API Reference v9.2.0

Lockstepclass

Module: ZaberMotionAscii

Represents a lockstep group with this ID on a device. A lockstep group is a movement synchronized pair of axes on a device. Requires at least Firmware 6.15 or 7.11.

The following example illustrates how you can obtain an instance of this type:

import ZaberMotionAscii

let connection = try await Connection.openSerialPort(portName: "COM3")
let device = try connection.getDevice(deviceAddress: 1)
let lockstep = try device.getLockstep(lockstepGroupId: 1)
Related Guides:

Properties

p

device

readonly
lockstep.device
Device Device that controls this lockstep group.
p

lockstepGroupId

readonly
lockstep.lockstepGroupId
Int The number that identifies the lockstep group on the device.

Methods

m

disable()

asyncthrows
try await lockstep.disable()
Disable the lockstep group.
m

enable()

asyncthrows
try await lockstep.enable(...axes)
Activate the lockstep group on the axes specified.
Arguments
NameTypeDescription
...axes[Int]The numbers of axes in the lockstep group.
m

getAxisNumbers()

asyncthrows
try await lockstep.getAxisNumbers()
Gets the axis numbers of the lockstep group.
Return Value
[Int] Axis numbers in order specified when enabling lockstep.
m

getOffsets()

asyncthrows
try await lockstep.getOffsets(unit = Units.native)
Gets the initial offsets of secondary axes of an enabled lockstep group.
Arguments
NameTypeDescription
unitUnitsUnits of position. Uses primary axis unit conversion.
Return Value
[Double] Initial offset for each axis of the lockstep group.
m

getPosition()

asyncthrows
try await lockstep.getPosition(unit = Units.native)
Returns current position of the primary axis.
Arguments
NameTypeDescription
unitUnitsUnits of the position.
Return Value
Double Primary axis position.
m

getTwists()

asyncthrows
try await lockstep.getTwists(unit = Units.native)
Gets the twists of secondary axes of an enabled lockstep group.
Arguments
NameTypeDescription
unitUnitsUnits of position. Uses primary axis unit conversion.
Return Value
[Double] Difference between the initial offset and the actual offset for each axis of the lockstep group.
m

home()

asyncthrows
try await lockstep.home(waitUntilIdle = true)
Retracts the axes of the lockstep group until a home associated with an individual axis is detected.
Arguments
NameTypeDescription
waitUntilIdleBoolDetermines whether function should return after the movement is finished or just started.
m

isBusy()

asyncthrows
try await lockstep.isBusy()
Returns bool indicating whether the lockstep group is executing a motion command.
Return Value
Bool True if the axes are currently executing a motion command.
m

isEnabled()

asyncthrows
try await lockstep.isEnabled()
Checks if the lockstep group is currently enabled on the device.
Return Value
Bool True if a lockstep group with this ID is enabled on the device.
m

isParked()

asyncthrows
try await lockstep.isParked()
Returns bool indicating whether the axis is parked or not.
Return Value
Bool True if lockstep group is parked.
m

moveAbsolute()

asyncthrows
try await lockstep.moveAbsolute(position, unit = Units.native, waitUntilIdle = true, velocity = 0, velocityUnit = Units.native, acceleration = 0, accelerationUnit = Units.native)
Move the first axis of the lockstep group to an absolute position. The other axes in the lockstep group maintain their offsets throughout movement.
Arguments
NameTypeDescription
positionDoubleAbsolute position.
unitUnitsUnits of position.
waitUntilIdleBoolDetermines whether function should return after the movement is finished or just started.
velocityDoubleMovement velocity. Default value of 0 indicates that the maxspeed setting is used instead.
velocityUnitUnitsUnits of velocity.
accelerationDoubleMovement acceleration. Default value of 0 indicates that the accel setting is used instead.
accelerationUnitUnitsUnits of acceleration.
m

moveMax()

asyncthrows
try await lockstep.moveMax(waitUntilIdle = true, velocity = 0, velocityUnit = Units.native, acceleration = 0, accelerationUnit = Units.native)
Moves the axes to the maximum valid position. The axes in the lockstep group maintain their offsets throughout movement. Respects lim.max for all axes in the group.
Arguments
NameTypeDescription
waitUntilIdleBoolDetermines whether function should return after the movement is finished or just started.
velocityDoubleMovement velocity. Default value of 0 indicates that the maxspeed setting is used instead.
velocityUnitUnitsUnits of velocity.
accelerationDoubleMovement acceleration. Default value of 0 indicates that the accel setting is used instead.
accelerationUnitUnitsUnits of acceleration.
m

moveMin()

asyncthrows
try await lockstep.moveMin(waitUntilIdle = true, velocity = 0, velocityUnit = Units.native, acceleration = 0, accelerationUnit = Units.native)
Moves the axes to the minimum valid position. The axes in the lockstep group maintain their offsets throughout movement. Respects lim.min for all axes in the group.
Arguments
NameTypeDescription
waitUntilIdleBoolDetermines whether function should return after the movement is finished or just started.
velocityDoubleMovement velocity. Default value of 0 indicates that the maxspeed setting is used instead.
velocityUnitUnitsUnits of velocity.
accelerationDoubleMovement acceleration. Default value of 0 indicates that the accel setting is used instead.
accelerationUnitUnitsUnits of acceleration.
m

moveRelative()

asyncthrows
try await lockstep.moveRelative(position, unit = Units.native, waitUntilIdle = true, velocity = 0, velocityUnit = Units.native, acceleration = 0, accelerationUnit = Units.native)
Move the first axis of the lockstep group to a position relative to its current position. The other axes in the lockstep group maintain their offsets throughout movement.
Arguments
NameTypeDescription
positionDoubleRelative position.
unitUnitsUnits of position.
waitUntilIdleBoolDetermines whether function should return after the movement is finished or just started.
velocityDoubleMovement velocity. Default value of 0 indicates that the maxspeed setting is used instead.
velocityUnitUnitsUnits of velocity.
accelerationDoubleMovement acceleration. Default value of 0 indicates that the accel setting is used instead.
accelerationUnitUnitsUnits of acceleration.
m

moveSin()

asyncthrows
try await lockstep.moveSin(amplitude, amplitudeUnits, period, periodUnits, count = 0, waitUntilIdle = true)
Moves the first axis of the lockstep group in a sinusoidal trajectory. The other axes in the lockstep group maintain their offsets throughout movement.
Arguments
NameTypeDescription
amplitudeDoubleAmplitude of the sinusoidal motion (half of the motion's peak-to-peak range).
amplitudeUnitsUnitsUnits of position.
periodDoublePeriod of the sinusoidal motion in milliseconds.
periodUnitsUnitsUnits of time.
countDoubleNumber of sinusoidal cycles to complete. Must be a multiple of 0.5 If count is not specified or set to 0, the axis will move indefinitely.
waitUntilIdleBoolDetermines whether function should return after the movement is finished or just started.
m

moveSinStop()

asyncthrows
try await lockstep.moveSinStop(waitUntilIdle = true)
Stops the lockstep group at the end of the sinusoidal trajectory for the first axis. 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
waitUntilIdleBoolDetermines whether function should return after the movement is finished.
m

moveVelocity()

asyncthrows
try await lockstep.moveVelocity(velocity, unit = Units.native, acceleration = 0, accelerationUnit = Units.native)
Moves the first axis of the lockstep group at the specified speed. The other axes in the lockstep group maintain their offsets throughout movement.
Arguments
NameTypeDescription
velocityDoubleMovement velocity.
unitUnitsUnits of velocity.
accelerationDoubleMovement acceleration. Default value of 0 indicates that the accel setting is used instead.
accelerationUnitUnitsUnits of acceleration.
m

park()

asyncthrows
try await lockstep.park()
Parks lockstep group in anticipation of turning the power off. It can later be powered on, unparked, and moved without first having to home it.
m

setTolerance()

asyncthrows
try await lockstep.setTolerance(tolerance, unit = Units.native, axisIndex = 0)
Sets lockstep twist tolerance. Twist tolerances that do not match the system configuration can reduce performance or damage the system.
Arguments
NameTypeDescription
toleranceDoubleTwist tolerance.
unitUnitsUnits of the tolerance. Uses primary axis unit conversion when setting to all axes, otherwise uses specified secondary axis unit conversion.
axisIndexIntOptional index of a secondary axis to set the tolerance for. If left empty or set to 0, the tolerance is set to all the secondary axes.
m

stop()

asyncthrows
try await lockstep.stop(waitUntilIdle = true)
Stops ongoing lockstep group movement. Decelerates until zero speed.
Arguments
NameTypeDescription
waitUntilIdleBoolDetermines whether function should return after the movement is finished or just started.
m

toString()

throws
try lockstep.toString()
Returns a string which represents the enabled lockstep group.
Return Value
String String which represents the enabled lockstep group.
m

unpark()

asyncthrows
try await lockstep.unpark()
Unparks lockstep group. Lockstep group will now be able to move.
m

waitUntilIdle()

asyncthrows
try await lockstep.waitUntilIdle(throwErrorOnFault = true)
Waits until the lockstep group stops moving.
Arguments
NameTypeDescription
throwErrorOnFaultBoolDetermines whether to throw error when fault is observed.