WAGO-I/O-SYSTEM 750
Fieldbus Communication 229
750-880, 750-880/025-000 ETHERNET Programmable Fieldbus Controller
Manual
Version 1.0.1
12.2.3.4 Function Code FC4 (Read Input Registers)
This function reads contents of input registers from the slave device in word
format.
Request
The request specifies a reference number (start register) and the word count
(register quantity) of the registers to be read. The reference number of the request
is zero based, therefore, the first register starts at address 0.
Example: Read registers 0 and 1
Table 102: Request of Function code FC4
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 0x04
Byte 8, 9
Reference number
0x0000
Byte 10, 11
Word count
0x0002
Response
The register data of the response is packed as 2 bytes per register. The first byte
has the higher value bits, the second the lower values.
Table 103: Response of Function code FC4
Byte
Field name
Example
...
Byte 7
MODBUS function code 0x04
Byte 8
Byte count
0x04
Byte 9, 10
Value register 0
0x1234
Byte 11, 12
Value register 1
0x2345
The contents of register 0 are shown by the value 0x1234 and the contents of
register 1 is 0x2345.
Exception
Table 104: Exception of Function code FC4
Byte
Field name
Example
...
Byte 7
MODBUS function code 0x84
Byte 8
Exception code
0x01 or 0x02