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)
axis = device.get_axis(1)axis.storageAxisStorage Key-value storage of this axis. Requires at least Firmware 7.30.axis.generic_command(command, check_errors = True, timeout = 0)| Name | Type | Description |
|---|---|---|
| command | str | Command and its parameters. |
| 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.axis.generic_command_multi_response(command, check_errors = True, timeout = 0)| Name | Type | Description |
|---|---|---|
| command | str | Command and its parameters. |
| 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.axis.generic_command_no_response(command)| Name | Type | Description |
|---|---|---|
| command | str | Command and its parameters. |
axis.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.axis.get_position(unit = Units.NATIVE)| Name | Type | Description |
|---|---|---|
| unit | LengthUnits | Units of position. |
float Axis position.axis.move_absolute(position, unit = Units.NATIVE, wait_until_idle = True, velocity = 0, velocity_unit = Units.NATIVE, acceleration = 0, acceleration_unit = Units.NATIVE, cyclic_direction = None, extra_cycles = None)| Name | Type | Description |
|---|---|---|
| position | float | Absolute position. |
| unit | LengthUnits | Units of position. |
| wait_until_idle | bool | Determines whether function should return after the movement is finished or just started. |
| velocity | float | Movement velocity. Default value of 0 indicates that the maxspeed setting is used instead. |
| velocity_unit | VelocityUnits | Units of velocity. |
| acceleration | float | Movement acceleration. Default value of 0 indicates that the accel setting is used instead. |
| acceleration_unit | AccelerationUnits | Units of acceleration. |
| cyclic_direction | Optional[CyclicDirection] | Which direction a cyclic device should take to get to the target position. |
| extra_cycles | Optional[int] | Number of extra cycles to complete before stopping at the target. |
axis.move_index(index, wait_until_idle = True, velocity = 0, velocity_unit = Units.NATIVE, acceleration = 0, acceleration_unit = Units.NATIVE)| Name | Type | Description |
|---|---|---|
| index | int | Index position. Index positions are numbered from 1. |
| wait_until_idle | bool | Determines whether function should return after the movement is finished or just started. |
| velocity | float | Movement velocity. Default value of 0 indicates that the maxspeed setting is used instead. |
| velocity_unit | VelocityUnits | Units of velocity. |
| acceleration | float | Movement acceleration. Default value of 0 indicates that the accel setting is used instead. |
| acceleration_unit | AccelerationUnits | Units of acceleration. |
axis.move_max(wait_until_idle = True, velocity = 0, velocity_unit = Units.NATIVE, acceleration = 0, acceleration_unit = Units.NATIVE)| Name | Type | Description |
|---|---|---|
| wait_until_idle | bool | Determines whether function should return after the movement is finished or just started. |
| velocity | float | Movement velocity. Default value of 0 indicates that the maxspeed setting is used instead. |
| velocity_unit | VelocityUnits | Units of velocity. |
| acceleration | float | Movement acceleration. Default value of 0 indicates that the accel setting is used instead. |
| acceleration_unit | AccelerationUnits | Units of acceleration. |
axis.move_min(wait_until_idle = True, velocity = 0, velocity_unit = Units.NATIVE, acceleration = 0, acceleration_unit = Units.NATIVE)| Name | Type | Description |
|---|---|---|
| wait_until_idle | bool | Determines whether function should return after the movement is finished or just started. |
| velocity | float | Movement velocity. Default value of 0 indicates that the maxspeed setting is used instead. |
| velocity_unit | VelocityUnits | Units of velocity. |
| acceleration | float | Movement acceleration. Default value of 0 indicates that the accel setting is used instead. |
| acceleration_unit | AccelerationUnits | Units of acceleration. |
axis.move_relative(position, unit = Units.NATIVE, wait_until_idle = True, velocity = 0, velocity_unit = Units.NATIVE, acceleration = 0, acceleration_unit = Units.NATIVE)| Name | Type | Description |
|---|---|---|
| position | float | Relative position. |
| unit | LengthUnits | Units of position. |
| wait_until_idle | bool | Determines whether function should return after the movement is finished or just started. |
| velocity | float | Movement velocity. Default value of 0 indicates that the maxspeed setting is used instead. |
| velocity_unit | VelocityUnits | Units of velocity. |
| acceleration | float | Movement acceleration. Default value of 0 indicates that the accel setting is used instead. |
| acceleration_unit | AccelerationUnits | Units of acceleration. |
axis.move_sin(amplitude, amplitude_units, period, period_units, count = 0, wait_until_idle = True)| Name | Type | Description |
|---|---|---|
| amplitude | float | Amplitude of the sinusoidal motion (half of the motion's peak-to-peak range). |
| amplitude_units | LengthUnits | Units of position. |
| period | float | Period of the sinusoidal motion in milliseconds. |
| period_units | TimeUnits | Units of time. |
| count | float | Number of sinusoidal cycles to complete. Must be a multiple of 0.5 If count is not specified or set to 0, the axis will move indefinitely. |
| wait_until_idle | bool | Determines whether function should return after the movement is finished or just started. |
axis.move_sin_stop(wait_until_idle = True)| Name | Type | Description |
|---|---|---|
| wait_until_idle | bool | Determines whether function should return after the movement is finished. |
axis.move_velocity(velocity, unit = Units.NATIVE, acceleration = 0, acceleration_unit = Units.NATIVE)| Name | Type | Description |
|---|---|---|
| velocity | float | Movement velocity. |
| unit | VelocityUnits | Units of velocity. |
| acceleration | float | Movement acceleration. Default value of 0 indicates that the accel setting is used instead. |
| acceleration_unit | AccelerationUnits | Units of acceleration. |
axis.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.axis.set_state(state)| Name | Type | Description |
|---|---|---|
| state | str | The state object to apply to this axis. |
SetStateAxisResponse Reports of any issues that were handled, but caused the state to not be exactly restored.