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:
-
limit_switches
¶ motor limit switches
-
instability_time
¶ motor instability time
-
backlash
¶ motor backlash
-
offset
¶ motor offset
-
sign
¶ motor sign
-
step_per_unit
¶ motor steps per unit
-
acceleration
¶ motor acceleration
-
deceleration
¶ motor deceleration
-
base_rate
¶ motor base rate
-
velocity
¶ motor velocity
-
get_position_attribute
()[source]¶ Returns the position attribute object for this motor
Returns: the position attribute Return type: SardanaAttribute
-
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.
Parameters:
-
read_dial_position
()[source]¶ Reads the dial position from hardware.
Returns: a SardanaValue
containing the dial positionReturn type: SardanaValue
-
put_dial_position
(dial_position_value, propagate=1)[source]¶ Sets a new dial position.
Parameters: - dial_position_value (
SardanaValue
) – the new dial position value - propagate (int) – 0 for not propagating, 1 to propagate, 2 propagate with priority
- dial_position_value (
-
get_dial_position_attribute
()[source]¶ Returns the dial position attribute object for this motor
Returns: the dial position attribute Return type: SardanaAttribute
-
get_dial_position
(cache=True, propagate=1)[source]¶ Returns the dial position.
Parameters: Returns: the dial position
Return type:
-
position
¶ motor user position
-
dial_position
¶ motor dial position
-
motion
¶ motion object
-