T-Series/Commands/Set Device Mode/A-MCA

From ZaberWiki
Jump to: navigation, search

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 motor controllers
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.

See Set Auto-Reply Disabled Mode (Cmd 101)

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.

See Set Knob Disabled Mode (Cmd 107)

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.

See Set Move Tracking Mode (Cmd 115)

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.

See Set Manual Move Tracking Disabled Mode (Cmd 116)

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.

See Set Message Id Mode (Cmd 102)

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.

See Set Home Status (Cmd 103)

bit_8 256 Disable Auto-Home
A value of 1 prevents the home sensor from triggering a homing procedure during a movement command. This allows rotational devices to move multiple revolutions without re-triggering the homing mechanism.

See Set Auto-Home Disabled Mode (Cmd 105)

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.

See Set Knob Direction (Cmd 108)

bit_10 1,024 Reserved
bit_11 2,048 Reserved
bit_12 4,096 Set Home Switch Logic
A value of 1 indicates that the peripheral is installed with an active high home sensor. Most Zaber peripherals have active low home sensors. For peripherals installed with active high home sensors, this bit must be changed from the default setting in order for the home sensor to function correctly. Damage to the home sensor or actuator may result if this bit is set improperly.

See Set Home Sensor Type (Cmd 104)

bit_13 8,192 Reserved
bit_14 16,384 Reserved
bit_15 32,768 Reserved


Personal tools
Zaber Website