The following example illustrates how you can obtain an instance of this type:
from zaber_motion.ascii import Connection
connection = Connection.open_serial_port('COM3')
device = connection.get_device(1)device.all_axesAllAxes Virtual axis which allows you to target all axes of this device.device.oscilloscopeOscilloscope Oscilloscope recording helper for this device. Requires at least Firmware 7.00.device.pvtPvt Gets an object that provides access to PVT functions of this device. Note that as of ZML v5.0.0, this returns a Pvt object and NOT a PvtSequence object. The PvtSequence can now be obtained from the Pvt object. Requires at least Firmware 7.33.device.streamsStreams Gets an object that provides access to Streams on this device. Requires at least Firmware 7.05.device.generic_command(command, axis = 0, check_errors = True, timeout = 0)| Name | Type | Description |
|---|---|---|
| command | str | Command and its parameters. |
| axis | int | Optional axis number to send the command to. |
| check_errors | 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. |
Response A response to the command.device.generic_command_multi_response(command, axis = 0, check_errors = True, timeout = 0)| Name | Type | Description |
|---|---|---|
| command | str | Command and its parameters. |
| axis | int | Optional axis number to send the command to. |
| check_errors | 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. |
List[Response] All responses to the command.device.generic_command_no_response(command, axis = 0)| Name | Type | Description |
|---|---|---|
| command | str | Command and its parameters. |
| axis | int | Optional axis number to send the command to. Specifying -1 omits the number completely. |
device.get_axis(axis_number)| Name | Type | Description |
|---|---|---|
| axis_number | int | Number of axis intended to control. |
Axis Axis instance.device.get_command_unit_conversion_descriptors(command_template)| Name | Type | Description |
|---|---|---|
| command_template | str | Template of the command. Parameters are denoted by question marks. |
List[Optional[UnitConversionDescriptor]] Unit conversion descriptor for each parameter in the command. Nil if a parameter does not have conversion.device.get_lockstep(lockstep_group_id)| Name | Type | Description |
|---|---|---|
| lockstep_group_id | int | The ID of the lockstep group to control. Lockstep group IDs start at one. |
Lockstep Lockstep instance.device.identify(assume_version = None)| Name | Type | Description |
|---|---|---|
| assume_version | Optional[FirmwareVersion] | The identification assumes the specified firmware version instead of the version queried from the device. Providing this argument can lead to unexpected compatibility issues. |
DeviceIdentity Device identification data.device.prepare_command(command_template, *parameters)| Name | Type | Description |
|---|---|---|
| command_template | str | Template of a command to prepare. Parameters are denoted by question marks. |
| *parameters | Measurement | Variable number of command parameters. |
str Command with converted parameters.device.renumber(address)| Name | Type | Description |
|---|---|---|
| address | int | The new address to assign to the device. |
Device New device instance with the new address.device.restore(hard = False)| Name | Type | Description |
|---|---|---|
| hard | bool | If true, completely erases device's memory. The device also resets. |
device.set_state(state, device_only = False)| Name | Type | Description |
|---|---|---|
| state | str | The state object to apply to this device. |
| device_only | bool | If true, only device scope settings and features will be set. |
SetStateDeviceResponse Reports of any issues that were handled, but caused the state to not be exactly restored.