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)

Properties

p

device

readonly
moveable.device
Device The device this moveable is on.
p

moveable_id

readonly
moveable.moveable_id
int The identifier for the moveable instance.

Methods

m

driver_disable()

async available
moveable.driver_disable()
Disables the driver, which prevents current from being sent to the motor or load. If the driver is already disabled, the driver remains disabled.
m

driver_enable()

async available
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
NameTypeDescription
timeoutfloatTimeout in seconds. Specify 0 to attempt to enable the driver once.
s

from_axis()

async available
Moveable.from_axis(axis, units = None)
Creates a Moveable instance for a given axis.
Arguments
NameTypeDescription
axisAxisAxis to create a Moveable for.
unitsOptional[DefaultMotionUnits]Default units of measurement used for movement operations.
Return Value
Moveable A Moveable instance for the specified axis.
s

from_device()

async available
Moveable.from_device(device, units = None)
Creates a Moveable instance for a single-axis device.
Arguments
NameTypeDescription
deviceDeviceDevice to create a Moveable for.
unitsOptional[DefaultMotionUnits]Default units of measurement used for movement operations.
Return Value
Moveable A Moveable instance for the specified device.
s

from_lockstep()

async available
Moveable.from_lockstep(lockstep, units = None)
Creates a Moveable instance for a given lockstep group.
Arguments
NameTypeDescription
lockstepLockstepLockstep group to create a Moveable for.
unitsOptional[DefaultMotionUnits]Default units of measurement used for movement operations.
Return Value
Moveable A Moveable instance for the specified lockstep group.
m

get_axis()

async available
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

get_encoder_position()

async available
moveable.get_encoder_position(unit = None)
Returns the current encoder position of the moveable.
Arguments
NameTypeDescription
unitOptional[LengthUnits]Units of position. If not specified, the default position unit is used.
Return Value
float Current encoder position.
m

get_limit_max()

async available
moveable.get_limit_max(unit = None)
Returns the maximum limit of the moveable.
Arguments
NameTypeDescription
unitOptional[LengthUnits]Units of position. If not specified, the default position unit is used.
Return Value
float Maximum limit.
m

get_limit_min()

async available
moveable.get_limit_min(unit = None)
Returns the minimum limit of the moveable.
Arguments
NameTypeDescription
unitOptional[LengthUnits]Units of position. If not specified, the default position unit is used.
Return Value
float Minimum limit.
m

get_lockstep()

async available
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

get_max_acceleration()

async available
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
NameTypeDescription
accel_typeOptional[AccelType]Which acceleration ramp to return. Defaults to AccelDecel.
unitOptional[AccelerationUnits]Units of acceleration. If not specified, the default acceleration unit is used.
Return Value
float Maximum acceleration.
m

get_max_speed()

async available
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
NameTypeDescription
unitOptional[VelocityUnits]Units of velocity. If not specified, the default velocity unit is used.
Return Value
float Maximum speed.
m

get_position()

async available
moveable.get_position(unit = None)
Returns the current position of the moveable.
Arguments
NameTypeDescription
unitOptional[LengthUnits]Units of position. If not specified, the default position unit is used.
Return Value
float Current position.
m

get_velocity()

async available
moveable.get_velocity(unit = None)
Returns the current velocity of the moveable.
Arguments
NameTypeDescription
unitOptional[VelocityUnits]Units of velocity. If not specified, the default velocity unit is used.
Return Value
float Current velocity.
m

home()

async available
moveable.home(wait_until_idle = True)
Moves the moveable to the home position.
Arguments
NameTypeDescription
wait_until_idleboolDetermines whether function should return after the movement is finished or just started.
m

is_busy()

async available
moveable.is_busy()
Returns bool indicating whether the moveable is executing a motion command.
Return Value
bool True if the moveable is currently executing a motion command.
m

is_homed()

async available
moveable.is_homed()
Returns bool indicating whether the moveable has position reference and was homed.
Return Value
bool True if the moveable has position reference and was homed.
m

is_parked()

async available
moveable.is_parked()
Returns bool indicating whether the moveable is parked.
Return Value
bool True if the moveable is parked.
m

move_absolute()

async available
moveable.move_absolute(position, velocity = None, acceleration = None, wait_until_idle = True, cyclic_direction = None, extra_cycles = None)
Moves to an absolute position.
Arguments
NameTypeDescription
positionMeasurementOrValueAbsolute position to move to.
velocityOptional[MeasurementOrValue]Movement velocity. If not specified, the maximum velocity setting is used.
accelerationOptional[MeasurementOrValue]Movement acceleration. If not specified, the default acceleration setting is used.
wait_until_idleboolDetermines whether function should return after the movement is finished or just started.
cyclic_directionOptional[CyclicDirection]Which direction a cyclic device should take to get to the target position.
extra_cyclesOptional[int]Number of extra cycles to complete before stopping at the target.
m

move_max()

async available
moveable.move_max(velocity = None, acceleration = None, wait_until_idle = True)
Moves to the end of travel.
Arguments
NameTypeDescription
velocityOptional[MeasurementOrValue]Movement velocity. If not specified, the maximum velocity setting is used.
accelerationOptional[MeasurementOrValue]Movement acceleration. If not specified, the default acceleration setting is used.
wait_until_idleboolDetermines whether function should return after the movement is finished or just started.
m

move_min()

async available
moveable.move_min(velocity = None, acceleration = None, wait_until_idle = True)
Moves to the beginning of travel.
Arguments
NameTypeDescription
velocityOptional[MeasurementOrValue]Movement velocity. If not specified, the maximum velocity setting is used.
accelerationOptional[MeasurementOrValue]Movement acceleration. If not specified, the default acceleration setting is used.
wait_until_idleboolDetermines whether function should return after the movement is finished or just started.
m

move_relative()

async available
moveable.move_relative(position, velocity = None, acceleration = None, wait_until_idle = True)
Moves by a relative amount from the current position.
Arguments
NameTypeDescription
positionMeasurementOrValueRelative displacement to move by.
velocityOptional[MeasurementOrValue]Movement velocity. If not specified, the maximum velocity setting is used.
accelerationOptional[MeasurementOrValue]Movement acceleration. If not specified, the default acceleration setting is used.
wait_until_idleboolDetermines whether function should return after the movement is finished or just started.
m

move_sin()

async available
moveable.move_sin(amplitude, period, count = 0, wait_until_idle = True)
Moves the moveable in a sinusoidal trajectory.
Arguments
NameTypeDescription
amplitudeMeasurementOrValueAmplitude of the sinusoidal motion (half of the motion's peak-to-peak range).
periodMeasurementOrValuePeriod of the sinusoidal motion.
countfloatNumber 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_idleboolDetermines whether function should return after the movement is finished or just started.
m

move_sin_stop()

async available
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
NameTypeDescription
wait_until_idleboolDetermines whether function should return after the movement is finished.
m

move_velocity()

async available
moveable.move_velocity(velocity, acceleration = None, wait_until_idle = True)
Begins moving at a specified velocity.
Arguments
NameTypeDescription
velocityMeasurementOrValueVelocity to move at.
accelerationOptional[MeasurementOrValue]Movement acceleration. If not specified, the default acceleration setting is used.
wait_until_idleboolDetermines whether function should return after the movement is finished or just started.
m

park()

async available
moveable.park()
Parks the moveable.
m

set_max_acceleration()

async available
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
NameTypeDescription
accelMeasurementOrValueMaximum acceleration to set.
accel_typeOptional[AccelType]Which acceleration ramp to set. Defaults to AccelDecel.
m

set_max_speed()

async available
moveable.set_max_speed(speed)
Sets the maximum speed of the moveable. For a lockstep group, sets the value on all axes.
Arguments
NameTypeDescription
speedMeasurementOrValueMaximum speed to set.
m

stop()

async available
moveable.stop(wait_until_idle = True)
Stops ongoing movement of the moveable.
Arguments
NameTypeDescription
wait_until_idleboolDetermines whether function should return after the movement is finished or just started.
m

unpark()

async available
moveable.unpark()
Unparks the moveable.
m

wait_until_idle()

async available
moveable.wait_until_idle(throw_error_on_fault = True)
Waits until the moveable stops moving.
Arguments
NameTypeDescription
throw_error_on_faultboolDetermines whether to throw error when fault is observed.