46
DYN2MS-02F-0116A17
7.2.6 B0 Byte
B0 byte is used for check sum, which is calculated from Bn~B1 as:
S = Bn + Bn-1 + Bn-2 +.... B1
B0 = 0x80 + Mod(S , 128), B0 = 0x80 + S - 128*[S/128]
B0 = 128 ~ 255
After receiving a packet, then calculate Temp = Mod(S , 128), if Temp = B0 , there is no error, otherwise there is
error during the packet transmission.
Example manual calculation:
Given: Command to rotate ID=8 motor at 50rpm constant speed
Packet Length = 4
n = 3
B3 = 0x08
B2 = 0x8a
B1 = 0xb2
S = B3 + B2 + B1 = 0x144 = 324
B0 = 0x80 + Mod(S , 128)
= 0x80 + Mod(324, 128)
= 0x80 + 0x44
B0 = c4
7.2 Packet Definition