
Appendix
37
MODBUS RTU | SPI 3 | Trebing & Himstedt
Creating a MODBUS telegram
In order to send a MODBUS telegram, you need to:
– create the MODBUS telegram,
– store the MODBUS telegram in the user data area.
The structure of the MODBUS telegram depends on the chosen MODBUS function
as shown in the following tables.
Note!
You find the description of the MODBUS functions e.g. in »MODBUS
Protocol Reference Guide« (see http://www.modicon.com).
Function 01: Read Coil Status
Request to the slave
Slave response
Byte
Contents
Hex code (e.g.)
Contents
Hex code (e.g.)
Byte 1
Slave Address
11
Slave Address
11
Byte 2
Function
01
Function
01
Byte 3
Starting Address High
00
Byte Count
05
Byte 4
Starting Address Low
13
Data (Coils 27-20)
CD
Byte 5
No. of Points High
00
Data (Coils 35-28)
6B
Byte 6
No. of Points Low
25
Data (Coils 43-36)
B2
Byte 7
–
–
Data (Coils 51-44)
0E
Byte 8
–
–
Data (Coils 56-52)
1B