Difference between revisions of "CanServo/Protocol/V1.1"
Jump to navigation
Jump to search
Line 20: | Line 20: | ||
* This message is delivered using the MultiPacket method below. | * This message is delivered using the MultiPacket method below. | ||
== CAN Protocol Ver 1.2 == | |||
* Message: Host -> Servo | |||
** ZUW1, <UID : 16 byte>, <ADDR : 2 byte>, <DATA : 2 byte> | |||
** ZUW2, <UID : 16 byte>, <ADDR1 : 2 byte>, <DATA1 : 2 byte>, <ADDR2 : 2 byte>, <DATA2 : 2 byte> | |||
** ZUX1, <UID : 16 byte>, <ADDR : 2 byte>, <DATA : 2 byte> | |||
** ZUX2, <UID : 16 byte>, <ADDR1 : 2 byte>, <DATA1 : 2 byte>, <ADDR2 : 2 byte>, <DATA2 : 2 byte> | |||
** ZUR1, <UID : 16 byte>, <ADDR : 2 byte> | |||
** ZUR2, <UID : 16 byte>, <ADDR1 : 2 byte>, <ADDR2 : 2 byte> | |||
* Message : Servo -> Host | |||
** ZUV1, <UID : 16 byte>, <ADDR : 2 byte>, <DATA : 2 byte> | |||
** ZUV2, <UID : 16 byte>, <ADDR1 : 2 byte>, <DATA1 : 2 byte>, <ADDR2 : 2 byte>, <DATA2 : 2 byte> | |||
== MultiPacket for Long Message == | == MultiPacket for Long Message == |
Revision as of 05:31, 27 June 2024
Under construction
CAN Protocol Ver 1.1
- This protocol needs FW Ver 1.12+
- The purpose of this message is to set the servo's ID based on the servo's UID.
- CAN ID
- 0x7FF : Servo -> Host
- 0x7FE : Host -> Servo
- Message : Servo -> Host
- ZUID, <UID : 16 byte>, <ID2 : 4 byte>, <ID1 : 1 byte>, <CAN Mode : 1 byte>
- Message: Host -> Servo
- ZIDS, <UID : 16 byte>, <ID2 : 4 byte>
- ZIDS, <UID : 16 byte>, <ID2 : 4 byte>, <ID1 : 1 byte>
- ZIDS, <UID : 16 byte>, <ID2 : 4 byte>, <ID1 : 1 byte>, <CAN Mode : 1 byte>
- This message is delivered using the MultiPacket method below.
CAN Protocol Ver 1.2
- Message: Host -> Servo
- ZUW1, <UID : 16 byte>, <ADDR : 2 byte>,
- ZUW2, <UID : 16 byte>, <ADDR1 : 2 byte>, <DATA1 : 2 byte>, <ADDR2 : 2 byte>, <DATA2 : 2 byte>
- ZUX1, <UID : 16 byte>, <ADDR : 2 byte>,
- ZUX2, <UID : 16 byte>, <ADDR1 : 2 byte>, <DATA1 : 2 byte>, <ADDR2 : 2 byte>, <DATA2 : 2 byte>
- ZUR1, <UID : 16 byte>, <ADDR : 2 byte>
- ZUR2, <UID : 16 byte>, <ADDR1 : 2 byte>, <ADDR2 : 2 byte>
- Message : Servo -> Host
- ZUV1, <UID : 16 byte>, <ADDR : 2 byte>,
- ZUV2, <UID : 16 byte>, <ADDR1 : 2 byte>, <DATA1 : 2 byte>, <ADDR2 : 2 byte>, <DATA2 : 2 byte>
MultiPacket for Long Message
- The first step is to calculate the CRC16 of the message and add it to the end to create the content to be sent.
- Send (maximum) 7 bytes extracted from the content to be sent and a Check Byte.
- Multi Packet's Data Format
- < Data : max 7 byte, cut from 'Message + CRC16' >, <Check Byte>
- Check Byte
- bit 7 = 1, if first packet
- bit 6 = 1, if last packet
- bit 5 = Toggle, first packet = 1, toggle bit on each packet
- bit 4:0 = Seq, 0 ~ 31, inc 1 on each message
- Note:
- ID2, CRC16 : byte order : low byte first, little endian
- Reference:
FD-CAN
- FD-CAN allows up to 64 bytes to be transmitted, so up to 63 bytes can be extracted at a time.
- This approach has not yet been implemented.