E-18
For details, please download and refer to MODBUS over Serial Line Specification & Implementation guide from the following URL;
5.1 Standard frame
The standard communications frame consists of:
Slave
address
Function
code
data
CRC
Slave address
:01~7FH
*When selecting slave address 0, a message is sent to all the instruments present on the network.
When the slave receives it, the slave does not make a response.
Function code
:03H …… Read Holding Registers ( maximum 250 bytes)
:08H …… Diagnostics
:10H …… Preset Multiple Registers
DATA
:8 bit HEX data
CRC
:The Cyclical Redundancy Check (CRC) field is two bytes, containing a 16–bit binary value.
<NOTE>
A procedure for generating a CRC is:
1. Load a 16–bit register with FFFF hex. Call this the CRC register.
2. Exclusive OR the first 8–bit byte of the message with the low–order byte of the 16–bit CRC register, putting the result in
the CRC register.
3. Shift the CRC register one bit to the right (toward the LSB), zero–filling the MSB. Extract and examine the LSB.
4. (If the LSB was 0): Repeat Step 3 (another shift).
(If the LSB was 1): Exclusive OR the CRC register with the polynomial value 0xA001 (1010 0000 0000 0001).
5. Repeat Steps 3 and 4 until 8 shifts have been performed. When this is done, a complete 8–bit byte will have been
processed.
6. Repeat Steps 2 through 5 for the next 8–bit byte of the message. Continue doing this until all bytes have been processed.
7. The final content of the CRC register is the CRC value.
8. When the CRC is placed into the message, its upper and lower bytes must be swapped as described below.
5.2 Bit sequence
With RTU character framing, the bit sequence is:
<Example>With Parity Checking
Start
1
2
3
4
5
6
7
8
Parity
Stop
LSB
MSB
<Example>Without Parity Checking
Start
1
2
3
4
5
6
7
8
Stop
Stop
LSB
MSB
5.3 Modbus Message RTU Framing
A Modbus message is placed by the transmitting device into a frame that has a known beginning and ending point.
This allows devices that receive a new frame to begin at the start of the message, and to know when the message is completed.
Partial messages must be detected and errors must be set as a result.
In RTU mode, message frames are separated by a silent interval of at least 3.5 character times.
The entire message frame must be transmitted as a continuous stream of characters.
If a silent interval of more than 1.5 character times occurs between two characters, the message frame is declared incomplete
and should be discarded by the receiver.
more than 3.5 char less than 1.5 char less than 1.5 char more than 3.5 char
Response
Slave
address
Function
code
CRC(Lo)
CRC(Hi)
Response
5. Modbus Data Format
Содержание AE1000-SW
Страница 33: ...E 33 BIF MD BIF CON 6 Outline dimensions Power supply 100 240V AC DC T R T R SLD FG COM Ter Ter P1 P2 ...
Страница 34: ...E 34 7 SERVICE NETWORK ...
Страница 35: ......