APPENDIX. HOST COMMUNICATION PROTOCOL
IMR02E20-E1
125
A.3 Modbus Protocol
The master controls communication between master and slave. A typical message consists of a request
(query message) sent from the master followed by an answer (response message) from the slave (SRZ
unit). When master begins data transmission, a set of data is sent to the slave in a fixed sequence.
When it is received, the slave decodes it, takes the necessary action, and returns data to the master.
A.3.1 Message format
The message consists of four parts: slave address, function code,
data, and error check code which are always transmitted in the
same sequence.
Slave address
The slave address is a number from 0 to F manually set at the address setting switch located at the
front of COM-ML.
For details, refer to
5.1 Address Setting (P. 21)
.
Although all connected slave units receive the query message sent from the master, only the slave with
the slave address coinciding with the query message will accept the message.
Function code
The function codes are the instructions set at the master and sent to the slave describing the action to
be executed. The function codes are included when the slave responds to the master.
For details, refer to
A.3.2 Function code (P. 126)
.
Data
The data to execute the function specified by the function code is sent to the slave and corresponding
data returned to the master from the slave.
For details, refer to
A.3.6 Register read and write (P. 131)
,
A.3.7 Caution for handling
communication data (P. 135)
and
8. COMMUNICATION DATA LIST (P. 34)
.
Error check
An error checking code (CRC-16: Cyclic Redundancy Check) is used to detect an error in the signal
transmission.
For details, refer to
A.3.5 Calculating CRC-16 (P. 128)
.
Slave address
Function code
Data
Error check (CRC-16)
Message format