poolmotor
¶
This module is part of the Python Pool libray. It defines the base classes for
Classes
PoolMotor¶

-
class
PoolMotor
(**kwargs)[source]¶ Bases:
sardana.pool.poolelement.PoolElement
An internal Motor object. NOT part of the official API. Accessing this object from a controller plug-in may lead to undetermined behavior like infinite recursion.
-
calculate_state_info
(state_info=None)[source]¶ Transforms the given state information. This specific base implementation transforms the given state,status tuple into a state, new_status tuple where new_status is “self.name is state plus the given status. It is assumed that the given status comes directly from the controller status information.
- Parameters
status_info (tuple<State, str>) – given status information [default: None, meaning use current state status.
- Returns
a transformed state information
- Return type
tuple<State, str>
-
inspect_limit_switches
()[source]¶ returns the current (cached value of the limit switches
- Returns
the current limit switches flags
-
get_limit_switches
(cache=True, propagate=1)[source]¶ Returns the motor limit switches state.
- Parameters
- Returns
the motor limit switches state
- Return type
-
property
limit_switches
¶ motor limit switches
-
property
instability_time
¶ motor instability time
-
property
backlash
¶ motor backlash
-
property
offset
¶ motor offset
-
property
sign
¶ motor sign
-
property
step_per_unit
¶ motor steps per unit
-
property
acceleration
¶ motor acceleration
-
property
deceleration
¶ motor deceleration
-
property
base_rate
¶ motor base rate
-
property
velocity
¶ motor velocity
-
get_position_attribute
()[source]¶ Returns the position attribute object for this motor
- Returns
the position attribute
- Return type
-
get_position
(cache=True, propagate=1)[source]¶ Returns the user position.
- Parameters
- Returns
the user position
- Return type
-
set_position
(position)[source]¶ Moves the motor to the specified user position
- Parameters
position (
Number
) – the user position to move to
-
set_write_position
(w_position, timestamp=None, propagate=1)[source]¶ Sets a new write value for the user position.
-
read_dial_position
()[source]¶ Reads the dial position from hardware.
- Returns
a
SardanaValue
containing the dial position- Return type
-
put_dial_position
(dial_position_value, propagate=1)[source]¶ Sets a new dial position.
- Parameters
dial_position_value (
SardanaValue
) – the new dial position valuepropagate (int) – 0 for not propagating, 1 to propagate, 2 propagate with priority
-
get_dial_position_attribute
()[source]¶ Returns the dial position attribute object for this motor
- Returns
the dial position attribute
- Return type
-
get_dial_position
(cache=True, propagate=1)[source]¶ Returns the dial position.
- Parameters
- Returns
the dial position
- Return type
-
property
position
¶ motor user position
-
property
dial_position
¶ motor dial position
-
property
motion
¶ motion object
-