Troubleshooting
Why a drive answers ping but the PLC cannot connect
Short answer
A drive that answers ping is telling you the IP path works, not that the protocol session does. ICMP echo and the PLC's EtherNet/IP or Modbus TCP connection are separate services with separate settings. Check the responder's identity and subnet, the imported device entry, protocol enable and ports, then cyclic data lengths, and fix the first one that fails.
On this page
A drive that answers ping has proved exactly one thing: an IP path exists between your test tool and something at that address. It has proved nothing about the protocol session the PLC needs. Ping is an ICMP echo exchange; an EtherNet/IP connection or a Modbus TCP session is a separate service with separate settings, and either one breaks while the other works. When the drive answers ping but the PLC cannot connect, work down four checks in order — who answered the ping, the device entry in the engineering tool, protocol enable and session ports, cyclic data lengths — and fix the first one that fails.
What a ping reply proves, and what it does not #
RFC 792 gives the echo a small contract: a device that receives an echo request for its own address answers with an echo reply, and nothing in that contract opens a TCP connection, selects a telegram or moves a single word of process data. A reply tells you the switch path is up and a live IP stack sits at that address. It tells you nothing about TCP or UDP reachability, about whether the protocol is enabled on the drive's control unit, about the engineering tool's device entry, or about data sizes. The services are configured independently, so they fail independently.
You meet the same layering in why ping succeeds but the PROFINET device is not found, and in PROFINET devices that go lost but still pingable in CODESYS V3. It shows up on the bench too, when a controller shows link lights but the engineering tool cannot connect. The independence also runs in reverse: a device can stay silent to ping because ICMP echo is switched off on it, which is its own fault where the device ignores ping until ICMP is enabled.
Work the checks in this order #
- Read the link state and error counters at the drive's port, the PLC's port and every switch port between them, and compare against a working drive on the same network.
- Identify what answered the ping: read the responder's MAC address and run the disconnect test below.
- Compute the subnet arithmetic on the drive's active address and the PLC's active address, not on the values you wrote down at commissioning.
- In the engineering tool, confirm the device entry exists and its configured address matches the drive's active address.
- Confirm the protocol is enabled on the drive's control unit and that nothing between PLC and drive filters the session ports.
- Compare cyclic data lengths, input and output separately, against the drive's connection definition.
- If all of that passes, capture packets on the PLC-to-drive path and read where the request dies.
Which device answered the ping #
Several drives on one network is exactly the situation where a duplicated address produces this symptom: some drives connect, one will not, and ping keeps answering you anyway. Treat the reply as unproven until you know who sent it.
Read the MAC address your PC has learned for the drive's address — arp -a lists it — and compare it with the drive's documented MAC or the switch's address-table entry. A mismatch means another device owns that address.
Then run the disconnect test, and one safety note comes with it: do it in a permitted stopped or commissioning window, and pull the drive's network lead, not its control power, so the machine stays in a defined state. With the lead out, ping the address again. A reply convicts another device — find it and remove the duplicate before you touch any protocol setting.
Read the drive's active address after every restart as well, rather than trusting the project. Where the control unit takes its address over DHCP — on these SINAMICS control units the DHCP mode is selected with p8924 — a restart can hand it a different lease than the address the project targets.
Check the subnet arithmetic before blaming routing #
Worked example: the drive's active settings are 192.168.10.57 with mask 255.255.255.0, and the PLC port is 192.168.10.201 with mask 255.255.255.0. AND each address with its mask: 192.168.10.57 AND 255.255.255.0 gives 192.168.10.0, and 192.168.10.201 AND 255.255.255.0 gives 192.168.10.0. Both sides sit on one network, frames travel directly, and the gateway entry on either device carries none of this traffic — a wrong or missing gateway cannot be the fault, and matching gateway settings on a working and a failing drive prove nothing.
A test PC at 192.168.20.40 with the same mask computes to 192.168.20.0, a different network, so its successful ping proves a routed path exists, not that the PLC's local path does. Only when the two computed networks differ do the gateway and any router between them become part of the path, and part of the fault.
The device entry in the engineering tool #
An EDS file describes an EtherNet/IP device to the engineering software: identity codes and the connection parameters the tool can then offer. Importing it adds the device type to the project's library; it does not enable the protocol in the drive and does not set the drive's address. A correct import is a precondition for adding the device, not proof of communication.
In Control Expert these entries live in the DTM browser. The documented export route opens the DTM browser, right-clicks the module and follows Device Menu, then Additional functions, then Export EDS — useful when you need a copy of the description that matches an installed unit. Import the EDS that matches the installed control unit, then add the device.
Read the exact symptom before the next move:
| What you see | What it means | Where to go |
|---|---|---|
| Device type missing from the browser | The description was never imported, or the wrong file went in | Import the EDS that matches the installed control unit |
| Entry present, configured address differs | The project targets another endpoint | Correct the address and download again |
| Entry present, address matches, device stays offline | A runtime session problem | Protocol enable and ports, next section |
| Session opens but process data is wrong | Lengths or mapping | Cyclic data lengths, two sections down |
Keep one working drive as the reference. It proves the workflow works; it does not prove that every entry in the project is correct.
Protocol enable and session ports #
This drive family supports both EtherNet/IP and Modbus TCP, and the PLC project uses one of them; the drive's control unit must be set to the same one. Compare a working and a failing drive directly: read the installed control unit, the communication interface and the enabled protocol on both, because identical hardware does not make independently commissioned settings identical. On SINAMICS control units the communication basis is selected with p2030, and the Modbus TCP commissioning guide sets p2030 = 13 for Modbus TCP.
Then confirm the ports the session uses. A Modbus TCP server listens on TCP port 502. EtherNet/IP implicit I/O runs on UDP 2222 and explicit messaging on TCP 44818. A router or firewall on the path can pass ICMP and drop those ports, which reproduces this symptom exactly: ping answers, the session never opens. For a check that goes past the echo, use a peer check that goes beyond an ICMP ping.
If the session is silent rather than refused, treat it as the no-reply class of fault; the same drive family shows it on its serial USS channel too, and there is a no-reply checklist for the drive's serial USS channel. A packet capture then sorts the rest: no request leaving the PLC points at the project or an inactive client block, requests with no reply point at the path or the drive endpoint, and a rejection reply points at the requested connection definition.
Cyclic data lengths must match #
An EtherNet/IP cyclic connection is a Class 1 connection: the PLC requests an output size, an input size and a packet interval, and the drive refuses the connection when they do not fit its assemblies. Ping keeps answering the whole time; the session never opens.
Illustrative example, not a drive specification: a drive connection that accepts four output words and four input words rejects a device entry asking for eight and eight. A word is 16 bits, so 8 words × 2 bytes = 16 bytes per leg where the drive's assemblies allow 4 × 2 = 8 bytes. Set the PLC side to the drive's sizes and the session opens — input and output checked separately, because the PLC's output data is the drive's input data and the other way round.
On the Modbus TCP branch the same check happens at register level: compare function-code area, start address, register count and data interpretation against the drive's register map. A count or area mismatch shows up as bad values or an exception reply rather than a clean connection, and a wrong word order can put the speed reference in the status register's seat.
The decision for each case #
- The ping still answers with the drive's network lead pulled: another device owns the address. Remove the duplicate and give each drive its own address before any other change.
- Link LEDs are down, or one switch port's error counters climb: it is the physical path. Fix the cable, connector or port and leave the protocol settings alone.
- The device type is missing in the engineering tool: import the EDS that matches the installed control unit and add the device again.
- The device is present but stays offline: set the control unit to the protocol the project uses — p2030 = 13 for the Modbus TCP branch on these SINAMICS units — and confirm TCP 502, or UDP 2222 and TCP 44818 on the EtherNet/IP branch, are not filtered between PLC and drive.
- The connection is refused and the sizes differ: set the PLC-side input and output lengths to the drive's connection sizes, each direction separately.
- The session opens but values are wrong: correct the mapping and word order against the drive's register map or telegram, with the working drive as the reference.
Bottom line: with link LEDs up and clean counters, a drive that answers ping but refuses the PLC is a session-configuration fault, not a cable fault. Fix the responder identity, the device entry, the protocol selection and ports, then the data lengths, in that order, and the connection comes up.
Questions asked
How can I test the drive's protocol port from a laptop before touching the PLC project?
Put a laptop on the same switch and open a TCP connection to the drive's address on the Modbus TCP port, 502. If the connection opens, the server is listening and the path passes it; if it is refused or times out while ping still works, a filter or the drive's server setting is in the way. A small Modbus TCP client that reads one holding register proves the application layer on top.
How do I catch a duplicate IP address without pulling cables?
Ping the address, then read the MAC your PC has learned for it with the arp -a command, and compare that MAC against the drive's documented MAC and the switch's address table. If it belongs to another device, the address is duplicated. Replies can also flip between the two owners as ARP entries age out, which is why the drive sometimes connects and sometimes does not.
Can two drives share one IP address if only one is powered at a time?
They can appear to, and it fails in the field. The moment both are powered, replies alternate between them as ARP entries update: one session drops while the other takes the traffic, and both devices fault-stamp each other. Give every drive its own address and change the second device's address before the machine is powered again.
What does an EDS import actually change?
It adds the device type to the engineering software's library: identity data such as vendor, device type and product codes, plus the connection parameters the tool can then offer. It does not set the drive's IP address, does not enable EtherNet/IP on the control unit and does not open a session. After a correct import you still configure the device instance, its address and the connection sizes yourself.
Why does the drive communicate after a restart and then fail again later?
Two things move the target without telling you. A drive set to take its address from DHCP can accept a different lease after a restart, so the project aims at an address no drive holds. And a PLC or switch can keep an old ARP entry pointing at the previous owner of that address. Read the drive's active address after every restart and compare it with the project before changing anything else.