IMD SolutionComputing LibraryShop main store

Troubleshooting

Fix CoDeSys communication error 0 when ping succeeds

Operating systems on the plant floor Published 6 min read

Short answer

When ping, FTP and Telnet succeed but CoDeSys login returns Communication error (#0), the network is proven and the station is not: the documented minimum is the CPU, at least one I/O or communication module, and a K-bus termination module. Install the missing terminator, then verify the controller's Ethernet settings and that CoDeSys targets 192.168.1.20 on port 1200.

On this page
  1. Why do ping, FTP and Telnet succeed while CoDeSys login fails?
  2. What is the minimum K-bus station for CoDeSys online communication?
  3. How do I install the K-bus termination module?
  4. Which Ethernet settings do I verify on the controller?
  5. What address and port must the CoDeSys communication settings use?
  6. What do I check on the engineering computer?
  7. How do I verify the repair?
  8. What do I decide from each finding?
  9. Questions asked

Login failing with Communication error (#0) while ping, FTP and Telnet all succeed means the network is proven and the controller station is not. The documented minimum for online communication on this controller family is the CPU, at least one I/O or communication module, and a K-bus termination module; the reported station, a WAGO IPC C10E with a single 750-430 digital input on the K-bus, carries no terminator. Install one, then confirm the controller's Ethernet settings and that CoDeSys targets 192.168.1.20 on TCP port 1200.

Why do ping, FTP and Telnet succeed while CoDeSys login fails? #

Because those three tests prove IP reachability and two answering services, not the K-bus station or the path CoDeSys uses: all three can pass while the online session that login opens is still refused.

The reported setup: Ethernet on connector X8, the controller on its default address, the engineering computer on the same subnet, communication parameters naming that address on port 1200, and only those two devices on the network. Read each success for what it covers:

Check Reported result What it proves What it leaves open
ping to 192.168.1.20 ok the IP layer reaches the controller everything above IP
FTP ok one TCP service on the controller answers not the service on port 1200
Telnet ok TCP port 23 answers not port 1200
CoDeSys login Communication error (#0) the session layer fails the network as a cause

Two details decide where to look next. A plain telnet command tests TCP port 23 unless a port is named, so that success never touched 1200. And #0 is documented as a connection timeout rather than a protocol fault, which fits a station that answers every probe but cannot complete a session.

What is the minimum K-bus station for CoDeSys online communication? #

Three parts: the CPU, at least one I/O or communication module, and a K-bus termination module — the reported station carries two of the three, which is why login fails over a proven network.

The termination module is a required part of that minimum, not an accessory; without it, online communication does not come up regardless of what the network does. Count the reported station: one CPU plus one 750-430 digital input is two bus parts against a required three, so the station fails its own configuration check before any setting is examined. The 750-430 is the right kind of occupant — a DI, DO, AI, AO or serial module all satisfy the one-module slot — so nothing installed needs replacing. The missing part is specifically the terminator.

How do I install the K-bus termination module? #

Power the station down, seat the termination module in the last position after the 750-430, restore power, let the controller restart, then log in again from CoDeSys.

  1. De-energize field power as well as system power before touching anything on the bus.
  2. Seat the termination module after the 750-430 so the K-bus ends in it.
  3. Restore power and let the controller finish its restart.
  4. Ping the controller from the engineering computer, then attempt login again.

The order number of the termination module is not part of the documented material for this station, so take it from the documentation for the controller family rather than matching by description. Do not treat the input module as the terminator; it stays where it is.

Which Ethernet settings do I verify on the controller? #

Run the vendor's separate Ethernet settings utility — a free program from the vendor's website, not part of CoDeSys — and confirm the controller still holds its address on the X8 interface.

That utility is where the controller's addressing actually lives, so it settles any disagreement between what ping reaches and what CoDeSys targets. If it shows an address other than the one in the communication parameters, change one side only — return the controller to its default or repoint CoDeSys — and retest. On the 750 series there is also a small hatch cover with a switch below it; the position that switch needs is specific to the controller variant and is stated in that variant's manual, so set it from the manual rather than by trial.

What address and port must the CoDeSys communication settings use? #

Destination 192.168.1.20 on TCP port 1200, with the engineering computer at 192.168.1.99 on the same subnet — a wrongly set port number reproduces this exact error, so the value has to match what the runtime listens on.

Worked example — subnet check on the reported addresses, assuming the usual 255.255.255.0 mask:

  • Engineering computer: 192.168.1.99 AND 255.255.255.0 = 192.168.1.0
  • Controller: 192.168.1.20 AND 255.255.255.0 = 192.168.1.0
  • Equal results put both devices on 192.168.1.0/24, so frames are delivered directly with no router between them; with only these two devices attached, routing is excluded and the fault sits above the network layer.

Then test the port that actually carries the session. A terminal connection to 192.168.1.20 on port 1200 — telnet 192.168.1.20 1200 or an equivalent TCP probe — opens when the runtime service is listening and is refused or silent when it is not. A silent port with the station and addressing correct means the service never came up, the same conclusion reached when a PLC runtime installer fails on the controller OS.

What do I check on the engineering computer? #

Repeat the login from a second computer: if Communication error (#0) appears identically on both, the engineering PC is exonerated and the fault stays on the controller side of the proven link.

The session reaches the controller through the CoDeSys gateway on the engineering computer, and documented fixes for this same error on a WAGO 750-862 include auditing that gateway and the routing of its TCP port 1217 — so confirm the gateway is running and that a host firewall is not blocking it. Swapping computers is the cheaper test, so run it first. The equivalent login fault under TwinCAT is a TwinCAT IPC staying in Config mode after power cycle, which has its own fix.

How do I verify the repair? #

Only a successful login and a completed project download verify the repair — continued ping, FTP and Telnet success proves the network, not the session, so none of those counts.

  • The K-bus ends in the termination module, seated after the 750-430.
  • The Ethernet settings utility reports the controller on X8 at the address the communication parameters use.
  • The hatch-cover switch sits at the position the variant's manual specifies.
  • The communication parameters read 192.168.1.20 and port 1200.
  • A direct TCP probe of port 1200 opens.
  • Ping from the engineering computer still answers.
  • Login succeeds and the test project downloads without Communication error (#0).

What do I decide from each finding? #

Install the missing terminator — that is the whole fix for the reported station; if the terminator is present, fix the address or port mismatch; if port 1200 stays silent with everything matched, the controller's runtime service is the fault.

  • Terminator absent, the reported case: install it, restart, log in. The station then meets the documented minimum and the download should complete.
  • Terminator present, address or port mismatch: correct one side with the Ethernet settings utility and the communication parameters so both name the same destination, then retest.
  • Terminator present, everything matched, port 1200 silent: restart or reinstall the runtime on the controller; if the unit is condemned at that point, the soft-PLC workload can move to a fanless mini PC in the same cabinet.

Questions asked

Does communication error 0 mean the same thing over a serial link?

It is documented as a connection timeout over serial as well, with baud-rate mismatch, wrong cable wiring, or a wrong COM port as the usual causes. Find the COM number in Device Manager under Ports, then match it in CoDeSys under Online > Communication parameters before suspecting the hardware.

Can the 750-430 digital input module end the K-bus instead of a terminator?

No. The 750-430 fills the one-module slot in the documented minimum, but the bus still has to end in the termination module, which is a separate part. Keep the input module installed where it is and add the terminator after it; the station then meets the minimum and login has its missing condition.

Why does the message say logout performed when login never worked?

The #0 marks the connection-level failure, and the IDE closes the session it tried to open, which the message words as a logout. In one reported case the retry failed the same way, the controller reset itself, and the next login succeeded, so cycle power once and retry before making deeper changes.

Will adding the termination module change the controller's IP address?

No. A K-bus module change does not touch Ethernet configuration, so the controller keeps its address and the two-device network stays valid. Addressing changes only through the separate Ethernet settings utility, and if it does change, the CoDeSys destination must be updated to match before login is retried.

Keep reading

  • Troubleshooting

    Fix TwinCAT IPC staying in Config mode after power cycle

    Set Auto Boot to Run mode under Boot Settings (Target) in SYSTEM > SETTINGS and activate the configuration. If the IPC still boots to Config mode, read the TwinCAT runtime build on the target itself: one reported 4024-to-4026 migration behaved this way until the runtime was returned to 4024.67.

    Operating systems on the plant floor

  • Comparison

    Running an MQTT broker in the PLC or on a separate device

    No MQTT broker is ported to Automation Runtime, so the broker cannot run in the PLC's runtime today. Keep the working split: the Paho-based client in the controller and Mosquitto on an external Linux device, or a Linux guest on hypervisor-capable controller hardware when one box is mandatory. Porting Mosquitto or NanoMQ into the runtime is a software project, not an install.

    Edge computing and IIoT

  • Troubleshooting

    Edge gateway shows offline: check the 3.5.16 requirement

    An edge gateway that flipped from green to offline most likely sits on 3.5.15 while the Automation Server lists Edge Gateway 3.5.16.0 or higher as the runtime system requirement. Read the installed version first, then remove and re-add the gateway, replace it through the service tool, update to 3.5.16.0 or higher, and escalate through a CODESYS Store support question if it stays red.

    Edge computing and IIoT