General Information
1.4 Modbus® RTU Protocol
ATC5300
8
Modbus Communication Protocol, Edition 03/2011, A5E02469001-02
1.4
Modbus
®
RTU Protocol
If one selects the Modbus® RTU protocol, the communication message has the following
structure:
•
The Address field holds the serial address of the slave destination device.
•
The Function field holds the code of the function that must be executed by the slave.
•
The Data field contains data sent to the slave or data received from the slave in response
to a query.
•
For the ATC, the maximum length for the data field is of 60 16-bit registers (120 bytes).
•
The CRC field allows the master and slave devices to check the message integrity. If a
message has been corrupted by electrical noise or interference, the CRC field allows the
devices to recognize the error and thereby to ignore the message.
•
The T1 T2 T3 sequence corresponds to a time, in which data must not be exchanged on
the communication bus to allow the connected devices to recognize the end of one
message and the beginning of another. This time must be at least 3.5 times the time
required to send one character.
The ATC measures the time that elapse from the reception of one character and the following.
If this time exceeds the time necessary to send 3.5 characters at the selected baudrate, then
the next character will be considered as the first of a new message.
1.5
Modbus
®
Functions
The available functions are:
For instance, to read the value of the battery voltage, which resides at location 30 (1E Hex)
from the ATC with serial address 01 the message to send is the following:
Whereas:
01= slave address
04 = Modbus® function "Read input register"
00 1D = Address of the required register (battery voltage) decreased by one
00 02 = Number of registers to be read beginning from address 30
E1 CD = CRC Checksum
T1
T2
T3
Address
(8 bit)
Function
(8 bit)
Data
(N x 8 bit)
CRC (16 bit)
T1
T2
T3
04 = Read input register
Allows to read the ATC measures.
06 = Preset single register
Allows writing parameters.
07 = Read exception
Allows to read the device status.
10 = Preset multiple register
Allows writing several parameters.
17 = Report slave ID
Allows to read information about the ATC.
01
04
00
1D
00
02
E1
CD