Check Code - Mitsubishi Electric RS232/485/LAN Serial Communication Control Manual

Rs232/485/lan serial communication control
Table of Contents

Advertisement

4.5 Check code

Check code is the Block Check Code (BCC) between the Header and the End of Message except SOH.
SOH
Reserved
Destination
Source
Type
Length
STX
Data
ETX
Check code
D
= D
XOR D
XOR D
n+1
1
2
XOR: Exclusive OR
Following is an example of a Check code (BCC) calculation.
Destination
Source
SOH
Reserved
Address
Address
01
30
41
D
D
D
0
1
2
Check code (BCC) D
4.6 Delimiter
Packet delimiter code; ASCII CR(0Dh).
Header
Message
D
0
D
1
D
2
D
3
D
4
D
5
D
6
D
7
|
|
|
|
D
n
D
n+1
XOR ,,, D
3
n
Header
Message
Message length
type
30
45
30
D
D
D
3
4
5
= D
xor D
17
1
2
= 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
7
6
5
4
2
2
2
2
P
P
P
P
OP code
STX
OP code
page
41
02
30
30
31
D
D
D
D
D
6
7
8
9
10
xor D
xor ... xor D
xor D
3
14
Delimiter
Check code
(12/56)
3
2
1
0
2
2
2
2
P
P
P
P
Message
Set Value
ETX
30
30
30
36
34
03
D
D
D
D
D
D
11
12
13
14
15
16
xor D
15
16
Check
code
Delimiter
(BCC)
77
0D
D
D
17
18

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mdt652s

Table of Contents