ProfiNet to EtherCAT Gateway for PLC-Robot Communication
In modern automated production lines, integrating equipment that uses different industrial Ethernet protocols is a common challenge. This article presents a practical configuration case using a protocol conversion gateway to enable communication between a PLC running EtherCAT and ABB robots using ProfiNet. The solution achieves real-time data exchange without modifying existing device firmware, ensuring high-speed, deterministic control for demanding applications like battery module assembly.
Project Background
A large-scale energy storage battery module production line required a cycle time of less than 18 seconds per module. The main controller was a PLC with EtherCAT master capability, managing 32 axes of motion. However, a critical station for laser cleaning, gluing, and stacking needed to integrate two six-axis industrial robots that communicated via ProfiNet. The two protocols differ fundamentally in frame format and clock synchronization. Traditional solutions involving additional interface cards would increase hardware costs and introduce scan cycle jitter. Moreover, the robot manufacturer prohibits firmware modifications. The chosen approach was to deploy a dedicated protocol conversion gateway that acts as a slave on both networks, mirroring data with sub-millisecond latency.
Equipment List
| Component | Specification |
|---|---|
| PLC | EtherCAT master, 250 µs cycle, 32-axis synchronization |
| Robots | Two six-axis robots, 200 kg payload, 2.6 m reach, ProfiNet slave, firmware 6.08, with distributed I/O modules |
| Protocol Gateway | Industrial protocol converter, dual Ethernet ports with independent MACs, supports 1440 bytes ProfiNet I/O and 512 bytes EtherCAT PDO, 24 VDC/200 mA, IP20, DIN rail mount |
| Switch | Industrial Gigabit switch with ring redundancy |
| Software | PLC engineering tool for EtherCAT configuration, TIA Portal V19 for ProfiNet GSDML configuration, gateway configuration tool V1.4 |
Network Topology
The physical connections are straightforward. The PLC connects to Port A of the gateway using a shielded Ethernet cable for EtherCAT. Port B of the gateway connects to the ProfiNet network via an industrial switch, which then links to the robot controllers and their distributed I/O modules. The gateway does not require any master license and does not participate in kinematic calculations; it simply performs data mapping at the dual-port RAM level.
Gateway Hardware Installation
- Mount the gateway on a 35 mm DIN rail, leaving at least 30 mm of space on the left for ventilation. Install a 24 V/10 A power supply on the right, with a separate ground connection for the PE terminal.
- Use M12 D-coded connectors for the EtherCAT segment, ensuring 360° shield termination. For ProfiNet, use RJ45 metal-shell shielded patch cables, with a maximum length of 30 meters.
- After power-up, the ECT LED turns solid green when EtherCAT enters Operational (OP) state. The PN LED turns solid green when ProfiNet enters Data Exchange. A flashing red light indicates synchronization loss, aiding quick troubleshooting.
Software Configuration Steps
EtherCAT Side (PLC Configuration)
- In the PLC engineering software, create a new project and import the gateway’s ESI file (e.g., “YC_PN-ECT_V1.4.xml”). Drag the gateway into the bus configuration and assign a station address, such as 1001.
- In the Process Data window, set up two PDO mappings:
- TxPDO 256 bytes (PLC to gateway to robot): contains 6 real-type target coordinates, 1 double-word control word, and 64 bytes reserved for process parameters.
- RxPDO 256 bytes (robot to gateway to PLC): contains 6 real-type actual coordinates, 1 double-word status word, and 1 real-type cycle time.
- Configure Distributed Clocks (DC) synchronization with a cycle time of 1 ms and a sync window of ±100 µs. Enable the Sync Unit function to ensure all servo axes and the gateway sample data simultaneously.
ProfiNet Side (TIA Portal Configuration)
- Install the GSDML file (e.g., “GSDML-V2.43-YC-PN-ECT-20250705.xml”). The gateway will appear in the hardware catalog as “YC-PN-ECT Gateway”.
- Drag the gateway into the ProfiNet network and assign a device name (e.g., “RobotGW_01”) and IP address (e.g., 192.168.2.100/24).
- In the Device View, add two I/O slots:
- Slot 1: Input 256 bytes
- Slot 2: Output 256 bytes
These lengths must match the EtherCAT PDO sizes for 1:1 address mapping inside the gateway.
- Enable IRT isochronous mode with a send cycle of 1 ms and a watchdog factor of 3. Map the robot CPU’s input and output addresses to data blocks for easy maintenance.
Gateway Configuration Tool
- Set the PC network adapter to an IP in the same subnet (e.g., 192.168.2.99). Ping the gateway’s default IP (192.168.2.10) and open the configuration tool. Click “Online Read”.
- In the EtherCAT tab, enable “Slave DC Enable” and enter the same station address as in the PLC configuration. In the ProfiNet tab, enter the device name exactly as set in TIA Portal to avoid name conflicts.
- Click “Write and Restart”. After rebooting, the gateway will enter a dual-network ready state within about 3 seconds, indicated by both ECT and PN LEDs solid green.
Robot-Side Mapping
In the robot programming environment, create a new system with the “ProfiNet Device” option. Define the 256-byte input as “plc_to_robot” and the 256-byte output as “robot_to_plc”. In the RAPID code, use PackRaw and UnpackRaw instructions to extract and pack data. For example:
! Unpack target coordinates
UnpackRaw plc_to_robot, 0, target_p.robax.rax_1;
! Pack actual coordinates
PackRaw robot_to_plc, 0, actual_p.robax.rax_1;
This allows the PLC to send kinematic target positions to the robot and receive actual position feedback within a 1 ms cycle.
Synchronization and Real-Time Performance Verification
- Network Capture: Wireshark analysis showed an EtherCAT cycle of 250 µs and ProfiNet IRT cycle of 1 ms. The gateway’s internal FIFO buffer added only 10 µs latency, with no frame loss.
- Logic Analyzer Measurement: The time from a PLC digital output set to the robot’s digital input response averaged 680 µs, meeting the project requirement of ≤1 ms.
- 24-Hour Stress Test: The robot’s repeat positioning error remained within ±0.03 mm. The cell stacking misalignment rate dropped from 2.8% to 0.1%, resulting in significant annual savings in rework costs.
Fault Diagnosis and Maintenance
- The gateway has a built-in web server for real-time monitoring of packet counts, CRC errors, and loss rates on both ports. If the ProfiNet side disconnects, the gateway automatically clears the EtherCAT outputs to prevent unintended robot motion.
- A heartbeat word is implemented in the PLC program: it increments every 1 ms, and the robot echoes it back. If the heartbeat is not refreshed within 5 ms, the PLC stops and triggers a “Gateway Sync Lost” alarm.
- On the robot teach pendant, the ProfiNet station list can be monitored online. If the gateway icon turns gray, it quickly indicates a power loss or cable disconnection.
Conclusion
The protocol conversion gateway successfully bridged EtherCAT and ProfiNet networks, acting as a dual slave to enable seamless data exchange between the PLC and robots. The measured latency was under 1 ms with zero packet loss, meeting the stringent requirements of high-speed battery module assembly. This approach avoids firmware modifications and reduces integration complexity, making it a reliable solution for mixed-protocol industrial environments.
Note: When implementing such a system, always ensure that the gateway configuration matches both the PLC and robot settings exactly. Proper grounding, shielding, and cable quality are critical for maintaining real-time performance.