T-Series/Compilation/Commands for motion products
From ZaberWiki
Warning: This is an "include" page. As such, its contents may be included in multiple other pages. To see a list of all pages that include this page, click on "What links here" in the bottom left navbar. If you make changes to this page, be sure that your changes are appropriate to all pages on which this content will be included. You are also encouraged to review our Zaber Wiki Editing Guidelines. This header will not be included in other pages.
[edit] Detailed Command Reference
The version of firmware installed on any Zaber T-Series device can be determined by issuing command #51. A three-digit number will be returned. Assume 2 decimal places (ex a reply of 293 indicates firmware version 2.93). This command reference applies only to firmware version 5.00 and up (the most recent version). For earlier versions of firmware, please consult the appropriate PDF user's manual:
Due to the addition of new features, newer versions of firmware may not be 100% backward compatible. You may wish to read the document Firmware History and Migration which outlines the changes that have taken place from one firmware version to the next and indicates what options are available if you wish to upgrade or downgrade the firmware on your devices.
[edit] Reset - Cmd 0
| Instruction Name | Reset |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 0 |
| Command Type | Command |
| Command Data | Ignored |
| Reply Data | None |
| Persistence | n/a |
| Summary | Sets the device to its power-up condition. |
This has the same effect as unplugging and restarting the device.
[edit] Special Note
The position stored in the device prior to this command will be lost, so you must save it and reload it if it is important. All non-volatile settings (i.e. Device Number, Target Velocity, etc.) are saved and are not affected by reset or power-down.
[edit] Home - Cmd 1
| Instruction Name | Home |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 1 |
| Command Type | Command |
| Command Data | Ignored |
| Reply Data | Final Position |
| Persistence | n/a |
| Summary | Causes a motion control device to back up to the home position and reset its internal position to 0. |
Upon receiving this instruction, a motion control device will retract until its internal home sensor triggers. It will then move forward several steps to avoid accidentally re-triggering the home sensor during use. If a home offset has been specified with the Set Home Offset (command #47) instruction, the device will extend the additional distance specified. It will then stop and reset its internal position register, effectively setting the final position to 0.
[edit] Renumber - Cmd 2
| Instruction Name | Renumber |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 2 |
| Command Type | Command |
| Command Data | New Number |
| Reply Data | Device Id |
| Persistence | Non-Volatile |
| Summary | Assigns new numbers to all the devices in the order in which they are connected. |
If sent to device number 0, the command data is ignored and all devices will renumber. The device closest to the computer becomes device number 1. The next device becomes number 2 and so forth. If sent to a device number other than 0, then specified device will reassign itself the device number in the command data. Renumbering takes about 1/2 a second during which time the computer must not send any further data. The device number is stored in non-volatile memory so you can renumber once and not worry about issuing the renumber instruction again after each power-up.
[edit] Store Current Position - Cmd 16
| Instruction Name | Store Current Position |
|---|---|
| Firmware Version | 5.04 and up |
| Command Number | 16 |
| Command Type | Command |
| Command Data | Address |
| Reply Data | Address |
| Persistence | Non-Volatile |
| Summary | Saves the current absolute position of the device. |
Valid Address values are 0 through 15 specifying one of 16 possible registers in which to store the position. This command can only be executed when the device has been homed. This command is used in conjunction with the Return Stored Position (Command #17) and Move To Stored Position (Command #18) instructions. The positions stored in the position registers are non-volatile and will persist after power-down or reset. All position registers are cleared by the Restore Settings (Command #36) instruction.
[edit] Return Stored Position - Cmd 17
| Instruction Name | Return Stored Position |
|---|---|
| Firmware Version | 5.04 and up |
| Command Number | 17 |
| Command Type | Command |
| Command Data | Address |
| Reply Data | Stored Position |
| Persistence | n/a |
| Summary | Returns the position stored in one of the 16 position registers for the device. |
Valid address values are 0 through 15, specifying one of 16 possible registers from which to retrieve the position. This command is used in conjunction with the Store Current Position (#16) and Move To Stored Position (#18) commands. Positions stored in the position registers are non-volatile and will persist after power-down or reset. All position registers are cleared by the Restore Factory Settings (#36) command.
[edit] Move To Stored Position - Cmd 18
| Instruction Name | Move To Stored Position |
|---|---|
| Firmware Version | 5.04 and up |
| Command Number | 18 |
| Command Type | Command |
| Command Data | Address |
| Reply Data | Final Position |
| Persistence | n/a |
| Summary | Moves the device to the stored position specified by the Command Data. |
Valid address values are 0 through 15, specifying one of 16 possible positions. This command is used in conjunction with the Store Current Position (#16) and Return Stored Position (#17) commands. All move commands are pre-emptive. If a new move command is issued before the previous move command is finished, the device will immediately move to the new position. The target speed and acceleration during a move can be specified using commands 42 and 43 respectively. This command may pre-empt, or be pre-empted by commands 18, 20, 21, 22 and 23.
[edit] Move Absolute - Cmd 20
| Instruction Name | Move Absolute |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 20 |
| Command Type | Command |
| Command Data | Absolute Position |
| Reply Data | Final position |
| Persistence | n/a |
| Summary | Moves the device to the position specified in the Command Data in microsteps. |
The position must be within the acceptable range for the device or an error code will be returned. All move commands are pre-emptive. If a new move command is issued before the previous move command is finished, the device will immediately move to the new position. The target speed and acceleration during a move absolute instruction can be specified using commands 42 and 43 respectively.
Command may pre-empt, or be pre-empted by commands 18, 20, 21, 22 and 23.
[edit] Move Relative - Cmd 21
| Instruction Name | Move Relative |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 21 |
| Command Type | Command |
| Command Data | Relative Position |
| Reply Data | Final Position |
| Persistence | n/a |
| Summary | Moves the device by the positive or negative number of microsteps specified in the Command Data. |
The device moves to the position given by its position before the command plus the value in command data. The final position must be within the acceptable range for the device or an error code will be returned. All move commands are pre-emptive. If a move relative command is issued while the device is currently moving due to a previous command, the device will immediately set a new target position equal to the current position (at the instant the command was received) plus the specified relative position. The target speed and acceleration during a move relative instruction can be specified using commands 42 and 43 respectively. The relative move command data (in microsteps) can be negative.
This command may pre-empt, or be pre-empted by commands 18, 20, 21, 22 and 23.
[edit] Move At Constant Speed - Cmd 22
| Instruction Name | Move At Constant Speed |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 22 |
| Command Type | Command |
| Command Data | Speed |
| Reply Data | Speed |
| Persistence | n/a |
| Summary | Moves the device at a constant speed based on the value specified in the Command Data. |
This instruction specifies a direction and a speed to move, rather than a target position. When this instruction is issued the device will accelerate (at a rate determined by command #43 Set Acceleration) to the speed specified by the instruction data. The device will continue moving at this speed until a limit is reached or a pre-empting instruction is issued. Negative speeds cause retraction while positive speeds cause extension.
To determine the actual speed that will result from a given data value, the following formulas may be used:
- Actual Speed
- = 9.375*(Command Data) [microsteps/sec] or
- = 9.375*(Command Data)/R [steps/sec] or
- = 562.5*(Command Data)/(R*S) [revolutions/min]
Where:
- Command Data is the absolute value of the Constant Speed Move instruction data
- R (microsteps/step) is the microstep resolution (command 37)
- S (steps/revolution) is the number of steps per revolution of the motor
For example, if S = 48, R = 64, and the Constant Speed Move instruction is issued with Data of 2922, then the device will move forward at a speed of approximately 535 revolutions per minute. For linear devices consult the section on Device Specific Information to determine the linear distance corresponding to a single step or revolution.
The maximum Data allowable is 512*R. Note that although the maximum data allowable depends on the resolution, the maximum speed possible is independent of the resolution. This can be seen by substituting Data = 512*R into the second formula above, giving a maximum speed (regardless of resolution) of 4800 steps/sec.
The device may be set to return its position continuously during the move using the set mode command (#40) bit 4. Position tracking is a reply-only command #8. If the device runs into zero position or maximum range, the device stops and the new position is returned via reply-only command #9.
This command may pre-empt, or be pre-empted by commands 18, 20, 21, 22 and 23.
[edit] Stop - Cmd 23
| Instruction Name | Stop |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 23 |
| Command Type | Command |
| Command Data | Ignored |
| Reply Data | Final Position |
| Persistence | n/a |
| Summary | Stops the device from moving by preempting any move instruction. |
This instruction can be used to pre-empt any move instruction. The device will decelerate (at a rate determined by command #43 Set Acceleration) and stop. The reply data is the current absolute position.
This command may pre-empt, or be pre-empted by commands 18, 20, 21, and 22.
[edit] Read Or Write Memory - Cmd 35
| Instruction Name | Read Or Write Memory |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 35 |
| Command Type | Command |
| Command Data | Data |
| Reply Data | Data |
| Persistence | Non-Volatile |
| Summary | Reads or writes a byte of non-volatile memory. |
128 bytes of memory are available for user data. For example, the user may want to save some custom data such as a serial number, a name string, or data that uniquely identifies a particular device. Data written is not cleared by power down or reset. The most significant bit of byte 3 specifies whether the instruction is a read (0) or a write (1). The least significant 7 bits of byte 3 specify the address to read/write (0 to 127). Byte 4 specifies the value to be written. Bytes 5 and 6 are ignored.
These settings are stored in non-volatile memory and will persist after power-down or reset.
[edit] Restore Settings - Cmd 36
| Instruction Name | Restore Settings |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 36 |
| Command Type | Command |
| Command Data | Peripheral Id |
| Reply Data | Peripheral Id |
| Persistence | Non-Volatile |
| Summary | Restores the device settings to the factory defaults. |
This command should be issued with a Peripheral Id of 0 to return the device to factory default settings. This instruction is very useful for troubleshooting. If the device does not appear to function properly, it may be because some of the settings have been changed. This instruction will restore the settings to default values. For a table of default settings, see Appendix A. All settings affected by this instruction are stored in non-volatile memory and will persist after power-down or reset.
[edit] Set Microstep Resolution - Cmd 37
| Instruction Name | Set Microstep Resolution |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 37 |
| Command Type | Setting |
| Command Data | Microsteps |
| Reply Data | Microsteps |
| Persistence | Non-Volatile |
| Summary | Changes the number of microsteps per step. |
Valid data are 1, 2, 4, 8, 16, 32, 64, and 128. The default on most devices is 64. All position data sent to or received from T-Series products is in units of microsteps. Note that when you change the microstep resolution using this command, other position related settings are changed automatically to adjust for the new microstep size. The table below gives an example showing how other settings are affected when the microstep resolution is changed from 128 to 64:
| Setting | Before | After |
| Target Speed * | 2922 | 1461 |
| Maximum Travel Range * | 280000 | 140000 |
| Current Position | 10501 ** | 5250 ** |
| Maximum Relative Move * | 20000 | 10000 |
| Home Offset * | 1000 | 500 |
| Acceleration * | 100 | 50 |
* The settings for these commands are saved in non-volatile memory, i.e. the settings persist even if the device is powered down. To restore all non-volatile settings to factory default, use Restore Settings (command 36).
** Note that if a number is divided by two, it is rounded down to the nearest whole number. The only exception to this is if acceleration would become 0 (because 0 for acceleration indicates infinite acceleration). If acceleration would become 0, it will instead be set to 1 which is the lowest acceleration possible.
[edit] Set Running Current - Cmd 38
| Instruction Name | Set Running Current |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 38 |
| Command Type | Setting |
| Command Data | Value |
| Reply Data | Value |
| Persistence | Non-Volatile |
| Summary | Places a current limit on the device. |
The current is related to the data by the formula:
- RunningCurrent = CurrentCapacity*10/CommandData
The Command Data can be either 0 (no current) or 10 (maximum current) through 127 (minimum current). Note that values of 1 through 9 are not accepted. CurrentCapacity is the hardware’s maximum capability of output current. In other words, as a fraction of the maximum current the device is capable of, the running current will be 10/CommandData.
[edit] Special Note
Most devices limit the voltage rather than the current. In this case you can think of the CurrentCapacity as the power supply voltage and the RunningCurrent as the effective voltage being applied to the motor. For example, if a product uses a 5V motor and has a 15V power supply, the running current might be set as follows:
- Command Data
- = 10 * CurrentCapacity / RunningCurrent
- = 10 * 15V / 5V
- = 30
If your application does not require high torque, it is best to decrease the RunningCurrent to reduce power consumption, vibration, and motor heating. Trial and error should suggest an appropriate setting. If higher torque is required, it is generally safe to overdrive motors as long as they are not operated continuously. Motor temperature is typically the best indication of the degree to which overdriving can be employed. If the motor gets too hot to touch (>75°C), you should reduce the running current.
[edit] Set Hold Current - Cmd 39
| Instruction Name | Set Hold Current |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 39 |
| Command Type | Setting |
| Command Data | Value |
| Reply Data | Value |
| Persistence | Non-Volatile |
| Summary | Sets the desired current to be used when the device is holding its position. |
The formula for the hold current works the same way as for running current:
- HoldCurrent = CurrentCapacity * 10 / CommandData
It is typical to run stepper motors at their rated current only during moves (for highest torque) and reduce the current when idle just to hold the position.
The range of accepted values is 10 - 127 (and 0). Typically the hold current can be set to around 25 - 50% of the running current. If the running current is set to a value of 24, the hold current may be set to a value of 48 to provide 50% hold. In some applications, the friction of the drive system alone is sufficient to hold the microstep position of the motor, and the hold current can be turned off completely. The hold current can be turned off by issuing the "Set Hold Current" instruction with data of 0.
When the device is moving, it applies running current to the motor. When the device stops moving, running current is applied for an additional 0.1 second before hold current is applied.
[edit] Set Device Mode - Cmd 40
| Instruction Name | Set Device Mode |
|---|---|
| Firmware Version | 5.04 and up |
| Command Number | 40 |
| Command Type | Setting |
| Command Data | Mode |
| Reply Data | Mode |
| Persistence | Non-Volatile |
| Summary | Sets the Mode for the given device. |
[edit] Special Note
This command allows setting several options. Each option is controlled by a single bit within the command data. Most software you will encounter, including most of our demo software, represents all 4 data bytes as a single decimal value rather than specifying each bit individually. To determine what decimal value to use requires a basic understanding of how the data is represented in binary. The command data may be considered as a single 32-bit binary value. The least significant bit is bit_0, the next is bit_1, the next is bit_2, and so on up to the most significant bit_31. Each bit may have a value of either 1 or 0.
The corresponding decimal representation of this 32-bit data is given by:
- Decimal value = (bit_0 * 1) + (bit_1 * 2) + … + (bit_n * 2^n) + … + (bit_31 * 2^31)
Each bit controls a single mode option as described in the table below. To determine the data value to use with the Set Device Mode command, simply determine the desired value of each bit (1 or 0), and calculate the decimal value using the above formula. Note that not all 32 bits are currently used. Any unused or reserved bits should be left as 0.
For example, suppose you want all mode bits to be 0 except for bit_3 (disable potentiometer), bit_14 (disable power LED), and bit_15 (disable serial LED). The Set Device Mode instruction should be sent with data calculated as follows:
- Command Data
- = 2^23 + 2^214 + 2^215
- = 8 + 16384 + 32768
- = 49160
Note that each instance of the Set Device Mode command overwrites ALL previous mode bits. Repeated commands do not have a cumulative effect. For example, suppose you send a Set Device Mode command with data of 8 to disable the potentiometer. If you then send another Set Device Mode command with data of 16384 to disable the power LED, you will re-enable the potentiometer since bit_3 in the 2nd instruction is 0.
Most devices have a default mode setting of 0 (all bits are 0), however, there are some exceptions. See Appendix A of the user manual for a table of default settings.
| Bit_n | 2n | Description
|
| bit_0 | 1 | Disable Auto-reply A value of 1 disables ALL replies except those to “return” commands (commands 50 and higher). The default value is 0 on all devices. |
| bit_1 | 2 | Enable Anti-backlash Routine A value of 1 enables anti-backlash. On negative moves (retracting), the device will overshoot the desired position by 640 microsteps (assuming 64 microsteps/step), reverse direction and approach the requested position from below. On positive moves (extending), the device behaves normally. Care must be taken not to crash the moving payload into a fixed object due to the 640 microsteps overshoot on negative moves. The default value is 0 on all devices. See note on anti-backlash and anti-sticktion below. * |
| bit_2 | 4 | Enable Anti-sticktion Routine A value of 1 enables the anti-sticktion routine. On moves less than 640 microsteps (assuming 64 microsteps/step), the device will first retract to a position 640 microsteps less than the requested position and approach the requested position from below. Care must be taken not to crash the moving payload into a fixed object due to the 640 microsteps negative move. The default value is 0 on all devices. See section on anti-backlash and anti-sticktion below this table. * |
| bit_3 | 8 | Disable Potentiometer A value of 1 disables the potentiometer preventing manual adjustment of the device. The default value is 0 on all devices. |
| bit_4 | 16 | Enable Constant Speed Position Tracking A value of 1 enables position tracking during constant speed commands. The device will return its position periodically when a constant speed command is executed. The Disable Auto-Reply option above takes precedence over this option. The default value is 0 on all devices. |
| bit_5 | 32 | Disable Manual Position Tracking A value of 1 disables automatic position replies during manual moves. The Disable Auto-Reply option above takes precedence over this option. The default value is 0 on all devices. |
| bit_6 | 64 | Enable Message Ids A value of 1 enables Message Ids. In this mode of communication, only bytes 3 through 5 are used for data. Byte 6 is used as an Id byte that the user can set to any value they wish. It will be returned unchanged in the reply. Message Ids allow the users application to monitor communication packets individually to implement error detection and recovery. The default value is 0 on all devices. Prior to firmware version 5.06, this feature was called "Virtual Channels Mode" and did not behave reliably. We do not recommend enabling this mode of communications unless you have firmware version 5.06 or later. |
| bit_7 | 128 | Home Status This bit is set to 0 automatically on power-up or reset. It is set automatically when the device is homed or when the position is set using command #45. It can be used to detect if a device has a valid position reference. It can also be set or cleared by the user. |
| bit_8 | 256 | Disable Auto-Home A value of 1 disables auto-home checking. Checking for trigger of home sensor is only done when home command is issued. This allows rotational devices to move multiple revolutions without re-triggering the home sensor. |
| bit_9 | 512 | Reverse Potentiometer A value of 1 reverses the direction of the travel when the potentiometer is used to control the device. This mode bit was introduced in firmware version 5.06. Prior to that it was not used. |
| bit_10 | 1,024 | Reserved |
| bit_11 | 2,048 | Enable Circular Phase Microstepping Square phase microstepping is employed by default. A value of 1 enables circular phase microstepping mode. The differences are: Circular Phase:
Square Phase:
|
| bit_12 | 4,096 | Reserved |
| bit_13 | 8,192 | Reserved |
| bit_14 | 1,6384 | Disable Power LED A value of 1 turns off the green power LED. It will still blink briefly, immediately after powerup. |
| bit_15 | 32,768 | Disable Serial LED A value of 1 turns off the yellow serial LED. |
*Anti-backlash and Anti-sticktion routines are designed to compensate for backlash and sticktion. The solution to backlash is to always approach a position from the same direction. The solution to sticktion is to move the device far enough away from the final position to break free of sticktion before attempting the final move. The operation of the two features are dependent on each other, and the interaction of enabling one or both of the features is described in the diagram to the right.
For each setting scenario, the starting position is denoted by the solid vertical line and the final position is denoted by the dotted vertical line. There are four possible moves for each scenario: long move positive, long move negative, short move positive and short move negative. The arrows show the path that would be traversed for each scenario.
[edit] Set Target Speed - Cmd 42
| Instruction Name | Set Target Speed |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 42 |
| Command Type | Setting |
| Command Data | Speed |
| Reply Data | Speed |
| Persistence | Non-Volatile |
| Summary | Sets the speed at which the device moves when using the "Move Absolute" or "Move Relative" commands. |
When a move absolute or move relative instruction is issued, the device will accelerate at a rate determined by the acceleration setting up to a maximum speed determined by this command, “Set Target Speed". To determine the actual speed that will result from a given data value, the following formulas may be used:
- Actual Speed
- = 9.375*Data [microsteps/sec] or
- = 9.375*Data/R [steps/sec] or
- = 562.5*Data/(R x S) [revolutions/min]
Where:
- "Data" is the value of the Set Target Speed command data
- R (microsteps/step) is the microstep resolution (command 37)
- S (steps/revolution) is the number of steps per revolution of the motor
For example, if S = 48, R = 64, and the Constant Speed Move instruction is issued with Data of 2922, then the device will move forward at a speed of approximately 535 revolutions per minute. For linear devices consult the section on Device Specific Information to determine the linear distance corresponding to a single step or revolution.
Valid data values are from 0 to (512*R-1). Note that although the maximum data allowable depends on the resolution, the maximum speed possible is independent of the resolution. This can be seen by substituting Data = 512*R into the second formula above, giving a maximum speed (regardless of resolution) of 4800 steps/sec.
The target velocity may be changed on-the-fly even when the device is in the middle of a move. The device will automatically adjust the velocity, but still target the final position specified in the original move.
[edit] Set Acceleration - Cmd 43
| Instruction Name | Set Acceleration |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 43 |
| Command Type | Setting |
| Command Data | Acceleration |
| Reply Data | Acceleration |
| Persistence | Non-Volatile |
| Summary | Sets the acceleration used by the movement commands. |
When a movement command is issued, the device will accelerate at a rate determined by this command "Set Acceleration" up to a maximum speed determined by the target velocity. To determine the acceleration that will result from a given data value, the following formulas may be used:
- Actual Acceleration
- = 11250*(Command Data) [microsteps/sec^2]
- = 11250*(CommandData/R) [steps/sec^2]
Where:
- "Command Data" is the value specified in the Command Data by the user
- R is the microstep resolution set in command #37(microsteps/step)
The maximum value allowable is (512*R-1). This is the same as the maximum allowable data for velocity, which means that the device will reach maximum velocity immediately. If acceleration is set to 0, it is as if acceleration is set to (512*R-1). Effectively acceleration is turned off and the device will start moving at the target speed immediately.
The acceleration may be changed on-the-fly even when the device is in the middle of a move. The device will still target the final position specified in the original move.
[edit] Set Maximum Range - Cmd 44
| Instruction Name | Set Maximum Range |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 44 |
| Command Type | Setting |
| Command Data | Range |
| Reply Data | Range |
| Persistence | Non-Volatile |
| Summary | Sets a limit on the range of travel up to 16777216. |
Use this command to limit the range of travel to a value other than the default. Exercise caution since using this command it is possible to set the range to a value greater than the physical limits of the device. The maximum range you can set is 16777216 microsteps.
This setting is stored in non-volatile memory and will persist after power-down or reset.
[edit] Set Current Position - Cmd 45
| Instruction Name | Set Current Position |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 45 |
| Command Type | Setting |
| Command Data | New Position |
| Reply Data | New Position |
| Persistence | Volatile |
| Summary | Sets the the internal register that holds the position to the value specified in the command data. |
The phase of the stepper motor is controlled by the least significant byte of the position, thus the device may move by +/- 2 full steps unless the new position corresponds to the true current position of the device. This command is useful if you want to turn off the system without losing position. Simply save the position in the controlling computer and turn off the hold current before powering down. After powering up, set the position back to the saved value and turn on the hold current. In this way you can continue without having to home the device. You have to turn off the hold current because when the power first comes on the position will default to the maximum range, and that may be out of phase with the motor's current position. If the hold current is on, it will force the motor into phase with the default position before you've had a chance to restore the current position.
The position data is volatile and will not persist after power-down or reset.
[edit] Set Maximum Relative Move - Cmd 46
| Instruction Name | Set Maximum Relative Move |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 46 |
| Command Type | Setting |
| Command Data | Range |
| Reply Data | Range |
| Persistence | Non-volatile |
| Summary | Sets a limit on the number of microsteps the device can make for a Relative Move command. |
Use this command to limit the maximum range of travel for a relative move command. For example, if maximum relative move is set to 1000, and the user requests a relative move (#21) of 800, then the device will move 800 microsteps. However, if the user requests a relative move of 1200, then the device will reply with an error code. Most applications can leave this unchanged from the default.
This setting is stored in non-volatile memory and will persist after power-down or reset.
[edit] Set Home Offset - Cmd 47
| Instruction Name | Set Home Offset |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 47 |
| Command Type | Setting |
| Command Data | Offset |
| Reply Data | Offset |
| Persistence | Non-Volatile |
| Summary | Sets the the new "Home" position which can then be used when the Home command is issued. |
When the home command is issued, the device will retract until the home sensor is triggered, then move forward until the home sensor is no longer triggered, then move forward by the Home Offset value (in microsteps) and call this position 0.
Note that the home offset command also changes the range. For example, if the initial home offset is 0 and the range is 500,000, and the user changes the home offset to 70,000, then the range is automatically adjusted to be 430,000. However, changing the range does not affect the home offset.
This setting is stored in non-volatile memory and will persist after power-down or reset.
[edit] Set Alias Number - Cmd 48
| Instruction Name | Set Alias Number |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 48 |
| Command Type | Setting |
| Command Data | Alias Number |
| Reply Data | Alias Number |
| Persistence | Non-Volatile |
| Summary | Sets an alternate device number for a device. |
This setting specifies an alternate device number for a device (in addition to its actual device number). By setting several devices to the same alias number, you can control a group of devices with a single instruction. When you send an instruction to an alias number, all devices with that alias number will execute the instruction and reply using their actual device numbers. To remove an alias, simply set the device's alias number to zero. Valid alias numbers are between 0 and 254. To avoid confusion, it is best to choose an alias greater than the number of devices connected.
This setting is stored in non-volatile memory and will persist after power-down or reset.
[edit] Set Lock State - Cmd 49
| Instruction Name | Set Lock State |
|---|---|
| Firmware Version | 5.07 and up |
| Command Number | 49 |
| Command Type | Setting |
| Command Data | Lock State |
| Reply Data | Lock State |
| Persistence | Non-Volatile |
| Summary | Locks or unlocks all non-volatile settings. |
Sometimes it is desirable to lock all non-volatile settings to prevent them from being changed inadvertently. After changing all settings as desired, settings can be locked by setting the Lock State to 1. Subsequent attempts to change any non-volatile setting (e.g., Set Target Speed, command 42) will result in an Error Response with an error code of 3600 (settings locked).
How the Restore Settings instruction behaves when the settings are locked depends on the firmware version. In version 5.07 issuing a Restore Settings instruction while the settings are locked will result in an Error Response with an error code of 3600 (settings locked). This behavior was found to confuse many customers so in version 5.08 and up, the behavior was changed such that regardless of the current lock state, issuing a Restore Settings instruction will always return setting values to factory default values and leave settings in an unlocked state.
Settings can also be unlocked by setting the Lock State to 0.
[edit] Return Device Id - Cmd 50
| Instruction Name | Return Device Id |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 50 |
| Command Type | Read-Only Setting |
| Command Data | Ignored |
| Reply Data | Device Id |
| Persistence | n/a |
| Summary | Returns the id number for the type of device connected. |
See the T-Series/Device_Ids wiki page for a table of device Ids for all Zaber products.
[edit] Return Firmware Version - Cmd 51
| Instruction Name | Return Firmware Version |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 51 |
| Command Type | Read-Only Setting |
| Command Data | Ignored |
| Reply Data | Version |
| Persistence | n/a |
| Summary | Returns the firmware version installed on the device. |
A decimal is assumed before the last two digits. For example, 502 indicates firmware version 5.02.
[edit] Return Power Supply Voltage - Cmd 52
| Instruction Name | Return Power Supply Voltage |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 52 |
| Command Type | Read-Only Setting |
| Command Data | Ignored |
| Reply Data | Voltage |
| Persistence | n/a |
| Summary | Returns the voltage level of the device's power supply. |
A decimal is assumed before the last digit. For example, a value of 127 indicates 12.7 V. Note that the internal voltage measurement is not very accurate. Don't be alarmed if the indicated voltage is slightly different from your measurements.
[edit] Return Setting - Cmd 53
| Instruction Name | Return Setting |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 53 |
| Command Type | Command |
| Command Data | Setting Number |
| Reply Data | Setting Value |
| Persistence | n/a |
| Summary | Returns the current value of the setting specified in the Command Data. |
Valid setting numbers are the command numbers of any "Set..." instruction. The device will reply using the command number of the specified setting (as if a command to change the setting had just been issued) but the setting will not be changed.
For example, command #48 is the "Set Alias" instruction. Therefore if you wish to return the current value of the alias number, simply send the Return Setting instruction with data of 48. The device will reply with command #48 and data equal to the setting value.
[edit] Return Status - Cmd 54
| Instruction Name | Return Status |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 54 |
| Command Type | Read-Only Setting |
| Command Data | Ignored |
| Reply Data | Status |
| Persistence | n/a |
| Summary | Returns the current status of the device. |
Status codes are as follows:
- 0 - idle, not currently executing any instructions
- 1 - executing a home instruction
- 10 - executing a manual move (i.e. the manual control knob is turned)
- 20 - executing a move absolute instruction
- 21 - executing a move relative instruction
- 22 - executing a move at constant speed instruction
- 23 - executing a stop instruction (i.e. decelerating)
[edit] Echo Data - Cmd 55
| Instruction Name | Echo Data |
|---|---|
| Firmware Version | 5.04 and up |
| Command Number | 55 |
| Command Type | Command |
| Command Data | Data |
| Reply Data | Data |
| Persistence | n/a |
| Summary | Echoes back the same Command Data that was sent. |
This command is useful for testing communication, similar to a network "ping".
[edit] Reply-Only Reference
In general, a T-series device will reply to an instruction using the same command number as the instruction itself. However, there are occasions (such as when the user turns the potentiometer) when the device may transmit data without first receiving a request from the controlling computer. This type of reply may be considered to be a triggered reply as opposed to a requested reply. In this case the device uses a “reply-only” command number to distinguish the reply from those requested by the controlling computer. The meanings of these replies and their corresponding data are given below.
[edit] Constant Speed Tracking - Cmd 8
| Instruction Name | Constant Speed Tracking |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 8 |
| Command Type | Reply |
| Command Data | n/a |
| Reply Data | Tracking Position |
| Persistence | n/a |
| Summary | Indicates to the user that the device has been set to a position tracking mode and given a move instruction. |
The device has been set to position tracking mode (see Set Mode instruction) and given a move instruction. In this mode, the device sends this reply every 0.25 seconds updating the current absolute position (in microsteps) during any move.
[edit] Limit Active - Cmd 9
| Instruction Name | Limit Active |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 9 |
| Command Type | Reply |
| Command Data | n/a |
| Reply Data | Final Position |
| Persistence | n/a |
| Summary | Indicates to the user that the device has reached one of the limits of travel. |
This response from a device indicates that it reached one of the limits of travel (either the minimum position or maximum position). For example, if a device is sent a “move at constant speed” instruction, and it reaches the maximum range of travel then the device will reply with this command number and the maximum position reached as data.
[edit] Manual Move Tracking - Cmd 10
| Instruction Name | Manual Move Tracking |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 10 |
| Command Type | Reply |
| Command Data | n/a |
| Reply Data | Tracking position |
| Persistence | n/a |
| Summary | A reply that is sent when the manual control knob is turned. |
The device has been moved manually (the knob is turned). If enabled with the Set Mode instruction, the device sends this reply at regular intervals updating the current position during manual moves.
[edit] Error - Cmd 255
| Instruction Name | Error |
|---|---|
| Firmware Version | 5.00 and up |
| Command Number | 255 |
| Command Type | Reply |
| Command Data | n/a |
| Reply Data | Error Code |
| Persistence | n/a |
| Summary | Indicates to the user that an error has occurred. |
This reply indicates that an error has occurred. The error code returned in the data indicates the type of error. The device may send an error code as a reply to an invalid instruction, or it may autonomously send an error code as a triggered reply (i.e. not in response to an instruction). The error code is typically the command number of the instruction that caused the error, but not always.
[edit] Error Codes for Motion Products
| Code | Name | Description |
|---|---|---|
| 2 | Device Number Invalid | Renumbering data out of range. Data (Device number) must be between 1 and 254 inclusive. |
| 14 | Voltage Low | Power supply voltage too low. |
| 15 | Voltage High | Power supply voltage too high. |
| 20 | Absolute Position Invalid | Move Absolute - Target position out of range. |
| 21 | Relative Position Invalid | Move Relative - Target position out of range. |
| 22 | Velocity Invalid | Constant velocity move. Velocity out of range. |
| 36 | Peripheral Id Invalid | Restore Settings - peripheral id is invalid. Please use one of the peripheral ids listed in the user manual, or 0 for default. |
| 37 | Resolution Invalid | Invalid microstep resolution. Resolution may only be 1, 2, 4, 8, 16, 32, 64, 128. |
| 38 | Run Current Invalid | Run current out of range. Run current may be 0, or 10 - 127. |
| 39 | Hold Current Invalid | Hold current out of range. Hold current may be 0, or 10 - 127. |
| 40 | Mode Invalid | Set Device Mode - one or more of the mode bits is invalid. |
| 42 | Speed Invalid | Target speed out of range. The range of target speed is determined by the resolution. |
| 43 | Acceleration Invalid | Target acceleration out of range. The range of target acceleration is determined by the resolution. |
| 44 | Maximum Range Invalid | The maximum range may only be set between 0 and the resolution limit of the stepper controller, which is 16,777,215. |
| 45 | Current Position Invalid | Current position out of range. Current position must be between 0 and the maximum range. |
| 46 | Maximum Relative Move Invalid | Max relative move out of range. Must be between 0 and 16,777,215. |
| 47 | Offset Invalid | Home offset out of range. Home offset must be between 0 and maximum range. |
| 48 | Alias Invalid | Alias out of range. Alias must be between 0 and 254 inclusive. |
| 49 | Lock State Invalid | Lock state must be 1 (locked) or 0 (unlocked). |
| 53 | Setting Invalid | Return Setting - data entered is not a valid setting command number. Valid setting command numbers are the command numbers of any "Set ..." instructions. |
| 64 | Command Invalid | Command number not valid in this firmware version. |
| 255 | Busy | Another command is executing and cannot be pre-empted. Either stop the previous command or wait until it finishes before trying again. |
| 1600 | Save Position Invalid | Save Current Position register out of range (must be 0-15). |
| 1601 | Save Position Not Homed | Save Current Position is not allowed unless the device has been homed. |
| 1700 | Return Position Invalid | Return Stored Position register out of range (must be 0-15). |
| 1800 | Move Position Invalid | Move to Stored Position register out of range (must be 0-15). |
| 1801 | Move Position Not Homed | Move to Stored Position is not allowed unless the device has been homed. |
| 2146 | Relative Position Limited | Move Relative (command 20) exceeded maximum relative move range. Either move a shorter distance, or change the maximum relative move (command 46). |
| 3600 | Settings Locked | Must clear Lock State (command 49) first. See the Set Lock State command for details. |
| 4008 | Disable Auto Home Invalid | Set Device Mode - this is a linear actuator; Disable Auto Home is used for rotary actuators only. |
| 4010 | Bit 10 Invalid | Set Device Mode - bit 10 is reserved and must be 0. |
| 4012 | Home Switch Invalid | Set Device Mode - this device has integrated home sensor with preset polarity; mode bit 12 cannot be changed by the user. |
| 4013 | Bit 13 Invalid | Set Device Mode - bit 13 is reserved and must be 0. |

