API Reference v9.3.1
Moveableclass
Module: zaber_motion.movement
Represents something that moves: either an axis of a device, or a lockstep group.
The following examples illustrate how you can obtain an instance of this type:
Example 1
Example 2
Example 3
from zaber_motion.ascii import Connection
from zaber_motion.movement import Moveable
connection = Connection.open_serial_port('COM3')
device = connection.get_device(1)
axis = device.get_axis(1)
moveable = Moveable.from_axis(axis)from zaber_motion.ascii import Connection
from zaber_motion.movement import Moveable
connection = Connection.open_serial_port('COM3')
device = connection.get_device(1)
lockstep = device.get_lockstep(1)
moveable = Moveable.from_lockstep(lockstep)from zaber_motion.ascii import Connection
from zaber_motion.movement import Moveable
connection = Connection.open_serial_port('COM3')
device = connection.get_device(1)
moveable = Moveable.from_device(device)Index
pProperties
mMethods
Properties
p
Methods
m
m
moveable.driver_enable(timeout = 10)Attempts to enable the driver repeatedly for the specified timeout. If the driver is already enabled, the driver remains enabled.
Arguments
| Name | Type | Description |
|---|---|---|
| timeout | float | Timeout in seconds. Specify 0 to attempt to enable the driver once. |
s
Moveable.from_axis(axis, units = None)Creates a Moveable instance for a given axis.
Arguments
| Name | Type | Description |
|---|---|---|
| axis | Axis | Axis to create a Moveable for. |
| units | Optional[DefaultMotionUnits] | Default units of measurement used for movement operations. |
Return Value
Moveable A Moveable instance for the specified axis.s
Moveable.from_device(device, units = None)Creates a Moveable instance for a single-axis device.
Arguments
| Name | Type | Description |
|---|---|---|
| device | Device | Device to create a Moveable for. |
| units | Optional[DefaultMotionUnits] | Default units of measurement used for movement operations. |
Return Value
Moveable A Moveable instance for the specified device.s
Moveable.from_lockstep(lockstep, units = None)Creates a Moveable instance for a given lockstep group.
Arguments
| Name | Type | Description |
|---|---|---|
| lockstep | Lockstep | Lockstep group to create a Moveable for. |
| units | Optional[DefaultMotionUnits] | Default units of measurement used for movement operations. |
Return Value
Moveable A Moveable instance for the specified lockstep group.m
moveable.get_axis()Returns the axis this moveable represents. For a lockstep moveable, returns the primary axis of the lockstep group.
Return Value
Axis Axis this moveable is based on.m
moveable.get_encoder_position(unit = None)Returns the current encoder position of the moveable.
Arguments
| Name | Type | Description |
|---|---|---|
| unit | Optional[LengthUnits] | Units of position. If not specified, the default position unit is used. |
Return Value
float Current encoder position.m
moveable.get_limit_max(unit = None)Returns the maximum limit of the moveable.
Arguments
| Name | Type | Description |
|---|---|---|
| unit | Optional[LengthUnits] | Units of position. If not specified, the default position unit is used. |
Return Value
float Maximum limit.m
moveable.get_limit_min(unit = None)Returns the minimum limit of the moveable.
Arguments
| Name | Type | Description |
|---|---|---|
| unit | Optional[LengthUnits] | Units of position. If not specified, the default position unit is used. |
Return Value
float Minimum limit.m
moveable.get_lockstep()Returns the lockstep group this moveable represents, or null if it is not a lockstep moveable.
Return Value
Optional[Lockstep] Lockstep instance, or null if this is not a lockstep moveable.m
moveable.get_max_acceleration(accel_type = None, unit = None)Returns the maximum acceleration of the moveable. For a lockstep group, returns the lowest value across all axes.
Arguments
| Name | Type | Description |
|---|---|---|
| accel_type | Optional[AccelType] | Which acceleration ramp to return. Defaults to AccelDecel. |
| unit | Optional[AccelerationUnits] | Units of acceleration. If not specified, the default acceleration unit is used. |
Return Value
float Maximum acceleration.m
moveable.get_max_speed(unit = None)Returns the maximum speed that this moveable will execute moves at by default. If a different velocity is specified on a move command, that will override this value for that command only.
Arguments
| Name | Type | Description |
|---|---|---|
| unit | Optional[VelocityUnits] | Units of velocity. If not specified, the default velocity unit is used. |
Return Value
float Maximum speed.m
moveable.get_position(unit = None)Returns the current position of the moveable.
Arguments
| Name | Type | Description |
|---|---|---|
| unit | Optional[LengthUnits] | Units of position. If not specified, the default position unit is used. |
Return Value
float Current position.m
moveable.get_velocity(unit = None)Returns the current velocity of the moveable.
Arguments
| Name | Type | Description |
|---|---|---|
| unit | Optional[VelocityUnits] | Units of velocity. If not specified, the default velocity unit is used. |
Return Value
float Current velocity.m
m
m
m
m
moveable.move_absolute(position, velocity = None, acceleration = None, wait_until_idle = True, cyclic_direction = None, extra_cycles = None)Moves to an absolute position.
Arguments
| Name | Type | Description |
|---|---|---|
| position | MeasurementOrValue | Absolute position to move to. |
| velocity | Optional[MeasurementOrValue] | Movement velocity. If not specified, the maximum velocity setting is used. |
| acceleration | Optional[MeasurementOrValue] | Movement acceleration. If not specified, the default acceleration setting is used. |
| wait_until_idle | bool | Determines whether function should return after the movement is finished or just started. |
| cyclic_direction | Optional[CyclicDirection] | Which direction a cyclic device should take to get to the target position. |
| extra_cycles | Optional[int] | Number of extra cycles to complete before stopping at the target. |
m
moveable.move_max(velocity = None, acceleration = None, wait_until_idle = True)Moves to the end of travel.
Arguments
| Name | Type | Description |
|---|---|---|
| velocity | Optional[MeasurementOrValue] | Movement velocity. If not specified, the maximum velocity setting is used. |
| acceleration | Optional[MeasurementOrValue] | Movement acceleration. If not specified, the default acceleration setting is used. |
| wait_until_idle | bool | Determines whether function should return after the movement is finished or just started. |
m
moveable.move_min(velocity = None, acceleration = None, wait_until_idle = True)Moves to the beginning of travel.
Arguments
| Name | Type | Description |
|---|---|---|
| velocity | Optional[MeasurementOrValue] | Movement velocity. If not specified, the maximum velocity setting is used. |
| acceleration | Optional[MeasurementOrValue] | Movement acceleration. If not specified, the default acceleration setting is used. |
| wait_until_idle | bool | Determines whether function should return after the movement is finished or just started. |
m
moveable.move_relative(position, velocity = None, acceleration = None, wait_until_idle = True)Moves by a relative amount from the current position.
Arguments
| Name | Type | Description |
|---|---|---|
| position | MeasurementOrValue | Relative displacement to move by. |
| velocity | Optional[MeasurementOrValue] | Movement velocity. If not specified, the maximum velocity setting is used. |
| acceleration | Optional[MeasurementOrValue] | Movement acceleration. If not specified, the default acceleration setting is used. |
| wait_until_idle | bool | Determines whether function should return after the movement is finished or just started. |
m
moveable.move_sin(amplitude, period, count = 0, wait_until_idle = True)Moves the moveable in a sinusoidal trajectory.
Arguments
| Name | Type | Description |
|---|---|---|
| amplitude | MeasurementOrValue | Amplitude of the sinusoidal motion (half of the motion's peak-to-peak range). |
| period | MeasurementOrValue | Period of the sinusoidal motion. |
| count | float | Number of sinusoidal cycles to complete. Must be a multiple of 0.5. If count is not specified or set to 0, the moveable will move indefinitely. |
| wait_until_idle | bool | Determines whether function should return after the movement is finished or just started. |
m
moveable.move_sin_stop(wait_until_idle = True)Stops the moveable at the end of the sinusoidal trajectory. If the sinusoidal motion was started with an integer-plus-half cycle count, the motion ends at the half-way point of the sinusoidal trajectory.
Arguments
| Name | Type | Description |
|---|---|---|
| wait_until_idle | bool | Determines whether function should return after the movement is finished. |
m
moveable.move_velocity(velocity, acceleration = None, wait_until_idle = True)Begins moving at a specified velocity.
Arguments
| Name | Type | Description |
|---|---|---|
| velocity | MeasurementOrValue | Velocity to move at. |
| acceleration | Optional[MeasurementOrValue] | Movement acceleration. If not specified, the default acceleration setting is used. |
| wait_until_idle | bool | Determines whether function should return after the movement is finished or just started. |
m
moveable.set_max_acceleration(accel, accel_type = None)Sets the maximum acceleration of the moveable. For a lockstep group, sets the value on all axes.
Arguments
| Name | Type | Description |
|---|---|---|
| accel | MeasurementOrValue | Maximum acceleration to set. |
| accel_type | Optional[AccelType] | Which acceleration ramp to set. Defaults to AccelDecel. |
m
moveable.set_max_speed(speed)Sets the maximum speed of the moveable. For a lockstep group, sets the value on all axes.
Arguments
| Name | Type | Description |
|---|---|---|
| speed | MeasurementOrValue | Maximum speed to set. |
m