
_________________________Shihlin Electric SPM-3 User Guide__________________
20
Master
Slave 1 Slave 2 Slave 3 Slave n
Query
Response
5.2 Modbus
At the start of modbus communication, master will issue a “Query” to the slave. Every slave will monitor
the “Query” address, if a “Query” belongs to a slave, the slave will “execute” and send back a
“response” to the master
5.2.1 Modbus Format
The Query-Response Cycle
Query message from Master
Device Address
Function Code
8 bit Data Bytes
Error Check
Response messages from Slave
5.3 Communication protocol
SPM-3 use Modus RTU as the communication protocol, and function codes are 0x03, 0x04, and 0x10.
The following charts show the master’s “Query” and slave’s “Response” format.
Query
:
Slave
Address
Function
Code
0x03,
0x04
Start
Address
(Hi)
Start
Address
(Lo)
Number
of Points
(Hi)
Number
of Points
(Lo)
Error
Check
(Lo)
Error
Check
(Hi)
Response
:
Slave
Address
Function
Code
0x03,
0x04
Byte
Count
Data
(Hi)
Data
(Lo)
Error
Check
(Lo)
Error
Check
(Hi)
Device Address
Function Code
8 bit Data Bytes
Error Check