User`s manual

SH-300 Text Panel
Page 80 of 103
When SH-300 set coil 15 the data format to be send from SH-300 is shown as following.
Query message
Field Name Example (Hex)
Device address -
Function code 05
Coil address Hi 0C
Coil address Lo
0F
Set data Hi FF
Set data Lo 00
CRC Lo -
CRC Hi -
The query message specifies the coil to be set. The requested ON/OFF state is specified by a
constant in the query data field. A value of FF 00 hex requests the coil to be ON. A value of 00 00
requests it to be OFF. All other values are illegal and will not affect the coil.
Response: The normal response is an echo of the query, returned after the coil state has been
set.
6.2.2 Here is an example of reading coils M15
Use indicator to indicate coil M15 status. According to the list of corresponding
relationship between address type and Function Codes in Modbus Protocol” the address
type of reading coil status is “0X”. The corresponding MODBUS data address of M15 is 3087.
When SH-300 read coil M15 the data format to send from SH-300 and responded by PLC is
shown as following.
Query message response message
Field Name Example (Hex) Field Name Example (Hex)
Device address - Device address -
Function code 01 Function code 01
Coil starting address Hi 0C The count of return bytes 01
Coil starting address Lo
0F Data (Coil M22-M15) -
No. of Coil Hi 00 CRC Lo -
No. of Coil Lo 01 CRC Hi -
CRC Lo -
CRC Hi -
The coil status in the response message is packed as one coil per bit of the data field. Status is
indicated as: 1 = ON; 0 = OFF. The LSB of the data byte contains coil M15 addressed in the
query. The highest order end of this byte contains coil M22.
“1X” expresses reading discrete input .For example PLC input signal, inner special coil status
etc.