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:
Index
pProperties
Properties
p
p
Methods
m
m
m
try await lockstep.getOffsets(unit = Units.native)Gets the initial offsets of secondary axes of an enabled lockstep group.
Arguments
| Name | Type | Description |
|---|---|---|
| unit | Units | Units of position. Uses primary axis unit conversion. |
Return Value
[Double] Initial offset for each axis of the lockstep group.m
try await lockstep.getPosition(unit = Units.native)Returns current position of the primary axis.
Arguments
| Name | Type | Description |
|---|---|---|
| unit | Units | Units of the position. |
Return Value
Double Primary axis position.m
try await lockstep.getTwists(unit = Units.native)Gets the twists of secondary axes of an enabled lockstep group.
Arguments
| Name | Type | Description |
|---|---|---|
| unit | Units | Units 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
m
m
m
m
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
| Name | Type | Description |
|---|---|---|
| position | Double | Absolute position. |
| unit | Units | Units of position. |
| waitUntilIdle | Bool | Determines whether function should return after the movement is finished or just started. |
| velocity | Double | Movement velocity. Default value of 0 indicates that the maxspeed setting is used instead. |
| velocityUnit | Units | Units of velocity. |
| acceleration | Double | Movement acceleration. Default value of 0 indicates that the accel setting is used instead. |
| accelerationUnit | Units | Units of acceleration. |
m
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
| Name | Type | Description |
|---|---|---|
| waitUntilIdle | Bool | Determines whether function should return after the movement is finished or just started. |
| velocity | Double | Movement velocity. Default value of 0 indicates that the maxspeed setting is used instead. |
| velocityUnit | Units | Units of velocity. |
| acceleration | Double | Movement acceleration. Default value of 0 indicates that the accel setting is used instead. |
| accelerationUnit | Units | Units of acceleration. |
m
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
| Name | Type | Description |
|---|---|---|
| waitUntilIdle | Bool | Determines whether function should return after the movement is finished or just started. |
| velocity | Double | Movement velocity. Default value of 0 indicates that the maxspeed setting is used instead. |
| velocityUnit | Units | Units of velocity. |
| acceleration | Double | Movement acceleration. Default value of 0 indicates that the accel setting is used instead. |
| accelerationUnit | Units | Units of acceleration. |
m
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
| Name | Type | Description |
|---|---|---|
| position | Double | Relative position. |
| unit | Units | Units of position. |
| waitUntilIdle | Bool | Determines whether function should return after the movement is finished or just started. |
| velocity | Double | Movement velocity. Default value of 0 indicates that the maxspeed setting is used instead. |
| velocityUnit | Units | Units of velocity. |
| acceleration | Double | Movement acceleration. Default value of 0 indicates that the accel setting is used instead. |
| accelerationUnit | Units | Units of acceleration. |
m
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
| Name | Type | Description |
|---|---|---|
| amplitude | Double | Amplitude of the sinusoidal motion (half of the motion's peak-to-peak range). |
| amplitudeUnits | Units | Units of position. |
| period | Double | Period of the sinusoidal motion in milliseconds. |
| periodUnits | Units | Units of time. |
| count | Double | Number 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. |
| waitUntilIdle | Bool | Determines whether function should return after the movement is finished or just started. |
m
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
| Name | Type | Description |
|---|---|---|
| waitUntilIdle | Bool | Determines whether function should return after the movement is finished. |
m
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
| Name | Type | Description |
|---|---|---|
| velocity | Double | Movement velocity. |
| unit | Units | Units of velocity. |
| acceleration | Double | Movement acceleration. Default value of 0 indicates that the accel setting is used instead. |
| accelerationUnit | Units | Units of acceleration. |
m
m
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
| Name | Type | Description |
|---|---|---|
| tolerance | Double | Twist tolerance. |
| unit | Units | Units of the tolerance. Uses primary axis unit conversion when setting to all axes, otherwise uses specified secondary axis unit conversion. |
| axisIndex | Int | Optional 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
m
m