HomeKnowledgeHow to configure the X4 port of the Solidot four-port EtherCAT distributor SW4-ECP04A in Codesys?

How to configure the X4 port of the Solidot four-port EtherCAT distributor SW4-ECP04A in Codesys?

2026-08-02

Article Overview

 

1.Demo Product:

SW4-ECP04A

 

2.Configuration Platform: Codesys (also applicable to some other PLC platforms based on the Codesys framework)

 

3.Core Operations: Import XML into Device Repository → Add distributor under EtherCat_Master → Right‑click X2/X3 ports to add devices → Add X4 port devices below the distributor in the actual configuration tree

 

4.Key Prerequisite: The XML file of the Solidot distributor must be imported into the Device Repository in advance.

 

5.Important Note: The X4 port does not have an independent port node. Devices connected to it must be added by right‑clicking EtherCat_Master and placed below the distributor in the actual configuration.

 

The SW4-ECP04A is a Solidot four‑port (1‑in‑3‑out) EtherCAT metal‑housing distributor. After importing the configuration file of this four‑port distributor into Codesys or similar platforms, some users are unsure how the 1‑in‑3‑out configuration corresponds to the programming environment – that is, devices can be added directly via right‑click on X2 and X3 ports, but where should the devices connected to X4 be configured?

 

On Codesys and other PLC platforms based on this framework, there is no independent port node for X4. The solution is as follows: after adding the distributor, right‑click EtherCat_Master, add the desired devices, and arrange them below the distributor node in the actual configuration tree – that corresponds to the X4 port configuration. This article uses SW4-ECP04A as an example to walk through the complete process of XML import, adding the distributor, and configuring the X2, X3, and X4 ports.

 

 

 

I. Import XML into the Project

  1. Open the Device Repository
    In the Codesys project, select “Tools” → “Device Repository” and open it.

 

  1. Import the distributor XML file
    In the opened window, select the Solidot distributor XML file and import it.

 

 

II. Add the Distributor

Right‑click on EtherCat_Master and add the distributor, using SW4-ECP04A as an example.

 

After adding the distributor, the configuration tree is displayed as shown.

 

 

 

III. X2 and X3 Port Configuration

Right‑click on the X2 and X3 ports respectively and add devices to attach them to the corresponding distributor ports.

 

 

In this case, Solidot EC5R series all‑in‑one modules are used as the added devices.

 

 

IV. X4 Port Configuration

  1. Right‑click EtherCat_Master to add a device
    After adding the distributor, right‑click EtherCat_Master, select “Add Device”, and choose the device you need to configure.

 

 

  1. Place the device below the distributor in the configuration tree
    Move the added module to below the distributor node in the actual configuration tree – that represents the actual X4 port configuration.

 

 

The final configuration tree is shown.

 

 

Reminder: The key to X4 port configuration is device placement. Devices on X2 and X3 are attached under their respective port nodes, while the X4 port has no independent node – its devices must be placed below the distributor node in the configuration tree, which corresponds to the physical X4 port.