T-Series/Commands/Set Device Mode/A-Series Linear Motorized Devices
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.
| Instruction Name | Set Device Mode |
|---|---|
| Applies to | A-Series linear motorized devices |
| Firmware Version | 6.xx |
| Command Number | 40 |
| Command Type | Setting |
| Command Data | Mode |
| Reply Data | Mode |
| Safe to retry? | Yes |
| Returns Current Position? | No |
| Persistence | Non-Volatile |
| Summary | Sets the Device Mode for the given device. |
This command allows setting several options, each controlled by a single bit within the command data. In A-Series devices, this command is replaced by individual setting commands. This command is deprecated but is supported for backward compatibility.
To determine what decimal value to use, 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. Any unused or reserved bits should be left as 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)
For example, suppose you want all mode bits to be 0 except for bit_3 (disable knob) and bit_6 (enable message Ids). The Set Device Mode instruction should be sent with data calculated as follows:
- Command Data
- = 2^3 + 2^6
- = 8 + 64
- = 72
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 knob. If you then send another Set Device Mode command with data of 64 to enable message IDs, you will re-enable the knob since bit_3 in the 2nd instruction is 0.
Most devices have a default mode setting of 0 (all bits are 0).
| Bit_n | 2^n | Description
|
| bit_0 | 1 | Disable Auto-reply A value of 1 disables ALL replies except those to “return” commands. The default value is 0. |
| bit_1 | 2 | Reserved |
| bit_2 | 4 | Reserved |
| bit_3 | 8 | Disable Knob A value of 1 disables knob functionality. All knob turns and depresses are ignored. The default value is 0. |
| bit_4 | 16 | Enable Move Tracking A value of 1 enables the Move Tracking response during move commands. The device will return its position periodically when a move command is executed. The Disable Auto-Reply option above takes precedence over this option. The default value is 0. |
| bit_5 | 32 | Disable Manual Move Tracking A value of 1 disables the Manual Move Tracking response during manual moves. The Disable Auto-Reply option above takes precedence over this option. The default value is 0. |
| bit_6 | 64 | Enable Message Ids A value of 1 enables Message Ids. When message id is enabled, only bytes 3 through 5 in the command requests and responses are used for data. Byte 6 is used as an id byte that the user can set to any value they wish. When the device receives a command request with a certain id byte, it will reply with a command response containing the same id byte. This allows the user application to monitor communication packets individually to implement error detection and recovery. The default value is 0. |
| bit_7 | 128 | Home Status This value indicates whether a device has been homed and has a valid position reference. 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. |
| bit_8 | 256 | Reserved |
| bit_9 | 512 | Reverse Knob A value of 1 reverses the direction of the travel when the knob is turned. The default value is 0. |
| bit_10 | 1,024 | Reserved |
| bit_11 | 2,048 | Reserved |
| bit_12 | 4,096 | Reserved |
| bit_13 | 8,192 | Reserved |
| bit_14 | 16,384 | Reserved |
| bit_15 | 32,768 | Reserved |