AbsoluteRotaryEncoder¶
- class AbsoluteRotaryEncoder(target: RotatingObject)¶
Bases:
SensorBaseAbsoluteRotaryEncoderobject.Attributes¶
targetRotatingObjectTarget rotating object whose angular position is probed by the sensor.
Methods¶
get_value()It gets the angular position of the
targetrotating object.
- get_value(unit: str | None = None) AngularPosition | float | int¶
It gets the angular position of the
targetrotating object.If a
unitis set, then it converts the angular position to that unit and returns only the numerical value as float or integer.Parameters¶
unitstr, optionalThe unit to which convert the
targetangular position. If specified, it converts the angular position and returns only the numerical value as float or integer, otherwise it returns anAngularPosition. Default isNone, so it returns anAngularPosition.
Returns¶
AngularPositionorfloatorintAngular position of the
targetrotating object.
Raises
TypeErrorIf
unitis not astr.
- property target: RotatingObject¶
Target rotating object whose angular position is probed by the sensor.
Returns¶
RotatingObjectTarget rotating object whose angular position is probed by the sensor.
Raises
TypeErrorIf
targetis not an instance ofRotatingObject.