280 • Common MODBUS functions
Network communication
Modular I/O System
ETHERNET TCP/IP
6 Common MODBUS functions
MODBUS functions from the OPEN MODBUS / TCP SPECIFICATION are
found in the application layer of the WAGO ETHERNET fieldbus cou-
pler/controller.
i
More information
More information on the OPEN MODBUS / TCP SPECIFICATION you can
find in the Internet:
http://www.modicon.com/openmbus/standards/openmbus.htm
These functions allow digital or analog input and output data to be set or di-
rectly read out of the fieldbus node.
Function code Function
Description
hexadeci-
mal
FC1:
0x01
read coils
Reading of several input bits
FC2:
0x02
read input discretes
Reading of several input bits
FC3:
0x03
read multiple registers
Reading of several input registers
FC4:
0x04
read input registers
Reading of several input registers
FC5:
0x05
write coil
Writing of an individual output bit
FC6:
0x06
write single register
Writing of an individual output register
FC7:
0x07
read exception status
Reading of the first 8 input bits
FC11:
0x0B
get comm event counters Communication event counter
FC15:
0x0F
force multiple coils
Writing of several output bits
FC16:
0x0010 write multiple registers
Writing of several output registers
FC23
0x0017 read/write multiple
registers
Reading and writing of several output registers
Tab. 6-1: List of the MODBUS functions in the fieldbus coupler and controller
To execute a desired function, specify the respective function code and the ad-
dress of the selected input or output channel.
Attention
The examples listed use the hexadecimal system (i.e.: 0x000) as their numeri-
cal format. Addressing begins with 0.
The format and beginning of the addressing may vary according to the soft-
ware and the control system. All addresses then need to be converted accord-
ingly.