Panasonic KT4H User Manual page 51

Table of Contents

Advertisement

(2) Error check of RTU mode
After calculating CRC-16 (Cyclic Redundancy Check) from the slave address to the end of data, the
calculated 16-bit data is appended to the end of message in sequence from low order to high order.
How to calculate CRC
In the CRC system, the information is divided by the polynomial series. The remainder is added to the end
of the information and transmitted. The generation of polynomial series is as follows.
(Generation of polynomial series: X
1
Initialize the CRC-16 data (assumed as X) (FFFFH).
2
Calculate exclusive OR (XOR) with the 1st data and X. This is assumed as X.
3
Shift X one bit to the right. This is assumed as X.
4
When a carry is generated as a result of the shift, XOR is calculated by X of
(A001H). This is assumed as X.
If a carry is not generated, go to step
5
Repeat steps
3
6
XOR is calculated with the next data and X. This is assumed as X.
7
3
Repeat steps
8
3
Repeat steps
9
Set X as CRC-16 to the end of message in sequence from low order to high order.
(3) Message example of RTU mode
1
Reading (Address 1, PV)
• A request message from the master
The number of data means the data item to be read, and it is fixed as 1 (0001H).
Slave
3.5 idle
address
characters
(01H)
• Response message from the slave in normal status (When PV=600
The number of response byte means number of bytes of the data which has been read, and it is
fixed as 2 (02H).
Slave
3.5 idle
address
characters
(01H)
16
15
+ X
+ X
5
.
and
4
until shifting 8 times.
5
to
.
5
to
up to the last data.
Function
code
(03H)
Function
Number of
code
response byte
(03H)
2
+ 1)
Data item
Number of data
(0080H)
(0001H)
Number of data
(02H)
(0258H)
51
3
and the fixed value
Error check
3.5 idle
CRC-16
characters
(85E2H)
[0258H])
Error check
3.5 idle
CRC-16
characters
(B8DEH)

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Kt4b

Table of Contents