Command/Response Formats
FCS Calculations
ASCII
Code
@
40
1
31
0
30
R
52
1
31
Calculation result
(See note.)
The PLC calculates the FCS (Frame Check Sequence) value for each com-
mand frame it receives, and it checks for errors by comparing that value with
the FCS value sent with the command frame. The host computer must calcu-
late the FCS value when sending a command frame.
Also, when checking for errors in response frames, the host computer must
calculate the FCS value for each response frame it receives and compare that
value to the FCS value sent in the response frame.
Header code
Unit number
FCS calculation range
0100
EOR
0011
EOR
0011
EOR
0101
•
•
•
0011
0100
4 Hex
Note The FCS is an 8-bit value converted into two ASCII characters. The 8-bit
value is the result of an exclusive OR sequentially performed between each
character in a transmission, from the first character in the frame to the last
character of the text in that frame. Non-ASCII data, however, may sometimes
be sent in the text data. If the data length is 7 bits, the leftmost bit of each
character is masked before the FCS is calculated.
Text
FCS
0000
0001
0000
0010
0001
0010
2 Hex
The value is converted to hexadecimal
and handled as ASCII.
Section 2-2
Terminator
13
Need help?
Do you have a question about the CJ - REFERENCE MANUAL 07-2009 and is the answer not in the manual?