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.
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.