Skip to content

Matlab

AllAxes

Represents all axes of motion associated with a device.

To use this type, add import zaber.motion.ascii.AllAxes; at the top of your source code.

device

P

allAxes.getDevice()

Device Device that controls this axis.

home()

Async M

allAxes.home(waitUntilIdle)
allAxes.home()

Homes all axes. Axes return to their homing positions.

Arguments

Name Type Description
waitUntilIdle logical Determines whether function should return after the movement is finished or just started.

isBusy()

Async M

allAxes.isBusy()

Returns bool indicating whether any axis is executing a motion command.

Arguments

No arguments

Return Value

logical True if any axis is currently executing a motion command.

stop()

Async M

allAxes.stop(waitUntilIdle)
allAxes.stop()

Stops ongoing axes movement. Decelerates until zero speed.

Arguments

Name Type Description
waitUntilIdle logical Determines whether function should return after the movement is finished or just started.

toString()

M

allAxes.toString()

Returns a string that represents the axes.

Arguments

No arguments

Return Value

char A string that represents the axes.

waitUntilIdle()

Async M

allAxes.waitUntilIdle(throwErrorOnFault)
allAxes.waitUntilIdle()

Waits until all axes of device stop moving.

Arguments

Name Type Description
throwErrorOnFault logical Determines whether to throw error when fault is observed.

Axis

Represents an axis of motion associated with a device.

To use this type, add import zaber.motion.ascii.Axis; at the top of your source code.

axisNumber

P

axis.getAxisNumber()

int32 The axis number identifies the axis on the device. The first axis has the number one.

axisType

P

axis.getAxisType()

AxisType Determines the type of an axis and units it accepts.

device

P

axis.getDevice()

Device Device that controls this axis.

identity

P

axis.getIdentity()

AxisIdentity Identity of the axis.

isPeripheral

P

axis.getIsPeripheral()

logical Indicates whether the axis is a peripheral or part of an integrated device.

peripheralId

P

axis.getPeripheralId()

int32 Unique ID of the peripheral hardware.

peripheralName

P

axis.getPeripheralName()

char Name of the peripheral.

settings

P

axis.getSettings()

AxisSettings Settings and properties of this axis.

warnings

P

axis.getWarnings()

Warnings Warnings and faults of this axis.

genericCommand()

Async M

axis.genericCommand(command, checkErrors)
axis.genericCommand(command)

Sends a generic ASCII command to this axis. For more information refer to: ASCII Protocol Manual.

Arguments

Name Type Description
command char Command to send.
checkErrors logical Controls whether to throw an exception when the device rejects the command.

Return Value

Response A response to the command.

genericCommandMultiResponse()

Async M

axis.genericCommandMultiResponse(command, checkErrors)
axis.genericCommandMultiResponse(command)

Sends a generic ASCII command to this axis and expect multiple responses. Responses are returned in order of arrival. For more information refer to: ASCII Protocol Manual.

Arguments

Name Type Description
command char Command to send.
checkErrors logical Controls whether to throw an exception when a device rejects the command.

Return Value

Response[] All responses to the command.

genericCommandNoResponse()

Async M

axis.genericCommandNoResponse(command)

Sends a generic ASCII command to this axis without expecting a response and without adding a message ID For more information refer to: ASCII Protocol Manual.

Arguments

Name Type Description
command char Command to send.

getPosition()

Async M

axis.getPosition(unit)
axis.getPosition()

Returns current axis position.

Arguments

Name Type Description
unit Units Units of position.

Return Value

double Axis position.

home()

Async M

axis.home(waitUntilIdle)
axis.home()

Homes axis. Axis returns to its homing position.

Arguments

Name Type Description
waitUntilIdle logical Determines whether function should return after the movement is finished or just started.

isBusy()

Async M

axis.isBusy()

Returns bool indicating whether the axis is executing a motion command.

Arguments

No arguments

Return Value

logical True if the axis is currently executing a motion command.

moveAbsolute()

Async M

axis.moveAbsolute(position, unit, waitUntilIdle)
axis.moveAbsolute(position, unit)
axis.moveAbsolute(position)

Move axis to absolute position.

Arguments

Name Type Description
position double Absolute position.
unit Units Units of position.
waitUntilIdle logical Determines whether function should return after the movement is finished or just started.

moveRelative()

Async M

axis.moveRelative(position, unit, waitUntilIdle)
axis.moveRelative(position, unit)
axis.moveRelative(position)

Move axis to position relative to current position.

Arguments

Name Type Description
position double Relative position.
unit Units Units of position.
waitUntilIdle logical Determines whether function should return after the movement is finished or just started.

moveVelocity()

Async M

axis.moveVelocity(velocity, unit)
axis.moveVelocity(velocity)

Begins to move axis at specified speed.

Arguments

Name Type Description
velocity double Movement velocity.
unit Units Units of velocity.

prepareCommand()

M

axis.prepareCommand(commandTemplate, ...parameters)

Formats parameters into a command and performs unit conversions. Parameters in the command template are denoted by a question mark. Command returned is only valid for this axis and this device. For more information refer to: ASCII Protocol Manual.

Arguments

Name Type Description
commandTemplate char Template of a command to prepare. Parameters are denoted by question marks.
...parameters Measurement Variable number of command parameters.

Return Value

char Command with converted parameters.

stop()

Async M

axis.stop(waitUntilIdle)
axis.stop()

Stops ongoing axis movement. Decelerates until zero speed.

Arguments

Name Type Description
waitUntilIdle logical Determines whether function should return after the movement is finished or just started.

toString()

M

axis.toString()

Returns a string that represents the axis.

Arguments

No arguments

Return Value

char A string that represents the axis.

waitUntilIdle()

Async M

axis.waitUntilIdle(throwErrorOnFault)
axis.waitUntilIdle()

Waits until axis stops moving.

Arguments

Name Type Description
throwErrorOnFault logical Determines whether to throw error when fault is observed.

AxisIdentity

Representation of data gathered during axis identification.

To use this type, add import zaber.motion.ascii.AxisIdentity; at the top of your source code.

axisType

P

axisIdentity.getAxisType()

AxisType Determines the type of an axis and units it accepts.

isPeripheral

P

axisIdentity.getIsPeripheral()

logical Indicates whether the axis is a peripheral or part of an integrated device.

peripheralId

P

axisIdentity.getPeripheralId()

int32 Unique ID of the peripheral hardware.

peripheralName

P

axisIdentity.getPeripheralName()

char Name of the peripheral.

AxisSettings

Class providing access to various axis settings and properties.

To use this type, add import zaber.motion.ascii.AxisSettings; at the top of your source code.

convertFromNativeUnits()

M

axisSettings.convertFromNativeUnits(setting, value, unit)

Convert arbitrary setting value from Zaber native units.

Arguments

Name Type Description
setting char Name of the setting.
value double Value of the setting in Zaber native units.
unit Units Units to convert value to.

Return Value

double Setting value.

convertToNativeUnits()

M

axisSettings.convertToNativeUnits(setting, value, unit)

Convert arbitrary setting value to Zaber native units.

Arguments

Name Type Description
setting char Name of the setting.
value double Value of the setting in units specified by following argument.
unit Units Units of the value.

Return Value

double Setting value.

get()

Async M

axisSettings.get(setting, unit)
axisSettings.get(setting)

Returns any axis setting or property.

Arguments

Name Type Description
setting char Name of the setting.
unit Units Units of setting.

Return Value

double Setting value.

set()

Async M

axisSettings.set(setting, value, unit)
axisSettings.set(setting, value)

Sets any axis setting.

Arguments

Name Type Description
setting char Name of the setting.
value double Value of the setting.
unit Units Units of setting.

AxisType

Denotes type of an axis and units it accepts.

To use this type, add import zaber.motion.ascii.AxisType; at the top of your source code.

Values
AxisType.LINEAR
AxisType.ROTARY
AxisType.UNKNOWN

Connection

Class representing access to particular connection (serial port, TCP connection).

To use this type, add import zaber.motion.ascii.Connection; at the top of your source code.

interfaceId

P

connection.getInterfaceId()

int32 The interface ID identifies this Connection instance with the underlying library.

close()

Async M

connection.close()

Close the connection.

Arguments

No arguments

detectDevices()

Async M

connection.detectDevices(identifyDevices)
connection.detectDevices()

Attempts to detect any devices present on this connection.

Arguments

Name Type Description
identifyDevices logical Determines whether device identification should be performed as well.

Return Value

Device[] Array of detected devices.

genericCommand()

Async M

connection.genericCommand(command, device, axis, checkErrors)
connection.genericCommand(command, device, axis)
connection.genericCommand(command, device)
connection.genericCommand(command)

Sends a generic ASCII command to this connection. For more information refer to the ASCII Protocol Manual.

Arguments

Name Type Description
command char Command to send.
device int32 Optional device address to send the command to.
axis int32 Optional axis number to send the command to.
checkErrors logical Controls whether to throw an exception when the device rejects the command.

Return Value

Response A response to the command.

genericCommandMultiResponse()

Async M

connection.genericCommandMultiResponse(command, device, axis, checkErrors)
connection.genericCommandMultiResponse(command, device, axis)
connection.genericCommandMultiResponse(command, device)
connection.genericCommandMultiResponse(command)

Sends a generic ASCII command to this connection and expect multiple responses, either from one device or from many devices. Responses are returned in order of arrival. For more information refer to the ASCII Protocol Manual.

Arguments

Name Type Description
command char Command to send.
device int32 Optional device address to send the command to.
axis int32 Optional axis number to send the command to.
checkErrors logical Controls whether to throw an exception when a device rejects the command.

Return Value

Response[] All responses to the command.

genericCommandNoResponse()

Async M

connection.genericCommandNoResponse(command, device, axis)
connection.genericCommandNoResponse(command, device)
connection.genericCommandNoResponse(command)

Sends a generic ASCII command to this connection without expecting a response and without adding a message ID. For more information refer to the ASCII Protocol Manual.

Arguments

Name Type Description
command char Command to send.
device int32 Optional device address to send the command to.
axis int32 Optional axis number to send the command to.

getDevice()

M

connection.getDevice(deviceAddress)

Gets a Device class instance which allows you to control a particular device on this connection.

Arguments

Name Type Description
deviceAddress int32 Address of device intended to control. Address is configured for each device.

Return Value

Device Device instance.

openSerialPort()

Async S

Connection.openSerialPort(portName, baudRate)
Connection.openSerialPort(portName)

Opens a serial port.

Arguments

Name Type Description
portName char Name of the port to open.
baudRate int32 Optional baud rate (defaults to 115200).

Return Value

Connection An object representing the port.

openTcp()

Async S

Connection.openTcp(hostName, port)

Opens a TCP connection.

Arguments

Name Type Description
hostName char Hostname or IP address.
port int32 Port number.

Return Value

Connection An object representing the connection.

renumberDevices()

Async M

connection.renumberDevices(firstAddress)
connection.renumberDevices()

Renumbers devices present on this connection. After renumbering, devices need to be identified again.

Arguments

Name Type Description
firstAddress int32 This is the address that the device closest to the computer is given. Remaining devices are numbered consecutively.

Return Value

int32 Total number of devices that responded to the renumber.

toString()

M

connection.toString()

Returns a string that represents the connection.

Arguments

No arguments

Return Value

char A string that represents the connection.

Device

Represents the controller part of one device - may be either a standalone controller or an integrated controller.

To use this type, add import zaber.motion.ascii.Device; at the top of your source code.

allAxes

P

device.getAllAxes()

AllAxes Virtual axis which allows you to target all axes of this device.

axisCount

P

device.getAxisCount()

int32 Number of axes this device has.

connection

P

device.getConnection()

Connection Connection of this device.

deviceAddress

P

device.getDeviceAddress()

int32 The device address uniquely identifies the device on the connection. It can be configured or automatically assigned by the renumber command.

deviceId

P

device.getDeviceId()

int32 Unique ID of the device hardware.

firmwareVersion

P

device.getFirmwareVersion()

FirmwareVersion Version of the firmware.

identity

P

device.getIdentity()

DeviceIdentity Identity of the device.

io

P

device.getIo()

DeviceIO I/O channels of this device.

name

P

device.getName()

char Name of the product.

serialNumber

P

device.getSerialNumber()

int64 Serial number of the device.

settings

P

device.getSettings()

DeviceSettings Settings and properties of this device.

warnings

P

device.getWarnings()

Warnings Warnings and faults of this device and all its axes.

genericCommand()

Async M

device.genericCommand(command, axis, checkErrors)
device.genericCommand(command, axis)
device.genericCommand(command)

Sends a generic ASCII command to this device. For more information refer to: ASCII Protocol Manual.

Arguments

Name Type Description
command char Command to send.
axis int32 Optional axis number to send the command to.
checkErrors logical Controls whether to throw an exception when the device rejects the command.

Return Value

Response A response to the command.

genericCommandMultiResponse()

Async M

device.genericCommandMultiResponse(command, axis, checkErrors)
device.genericCommandMultiResponse(command, axis)
device.genericCommandMultiResponse(command)

Sends a generic ASCII command to this device and expect multiple responses. Responses are returned in order of arrival. For more information refer to: ASCII Protocol Manual.

Arguments

Name Type Description
command char Command to send.
axis int32 Optional axis number to send the command to.
checkErrors logical Controls whether to throw an exception when a device rejects the command.

Return Value

Response[] All responses to the command.

genericCommandNoResponse()

Async M

device.genericCommandNoResponse(command, axis)
device.genericCommandNoResponse(command)

Sends a generic ASCII command to this device without expecting a response and without adding a message ID For more information refer to: ASCII Protocol Manual.

Arguments

Name Type Description
command char Command to send.
axis int32 Optional axis number to send the command to.

getAxis()

M

device.getAxis(axisNumber)

Gets an Axis class instance which allows you to control a particular axis on this device.

Arguments

Name Type Description
axisNumber int32 Number of axis intended to control.

Return Value

Axis Axis instance.

getLockstep()

M

device.getLockstep(lockstepGroupId)

Gets a Lockstep class instance which allows you to control a particular lockstep group on the device.

Arguments

Name Type Description
lockstepGroupId int32 The ID of the lockstep group to control. Lockstep group IDs start at one.

Return Value

Lockstep Lockstep instance.

identify()

Async M

device.identify()

Queries the device and the database, gathering information about the product. Without this information features such as unit conversions will not work. Usually, called automatically by detect devices method.

Arguments

No arguments

Return Value

DeviceIdentity Device identification data.

toString()

M

device.toString()

Returns a string that represents the device.

Arguments

No arguments

Return Value

char A string that represents the device.

DeviceDbSourceType

Type of source of Device DB data.

To use this type, add import zaber.motion.DeviceDbSourceType; at the top of your source code.

Values
DeviceDbSourceType.FILE
DeviceDbSourceType.WEB_SERVICE

DeviceIdentity

Representation of data gathered during device identification.

To use this type, add import zaber.motion.ascii.DeviceIdentity; at the top of your source code.

axisCount

P

deviceIdentity.getAxisCount()

int32 Number of axes this device has.

deviceId

P

deviceIdentity.getDeviceId()

int32 Unique ID of the device hardware.

firmwareVersion

P

deviceIdentity.getFirmwareVersion()

FirmwareVersion Version of the firmware.

name

P

deviceIdentity.getName()

char Name of the product.

serialNumber

P

deviceIdentity.getSerialNumber()

int64 Serial number of the device.

DeviceIO

Class providing access to the I/O channels of the device.

To use this type, add import zaber.motion.ascii.DeviceIO; at the top of your source code.

getAllAnalogInputs()

Async M

deviceIO.getAllAnalogInputs()

Returns the current values of all analog input channels.

Arguments

No arguments

Return Value

double[] Measurements of the voltage present on the input channels.

getAllAnalogOutputs()

Async M

deviceIO.getAllAnalogOutputs()

Returns the current values of all analog output channels.

Arguments

No arguments

Return Value

double[] Measurements of voltage that the output channels are conducting.

getAllDigitalInputs()

Async M

deviceIO.getAllDigitalInputs()

Returns the current values of all digital input channels.

Arguments

No arguments

Return Value

logical[] True if voltage is present on the input channel and false otherwise.

getAllDigitalOutputs()

Async M

deviceIO.getAllDigitalOutputs()

Returns the current values of all digital output channels.

Arguments

No arguments

Return Value

logical[] True if the output channel is conducting and false otherwise.

getAnalogInput()

Async M

deviceIO.getAnalogInput(channelNumber)

Returns the current value of the specified analog input channel.

Arguments

Name Type Description
channelNumber int32 Channel number starting at 1.

Return Value

double A measurementsof the voltage present on the input channel.

getAnalogOutput()

Async M

deviceIO.getAnalogOutput(channelNumber)

Returns the current values of the specified analog output channel.

Arguments

Name Type Description
channelNumber int32 Channel number starting at 1.

Return Value

double A measurement of voltage that the output channel is conducting.

getChannelsInfo()

Async M

deviceIO.getChannelsInfo()

Returns the number of I/O channels the device has.

Arguments

No arguments

Return Value

DeviceIOInfo An object containing the number of I/O channels the device has.

getDigitalInput()

Async M

deviceIO.getDigitalInput(channelNumber)

Returns the current value of the specified digital input channel.

Arguments

Name Type Description
channelNumber int32 Channel number starting at 1.

Return Value

logical True if voltage is present on the input channel and false otherwise.

getDigitalOutput()

Async M

deviceIO.getDigitalOutput(channelNumber)

Returns the current value of the specified digital output channel.

Arguments

Name Type Description
channelNumber int32 Channel number starting at 1.

Return Value

logical True if the output channel is conducting and false otherwise.

setAllDigitalOutputs()

Async M

deviceIO.setAllDigitalOutputs(values)

Sets values for all digital output channels.

Arguments

Name Type Description
values logical[] True to set the output channel to conducting and false to turn it off.

setDigitalOutput()

Async M

deviceIO.setDigitalOutput(channelNumber, value)

Sets value for the specified digital output channel.

Arguments

Name Type Description
channelNumber int32 Channel number starting at 1.
value logical True to set the output channel to conducting and false to turn it off.

DeviceIOInfo

Class representing information on the I/O channels of the device.

To use this type, add import zaber.motion.ascii.DeviceIOInfo; at the top of your source code.

numberAnalogInputs

P

deviceIOInfo.getNumberAnalogInputs()

int32 Number of analog input channels.

numberAnalogOutputs

P

deviceIOInfo.getNumberAnalogOutputs()

int32 Number of analog output channels.

numberDigitalInputs

P

deviceIOInfo.getNumberDigitalInputs()

int32 Number of digital input channels.

numberDigitalOutputs

P

deviceIOInfo.getNumberDigitalOutputs()

int32 Number of digital output channels.

FirmwareVersion

Class representing version of firmware in the controller.

To use this type, add import zaber.motion.FirmwareVersion; at the top of your source code.

build

P

firmwareVersion.getBuild()

int32 Build version number.

major

P

firmwareVersion.getMajor()

int32 Major version number.

minor

P

firmwareVersion.getMinor()

int32 Minor version number.

Library

Access class to general library information and configuration.

To use this type, add import zaber.motion.Library; at the top of your source code.

setDeviceDbSource()

S

Library.setDeviceDbSource(sourceType, urlOrFilePath)
Library.setDeviceDbSource(sourceType)

Sets source of Device DB data. Allows selection of a web service or a local file.

Arguments

Name Type Description
sourceType DeviceDbSourceType Source type.
urlOrFilePath char URL of the web service or path to the local file. Leave empty for the default URL of Zaber web service.

setLogOutput()

S

Library.setLogOutput(mode, filePath)
Library.setLogOutput(mode)

Sets library logging output.

Arguments

Name Type Description
mode LogOutputMode Logging output mode.
filePath char Path of the file to open.

toggleDeviceDbStore()

S

Library.toggleDeviceDbStore(toggleOn, storeLocation)
Library.toggleDeviceDbStore(toggleOn)

Toggles Device DB store. The store uses filesystem to save information obtained from Device DB. The stored data are later used instead of the Device DB.

Arguments

Name Type Description
toggleOn logical True to turn on, false to turn off.
storeLocation char Specifies relative or absolute path of the folder used by the store. Must be accessible by the process.

Lockstep

Represents a lockstep group with this ID on a device. A lockstep group is a movement synchronized pair of axes on a device.

To use this type, add import zaber.motion.ascii.Lockstep; at the top of your source code.

device

P

lockstep.getDevice()

Device Device that controls this lockstep group.

lockstepGroupId

P

lockstep.getLockstepGroupId()

int32 The number that identifies the lockstep group on the device.

disable()

Async M

lockstep.disable()

Disable the lockstep group.

Arguments

No arguments

enable()

Async M

lockstep.enable(axis1, axis2)

Activate the lockstep group on the two axes specified.

Arguments

Name Type Description
axis1 int32 The number of the first axis in the lockstep group.
axis2 int32 The number of the second axis in the lockstep group.

getAxes()

Async M

lockstep.getAxes()

Gets the axes of the lockstep group.

Arguments

No arguments

Return Value

LockstepAxes LockstepAxes instance which contains both the axis numbers of the lockstep group.

getOffset()

Async M

lockstep.getOffset(unit)
lockstep.getOffset()

Gets the initial offset of an enabled lockstep group.

Arguments

Name Type Description
unit Units Units of position.

Return Value

double Initial offset of the lockstep group.

getTwist()

Async M

lockstep.getTwist(unit)
lockstep.getTwist()

Gets the twist of an enabled lockstep group.

Arguments

Name Type Description
unit Units Units of position.

Return Value

double Difference between the initial offset and the actual offset of the lockstep group.

home()

Async M

lockstep.home(waitUntilIdle)
lockstep.home()

Retracts the axes of the lockstep group until a home associated with an individual axis is detected.

Arguments

Name Type Description
waitUntilIdle logical Determines whether function should return after the movement is finished or just started.

isBusy()

Async M

lockstep.isBusy()

Returns bool indicating whether the lockstep group is executing a motion command.

Arguments

No arguments

Return Value

logical True if the axis is currently executing a motion command.

isEnabled()

Async M

lockstep.isEnabled()

Checks if the lockstep group is currently enabled on the device.

Arguments

No arguments

Return Value

logical True if a lockstep group with this ID is enabled on the device.

moveAbsolute()

Async M

lockstep.moveAbsolute(position, unit, waitUntilIdle)
lockstep.moveAbsolute(position, unit)
lockstep.moveAbsolute(position)

Move the first axis of the lockstep group to an absolute position. The other axis in the lockstep group maintains its offset throughout movement.

Arguments

Name Type Description
position double Absolute position.
unit Units Units of position.
waitUntilIdle logical Determines whether function should return after the movement is finished or just started.

moveRelative()

Async M

lockstep.moveRelative(position, unit, waitUntilIdle)
lockstep.moveRelative(position, unit)
lockstep.moveRelative(position)

Move the first axis of the lockstep group to a position relative to its current positoin. The other axis in the lockstep group maintains its offset throughout movement.

Arguments

Name Type Description
position double Relative position.
unit Units Units of position.
waitUntilIdle logical Determines whether function should return after the movement is finished or just started.

moveVelocity()

Async M

lockstep.moveVelocity(velocity, unit)
lockstep.moveVelocity(velocity)

Moves the first axis of the lockstep group at the specified speed. The other axis in the lockstep group maintains its offset throughout movement.

Arguments

Name Type Description
velocity double Movement velocity.
unit Units Units of velocity.

stop()

Async M

lockstep.stop(waitUntilIdle)
lockstep.stop()

Stops ongoing lockstep group movement. Decelerates until zero speed.

Arguments

Name Type Description
waitUntilIdle logical Determines whether function should return after the movement is finished or just started.

toString()

M

lockstep.toString()

Returns a string which represents the enabled lockstep group.

Arguments

No arguments

Return Value

char String which represents the enabled lockstep group.

waitUntilIdle()

Async M

lockstep.waitUntilIdle(throwErrorOnFault)
lockstep.waitUntilIdle()

Waits until the lockstep group stops moving.

Arguments

Name Type Description
throwErrorOnFault logical Determines whether to throw error when fault is observed.

LockstepAxes

The axis numbers of a lockstep group.

To use this type, add import zaber.motion.ascii.LockstepAxes; at the top of your source code.

axis1

P

lockstepAxes.getAxis1()

int32 The axis number used to set the first axis.

axis2

P

lockstepAxes.getAxis2()

int32 The axis number used to set the second axis.

LogOutputMode

Mode of logging output of the library.

To use this type, add import zaber.motion.LogOutputMode; at the top of your source code.

Values
LogOutputMode.FILE
LogOutputMode.OFF
LogOutputMode.STDERR
LogOutputMode.STDOUT

Measurement

Represents a numerical value with optional units specified.

To use this type, add import zaber.motion.Measurement; at the top of your source code.

unit

P

measurement.getUnit()

Units Optional units of the measurement.

value

P

measurement.getValue()

double Value of the measurement.

MessageType

Denotes type of the response message. For more information refer to: ASCII Protocol Manual.

To use this type, add import zaber.motion.ascii.MessageType; at the top of your source code.

Values
MessageType.ALERT
MessageType.INFO
MessageType.REPLY

Exceptions

MotionLibException

Exception originating in the library.

To use this type, add import zaber.motion.MotionLibException; at the top of your source code.

message

P

motionLibException.getMessage()

char Error message of the exception.

toString()

M

motionLibException.toString()

Returns a string that represents the exception.

Arguments

No arguments

Return Value

char A string that represents the exception.

Below are the subclasses of MotionLibException:

Exceptions
BinaryCommandFailedException
BinaryErrorException
CommandFailedException
CommandPreemptedException
ConnectionClosedException
ConnectionFailedException
ConversionFailedException
DeviceAddressConflictException
DeviceDbFailedException
DeviceFailedException
DeviceNotIdentifiedException
InternalErrorException
InvalidArgumentException
InvalidDataException
InvalidPacketException
InvalidResponseException
IoChannelOutOfRangeException
IoFailedException
LockstepEnabledException
LockstepNotEnabledException
MovementFailedException
MovementInterruptedException
NoDeviceFoundException
NotSupportedException
OsFailedException
OutOfRequestIdsException
RequestTimeoutException
SettingNotFoundException
UnknownRequestException

Response

Response message from the device.

To use this type, add import zaber.motion.ascii.Response; at the top of your source code.

axisNumber

P

response.getAxisNumber()

int32 Number of the axis which the response applies to. Zero denotes device scope.

data

P

response.getData()

char Response data which varies depending on the request.

deviceAddress

P

response.getDeviceAddress()

int32 Number of the device that sent the message.

messageType

P

response.getMessageType()

MessageType Type of the reply received.

replyFlag

P

response.getReplyFlag()

char The reply flag indicates if the request was accepted (OK) or rejected (RJ).

status

P

response.getStatus()

char The device status contains BUSY when the axis is moving and IDLE otherwise.

warningFlag

P

response.getWarningFlag()

char The warning flag contains the highest priority warning currently active for the device or axis.

SettingConstants

Named constants for all Zaber ASCII protocol settings. For more information please refer to the ASCII Protocol Manual.

To use this type, add import zaber.motion.ascii.SettingConstants; at the top of your source code.

Constant Value
SettingConstants.ACCEL accel
SettingConstants.CALIBRATION_TYPE calibration.type
SettingConstants.CLOOP_CONTINUOUS_ENABLE cloop.continuous.enable
SettingConstants.CLOOP_COUNTS cloop.counts
SettingConstants.CLOOP_DISPLACE_TOLERANCE cloop.displace.tolerance
SettingConstants.CLOOP_DURATION_MAX cloop.duration.max
SettingConstants.CLOOP_ENABLE cloop.enable
SettingConstants.CLOOP_MODE cloop.mode
SettingConstants.CLOOP_RECOVERY_ENABLE cloop.recovery.enable
SettingConstants.CLOOP_SETTLE_PERIOD cloop.settle.period
SettingConstants.CLOOP_SETTLE_TOLERANCE cloop.settle.tolerance
SettingConstants.CLOOP_STALLTIMEOUT cloop.stalltimeout
SettingConstants.CLOOP_STEPS cloop.steps
SettingConstants.CLOOP_TIMEOUT cloop.timeout
SettingConstants.COMM_ADDRESS comm.address
SettingConstants.COMM_ALERT comm.alert
SettingConstants.COMM_CHECKSUM comm.checksum
SettingConstants.COMM_PROTOCOL comm.protocol
SettingConstants.COMM_RS_232_BAUD comm.rs232.baud
SettingConstants.COMM_RS_232_PROTOCOL comm.rs232.protocol
SettingConstants.COMM_RS_485_BAUD comm.rs485.baud
SettingConstants.COMM_RS_485_ENABLE comm.rs485.enable
SettingConstants.COMM_RS_485_PROTOCOL comm.rs485.protocol
SettingConstants.COMM_USB_PROTOCOL comm.usb.protocol
SettingConstants.DEVICEID deviceid
SettingConstants.DRIVER_CURRENT_HOLD driver.current.hold
SettingConstants.DRIVER_CURRENT_MAX driver.current.max
SettingConstants.DRIVER_CURRENT_RUN driver.current.run
SettingConstants.DRIVER_CURRENT_SERVO driver.current.servo
SettingConstants.DRIVER_DIR driver.dir
SettingConstants.DRIVER_ENABLED driver.enabled
SettingConstants.DRIVER_TEMPERATURE driver.temperature
SettingConstants.ENCODER_COUNT encoder.count
SettingConstants.ENCODER_COUNT_CAL encoder.count.cal
SettingConstants.ENCODER_COUNT_CALIBRATED encoder.count.calibrated
SettingConstants.ENCODER_COUNTH encoder.counth
SettingConstants.ENCODER_DIR encoder.dir
SettingConstants.ENCODER_ERROR encoder.error
SettingConstants.ENCODER_FAULT_TYPE encoder.fault.type
SettingConstants.ENCODER_FILTER encoder.filter
SettingConstants.ENCODER_INDEX_COUNT encoder.index.count
SettingConstants.ENCODER_INDEX_MODE encoder.index.mode
SettingConstants.ENCODER_INDEX_PHASE encoder.index.phase
SettingConstants.ENCODER_MODE encoder.mode
SettingConstants.ENCODER_POS encoder.pos
SettingConstants.ENCODER_POS_ERROR encoder.pos.error
SettingConstants.FILTER_HOLDERID filter.holderid
SettingConstants.FORCE_AVERAGE force.average
SettingConstants.JOY_DEBUG joy.debug
SettingConstants.KNOB_DIR knob.dir
SettingConstants.KNOB_DISTANCE knob.distance
SettingConstants.KNOB_ENABLE knob.enable
SettingConstants.KNOB_FORCE knob.force
SettingConstants.KNOB_FORCEPROFILE knob.forceprofile
SettingConstants.KNOB_MAXSPEED knob.maxspeed
SettingConstants.KNOB_MODE knob.mode
SettingConstants.KNOB_SPEEDPROFILE knob.speedprofile
SettingConstants.LIMIT_APPROACH_ACCEL limit.approach.accel
SettingConstants.LIMIT_APPROACH_MAXSPEED limit.approach.maxspeed
SettingConstants.LIMIT_AWAY_ACTION limit.away.action
SettingConstants.LIMIT_AWAY_EDGE limit.away.edge
SettingConstants.LIMIT_AWAY_POS limit.away.pos
SettingConstants.LIMIT_AWAY_POSUPDATE limit.away.posupdate
SettingConstants.LIMIT_AWAY_PRESET limit.away.preset
SettingConstants.LIMIT_AWAY_STATE limit.away.state
SettingConstants.LIMIT_AWAY_TRIGGERED limit.away.triggered
SettingConstants.LIMIT_AWAY_TYPE limit.away.type
SettingConstants.LIMIT_C_ACTION limit.c.action
SettingConstants.LIMIT_C_EDGE limit.c.edge
SettingConstants.LIMIT_C_POS limit.c.pos
SettingConstants.LIMIT_C_POSUPDATE limit.c.posupdate
SettingConstants.LIMIT_C_PRESET limit.c.preset
SettingConstants.LIMIT_C_STATE limit.c.state
SettingConstants.LIMIT_C_TRIGGERED limit.c.triggered
SettingConstants.LIMIT_C_TYPE limit.c.type
SettingConstants.LIMIT_CYCLE_DIST limit.cycle.dist
SettingConstants.LIMIT_D_ACTION limit.d.action
SettingConstants.LIMIT_D_EDGE limit.d.edge
SettingConstants.LIMIT_D_POS limit.d.pos
SettingConstants.LIMIT_D_POSUPDATE limit.d.posupdate
SettingConstants.LIMIT_D_PRESET limit.d.preset
SettingConstants.LIMIT_D_STATE limit.d.state
SettingConstants.LIMIT_D_TRIGGERED limit.d.triggered
SettingConstants.LIMIT_D_TYPE limit.d.type
SettingConstants.LIMIT_DETECT_DECELONLY limit.detect.decelonly
SettingConstants.LIMIT_DETECT_MAXSPEED limit.detect.maxspeed
SettingConstants.LIMIT_HOME_ACTION limit.home.action
SettingConstants.LIMIT_HOME_EDGE limit.home.edge
SettingConstants.LIMIT_HOME_POS limit.home.pos
SettingConstants.LIMIT_HOME_POSUPDATE limit.home.posupdate
SettingConstants.LIMIT_HOME_PRESET limit.home.preset
SettingConstants.LIMIT_HOME_STATE limit.home.state
SettingConstants.LIMIT_HOME_TRIGGERED limit.home.triggered
SettingConstants.LIMIT_HOME_TYPE limit.home.type
SettingConstants.LIMIT_MAX limit.max
SettingConstants.LIMIT_MIN limit.min
SettingConstants.LIMIT_START_POS limit.start.pos
SettingConstants.LIMIT_SWAPINPUTS limit.swapinputs
SettingConstants.LOCKSTEP_NUMGROUPS lockstep.numgroups
SettingConstants.LOCKSTEP_TOLERANCE lockstep.tolerance
SettingConstants.MAXSPEED maxspeed
SettingConstants.MOTION_ACCELONLY motion.accelonly
SettingConstants.MOTION_DECELONLY motion.decelonly
SettingConstants.MOTION_INDEX_DIST motion.index.dist
SettingConstants.MOTION_INDEX_NUM motion.index.num
SettingConstants.MOTOR_CURRENT_MAX motor.current.max
SettingConstants.PARKING_STATE parking.state
SettingConstants.PERIPHERAL_SERIAL peripheral.serial
SettingConstants.PERIPHERALID peripheralid
SettingConstants.POS pos
SettingConstants.RESOLUTION resolution
SettingConstants.SCOPE_DELAY scope.delay
SettingConstants.SCOPE_TIMEBASE scope.timebase
SettingConstants.STREAM_NUMBUFS stream.numbufs
SettingConstants.STREAM_NUMSTREAMS stream.numstreams
SettingConstants.SYSTEM_ACCESS system.access
SettingConstants.SYSTEM_AXISCOUNT system.axiscount
SettingConstants.SYSTEM_CURRENT system.current
SettingConstants.SYSTEM_LED_ENABLE system.led.enable
SettingConstants.SYSTEM_SERIAL system.serial
SettingConstants.SYSTEM_TEMPERATURE system.temperature
SettingConstants.SYSTEM_VOLTAGE system.voltage
SettingConstants.TRIGGER_NUMACTIONS trigger.numactions
SettingConstants.TRIGGER_NUMTRIGGERS trigger.numtriggers
SettingConstants.VEL vel
SettingConstants.VERSION version
SettingConstants.VERSION_BUILD version.build
SettingConstants.VIRTUAL_NUMVIRTUAL virtual.numvirtual

Tools

Class providing various utility functions.

To use this type, add import zaber.motion.Tools; at the top of your source code.

listSerialPorts()

Async S

Tools.listSerialPorts()

Lists all serial ports on the computer.

Arguments

No arguments

Return Value

char[] Array of serial port names.

Units

Represents all units available across the library.


Native

Constant Unit
Units.NATIVE Device native units

Length

Constant Unit
Units.LENGTH_METRES Metres
Units.LENGTH_CENTIMETRES Centimetres
Units.LENGTH_MILLIMETRES Millimetres
Units.LENGTH_MICROMETRES Micrometres
Units.LENGTH_NANOMETRES Nanometres
Units.LENGTH_INCHES Inches

Velocity

Constant Unit
Units.VELOCITY_METRES_PER_SECOND Metres per second
Units.VELOCITY_CENTIMETRES_PER_SECOND Centimetres per second
Units.VELOCITY_MILLIMETRES_PER_SECOND Millimetres per second
Units.VELOCITY_MICROMETRES_PER_SECOND Micrometres per second
Units.VELOCITY_NANOMETRES_PER_SECOND Nanometres per second
Units.VELOCITY_INCHES_PER_SECOND Inches per second

Acceleration

Constant Unit
Units.ACCELERATION_METRES_PER_SECOND_SQUARED Metres per second squared
Units.ACCELERATION_CENTIMETRES_PER_SECOND_SQUARED Centimetres per second squared
Units.ACCELERATION_MILLIMETRES_PER_SECOND_SQUARED Millimetres per second squared
Units.ACCELERATION_MICROMETRES_PER_SECOND_SQUARED Micrometres per second squared
Units.ACCELERATION_NANOMETRES_PER_SECOND_SQUARED Nanometres per second squared
Units.ACCELERATION_INCHES_PER_SECOND_SQUARED Inches per second squared

Angle

Constant Unit
Units.ANGLE_DEGREES Degrees
Units.ANGLE_RADIANS Radians

Angular Velocity

Constant Unit
Units.ANGULAR_VELOCITY_DEGREES_PER_SECOND Degrees per second
Units.ANGULAR_VELOCITY_RADIANS_PER_SECOND Radians per second

Angular Acceleration

Constant Unit
Units.ANGULAR_ACCELERATION_DEGREES_PER_SECOND_SQUARED Degrees per second squared
Units.ANGULAR_ACCELERATION_RADIANS_PER_SECOND_SQUARED Radians per second squared

AC Electric Current

Constant Unit
Units.AC_ELECTRIC_CURRENT_AMPERES_PEAK Amperes peak
Units.AC_ELECTRIC_CURRENT_AMPERES_RMS Amperes RMS

Percent

Constant Unit
Units.PERCENT_PERCENT Percent

DC Electric Current

Constant Unit
Units.DC_ELECTRIC_CURRENT_AMPERES Amperes

Force

Constant Unit
Units.FORCE_NEWTONS Newtons
Units.FORCE_MILLINEWTONS Millinewtons
Units.FORCE_POUNDS_FORCE Pounds-force
Units.FORCE_KILONEWTONS Kilonewtons

Time

Constant Unit
Units.TIME_SECONDS Seconds
Units.TIME_MILLISECONDS Milliseconds
Units.TIME_MICROSECONDS Microseconds

Torque

Constant Unit
Units.TORQUE_NEWTON_METRES Newton metres
Units.TORQUE_NEWTON_CENTIMETRES Newton centimetres
Units.TORQUE_POUND_FORCE_FEET Pound-force-feet
Units.TORQUE_OUNCE_FORCE_INCHES Ounce-force-inches

Inertia

Constant Unit
Units.INERTIA_GRAMS Grams
Units.INERTIA_KILOGRAMS Kilograms
Units.INERTIA_MILLIGRAMS Milligrams
Units.INERTIA_POUNDS Pounds
Units.INERTIA_OUNCES Ounces

Rotational Inertia

Constant Unit
Units.ROTATIONAL_INERTIA_GRAM_SQUARE_METRE Gram-square metre
Units.ROTATIONAL_INERTIA_KILOGRAM_SQUARE_METRE Kilogram-square metre
Units.ROTATIONAL_INERTIA_POUND_SQUARE_FEET Pound-square-feet

Force Constant

Constant Unit
Units.FORCE_CONSTANT_NEWTONS_PER_AMP Newtons per amp
Units.FORCE_CONSTANT_MILLINEWTONS_PER_AMP Millinewtons per amp
Units.FORCE_CONSTANT_KILONEWTONS_PER_AMP Kilonewtons per amp
Units.FORCE_CONSTANT_POUNDS_FORCE_PER_AMP Pounds-force per amp

Torque Constant

Constant Unit
Units.TORQUE_CONSTANT_NEWTON_METRES_PER_AMP Newton metres per amp
Units.TORQUE_CONSTANT_MILLINEWTON_METRES_PER_AMP Millinewton metres per amp
Units.TORQUE_CONSTANT_KILONEWTON_METRES_PER_AMP Kilonewton metres per amp
Units.TORQUE_CONSTANT_POUND_FORCE_FEET_PER_AMP Pound-force-feet per amp

WarningFlags

Warning flag constants that indicate whether any device fault or warning is active. For more information please refer to the ASCII Protocol Manual.

To use this type, add import zaber.motion.ascii.WarningFlags; at the top of your source code.

Constant Value
WarningFlags.ANALOG_ENCODER_SYNC_ERROR FA
WarningFlags.CONTROLLER_TEMPERATURE_HIGH WT
WarningFlags.CRITICAL_SYSTEM_ERROR FF
WarningFlags.DEVICE_NOT_HOMED WH
WarningFlags.DISPLACED_WHEN_STATIONARY WM
WarningFlags.DRIVER_DISABLED FD
WarningFlags.ENCODER_ERROR FQ
WarningFlags.EXCESSIVE_TWIST FT
WarningFlags.INDEX_ERROR FI
WarningFlags.INTERPOLATED_PATH_DEVIATION FP
WarningFlags.INVALID_CALIBRATION_TYPE WP
WarningFlags.JOYSTICK_CALIBRATING NJ
WarningFlags.LIMIT_ERROR FE
WarningFlags.MANUAL_CONTROL NC
WarningFlags.MOVEMENT_INTERRUPTED NI
WarningFlags.NO_REFERENCE_POSITION WR
WarningFlags.OVERVOLTAGE_OR_UNDERVOLTAGE FV
WarningFlags.SETTING_UPDATE_PENDING NU
WarningFlags.STALLED_AND_STOPPED FS
WarningFlags.STALLED_WITH_RECOVERY WS
WarningFlags.STREAM_BOUNDS_ERROR FB
WarningFlags.STREAM_DISCONTINUITY ND
WarningFlags.UNEXPECTED_LIMIT_TRIGGER WL
WarningFlags.VALUE_ROUNDED NR
WarningFlags.VOLTAGE_OUT_OF_RANGE WV

Warnings

Class used to check and reset warnings and faults on device or axis.

To use this type, add import zaber.motion.ascii.Warnings; at the top of your source code.

clearFlags()

Async M

warnings.clearFlags()

Clears (acknowledges) current warnings and faults on axis or device and returns them.

Arguments

No arguments

Return Value

java.util.Set<char> Warnings and faults before clearing. Refer to WarningFlags to check a particular flag.

getFlags()

Async M

warnings.getFlags()

Returns current warnings and faults on axis or device.

Arguments

No arguments

Return Value

java.util.Set<char> Retrieved warnings and faults. Refer to WarningFlags to check a particular flag.