To use this type, add from zaber_motion.binary import Device to the top of your source code.
device.device_typeDeviceType Determines the type of an device and units it accepts.device.generic_command(command, data = 0, timeout = 0.0, check_errors = True)| Name | Type | Description |
|---|---|---|
| command | CommandCode | Command to send. |
| data | int | Optional data argument to the command. Defaults to zero. |
| timeout | float | Number of seconds to wait for a response from the device. 0 or negative defaults to 0.5s. |
| check_errors | bool | Controls whether to throw an exception when the device rejects the command. |
Message A response to the command.device.generic_command_no_response(command, data = 0)| Name | Type | Description |
|---|---|---|
| command | CommandCode | Command to send. |
| data | int | Optional data argument to the command. Defaults to zero. |
device.generic_command_with_units(command, data = 0, from_unit = Units.NATIVE, to_unit = Units.NATIVE, timeout = 0.0)| Name | Type | Description |
|---|---|---|
| command | CommandCode | Command to send. |
| data | float | Data argument to the command. Defaults to zero. |
| from_unit | UnitsAndLiterals | Unit to convert sent data from. |
| to_unit | UnitsAndLiterals | Unit to convert retrieved data to. |
| timeout | float | Number of seconds to wait for a response from the device. 0 or negative defaults to 0.5s. |
float Data that has been converted to the provided unit.device.get_position(unit = Units.NATIVE)| Name | Type | Description |
|---|---|---|
| unit | LengthUnits | Units of position. |
float Axis position.device.home(unit = Units.NATIVE, timeout = DEFAULT_MOVEMENT_TIMEOUT)| Name | Type | Description |
|---|---|---|
| unit | LengthUnits | Unit to convert returned position to. |
| timeout | float | Number of seconds to wait for response from the device chain (defaults to 60s). |
float Current position that has been converted to the provided unit.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.move_absolute(position, unit = Units.NATIVE, timeout = DEFAULT_MOVEMENT_TIMEOUT)| Name | Type | Description |
|---|---|---|
| position | float | Absolute position. |
| unit | LengthUnits | Unit for the provided position as well as position returned by the device. |
| timeout | float | Number of seconds to wait for response from the device chain (defaults to 60s). |
float Current position that has been converted to the provided unit.device.move_relative(position, unit = Units.NATIVE, timeout = DEFAULT_MOVEMENT_TIMEOUT)| Name | Type | Description |
|---|---|---|
| position | float | Relative position. |
| unit | LengthUnits | Unit for the provided position as well as position returned by the device. |
| timeout | float | Number of seconds to wait for response from the device chain (defaults to 60s). |
float Current position that has been converted to the provided unit.device.move_velocity(velocity, unit = Units.NATIVE)| Name | Type | Description |
|---|---|---|
| velocity | float | Movement velocity. |
| unit | VelocityUnits | Unit to convert returned velocity to. |
float Device velocity that has been converted to the provided unit.device.stop(unit = Units.NATIVE, timeout = DEFAULT_MOVEMENT_TIMEOUT)| Name | Type | Description |
|---|---|---|
| unit | LengthUnits | Unit to convert returned position to. |
| timeout | float | Number of seconds to wait for response from the device chain (defaults to 60s). |
float Current position that has been converted to the provided unit.