API Reference v9.2.0

AllAxesclass

Module: ZaberMotionAscii

Represents all axes of motion associated with a device.

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 allAxes = device.allAxes

Properties

p

device

readonly
allAxes.device
Device Device that controls this axis.

Methods

m

driverDisable()

asyncthrows
try await allAxes.driverDisable()
Disables all axes drivers, which prevents current from being sent to the motor or load.
m

driverEnable()

asyncthrows
try await allAxes.driverEnable(timeout = 10)
Attempts to enable all axes drivers (where applicable) repeatedly for the specified timeout. If the driver is already enabled, the driver remains enabled.
Arguments
NameTypeDescription
timeoutDoubleTimeout in seconds. Specify 0 to attempt to enable the driver once.
m

home()

asyncthrows
try await allAxes.home(waitUntilIdle = true)
Homes all axes. Axes return to their homing positions.
Arguments
NameTypeDescription
waitUntilIdleBoolDetermines whether function should return after the movement is finished or just started.
m

isBusy()

asyncthrows
try await allAxes.isBusy()
Returns bool indicating whether any axis is executing a motion command.
Return Value
Bool True if any axis is currently executing a motion command.
m

isHomed()

asyncthrows
try await allAxes.isHomed()
Returns bool indicating whether all axes have position reference and were homed.
Return Value
Bool True if all axes have position reference and were homed.
m

park()

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

stop()

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

toString()

throws
try allAxes.toString()
Returns a string that represents the axes.
Return Value
String A string that represents the axes.
m

unpark()

asyncthrows
try await allAxes.unpark()
Unparks the device. The device will now be able to move.
m

waitUntilIdle()

asyncthrows
try await allAxes.waitUntilIdle(throwErrorOnFault = true)
Waits until all axes of device stop moving.
Arguments
NameTypeDescription
throwErrorOnFaultBoolDetermines whether to throw error when fault is observed.