Download Print this page

Panasonic KT4R Communication Instruction Manual page 23

Temperature controller
Hide thumbs Also See for KT4R:

Advertisement

(3) Data
Data differs depending on the function code.
A request message from the master is composed of a data item, amount of data and setting data.
A response message from the slave is composed of a number of bytes, data and exception codes
in negative acknowledgements, corresponding to the request message.
The effective range of data is -32768 to 32767 (8000H to 7FFFH).
Refer to Section "7. Communication Command Table" (pp.35 to 51).
(4) Error Check
ASCII Mode
After calculating LRC (Longitudinal Redundancy Check) from the slave address to the end
of data, the calculated 8-bit data is converted to two ASCII characters, and are appended to the
end of message.
How to calculate LRC
1
Create a message in RTU mode.
2
Add all the values from the slave address to the end of data. This is assumed as X.
3
Make a complement for X (bit reverse). This is assumed as X.
4
Add a value of 1 to X. This is assumed as X.
5
Set X as an LRC to the end of the message.
6
Convert the whole message to ASCII characters.
RTU Mode
After calculating CRC-16 (Cyclic Redundancy Check) from the slave address to the end of the
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-16
In the CRC-16 system, the information is divided by the polynomial series. The remainder is
added to the end of the information and transmitted. The generation of a 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
fixed value (A001H). This is assumed as X. If a carry is not generated, go to step
5
Repeat steps
6
XOR is calculated with the next data and X. This is assumed as X.
7
Repeat steps
8
Repeat steps
9
Set X as CRC-16 to the end of message in sequence from low order to high order.
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com
16
15
+ X
3
4
and
until shifting 8 times.
3
5
to
.
3
to
5
up to the final data.
2
+ X
+ 1)
3
and the
5
.

Advertisement

loading