![background image](http://html1.mh-extra.com/html/omron/v400-h101/v400-h101_user-manual_741429067.webp)
65
V400-H101/201
User’s Manual
A
p
pend
ices
FCS Ca
lc
ula
tion M
e
thod
Appendices
FCS Calculation Method
■
FCS Calculation Method
The FCS (Frame Check Sequence) is the result of taking the XOR for each byte
between the header and footer (8 bits) and converting it to 2 characters of ASCII. The
FCS can be attached to output data to improve the reliability of communications.
Each time data is received, the host calculates the FCS and checks it against the FCS
attached to the sent data so that the send data can be checked for errors.
■
Calculation Example for Sending FCS
Sample read data: ABCDEFG
The details of the read data and calculation method are as follows:
A
B
C D E
F G
4
0
0100
0100
0100
0100
0100
0100
0100
0001
0010
0011
0100
0101
0110
0111
A
B
C
D
E
F
G
41
42
43
44
45
46
47
XOR
XOR
XOR
XOR
XOR
XOR
0100 0000
·
Read data
Header
Footer
Read data
FCS
·
Calculation method
Read data
ASCII
Hexadecimal
Conversion to
ASCII:
Conversion to
hexadecimal:
Obtaining the
exclusive OR:
Conversion to
ASCII:
FCS data: 40