Herunterladen Inhalt Inhalt Diese Seite drucken

Weidmuller Power Monitor Handbuch Seite 203

Inhaltsverzeichnis

Werbung

Verfügbare Sprachen

Verfügbare Sprachen

Communications
Data: Data depends on the function code.
A request message from the Master side is composed of a data item, number of data and setting data.
A response message from the Slave side is composed of the number of bytes, data and exception code in
negative acknowledgement.
Error check: 16-bit data to detect communication errors. See below.
Acknowledgement response
When the command is to write one point, the response is the same command message.
When the command is to write several points, the response is part of the command message (6-byte).
Error check
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 the 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) Initialise the CRC-16 data (assumed to be X) (FFFFH).
(2) Calculate exclusive OR (XOR) with the 1st data and X. This is assumed to be X.
(3) Shift X one bit to the right. This is assumed to be X.
(4) When a carry is generated as a result of the shift, XOR is calculated by X of 3) and the fixed value
(A001H). This is assumed to be X. If a carry is not generated, go to step 5).
(5) Repeat steps 3) and 4) until shifting 8 times.
(6) XOR is calculated with the next data and X. This is assumed to be X.
(7) Repeat steps 3) to 5).
(8) Repeat steps 3) to 5) up to the last data.
(9) Set X as CRC-16 to the end of message in sequence from low order to high order.
Message example
<1> Reading conversion rate (P) (005DH) of address 1
• Command
3.5 idle
address
characters
1435710000/01/05.13
16
15
+ X
+ X
Slave
Function
code
(01H)
(03H)
1
1
2
+ 1)
Data item
Number of
data
(005DH)
(0001H)
2
2
Error check
3.5 idle
CRC-16
characters
(15D8H)
← character
2
number
81

Werbung

Kapitel

Inhaltsverzeichnis
loading

Inhaltsverzeichnis