Skip to content

C#

AlertEvent

Alert message received from the device.

To use this type, add using Zaber.Motion.Ascii; to the top of your source code.

AxisNumber

P

alertEvent.AxisNumber

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

Data

P

alertEvent.Data

string Response data which varies depending on the request.

DeviceAddress

P

alertEvent.DeviceAddress

int Number of the device that sent the message.

Status

P

alertEvent.Status

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

WarningFlag

P

alertEvent.WarningFlag

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

AllAxes

Represents all axes of motion associated with a device.

To use this type, add using Zaber.Motion.Ascii; to the top of your source code.

Device

P

allAxes.Device

Device Device that controls this axis.

Home()

Async M

allAxes.Home(waitUntilIdle = true)

Homes all axes. Axes return to their homing positions.

Arguments

Name Type Description
waitUntilIdle bool 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

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

Park()

Async M

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.

Arguments

No arguments

Stop()

Async M

allAxes.Stop(waitUntilIdle = true)

Stops ongoing axes movement. Decelerates until zero speed.

Arguments

Name Type Description
waitUntilIdle bool 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

string A string that represents the axes.

Unpark()

Async M

allAxes.Unpark()

Unparks the device. The device will now be able to move.

Arguments

No arguments

WaitUntilIdle()

Async M

allAxes.WaitUntilIdle(throwErrorOnFault = true)

Waits until all axes of device stop moving.

Arguments

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

Axis

Represents an axis of motion associated with a device.

To use this type, add using Zaber.Motion.Ascii; to the top of your source code.

AxisNumber

P

axis.AxisNumber

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

AxisType

P

axis.AxisType

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

Device

P

axis.Device

Device Device that controls this axis.

Identity

P

axis.Identity

AxisIdentity Identity of the axis.

IsPeripheral

P

axis.IsPeripheral

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

PeripheralId

P

axis.PeripheralId

int Unique ID of the peripheral hardware.

PeripheralName

P

axis.PeripheralName

string Name of the peripheral.

Settings

P

axis.Settings

AxisSettings Settings and properties of this axis.

Warnings

P

axis.Warnings

Warnings Warnings and faults of this axis.

GenericCommand()

Async M

axis.GenericCommand(command, checkErrors = true, timeout = 0)

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

Arguments

Name Type Description
command string Command and its parameters.
checkErrors bool Controls whether to throw an exception when the device rejects the command.
timeout int The timeout, in milliseconds, for a device to respond to the command. Overrides the connection default request timeout.

Return Value

Response A response to the command.

GenericCommandMultiResponse()

Async M

axis.GenericCommandMultiResponse(command, checkErrors = true, timeout = 0)

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 string Command and its parameters.
checkErrors bool Controls whether to throw an exception when a device rejects the command.
timeout int The timeout, in milliseconds, for a device to respond to the command. Overrides the connection default request timeout.

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 string Command and its parameters.

GetPosition()

Async M

axis.GetPosition(unit = Units.Native)

Returns current axis position.

Arguments

Name Type Description
unit Units Units of position.

Return Value

double Axis position.

Home()

Async M

axis.Home(waitUntilIdle = true)

Homes axis. Axis returns to its homing position.

Arguments

Name Type Description
waitUntilIdle bool 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

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

IsParked()

Async M

axis.IsParked()

Returns bool indicating whether the axis is parked or not.

Arguments

No arguments

Return Value

bool True if the axis is currently parked. False otherwise.

MoveAbsolute()

Async M

axis.MoveAbsolute(position, unit = Units.Native, waitUntilIdle = true)

Move axis to absolute position.

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.

MoveMax()

Async M

axis.MoveMax(waitUntilIdle = true)

Moves the axis to the maximum position as specified by limit.max.

Arguments

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

MoveMin()

Async M

axis.MoveMin(waitUntilIdle = true)

Moves the axis to the minimum position as specified by limit.min.

Arguments

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

MoveRelative()

Async M

axis.MoveRelative(position, unit = Units.Native, waitUntilIdle = true)

Move axis to position relative to current position.

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.

MoveVelocity()

Async M

axis.MoveVelocity(velocity, unit = Units.Native)

Begins to move axis at specified speed.

Arguments

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

Park()

Async M

axis.Park()

Parks the axis in anticipation of turning the power off. It can later be powered on, unparked, and moved without first having to home it.

Arguments

No arguments

PrepareCommand()

M

axis.PrepareCommand(commandTemplate, params 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 string Template of a command to prepare. Parameters are denoted by question marks.
params parameters Measurement[] Variable number of command parameters.

Return Value

string Command with converted parameters.

Stop()

Async M

axis.Stop(waitUntilIdle = true)

Stops ongoing axis movement. Decelerates until zero speed.

Arguments

Name Type Description
waitUntilIdle bool 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

string A string that represents the axis.

Unpark()

Async M

axis.Unpark()

Unparks axis. Axis will now be able to move.

Arguments

No arguments

WaitUntilIdle()

Async M

axis.WaitUntilIdle(throwErrorOnFault = true)

Waits until axis stops moving.

Arguments

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

AxisIdentity

Representation of data gathered during axis identification.

To use this type, add using Zaber.Motion.Ascii; to the top of your source code.

AxisType

P

axisIdentity.AxisType

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

IsPeripheral

P

axisIdentity.IsPeripheral

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

PeripheralId

P

axisIdentity.PeripheralId

int Unique ID of the peripheral hardware.

PeripheralName

P

axisIdentity.PeripheralName

string Name of the peripheral.

AxisSettings

Class providing access to various axis settings and properties.

To use this type, add using Zaber.Motion.Ascii; to 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 string 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 string 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 = Units.Native)

Returns any axis setting or property. For more information refer to the ASCII Protocol Manual.

Arguments

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

Return Value

double Setting value.

Set()

Async M

axisSettings.Set(setting, value, unit = Units.Native)

Sets any axis setting. For more information refer to the ASCII Protocol Manual.

Arguments

Name Type Description
setting string 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 using Zaber.Motion.Ascii; to the top of your source code.

Member Numeric value
AxisType.Unknown 0
AxisType.Linear 1
AxisType.Rotary 2

BinaryCommandFailedExceptionData

Contains additional data for BinaryCommandFailedException.

To use this type, add using Zaber.Motion; to the top of your source code.

ResponseData

P

binaryCommandFailedExceptionData.ResponseData

int The response data.

CommandFailedExceptionData

Contains additional data for CommandFailedException.

To use this type, add using Zaber.Motion; to the top of your source code.

ReplyFlag

P

commandFailedExceptionData.ReplyFlag

string The flags on the reply sent by the device.

ResponseData

P

commandFailedExceptionData.ResponseData

string The response data.

Status

P

commandFailedExceptionData.Status

string The current device status.

WarningFlag

P

commandFailedExceptionData.WarningFlag

string The current warning flag on the device.

Connection

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

To use this type, add using Zaber.Motion.Ascii; to the top of your source code.

ChecksumEnabled

P

connection.ChecksumEnabled

bool Controls whether outgoing messages contain checksum.

DefaultRequestTimeout

P

connection.DefaultRequestTimeout

int The default timeout, in milliseconds, for a device to respond to a request. Setting the timeout to a too low value may cause request timeout exceptions.

InterfaceId

P

connection.InterfaceId

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

Alert

E

connection.Alert

Event invoked when an alert is received from a device.

Emitted Data

AlertEvent Alert message received from the device.

Disconnected

E

connection.Disconnected

Event invoked when connection is interrupted or closed.

Emitted Data

MotionLibException Error that caused disconnection.

UnknownResponse

E

connection.UnknownResponse

Event invoked when a response from a device cannot be matched to any known request.

Emitted Data

UnknownResponseEvent Reply that could not be matched to a request.

Close()

Async M

connection.Close()

Close the connection.

Arguments

No arguments

DetectDevices()

Async M

connection.DetectDevices(identifyDevices = true)

Attempts to detect any devices present on this connection.

Arguments

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

Return Value

Device[] Array of detected devices.

GenericCommand()

Async M

connection.GenericCommand(command, device = 0, axis = 0, checkErrors = true, timeout = 0)

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

Arguments

Name Type Description
command string Command and its parameters.
device int Optional device address to send the command to.
axis int Optional axis number to send the command to.
checkErrors bool Controls whether to throw an exception when the device rejects the command.
timeout int The timeout, in milliseconds, for a device to respond to the command. Overrides the connection default request timeout.

Return Value

Response A response to the command.

GenericCommandMultiResponse()

Async M

connection.GenericCommandMultiResponse(command, device = 0, axis = 0, checkErrors = true, timeout = 0)

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 string Command and its parameters.
device int Optional device address to send the command to.
axis int Optional axis number to send the command to.
checkErrors bool Controls whether to throw an exception when a device rejects the command.
timeout int The timeout, in milliseconds, for a device to respond to the command. Overrides the connection default request timeout.

Return Value

Response[] All responses to the command.

GenericCommandNoResponse()

Async M

connection.GenericCommandNoResponse(command, device = 0, axis = 0)

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 string Command and its parameters.
device int Optional device address to send the command to.
axis int 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. Devices are numbered from 1.

Arguments

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

Return Value

Device Device instance.

HomeAll()

Async M

connection.HomeAll(waitUntilIdle = true)

Homes all of the devices on this connection.

Arguments

Name Type Description
waitUntilIdle bool Determines whether the function should return immediately or wait until the devices are homed.

Return Value

int[] The addresses of the devices that were homed by this command.

OpenCustom()

Async S

Connection.OpenCustom(transport)

Opens a connection using a custom transport.

Arguments

Name Type Description
transport Transport The custom connection transport.

Return Value

Connection An object representing the connection.

OpenSerialPort()

Async S

Connection.OpenSerialPort(portName, baudRate = DefaultBaudRate)

Opens a serial port.

Arguments

Name Type Description
portName string Name of the port to open.
baudRate int 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 string Hostname or IP address.
port int Port number.

Return Value

Connection An object representing the connection.

RenumberDevices()

Async M

connection.RenumberDevices(firstAddress = 1)

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

Arguments

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

Return Value

int Total number of devices that responded to the renumber.

StopAll()

Async M

connection.StopAll(waitUntilIdle = true)

Stops all of the devices on this connection.

Arguments

Name Type Description
waitUntilIdle bool Determines whether the function should return immediately or wait until the devices are stopped.

Return Value

int[] The addresses of the devices that were stopped by this command.

ToString()

M

connection.ToString()

Returns a string that represents the connection.

Arguments

No arguments

Return Value

string 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 using Zaber.Motion.Ascii; to the top of your source code.

AllAxes

P

device.AllAxes

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

AxisCount

P

device.AxisCount

int Number of axes this device has.

Connection

P

device.Connection

Connection Connection of this device.

DeviceAddress

P

device.DeviceAddress

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

DeviceId

P

device.DeviceId

int Unique ID of the device hardware.

FirmwareVersion

P

device.FirmwareVersion

FirmwareVersion Version of the firmware.

Identity

P

device.Identity

DeviceIdentity Identity of the device.

IO

P

device.IO

DeviceIO I/O channels of this device.

IsIdentified

P

device.IsIdentified

bool Indicates whether or not the device has been identified.

Name

P

device.Name

string Name of the product.

SerialNumber

P

device.SerialNumber

uint Serial number of the device.

Settings

P

device.Settings

DeviceSettings Settings and properties of this device.

Warnings

P

device.Warnings

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

GenericCommand()

Async M

device.GenericCommand(command, axis = 0, checkErrors = true, timeout = 0)

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

Arguments

Name Type Description
command string Command and its parameters.
axis int Optional axis number to send the command to.
checkErrors bool Controls whether to throw an exception when the device rejects the command.
timeout int The timeout, in milliseconds, for a device to respond to the command. Overrides the connection default request timeout.

Return Value

Response A response to the command.

GenericCommandMultiResponse()

Async M

device.GenericCommandMultiResponse(command, axis = 0, checkErrors = true, timeout = 0)

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 string Command and its parameters.
axis int Optional axis number to send the command to.
checkErrors bool Controls whether to throw an exception when a device rejects the command.
timeout int The timeout, in milliseconds, for a device to respond to the command. Overrides the connection default request timeout.

Return Value

Response[] All responses to the command.

GenericCommandNoResponse()

Async M

device.GenericCommandNoResponse(command, axis = 0)

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 string Command and its parameters.
axis int 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. Axes are numbered from 1.

Arguments

Name Type Description
axisNumber int 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 int The ID of the lockstep group to control. Lockstep group IDs start at one.

Return Value

Lockstep Lockstep instance.

GetStream()

M

device.GetStream(streamId)

Gets a Stream class instance which allows you to control a particular stream on the device.

Arguments

Name Type Description
streamId int The ID of the stream to control. Stream IDs start at one.

Return Value

Stream Stream instance.

GetStreamBuffer()

M

device.GetStreamBuffer(streamBufferId)

Gets a StreamBuffer class instance which is a handle for a stream buffer on the device.

Arguments

Name Type Description
streamBufferId int The ID of the stream buffer to control. Stream buffer IDs start at one.

Return Value

StreamBuffer StreamBuffer 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.

PrepareCommand()

M

device.PrepareCommand(commandTemplate, params 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 device. For more information refer to: ASCII Protocol Manual.

Arguments

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

Return Value

string Command with converted parameters.

ToString()

M

device.ToString()

Returns a string that represents the device.

Arguments

No arguments

Return Value

string A string that represents the device.

DeviceAddressConflictExceptionData

Contains additional data for DeviceAddressConflictException.

To use this type, add using Zaber.Motion; to the top of your source code.

DeviceAddresses

P

deviceAddressConflictExceptionData.DeviceAddresses

int[] The full list of detected device addresses.

DeviceDbSourceType

Type of source of Device DB data.

To use this type, add using Zaber.Motion; to the top of your source code.

Member Numeric value
DeviceDbSourceType.WebService 0
DeviceDbSourceType.File 1

DeviceIdentity

Representation of data gathered during device identification.

To use this type, add using Zaber.Motion.Ascii; to the top of your source code.

AxisCount

P

deviceIdentity.AxisCount

int Number of axes this device has.

DeviceId

P

deviceIdentity.DeviceId

int Unique ID of the device hardware.

FirmwareVersion

P

deviceIdentity.FirmwareVersion

FirmwareVersion Version of the firmware.

Name

P

deviceIdentity.Name

string Name of the product.

SerialNumber

P

deviceIdentity.SerialNumber

uint Serial number of the device.

DeviceIO

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

To use this type, add using Zaber.Motion.Ascii; to 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

bool[] 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

bool[] 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 int 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 int 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 int Channel number starting at 1.

Return Value

bool 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 int Channel number starting at 1.

Return Value

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

SetAllAnalogOutputs()

Async M

deviceIO.SetAllAnalogOutputs(values)

Sets values for all analog output channels.

Arguments

Name Type Description
values double[] Voltage values to set the output channels to.

SetAllDigitalOutputs()

Async M

deviceIO.SetAllDigitalOutputs(values)

Sets values for all digital output channels.

Arguments

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

SetAnalogOutput()

Async M

deviceIO.SetAnalogOutput(channelNumber, value)

Sets value for the specified analog output channel.

Arguments

Name Type Description
channelNumber int Channel number starting at 1.
value double Value to set the output channel voltage to.

SetDigitalOutput()

Async M

deviceIO.SetDigitalOutput(channelNumber, value)

Sets value for the specified digital output channel.

Arguments

Name Type Description
channelNumber int Channel number starting at 1.
value bool 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 using Zaber.Motion.Ascii; to the top of your source code.

NumberAnalogInputs

P

deviceIOInfo.NumberAnalogInputs

int Number of analog input channels.

NumberAnalogOutputs

P

deviceIOInfo.NumberAnalogOutputs

int Number of analog output channels.

NumberDigitalInputs

P

deviceIOInfo.NumberDigitalInputs

int Number of digital input channels.

NumberDigitalOutputs

P

deviceIOInfo.NumberDigitalOutputs

int Number of digital output channels.

DeviceSettings

Class providing access to various device settings and properties.

To use this type, add using Zaber.Motion.Ascii; to the top of your source code.

ConvertFromNativeUnits()

M

deviceSettings.ConvertFromNativeUnits(setting, value, unit)

Convert arbitrary setting value from Zaber native units.

Arguments

Name Type Description
setting string 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

deviceSettings.ConvertToNativeUnits(setting, value, unit)

Convert arbitrary setting value to Zaber native units.

Arguments

Name Type Description
setting string 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

deviceSettings.Get(setting, unit = Units.Native)

Returns any device setting or property. For more information refer to the ASCII Protocol Manual.

Arguments

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

Return Value

double Setting value.

Set()

Async M

deviceSettings.Set(setting, value, unit = Units.Native)

Sets any device setting. For more information refer to the ASCII Protocol Manual.

Arguments

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

FirmwareVersion

Class representing version of firmware in the controller.

To use this type, add using Zaber.Motion; to the top of your source code.

Build

P

firmwareVersion.Build

int Build version number.

Major

P

firmwareVersion.Major

int Major version number.

Minor

P

firmwareVersion.Minor

int Minor version number.

InvalidPacketExceptionData

Contains additional data for the InvalidPacketException.

To use this type, add using Zaber.Motion; to the top of your source code.

Packet

P

invalidPacketExceptionData.Packet

string The invalid packet that caused the exception.

Reason

P

invalidPacketExceptionData.Reason

string The reason for the exception.

InvalidResponseExceptionData

Contains additional data for InvalidResponseException.

To use this type, add using Zaber.Motion; to the top of your source code.

Response

P

invalidResponseExceptionData.Response

string The response data.

Library

Access class to general library information and configuration.

To use this type, add using Zaber.Motion; to the top of your source code.

DisableDeviceDbStore()

S

Library.DisableDeviceDbStore()

Disables Device DB store.

Arguments

No arguments

EnableDeviceDbStore()

S

Library.EnableDeviceDbStore(storeLocation = "")

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

Arguments

Name Type Description
storeLocation string Specifies relative or absolute path of the folder used by the store. If left empty defaults to a folder in user home directory. Must be accessible by the process.

SetDeviceDbSource()

S

Library.SetDeviceDbSource(sourceType, urlOrFilePath = "")

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 string 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 = "")

Sets library logging output.

Arguments

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

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 using Zaber.Motion.Ascii; to the top of your source code.

Device

P

lockstep.Device

Device Device that controls this lockstep group.

LockstepGroupId

P

lockstep.LockstepGroupId

int 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(params axes)

Activate the lockstep group on the axes specified.

Arguments

Name Type Description
params axes int[] The numbers of axes in the lockstep group.

GetAxes()

Async M

Obsolete: Use GetAxisNumbers instead.

lockstep.GetAxes()

Gets the axes of the lockstep group.

Arguments

No arguments

Return Value

LockstepAxes LockstepAxes instance which contains the axes numbers of the lockstep group.

GetAxisNumbers()

Async M

lockstep.GetAxisNumbers()

Gets the axis numbers of the lockstep group.

Arguments

No arguments

Return Value

int[] Axis numbers in order specified when enabling lockstep.

GetOffsets()

Async M

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.

Return Value

double[] Initial offset for each axis of the lockstep group.

GetTwists()

Async M

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.

Return Value

double[] Difference between the initial offset and the actual offset for each axis of the lockstep group.

Home()

Async M

lockstep.Home(waitUntilIdle = true)

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

Arguments

Name Type Description
waitUntilIdle bool 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

bool True if the axes are 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

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

MoveAbsolute()

Async M

lockstep.MoveAbsolute(position, unit = Units.Native, waitUntilIdle = true)

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.

MoveMax()

Async M

lockstep.MoveMax(waitUntilIdle = true)

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.

MoveMin()

Async M

lockstep.MoveMin(waitUntilIdle = true)

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.

MoveRelative()

Async M

lockstep.MoveRelative(position, unit = Units.Native, waitUntilIdle = true)

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.

MoveVelocity()

Async M

lockstep.MoveVelocity(velocity, unit = 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.

Stop()

Async M

lockstep.Stop(waitUntilIdle = true)

Stops ongoing lockstep group movement. Decelerates until zero speed.

Arguments

Name Type Description
waitUntilIdle bool 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

string String which represents the enabled lockstep group.

WaitUntilIdle()

Async M

lockstep.WaitUntilIdle(throwErrorOnFault = true)

Waits until the lockstep group stops moving.

Arguments

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

LockstepAxes

The axis numbers of a lockstep group.

To use this type, add using Zaber.Motion.Ascii; to the top of your source code.

Axis1

P

lockstepAxes.Axis1

int The axis number used to set the first axis.

Axis2

P

lockstepAxes.Axis2

int The axis number used to set the second axis.

Axis3

P

lockstepAxes.Axis3

int The axis number used to set the third axis.

Axis4

P

lockstepAxes.Axis4

int The axis number used to set the fourth axis.

LogOutputMode

Mode of logging output of the library.

To use this type, add using Zaber.Motion; to the top of your source code.

Member Numeric value
LogOutputMode.Off 0
LogOutputMode.Stdout 1
LogOutputMode.Stderr 2
LogOutputMode.File 3

Measurement

Represents a numerical value with optional units specified.

To use this type, add using Zaber.Motion; to the top of your source code.

Unit

P

measurement.Unit

Units Optional units of the measurement.

Value

P

measurement.Value

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 using Zaber.Motion.Ascii; to the top of your source code.

Member Numeric value
MessageType.Reply 0
MessageType.Info 1
MessageType.Alert 2

MotionLibException

Exception originating in the library.

To use this type, add using Zaber.Motion; to the top of your source code.

Details

P

motionLibException.Details

Additional data for a given exception subclass. The structure of this data is different for each subclass and some subclasses may not even have this property. See the list of available subclasses below for more details.

Message

P

motionLibException.Message

string Error message of the exception.

ToString()

M

motionLibException.ToString()

Returns a string that represents the exception.

Arguments

No arguments

Return Value

string A string that represents the exception.

Below are the subclasses of MotionLibException:

Exception Description
BinaryCommandFailedException Thrown when a device rejects a binary command with an error.

Details: BinaryCommandFailedExceptionData
CommandFailedException Thrown when a device rejects a command.

Details: CommandFailedExceptionData
CommandPreemptedException Thrown when a movement command gets preempted by another command.
ConnectionClosedException Thrown when attempting to communicate on a closed connection.
ConnectionFailedException Thrown when a connection breaks during a request.
ConversionFailedException Thrown when a value cannot be converted using the provided units.
DeviceAddressConflictException Thrown when there is a conflict in device numbers preventing unique addressing.

Details: DeviceAddressConflictExceptionData
DeviceBusyException Thrown when a requested operation fails because the device is currently busy.
DeviceDbFailedException Thrown when device information cannot be retrieved from the device database.
DeviceFailedException Thrown when a device registers fatal failure. Contact support if you observe this exception.
DeviceNotIdentifiedException Thrown when attempting an operation that requires an identified device.
InternalErrorException Used for internal error handling. Please report an issue if observed.
InvalidArgumentException Thrown when a function is called with invalid values.
InvalidDataException Thrown when incoming device data cannot be parsed as expected.
InvalidPacketException Thrown when a packet from a device cannot be parsed.

Details: InvalidPacketExceptionData
InvalidParkStateException Thrown when a device is unable to park.
InvalidResponseException Thrown when a device sends a response with unexpected type or data.

Details: InvalidResponseExceptionData
IoChannelOutOfRangeException Thrown when a device IO operation cannot be performed because the provided channel is not valid.
IoFailedException Thrown when the library cannot perform an operation on a file.
LockstepEnabledException Thrown when an operation cannot be performed because lockstep motion is enabled.
LockstepNotEnabledException Thrown when an operation cannot be performed because lockstep motion is not enabled.
MovementFailedException Thrown when a device registers a fault during movement.

Details: MovementFailedExceptionData
MovementInterruptedException Thrown when ongoing movement is interrupted by another command or user input.

Details: MovementInterruptedExceptionData
NoDeviceFoundException Thrown when no devices can be found on a connection.
NotSupportedException Thrown when a device does not support a requested command or setting.
OsFailedException Thrown when an operation fails due to underlying operating system error.
OutOfRequestIdsException Thrown when the library is overwhelmed with too many simultaneous requests.
RequestTimeoutException Thrown when a device does not respond to a request in time.
SerialPortBusyException Thrown when a serial port cannot be opened because it is in use by another application.
SettingNotFoundException Thrown when a get or a set command cannot be found for a setting.
StreamExecutionException Thrown when a streamed motion fails.

Details: StreamExecutionExceptionData
StreamModeException Thrown when an operation is not supported by a mode the stream is currently set up in.
StreamMovementFailedException Thrown when a device registers a fault during streamed movement.

Details: StreamMovementFailedExceptionData
StreamMovementInterruptedException Thrown when ongoing stream movement is interrupted by another command or user input.

Details: StreamMovementInterruptedExceptionData
StreamSetupFailedException Thrown when setting up a stream fails.
TransportAlreadyUsedException Thrown when a transport has already been used to open another connection.
UnknownRequestException Used for internal error handling. Indicates mixed library binary files. Reinstall the library.

MovementFailedExceptionData

Contains additional data for MovementFailedException.

To use this type, add using Zaber.Motion; to the top of your source code.

Reason

P

movementFailedExceptionData.Reason

string The reason for the Exception.

Warnings

P

movementFailedExceptionData.Warnings

string[] The full list of warnings.

MovementInterruptedExceptionData

Contains additional data for MovementInterruptedException.

To use this type, add using Zaber.Motion; to the top of your source code.

Reason

P

movementInterruptedExceptionData.Reason

string The reason for the Exception.

Warnings

P

movementInterruptedExceptionData.Warnings

string[] The full list of warnings.

Response

Response message from the device.

To use this type, add using Zaber.Motion.Ascii; to the top of your source code.

AxisNumber

P

response.AxisNumber

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

Data

P

response.Data

string Response data which varies depending on the request.

DeviceAddress

P

response.DeviceAddress

int Number of the device that sent the message.

MessageType

P

response.MessageType

MessageType Type of the reply received.

ReplyFlag

P

response.ReplyFlag

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

Status

P

response.Status

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

WarningFlag

P

response.WarningFlag

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

RotationDirection

Direction of rotation.

To use this type, add using Zaber.Motion; to the top of your source code.

Member Numeric value
RotationDirection.Clockwise 0
RotationDirection.Counterclockwise 1
RotationDirection.CW 0
RotationDirection.CCW 1

SettingConstants

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

To use this type, add using Zaber.Motion.Ascii; to the top of your source code.

Constant Value
SettingConstants.Accel accel
SettingConstants.CalibrationType calibration.type
SettingConstants.CloopContinuousEnable cloop.continuous.enable
SettingConstants.CloopCounts cloop.counts
SettingConstants.CloopDisplaceTolerance cloop.displace.tolerance
SettingConstants.CloopDurationMax cloop.duration.max
SettingConstants.CloopEnable cloop.enable
SettingConstants.CloopMode cloop.mode
SettingConstants.CloopRecoveryEnable cloop.recovery.enable
SettingConstants.CloopSettlePeriod cloop.settle.period
SettingConstants.CloopSettleTolerance cloop.settle.tolerance
SettingConstants.CloopStalltimeout cloop.stalltimeout
SettingConstants.CloopSteps cloop.steps
SettingConstants.CloopTimeout cloop.timeout
SettingConstants.CommAddress comm.address
SettingConstants.CommAlert comm.alert
SettingConstants.CommChecksum comm.checksum
SettingConstants.CommProtocol comm.protocol
SettingConstants.CommRs232Baud comm.rs232.baud
SettingConstants.CommRs232Protocol comm.rs232.protocol
SettingConstants.CommRs485Baud comm.rs485.baud
SettingConstants.CommRs485Enable comm.rs485.enable
SettingConstants.CommRs485Protocol comm.rs485.protocol
SettingConstants.CommUsbProtocol comm.usb.protocol
SettingConstants.Deviceid deviceid
SettingConstants.DriverCurrentHold driver.current.hold
SettingConstants.DriverCurrentMax driver.current.max
SettingConstants.DriverCurrentRun driver.current.run
SettingConstants.DriverCurrentServo driver.current.servo
SettingConstants.DriverDir driver.dir
SettingConstants.DriverEnabled driver.enabled
SettingConstants.DriverTemperature driver.temperature
SettingConstants.EncoderCount encoder.count
SettingConstants.EncoderCountCal encoder.count.cal
SettingConstants.EncoderCountCalibrated encoder.count.calibrated
SettingConstants.EncoderDir encoder.dir
SettingConstants.EncoderError encoder.error
SettingConstants.EncoderFaultType encoder.fault.type
SettingConstants.EncoderFilter encoder.filter
SettingConstants.EncoderIndexCount encoder.index.count
SettingConstants.EncoderIndexMode encoder.index.mode
SettingConstants.EncoderIndexPhase encoder.index.phase
SettingConstants.EncoderMode encoder.mode
SettingConstants.EncoderPos encoder.pos
SettingConstants.EncoderPosError encoder.pos.error
SettingConstants.FilterHolderid filter.holderid
SettingConstants.ForceAverage force.average
SettingConstants.JoyDebug joy.debug
SettingConstants.KnobDir knob.dir
SettingConstants.KnobDistance knob.distance
SettingConstants.KnobEnable knob.enable
SettingConstants.KnobForce knob.force
SettingConstants.KnobForceprofile knob.forceprofile
SettingConstants.KnobMaxspeed knob.maxspeed
SettingConstants.KnobMode knob.mode
SettingConstants.KnobSpeedprofile knob.speedprofile
SettingConstants.LampCurrent lamp.current
SettingConstants.LampCurrentMax lamp.current.max
SettingConstants.LampFlux lamp.flux
SettingConstants.LampFluxMax lamp.flux.max
SettingConstants.LampStatus lamp.status
SettingConstants.LampTemperature lamp.temperature
SettingConstants.LampWavelengthFwhm lamp.wavelength.fwhm
SettingConstants.LampWavelengthPeak lamp.wavelength.peak
SettingConstants.LimitApproachAccel limit.approach.accel
SettingConstants.LimitApproachMaxspeed limit.approach.maxspeed
SettingConstants.LimitAwayAction limit.away.action
SettingConstants.LimitAwayEdge limit.away.edge
SettingConstants.LimitAwayPos limit.away.pos
SettingConstants.LimitAwayPosupdate limit.away.posupdate
SettingConstants.LimitAwayPreset limit.away.preset
SettingConstants.LimitAwayState limit.away.state
SettingConstants.LimitAwayTriggered limit.away.triggered
SettingConstants.LimitAwayType limit.away.type
SettingConstants.LimitCAction limit.c.action
SettingConstants.LimitCEdge limit.c.edge
SettingConstants.LimitCPos limit.c.pos
SettingConstants.LimitCPosupdate limit.c.posupdate
SettingConstants.LimitCPreset limit.c.preset
SettingConstants.LimitCState limit.c.state
SettingConstants.LimitCTriggered limit.c.triggered
SettingConstants.LimitCType limit.c.type
SettingConstants.LimitCycleDist limit.cycle.dist
SettingConstants.LimitDAction limit.d.action
SettingConstants.LimitDEdge limit.d.edge
SettingConstants.LimitDetectDecelonly limit.detect.decelonly
SettingConstants.LimitDetectMaxspeed limit.detect.maxspeed
SettingConstants.LimitDPos limit.d.pos
SettingConstants.LimitDPosupdate limit.d.posupdate
SettingConstants.LimitDPreset limit.d.preset
SettingConstants.LimitDState limit.d.state
SettingConstants.LimitDTriggered limit.d.triggered
SettingConstants.LimitDType limit.d.type
SettingConstants.LimitHomeAction limit.home.action
SettingConstants.LimitHomeEdge limit.home.edge
SettingConstants.LimitHomePos limit.home.pos
SettingConstants.LimitHomePosupdate limit.home.posupdate
SettingConstants.LimitHomePreset limit.home.preset
SettingConstants.LimitHomeState limit.home.state
SettingConstants.LimitHomeTriggered limit.home.triggered
SettingConstants.LimitHomeType limit.home.type
SettingConstants.LimitMax limit.max
SettingConstants.LimitMin limit.min
SettingConstants.LimitStartPos limit.start.pos
SettingConstants.LimitSwapinputs limit.swapinputs
SettingConstants.LockstepNumgroups lockstep.numgroups
SettingConstants.LockstepTolerance lockstep.tolerance
SettingConstants.Maxspeed maxspeed
SettingConstants.MotionAccelonly motion.accelonly
SettingConstants.MotionBusy motion.busy
SettingConstants.MotionDecelonly motion.decelonly
SettingConstants.MotionIndexDist motion.index.dist
SettingConstants.MotionIndexNum motion.index.num
SettingConstants.MotorCurrentMax motor.current.max
SettingConstants.ParkingState parking.state
SettingConstants.Peripheralid peripheralid
SettingConstants.PeripheralId peripheral.id
SettingConstants.PeripheralIdPending peripheral.id.pending
SettingConstants.PeripheralSerial peripheral.serial
SettingConstants.PeripheralSerialPending peripheral.serial.pending
SettingConstants.Pos pos
SettingConstants.Resolution resolution
SettingConstants.ScopeDelay scope.delay
SettingConstants.ScopeTimebase scope.timebase
SettingConstants.StreamNumbufs stream.numbufs
SettingConstants.StreamNumstreams stream.numstreams
SettingConstants.SystemAccess system.access
SettingConstants.SystemAxiscount system.axiscount
SettingConstants.SystemCurrent system.current
SettingConstants.SystemLedEnable system.led.enable
SettingConstants.SystemSerial system.serial
SettingConstants.SystemTemperature system.temperature
SettingConstants.SystemVoltage system.voltage
SettingConstants.TriggerNumactions trigger.numactions
SettingConstants.TriggerNumtriggers trigger.numtriggers
SettingConstants.Vel vel
SettingConstants.Version version
SettingConstants.VersionBuild version.build
SettingConstants.VirtualNumvirtual virtual.numvirtual

Stream

A handle for a stream with this ID on the device. Streams provide a way to execute or store a sequence of actions. Stream methods append actions to a queue which executes or stores actions in a first in, first out order.

To use this type, add using Zaber.Motion.Ascii; to the top of your source code.

Axes

P

stream.Axes

StreamAxisDefinition[] An array of axes definitions the stream is set up to control.

Device

P

stream.Device

Device Device that controls this stream.

Mode

P

stream.Mode

StreamMode Current mode of the stream.

StreamId

P

stream.StreamId

int The number that identifies the stream on the device.

ArcAbsolute()

Async M

stream.ArcAbsolute(rotationDirection, centerX, centerY, endX, endY)

Queue an absolute arc movement on the first two axes of the stream. Absolute meaning that the home positions of the axes is treated as the origin.

Arguments

Name Type Description
rotationDirection RotationDirection The direction of the rotation.
centerX Measurement The first dimensions of the position of the center of the circle on which the arc exists.
centerY Measurement The second dimensions of the position of the center of the circle on which the arc exists.
endX Measurement The first dimensions of the end position of the arc.
endY Measurement The second dimensions of the end position of the arc.

ArcAbsoluteOn()

Async M

stream.ArcAbsoluteOn(targetAxesIndices, rotationDirection, centerX, centerY, endX, endY)

Queue an absolute arc movement in the stream. The movement will only target the specified subset of axes in the stream.

Arguments

Name Type Description
targetAxesIndices int[] Indices of the axes in the stream the movement targets. Refers to the axes provided during the stream setup or further execution. Indices are zero-based.
rotationDirection RotationDirection The direction of the rotation.
centerX Measurement The first dimensions of the position of the center of the circle on which the arc exists.
centerY Measurement The second dimensions of the position of the center of the circle on which the arc exists.
endX Measurement The first dimensions of the end position of the arc.
endY Measurement The second dimensions of the end position of the arc.

ArcRelative()

Async M

stream.ArcRelative(rotationDirection, centerX, centerY, endX, endY)

Queue a relative arc movement on the first two axes of the stream. Relative meaning that the current position of the axes is treated as the origin.

Arguments

Name Type Description
rotationDirection RotationDirection The direction of the rotation.
centerX Measurement The first dimensions of the position of the center of the circle on which the arc exists.
centerY Measurement The second dimensions of the position of the center of the circle on which the arc exists.
endX Measurement The first dimensions of the end position of the arc.
endY Measurement The second dimensions of the end position of the arc.

ArcRelativeOn()

Async M

stream.ArcRelativeOn(targetAxesIndices, rotationDirection, centerX, centerY, endX, endY)

Queue a relative arc movement in the stream. The movement will only target the specified subset of axes in the stream.

Arguments

Name Type Description
targetAxesIndices int[] Indices of the axes in the stream the movement targets. Refers to the axes provided during the stream setup or further execution. Indices are zero-based.
rotationDirection RotationDirection The direction of the rotation.
centerX Measurement The first dimensions of the position of the center of the circle on which the arc exists.
centerY Measurement The second dimensions of the position of the center of the circle on which the arc exists.
endX Measurement The first dimensions of the end position of the arc.
endY Measurement The second dimensions of the end position of the arc.

Call()

Async M

stream.Call(streamBuffer)

Append the actions in a stream buffer to the queue.

Arguments

Name Type Description
streamBuffer StreamBuffer The stream buffer to call.

CircleAbsolute()

Async M

stream.CircleAbsolute(rotationDirection, centerX, centerY)

Queue an absolute circle movement on the first two axes of the stream. Absolute meaning that the home positions of the axes are treated as the origin.

Arguments

Name Type Description
rotationDirection RotationDirection The direction of the rotation.
centerX Measurement The first dimension of the position of the center of the circle.
centerY Measurement The second dimension of the position of the center of the circle.

CircleAbsoluteOn()

Async M

stream.CircleAbsoluteOn(targetAxesIndices, rotationDirection, centerX, centerY)

Queue an absolute circle movement in the stream. The movement will only target the specified subset of axes in the stream.

Arguments

Name Type Description
targetAxesIndices int[] Indices of the axes in the stream the movement targets. Refers to the axes provided during the stream setup or further execution. Indices are zero-based.
rotationDirection RotationDirection The direction of the rotation.
centerX Measurement The first dimension of the position of the center of the circle.
centerY Measurement The second dimension of the position of the center of the circle.

CircleRelative()

Async M

stream.CircleRelative(rotationDirection, centerX, centerY)

Queue a relative circle movement on the first two axes of the stream. Relative meaning that the current position of the axes is treated as the origin.

Arguments

Name Type Description
rotationDirection RotationDirection The direction of the rotation.
centerX Measurement The first dimension of the position of the center of the circle.
centerY Measurement The second dimension of the position of the center of the circle.

CircleRelativeOn()

Async M

stream.CircleRelativeOn(targetAxesIndices, rotationDirection, centerX, centerY)

Queue a relative circle movement in the stream. The movement will only target the specified subset of axes in the stream.

Arguments

Name Type Description
targetAxesIndices int[] Indices of the axes in the stream the movement targets. Refers to the axes provided during the stream setup or further execution. Indices are zero-based.
rotationDirection RotationDirection The direction of the rotation.
centerX Measurement The first dimension of the position of the center of the circle.
centerY Measurement The second dimension of the position of the center of the circle.

Cork()

Async M

stream.Cork()

Cork the front of the stream's action queue, blocking execution. Execution resumes upon uncorking the queue, or when the number of queued actions reaches its limit. Corking eliminates discontinuities in motion due to subsequent stream commands reaching the device late. You can only cork an idle live stream.

Arguments

No arguments

Disable()

Async M

stream.Disable()

Disable the stream. If the stream is not setup, this command does nothing. Once disabled, the stream will no longer accept stream commands. The stream will process the rest of the commands in the queue until it is empty.

Arguments

No arguments

GetMaxCentripetalAcceleration()

Async M

stream.GetMaxCentripetalAcceleration(unit = Units.Native)

Gets the maximum centripetal acceleration of the live stream. Converts the units using the first axis of the stream.

Arguments

Name Type Description
unit Units Units of acceleration.

Return Value

double The maximum centripetal acceleration of the live stream.

GetMaxSpeed()

Async M

stream.GetMaxSpeed(unit = Units.Native)

Gets the maximum speed of the live stream. Converts the units using the first axis of the stream.

Arguments

Name Type Description
unit Units Units of velocity.

Return Value

double The maximum speed of the stream.

GetMaxTangentialAcceleration()

Async M

stream.GetMaxTangentialAcceleration(unit = Units.Native)

Gets the maximum tangential acceleration of the live stream. Converts the units using the first axis of the stream.

Arguments

Name Type Description
unit Units Units of acceleration.

Return Value

double The maximum tangential acceleration of the live stream.

IsBusy()

Async M

stream.IsBusy()

Returns a boolean value indicating whether the live stream is executing a queued action.

Arguments

No arguments

Return Value

bool True if the stream is executing a queued action.

LineAbsolute()

Async M

stream.LineAbsolute(params endpoint)

Queue an absolute line movement in the stream.

Arguments

Name Type Description
params endpoint Measurement[] Positions for the axes to move to, relative to their home positions.

LineAbsoluteOn()

Async M

stream.LineAbsoluteOn(targetAxesIndices, endpoint)

Queue an absolute line movement in the stream, targeting a subset of the stream axes.

Arguments

Name Type Description
targetAxesIndices int[] Indices of the axes in the stream the movement targets. Refers to the axes provided during the stream setup or further execution. Indices are zero-based.
endpoint Measurement[] Positions for the axes to move to, relative to their home positions.

LineRelative()

Async M

stream.LineRelative(params endpoint)

Queue a relative line movement in the stream.

Arguments

Name Type Description
params endpoint Measurement[] Positions for the axes to move to, relative to their positions before movement.

LineRelativeOn()

Async M

stream.LineRelativeOn(targetAxesIndices, endpoint)

Queue a relative line movement in the stream, targeting a subset of the stream axes.

Arguments

Name Type Description
targetAxesIndices int[] Indices of the axes in the stream the movement targets. Refers to the axes provided during the stream setup or further execution. Indices are zero-based.
endpoint Measurement[] Positions for the axes to move to, relative to their positions before movement.

SetAnalogOutput()

Async M

stream.SetAnalogOutput(channelNumber, value)

Set the value of an analog output channel.

Arguments

Name Type Description
channelNumber int The number of the analog output channel. Channel numbers are numbered from one.
value double The value to set the channel to, in volts.

SetDigitalOutput()

Async M

stream.SetDigitalOutput(channelNumber, value)

Set the value of a digital output channel.

Arguments

Name Type Description
channelNumber int The number of the digital output channel. Channel numbers are numbered from one.
value bool The value to set the channel to.

SetMaxCentripetalAcceleration()

Async M

stream.SetMaxCentripetalAcceleration(maxCentripetalAcceleration, unit = Units.Native)

Sets the maximum centripetal acceleration of the live stream. Converts the units using the first axis of the stream.

Arguments

Name Type Description
maxCentripetalAcceleration double Maximum centripetal acceleration at which any stream action is executed.
unit Units Units of acceleration.

SetMaxSpeed()

Async M

stream.SetMaxSpeed(maxSpeed, unit = Units.Native)

Sets the maximum speed of the live stream. Converts the units using the first axis of the stream.

Arguments

Name Type Description
maxSpeed double Maximum speed at which any stream action is executed.
unit Units Units of velocity.

SetMaxTangentialAcceleration()

Async M

stream.SetMaxTangentialAcceleration(maxTangentialAcceleration, unit = Units.Native)

Sets the maximum tangential acceleration of the live stream. Converts the units using the first axis of the stream.

Arguments

Name Type Description
maxTangentialAcceleration double Maximum tangential acceleration at which any stream action is executed.
unit Units Units of acceleration.

SetupLive()

Async M

stream.SetupLive(params axes)

Setup the stream to control the specified axes and to queue actions on the device.

Arguments

Name Type Description
params axes int[] Numbers of physical axes to setup the stream on.

SetupLiveComposite()

Async M

stream.SetupLiveComposite(params axes)

Setup the stream to control the specified axes and to queue actions on the device. Allows use of lockstep axes in a stream.

Arguments

Name Type Description
params axes StreamAxisDefinition[] Definition of the stream axes.

SetupStore()

Async M

stream.SetupStore(streamBuffer, params axes)

Setup the stream to control the specified axes and queue actions into a stream buffer.

Arguments

Name Type Description
streamBuffer StreamBuffer The stream buffer to queue actions in.
params axes int[] Numbers of physical axes to setup the stream on.

SetupStoreArbitraryAxes()

Async M

stream.SetupStoreArbitraryAxes(streamBuffer, axesCount)

Setup the stream to use a specified number of axes, and to queue actions in a stream buffer. Afterwards, you may call the resulting stream buffer on arbitrary axes. This mode does not allow for unit conversions.

Arguments

Name Type Description
streamBuffer StreamBuffer The stream buffer to queue actions in.
axesCount int The number of axes in the stream.

SetupStoreComposite()

Async M

stream.SetupStoreComposite(streamBuffer, params axes)

Setup the stream to control the specified axes and queue actions into a stream buffer. Allows use of lockstep axes in a stream.

Arguments

Name Type Description
streamBuffer StreamBuffer The stream buffer to queue actions in.
params axes StreamAxisDefinition[] Definition of the stream axes.

ToggleDigitalOutput()

Async M

stream.ToggleDigitalOutput(channelNumber)

Toggle the value of a digital output channel.

Arguments

Name Type Description
channelNumber int The number of the digital output channel. Channel numbers are numbered from one.

ToString()

M

stream.ToString()

Returns a string which represents the stream.

Arguments

No arguments

Return Value

string String which represents the stream.

Uncork()

Async M

stream.Uncork()

Uncork the front of the queue, unblocking command execution. You can only uncork an idle live stream that is corked.

Arguments

No arguments

Wait()

Async M

stream.Wait(time, unit = Units.Native)

Wait a specified time.

Arguments

Name Type Description
time double Amount of time to wait.
unit Units Units of time.

WaitAnalogInput()

Async M

stream.WaitAnalogInput(channelNumber, condition, value)

Wait for the value of a analog input channel to reach a condition concerning a given value.

Arguments

Name Type Description
channelNumber int The number of the analog input channel. Channel numbers are numbered from one.
condition string A condition (e.g. <, <=, ==, !=).
value double The value that the condition concerns, in volts.

WaitDigitalInput()

Async M

stream.WaitDigitalInput(channelNumber, value)

Wait for a digital input channel to reach a given value.

Arguments

Name Type Description
channelNumber int The number of the digital input channel. Channel numbers are numbered from one.
value bool The value that the stream should wait for.

WaitUntilIdle()

Async M

stream.WaitUntilIdle(throwErrorOnFault = true)

Waits until the live stream executes all queued actions.

Arguments

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

StreamAxisDefinition

Defines an axis of the stream.

To use this type, add using Zaber.Motion.Ascii; to the top of your source code.

AxisNumber

P

streamAxisDefinition.AxisNumber

int Number of a physical axis or a lockstep group.

AxisType

P

streamAxisDefinition.AxisType

StreamAxisType Defines the type of the axis.

StreamAxisType

Denotes type of the stream axis.

To use this type, add using Zaber.Motion.Ascii; to the top of your source code.

Member Numeric value
StreamAxisType.Physical 0
StreamAxisType.Lockstep 1

StreamBuffer

Represents a stream buffer with this ID on a device. A stream buffer is a place to store a queue of stream actions.

To use this type, add using Zaber.Motion.Ascii; to the top of your source code.

BufferId

P

streamBuffer.BufferId

int The number identifying the buffer on the device.

Device

P

streamBuffer.Device

Device The Device this buffer exists on.

Erase()

Async M

streamBuffer.Erase()

Erase the contents of the buffer.

Arguments

No arguments

GetContent()

Async M

streamBuffer.GetContent()

Get the buffer contents as an array of strings.

Arguments

No arguments

Return Value

string[] A string array containing all the stream commands stored in the buffer.

StreamExecutionExceptionData

Contains additional data for StreamExecutionException.

To use this type, add using Zaber.Motion; to the top of your source code.

ErrorFlag

P

streamExecutionExceptionData.ErrorFlag

string The error flag that caused the exception.

Reason

P

streamExecutionExceptionData.Reason

string The reason for the exception.

StreamMode

Mode of a stream.

To use this type, add using Zaber.Motion.Ascii; to the top of your source code.

Member Numeric value
StreamMode.Disabled 0
StreamMode.Store 1
StreamMode.StoreArbitraryAxes 2
StreamMode.Live 3

StreamMovementFailedExceptionData

Contains additional data for StreamMovementFailedException.

To use this type, add using Zaber.Motion; to the top of your source code.

Reason

P

streamMovementFailedExceptionData.Reason

string The reason for the Exception.

Warnings

P

streamMovementFailedExceptionData.Warnings

string[] The full list of warnings.

StreamMovementInterruptedExceptionData

Contains additional data for StreamMovementInterruptedException.

To use this type, add using Zaber.Motion; to the top of your source code.

Reason

P

streamMovementInterruptedExceptionData.Reason

string The reason for the Exception.

Warnings

P

streamMovementInterruptedExceptionData.Warnings

string[] The full list of warnings.

Tools

Class providing various utility functions.

To use this type, add using Zaber.Motion; to the top of your source code.

ListSerialPorts()

Async S

Tools.ListSerialPorts()

Lists all serial ports on the computer.

Arguments

No arguments

Return Value

string[] Array of serial port names.

Transport

Connection transport backend allowing to carry Zaber ASCII protocol over arbitrary protocols. Can only be used with a single connection.

To use this type, add using Zaber.Motion.Ascii; to the top of your source code.

TransportId

P

transport.TransportId

int The transport ID identifies this transport instance with the underlying library.

Close()

Async M

transport.Close()

Closes the transport. Also closes the connection using the transport.

Arguments

No arguments

CloseWithError()

Async M

transport.CloseWithError(errorMessage)

Closes the transport with error. Also closes the connection using the transport propagating the error.

Arguments

Name Type Description
errorMessage string Error to be propagated.

Open()

S

Transport.Open()

Creates new instance allowing to read/write messages from/to a single connection.

Arguments

No arguments

Return Value

Transport New instance of transport.

Read()

Async M

transport.Read()

Reads a single message generated by the connection. The message is a request for the device. Read should be called continuously in a loop to ensure all generated messages are processed. Subsequent read call confirms that previous message was delivered to the device.

Arguments

No arguments

Return Value

string Message generated by the connection.

Write()

Async M

transport.Write(message)

Writes a single message to the connection. The message will be processed as a reply from the device.

Arguments

Name Type Description
message string Single message of Zaber ASCII protocol.

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_MetresPerSecond Metres per second
Units.Velocity_CentimetresPerSecond Centimetres per second
Units.Velocity_MillimetresPerSecond Millimetres per second
Units.Velocity_MicrometresPerSecond Micrometres per second
Units.Velocity_NanometresPerSecond Nanometres per second
Units.Velocity_InchesPerSecond Inches per second

Acceleration

Constant Unit
Units.Acceleration_MetresPerSecondSquared Metres per second squared
Units.Acceleration_CentimetresPerSecondSquared Centimetres per second squared
Units.Acceleration_MillimetresPerSecondSquared Millimetres per second squared
Units.Acceleration_MicrometresPerSecondSquared Micrometres per second squared
Units.Acceleration_NanometresPerSecondSquared Nanometres per second squared
Units.Acceleration_InchesPerSecondSquared Inches per second squared

Angle

Constant Unit
Units.Angle_Degrees Degrees
Units.Angle_Radians Radians

Angular Velocity

Constant Unit
Units.AngularVelocity_DegreesPerSecond Degrees per second
Units.AngularVelocity_RadiansPerSecond Radians per second

Angular Acceleration

Constant Unit
Units.AngularAcceleration_DegreesPerSecondSquared Degrees per second squared
Units.AngularAcceleration_RadiansPerSecondSquared Radians per second squared

AC Electric Current

Constant Unit
Units.ACElectricCurrent_AmperesPeak Amperes peak
Units.ACElectricCurrent_AmperesRms Amperes RMS

Percent

Constant Unit
Units.Percent_Percent Percent

DC Electric Current

Constant Unit
Units.DCElectricCurrent_Amperes Amperes

Force

Constant Unit
Units.Force_Newtons Newtons
Units.Force_Millinewtons Millinewtons
Units.Force_PoundsForce 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_NewtonMetres Newton metres
Units.Torque_NewtonCentimetres Newton centimetres
Units.Torque_PoundForceFeet Pound-force-feet
Units.Torque_OunceForceInches 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.RotationalInertia_GramSquareMetre Gram-square metre
Units.RotationalInertia_KilogramSquareMetre Kilogram-square metre
Units.RotationalInertia_PoundSquareFeet Pound-square-feet

Force Constant

Constant Unit
Units.ForceConstant_NewtonsPerAmp Newtons per amp
Units.ForceConstant_MillinewtonsPerAmp Millinewtons per amp
Units.ForceConstant_KilonewtonsPerAmp Kilonewtons per amp
Units.ForceConstant_PoundsForcePerAmp Pounds-force per amp

Torque Constant

Constant Unit
Units.TorqueConstant_NewtonMetresPerAmp Newton metres per amp
Units.TorqueConstant_MillinewtonMetresPerAmp Millinewton metres per amp
Units.TorqueConstant_KilonewtonMetresPerAmp Kilonewton metres per amp
Units.TorqueConstant_PoundForceFeetPerAmp Pound-force-feet per amp

UnknownResponseEvent

Reply that could not be matched to a request.

To use this type, add using Zaber.Motion.Ascii; to the top of your source code.

AxisNumber

P

unknownResponseEvent.AxisNumber

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

Data

P

unknownResponseEvent.Data

string Response data which varies depending on the request.

DeviceAddress

P

unknownResponseEvent.DeviceAddress

int Number of the device that sent the message.

MessageType

P

unknownResponseEvent.MessageType

MessageType Type of the reply received.

ReplyFlag

P

unknownResponseEvent.ReplyFlag

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

Status

P

unknownResponseEvent.Status

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

WarningFlag

P

unknownResponseEvent.WarningFlag

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

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 using Zaber.Motion.Ascii; to the top of your source code.

Constant Value
WarningFlags.AnalogEncoderSyncError FA
WarningFlags.ControllerTemperatureHigh WT
WarningFlags.CriticalSystemError FF
WarningFlags.CurrentInrushError FC
WarningFlags.DeviceNotHomed WH
WarningFlags.DisplacedWhenStationary WM
WarningFlags.DriverDisabled FD
WarningFlags.DriverDisabledNoFault FO
WarningFlags.EncoderError FQ
WarningFlags.ExcessiveTwist FT
WarningFlags.HardwareEmergencyStop FH
WarningFlags.IndexError FI
WarningFlags.InterpolatedPathDeviation FP
WarningFlags.InvalidCalibrationType WP
WarningFlags.JoystickCalibrating NJ
WarningFlags.LimitError FE
WarningFlags.ManualControl NC
WarningFlags.MotorTemperatureError FM
WarningFlags.MovementInterrupted NI
WarningFlags.NoReferencePosition WR
WarningFlags.OvervoltageOrUndervoltage FV
WarningFlags.PeripheralInactive FZ
WarningFlags.PeripheralNotSupported FN
WarningFlags.SettingUpdatePending NU
WarningFlags.StalledAndStopped FS
WarningFlags.StalledWithRecovery WS
WarningFlags.StreamBoundsError FB
WarningFlags.StreamDiscontinuity ND
WarningFlags.UnexpectedLimitTrigger WL
WarningFlags.ValueRounded NR
WarningFlags.ValueTruncated NT
WarningFlags.VoltageOutOfRange WV

Warnings

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

To use this type, add using Zaber.Motion.Ascii; to 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

ISet<string> 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

ISet<string> Retrieved warnings and faults. Refer to WarningFlags to check a particular flag.