WAGO-I/O-SYSTEM 750 XTR
Fieldbus Communication 161
750-352/040-000 FC ETHERNET G3 XTR
Manual
Version 1.3.0
11.2.3.5 Function Code FC5 (Write Coil)
This function writes a single output bit to the slave device.
Request
The request specifies the reference number (output address) of output bit to be
written. The reference number of the request is zero based; therefore, the first
coil starts at address 0.
Example: Turn ON the second output bit (address 1)
Table 85: Request of Function Code FC5
Byte
Field name
Example
Byte 0, 1
Transaction identifier
0x0000
Byte 2, 3
Protocol identifier
0x0000
Byte 4, 5
Length field
0x0006
Byte 6
Unit identifier
0x01 not used
Byte 7
MODBUS function code
0x05
Byte 8, 9
Reference number
0x0001
Byte 10
ON/OFF
0xFF
Byte 11
0x00
Response
Table 86: Response of Function Code FC5
Byte
Field name
Example
...
Byte 7
MODBUS function code
0x05
Byte 8, 9
Reference number
0x0001
Byte 10
Value
0xFF
Byte 11
0x00
Exception
Table 87: Exception of Function Code FC5
Byte
Field name
Example
...
Byte 7
MODBUS function code
0x85
Byte 8
Exception code
0x01, 0x02 or 0x03