13
5
MODBUS FUNCTIONS…
5.3
Force Single Coil – Function Code 05
5.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 have no effect on coil status.
Note. To write to a coil its offset address (one less than the coil number)
must be used, e.g. to write to coil 30, the coil address 29 (1CH) is transmitted.
The use of slave address zero (broadcast mode) forces all attached slaves to
modify the desired coil.
Example – switch ON coil address 30 (auto/manual state) in slave 01.
Coil
Coil
Data
Data
Error
Address
Function
Offset
Offset
Value
Value
Check
(CRC-16)
High
Low
High
Low
Field
01
05
00
1D
FF
00
80
FF
5.3.2
Force Single Coil Response
The response is confirmation of the query after the coil state has been altered.
Example:
Coil
Coil
Data
Data
Error
Address
Function
Offset
Offset
Value
Value
Check
(CRC-16)
High
Low
High
Low
Field
01
05
00
1D
FF
00
28
60
Содержание DATUM L150
Страница 22: ...20 NOTES ...