3
SET
BAUD
Press SET key to save “BAUD”.
SET +
▽
25/100
Press SET +
▽
one time to return the normal indication
(PV/SV indication).
5. MODBUS COMMUNICATION PROTOCOL
5.1 General
The communication system by the MODBUS protocol is that the communication is
always started from the master station and a slave station responds to the received
message.
Transmission procedures is as shown below.
1. The master station sends a command message to a slave station.
2. The slave station checks that the address in the received message matches with
the own address or not.
3. If matched, the slave station executes the command and sends back the
response message.
4. If mismatched, the slave station leaves the command message and wait for the
next command message.
5. The master station can individually communicate with any one of slave stations
connected on the same line upon setting the address in the command message.
5.2 Composition of Message
Command message and response message consist of 4 fields; Address, Function code,
Data and CRC check code. And these are sends in this order. The allowable character
transmitted for all fields are hexadecimal 0-9,A-F
RTU mode framing
START ADDRESS
FUNCTION DATA CRC
CHECK END
T1-T2-T3-T4
8 BITS
8 BITS
N × 8 BITS
16 BITS
T1-T2-T3-T4
In the following, each field is explained.
1. Start
In RTU mode, messages start with a silent interval of at least 3.5 character times. This is
most easily implemented as a multiple of character times at the baud rate that is being
used on the network (shown as T1-T2-T3-T4 in the figure above). The first field then
transmitted is the device address.
2. Address
Address is the number specifying a slave station. Valid slave device addresses
are in the range 0f 1-255 decimal. A master addresses a slave by placing the
slave address in the address field of the message. When the slave sends its
response, it places its own address in this address field of the response to let the
master know which slave is responding.
Address 0 is used for the broadcast address, which all slave stations recognize.
When the broadcast address (address 0) is applied on the command message,
no any response message will be sent from the slave stations.
3. Function
This is a code to designate the function executed at a slave station. When a message is
sent from a master to a slave device the function code field tells the slave what kind of
action to perform. When the slave responds to the master, it uses the function code field
to indicate either a normal response or that some kind of error occurred. For normal
response, the slave simply echoes the original function code. For an exception response,
the slave returns a code that is equivalent to the original function code with its
most-signification bit set to a logic 1.
4. Data