![YOKOGAWA IR202 User Manual Download Page 18](http://html.mh-extra.com/html/yokogawa/ir202/ir202_user-manual_911278018.webp)
<3. MODBUS PROTOCOL>
3-5
IM 11G02Q02-01EN 2nd Edition : Sep. 04, 2020-00
Explanation of variables
CR: CRC error check data (2 bytes)
I: Digits of calculation characters
in command message
J: Check on the number of times
of CR calculation
Start
Set FFFF
H
(hexadecimal number) in CR.
Set 1 in I.
Exclusive logical sum (XOR) is executed
with CR and one character (1 byte) of #I of
the message, and its results is set in CR.
Set 1 in J.
Bit at right end
of CR is 1?
Shift CR to right by 1 bit, and A001
H
and
exclusive logical sum (XOR) are executed
and its result is set in CR.
Shift CR to right
by 1 bit.
Add 1 to J.
Calculation (8 times) is
finished?
J>8
Add 1 to I.
Calculation of all characters
is completed?
I>All characters
End
(Calculation is executed in the order of
command message station No., function
code and data.)
CR calculation result shall be added to
the last command message in the order
of LOW byte and HIGH byte.
NO
NO
NO
YES
YES
YES
Figure 3-3
CRC-16 calculation flow chart
Summary of Contents for IR202
Page 7: ...Blank Page ...
Page 13: ...Blank Page ...
Page 43: ...Blank Page ...
Page 45: ...Blank Page ...