Yamato INE800 Manual page 44

Eco incubator
Table of Contents

Advertisement

4.5.1 Calculation of CRC-16
In the CRC system, information to send is divided with a generating polynominal and suffixing the
generated remainder to the information.
The generating polynominal is as follows:
1 + X
+ X
+ X
2
15
15
The following calculation procedures are applied to from the Slave address to the end of data.
1. Initialization of CRC-16 data (defined as X)(=FFFFH)
2. Exclusive or (EX-OR) of data 1 and X→X
3. Shift X to the right by one bit→X
4. When a carry has occurred, calculate EX-OR with A001H. If not, go to 5.→X
5. Repeat steps 3 and 4 until shifts occur eight times.
6. EX-OR of the next data and X→X
7. Same as steps 3 to 5.
8. Repeat these steps up to the last data.
9. Create messages for the calculated 16-bit data (X) from the lowest data first.
Example: When data is [02H] and [07H], CRC-16 will be 1241H and thus the resulting error check
data will be [41H] and [12H].
4.5.2 Calculation of LRC
The following calculation procedures are applied to from the Slave address to the end of data.
1. Create a message in the RTU mode.
2. Add up from the beginning of the data (Slave address) to the end.→X
3. Complement X (bit reversed)→X
4. Add 1. (X=X + 1)
5. Suffix X to the end of the message as LRC.
6. Convert the whole data into ASCII characters.
Example: When data is [02H] and [07H], LRC will be [F7H] and thus a binary message will be [02H]
[07H] [F7H]; an ASCII message will be [30H] [32H] [30H] [37H] [46H] [37H].
4. Operating procedures
Setting external communication
40

Advertisement

Table of Contents
loading

Table of Contents