Setting up the EK1000
The Beckhoff EK1000 is an EtherCAT coupler for EtherCAT Open Mode: a master on the Ethernet network sends the EtherCAT frames to the EK1000 in UDP packets or as layer-2 frames, and the EK1000 passes them to the terminals behind it. logiccloud is this master.
Read the EK1000 documentation from Beckhoff for the hardware steps (wiring, power, DIP switches, IP address). This page lists what logiccloud needs.
Before you start
Section titled “Before you start”- EK1000 with its terminals wired and powered.
- The ENI file of the bus, exported from TwinCAT (recommended), or the ESI files of the terminals. See Devices and mapping.
- A logiccloud device with an IP route to the EK1000 (UDP) or a free network interface in the same layer-2 network (layer 2).
1. Set the transport of the EK1000
Section titled “1. Set the transport of the EK1000”In TwinCAT, select the EK1000, open the EOM Devices tab, then EOM Online Settings, and select UDP for the UDP transport, or RAW for layer 2. Then stop TwinCAT: only one master may run the segment (see step 4).
2. Give the EK1000 a fixed IP address (UDP)
Section titled “2. Give the EK1000 a fixed IP address (UDP)”Set a static IP address as described in the EK1000 documentation, and note it. You enter it as Host in the EtherCAT connection.
The EK1000 does not need to be in the subnet of the logiccloud device: a router between them is allowed. Example of a tested setup: logiccloud device in 192.168.3.0/24, router 192.168.3.1, EK1000 192.168.2.110.
Check the route on the logiccloud device:
ip route get <EK1000 IP address>. Expected: one line with the gateway (via) and the interface (dev) that lead to the EK1000.ping -c 3 <EK1000 IP address>. Expected: 3 replies.
3. Allow the UDP traffic (UDP)
Section titled “3. Allow the UDP traffic (UDP)”- The connector sends from UDP port 34980 of the logiccloud device to UDP port 34980 of the EK1000 (or the port that you enter in the connection). The EK1000 answers from 34980 to 34980.
- Allow UDP port 34980 in both directions between the logiccloud device and the EK1000, on the device firewall and on every router or firewall between them.
Check on the device while the connector runs: sudo tcpdump -ni <interface> udp port 34980. Expected: packets to the EK1000 and answers from it.
4. Make sure that logiccloud is the only master (UDP)
Section titled “4. Make sure that logiccloud is the only master (UDP)”The EK1000 accepts frames from one master only. It stores the IP address, the MAC address and the UDP port of this master and ignores frames from all others (see the EK1000 documentation, object 0xFA00).
- Before the first start of the connection, shut down the PC that ran TwinCAT, or disconnect it from the network. Stopping the TwinCAT software alone was not enough in a tested setup. Then switch the power of the EK1000 off and on again, and start the logiccloud runtime. The EK1000 then accepts the first master that sends to it.
- The connector always sends from the same UDP port (34980), also after a reconnect or a restart of the runtime. The EK1000 therefore keeps answering it. You do not need to restart the EK1000 when the runtime restarts.
- When another program on the device already uses UDP port 34980, the connector sends from a port that the operating system chooses and logs a warning (see Troubleshooting). Stop the other program.
5. Cable the network interface (layer 2)
Section titled “5. Cable the network interface (layer 2)”Cable a free network interface of the device directly to the EtherCAT input (X001) of the EK1000, or connect both to the same layer-2 network. Use the interface only for EtherCAT. Layer-2 frames do not pass a router. On a device installed with the Linux installation script, the container needs the host network to see the interface: see Layer 2 on a device installed with the Linux script.
Network security
Section titled “Network security”EtherCAT has no authentication and no encryption. Every device that can send frames to the EK1000 can read and write its terminals. Put the EK1000 and the logiccloud device into a separate network segment (own subnet or VLAN) that only these devices and the engineering PC can reach.
Next steps
Section titled “Next steps”Create the EtherCAT connection, then add the devices and map the variables.