LSS-PRO CAN Bus
LSS-PRO uses the extended CAN frame format to send and receive LSS command information.
Since LSS commands are character data (1 character 1 byte), they cannot be directly assigned to the CAN Data field (8 bytes). Therefore, it converts the LSS command and assigns the conversion information to the Identifier and Data field of the extended CAN frame format.
Extended CAN frame format (29-bit CAN ID)
Extended CAN 2.0 B has 29-bit identifier which means that there are 2^29 = 536,870,912 unique CAN-IDs. With a longer 29-bit identifier field, Extended CAN frames support a significantly larger address space. accommodating up to or over 500 million unique message identifiers.
Example: 10101010111000111010101011101 (binary 29 bits) i.e., 0x155C755D (hex).
CAN communication rate is set at 500kbps.
Assign LSS command information to the field in green in this image:
Data format on USB-Serial | Data format on CAN-Bus | ||||
ID[28-20] | Reserved | ||||
Header | # or * | ID[19] | Request/Response (0:Request 1:Response) | # = 0, * = 1 | |
ID[18] | Presence of command parameters | Set to 1 if there are parameters such as D commands, set to 0 if there are parameters such as Query commands, etc. | |||
ID[17] | Presence of sub-command id | Set to 1 if there is a Modifier command (SD/T), otherwise set to 0. | |||
ID[16] | Presence of sub-command parameter | Set to 1 if there is a parameter for the Modifier command, otherwise set to 0. (SD/T requires a parameter, so currently if ID[17] is 1, ID[16] will also be 1.) | |||
ServoID | Servo ID | ID[15-8] | Source ID | ||
ID[7-0] | Destination ID | ||||
Command | Action Command (ex. RESET, D, etc..) Query Command (ex. QID, QD, etc...) Configuration Command (ex. CID, etc...) | DATA0 | Command ID | See Command ID List. | |
Value | Command Value | DATA1 | Command parameter0 | ||
DATA2 | Command parameter1 | ||||
DATA3 | Command parameter2 | ||||
DATA4 | Command parameter3 | ||||
Modifier | Modifier Command (ex. SD, T, etc...) | DATA5 | Sub-command ID | See Command ID List. | |
Modifier Value | Modifier Command Value | DATA6 | Sub-command parameter0 | ||
DATA7 | Sub-command parameter1 |