120
•
Fieldbus Communication
MODBUS
Functions
WAGO-I/O-SYSTEM
750
ETHERNET TCP/IP
4.2.3 Description of the MODBUS Functions
All MODBUS functions are executed as follows:
A MODBUS TCP master (e.g., a PC) makes a request to the WAGO fieldbus
node using a specific function code based on the desired operation. The
WAGO fieldbus node receives the datagram and then responds to the master
with the proper data, which is based on the master’s request.
If the WAGO fieldbus node receives an incorrect request, it sends an error
datagram (Exception) to the master.
The exception code contained in the exception has the following meaning:
Exception Code
Meaning
0x01 Illegal
Function
0x02
Illegal Data Address
0x03
Illegal Data Value
0x04
Slave Device Failure
0x05 Acknowledge
0x06 Server
Busy
0x08
Memory Parity Error
0x0A
Gateway Path Unavailable
0x0B
Gateway Target Device Failed To Respond
The following chapters describe the datagram architecture of request, response
and exception with examples for each function code.
Note
In the case of the read functions (FC1 – FC4) the outputs can be additionally
written and read back by adding an offset of 200
hex
(0x0200) to the MODBUS
addresses in the range of [0
hex
- FF
hex
] and an offset of 1000
hex
(0x01000) to the
MODBUS addresses in the range of [6000
hex
- 62FC
hex
].