
12
INZ-TN5A0506-E
Fig. 5-4 Flow of CRC-16 calculation
Start
Set FFFF
H
(hexadecimal number) in CR.
Set 1 to I
Exclusive-OR (XOR) runs on each character
of J (one byte) for CR and the specified
message, and sets that result to CR.
Set 1 to J
Add 1 to J
Bit at right end
of CR is 1?
After CR has been adjusted one
bit to the right, A001H and XOR
run and set that result to CR.
Shift CR to right by 1 bit.
Calculation (8 times)
is finished?
J>8
Add 1 to I
Calculation of all
characters is completed?
I>All characters
Close
YES
YES
YES
NO
NO
NO
*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
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.
Содержание ZKM
Страница 37: ......