6
5. Modbus Protocol
5.1 Transmission Mode
Modbus protocol transmission mode is RTU mode.
8-bit binary data in command is transmitted as it is.
Data format Start bit: 1 bit
Data bit: 8 bits
Parity: Odd (No parity, Even) (Selectable)
Stop bit: 1 bit (2 bits) (Selectable)
Error detection: CRC-16 (Cyclic Redundancy Check)
5.2 Data Communication Interval
For communication speed 9600 bps, 19200 bps: To transmit continuously, an interval between characters
which consist of one message, must be within 1.5 character transmission times.
For communication speed 38400 bps: To transmit continuously, an interval between characters which
consist of one message, must be within 750
s.
If an interval lasts longer than the above, the instrument assumes that transmission from the master is
finished, which results in a communication error, and will not return a response.
5.3 Message Configuration
For communication speed 9600 bps, 19200 bps: RTU mode message is configured to start after idle time is
processed for more than 3.5 character transmissions, and end after idle time is processed for more than 3.5
character transmissions.
For communication speed 38400 bps: RTU mode message is configured to start after idle time is processed
for more than 1.75 ms, and end after idle time is processed for more than 1.75 ms.
Data section: Max. 252 bytes
3.5 idle
characters
Slave
address
Function
code
Data
Error check
CRC-16
3.5 idle
characters
(1) Slave Address
Slave address is an individual instrument number on the slave side, and is set within the range
1 to 247 (01H to F7H). The master identifies slaves by the slave address of the requested message.
The slave informs the master which slave is responding to the master by placing its own address in
the response message.
Slave address 0 (00H, Broadcast address) can identify all the slaves connected. However, slaves
do not respond.
(2) Function Code
The function code is the command code for the slave to undertake one of the following actions.
Type
Function
Code
Sub-Function
Code
Contents
Data
access
03 (03H)
Reads a single or multiple piece(s) of data
from slave(s).
(Max. 25 pieces of data)
04 (04H) Reads information from slave(s).
06 (06H) Writes a single piece of data to slave(s).
16 (10H)
Writes multiple pieces of data to slave(s).
(Max. 25 pieces of data)
Diagnostics
08 (08H) 00 Echoes back the request message.
43 (2BH) 14 Reads device identification information.
The function code is used to discern whether the response is normal (acknowledgement) or if any
error (negative acknowledgement) has occurred when the slave returns the response message
to the master.
When acknowledgement is returned, the slave simply returns the original function code.
When negative acknowledgement is returned, the MSB of the original function code is set as 1 for
the response.
For example, if the master sends request message setting 13H to the function code by mistake,
slave returns 93H by setting the MSB to 1, because the former is an illegal function.