
9
…8
MODBUS FUNCTIONS
8.2.2
Read Holding Register Response
The addressed slave responds with its address and function code, followed by the information field. The information field contains
1 byte describing the quantity of data bytes to be returned. The contents of each register requested (DATA) is two bytes, the first
byte includes the high order bits and the second the low order bits.
Example
– the response to the read holding register query shows the following:
Time (Hour) = 15
Time (Minutes) = 20
Time (Date) = 25
Time (Month) = February
01
03
08
00
0F
00
14
00
19
00
02
0A
D2
Address
Function
Error Check Field
(CRC-16)
8.3
Force Single Coil – Function Code 05
8.3.1
Force Single Coil Query
This message forces a single coil either ON or OFF. The data value 65,280 (FF00 HEX) sets the coil ON and the value zero turns
it OFF. All other values are illegal and do not affect the coil.
Note
. To write to a coil the coil offset address must be used, e.g. to write to coil 10, the coil address 09(09H) is
transmitted.
The use of slave address zero (broadcast mode) forces all attached slaves to modify the desired coil.
Example
– a force single coil request to switch ON coil address 10 (NV Memory Save) in slave 01 is shown below.
8.3.2
Force Single Coil Response
The response is confirmation of the query after the coil state has been altered.
Example
:
01
05
00
09
FF
00
5C
38
Coil Offset
High
Function
Address
Coil Offset
Low
Error Check Field (CRC-16)
Data Value High
Data Value Low
01
05
00
09
FF
00
5C
38
Coil Offset
High
Function
Address
Coil Offset
Low
Error Check Field (CRC-16)
Data Value High
Data Value Low
Holding
Register 14
High
Low
Holding
Register 13
High
Low
Holding
Register 12
High
Low
Holding
Register 11
High
Low
Byte Count
Summary of Contents for 8241
Page 26: ...24 NOTES ...