(13/139)
4.3 Check code
Check code is the Block Check Code (BCC) between the Header and the End of Message except SOH.
D
n+1
= D
1
XOR D
2
XOR D
3
XOR ,,, D
n
XOR: Exclusive OR
Following is an example of a Check code (BCC) calculation.
Check code (BCC) D
17
= D
1
xor D
2
xor D
3
xor … xor D
14
xor D
15
xor D
16
= 30h xor 41h xor 30h xor 45h xor 30h xor 41h
xor 02h xor 30h xor 30h xor 31h xor 30h xor 30h
xor 30h xor 36h xor 34h xor 03h
= 77h
Header Message
Check code
Delimiter
2
7
2
6
2
5
2
4
2
3
2
2
2
1
2
0
SOH
D
0
Reserved
D
1
Destination
D
2
Source
D
3
Type
D
4
Length(H)
D
5
Length(L)
D
6
STX
D
7
Data
D
8
|
|
|
|
ETX
D
n
Check code
D
n+1
P
P
P
P
P
P
P
P
Header
Message
Check
code
(BCC)
Delimiter
SOH Reserved Destination
Address
Source
Address
Message
type
Message length
STX
OP code
page
OP code
Set Value
ETX
01
30
41
30
45
30
41
02 30 30 31 30 30 30 36 34 03
77
0D
D
0
D
1
D
2
D
3
D
4
D
5
D
6
D
7
D
8
D
9
D
10
D
11
D
12
D
13
D
14
D
15
D
16
D
17
D
18
Содержание X754HB
Страница 6: ... 6 139 Please refer Controlling the LCD monitor via LAN control on User s manual ...
Страница 14: ... 14 139 4 4 Delimiter Packet delimiter code ASCII CR 0Dh Header Message Check code Delimiter ...
Страница 17: ... 17 139 18th byte ETX End of Message ASCII ETX 03h ...
Страница 51: ... 51 139 CR 0Dh End of packet ...
Страница 77: ... 77 139 Refer to the section 4 3 Check code for a BCC calculation Delimiter CR 0Dh End of packet ...
Страница 89: ... 89 139 Delimiter CR 0Dh End of packet ...
Страница 98: ... 98 139 Delimiter CR 0Dh End of packet ...
Страница 102: ... 102 139 Delimiter CR 0Dh End of packet ...
Страница 104: ... 104 139 Refer to the section 4 3 Check code for a BCC calculation Delimiter CR 0Dh End of packet ...
Страница 106: ... 106 139 Delimiter CR 0Dh End of packet ...
Страница 108: ... 108 139 Delimiter CR 0Dh End of packet ...
Страница 110: ... 110 139 Delimiter CR 0Dh End of packet ...
Страница 112: ... 112 139 Delimiter CR 0Dh End of packet ...
Страница 115: ... 115 139 Delimiter CR 0Dh End of packet ...
Страница 118: ... 118 139 Delimiter CR 0Dh End of packet ...
Страница 124: ... 124 139 Delimiter CR 0Dh End of packet ...
Страница 126: ... 126 139 Delimiter CR 0Dh End of packet ...