11 Modbus
11.1 Configuring Modbus TCP
Modular PLCs XControl: XC-104-…, XC-204-…, XC-303-… 01/23 MN050005EN Eaton.com 125
11 Modbus
11.1 Configuring Modbus TCP
11.2 Adding an Ethernet adapter
XSOFT-CODESYS-3 offers two different Ethernet connection options. An
Ethernet adapter can be used to define the corresponding protocol: Ether-
Net/IP or Modbus TCP.
▶ In the device tree, select the "Device (XC-303)" device.
▶ Right-click on it to open the context menu and select the <Add
device...> option.
The "Add device" dialog box will appear. You can leave the dialog box open.
▶ Select "EtherNet/IP | Ethernet Adapter| Ethernet" under "Field buses" in
the "Add device" dialog box.
▶ Confirm by clicking on the "Add Device" button.
The Ethernet master will appear in the configuration tree.
Figure 91: Ethernet master parameters
11.3 Adding a Modbus TCP master and device
▶ To add the Modbus TCP master to your configuration, right-click on
"Ethernet (Ethernet)":
▶ Click on the <Add device…> option.
The list will show the available Ethernet devices or Ethernet-based protocols
such as Modbus.
▶ Select "Modbus | Modbus TCP Master | Modbus TCP Master".
▶ Then click on the <Add device...> option
▶ Select "Modbus TCP Master" in the device tree.
▶ Right-click on it to open the context menu and select the <Add
device...> option.
▶ Select "Modbus TCP Slave".
▶ Then click on the <Add device...> option