T-Series/Commands/Set Message Id Mode

From ZaberWiki
Jump to: navigation, search

Set Message Id Mode - Cmd 102

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 Message Id Mode
Applies to A-Series devices
Firmware Version 6.xx
Command Number 102
Command Type Setting
Command Data Message Id Mode
Reply Data Message Id Mode
Safe to retry? Yes
Returns Current Position? No
Persistence Non-Volatile
Summary Enable message ids in device communication.

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.

0 - Message Id Disabled (Default)
All 4 data bytes are used for data
1 - Message Id Enabled
Only bytes 3 through 5 are used for data. Byte 6 is used as an id byte. Device always responds with a message id corresponding to that in the command request.
  • A device will not reply with the same message id more than once, unless user issues two commands with identical message id.
  • For any reply that is not a result of a user request, message id 0 is used. (e.g. Manual Move Tracking)
  • NOTE: When message id is enabled, data range is limited to 3 bytes (24 bits). Thus, commands with data value more than 24 bit range might not behave properly.

This setting is identical to bit 6 of Set Device Mode (Cmd 40). Changes to either this setting or the device mode will be reflected in the other.

This setting is stored in non-volatile memory and will persist after power-down or reset.

Example
requests -> (id 01) Move Absolute 10000 [device starts to move]
requests -> (id 02) Return Status [request device status]
<- responds (id 02) Return Status ( 20 ) [device replies with message id corresponding to the request (id 02)]
<- responds (id 01) Move Absolute 10000 [when movement is completed, device replies with id 01 which corresponds to the request.]
Personal tools
Zaber Website