Modbus TCP Server connection is ESTABLISHED but all holding registers are value 0?

mil581
2025-12-25
2026-01-07
  • mil581 - 2025-12-25

    Hello everyone!

    I'm facing a weird issue with CODESYS Control Win V3 x64 on a fresh Windows install.

    The situation is as follows:

    CODESYS Modbus TCP Server (Slave) is running and I can see live values in the mapping display of Modbus settings: GVL (e.g., 32, 42, 50).

    Port 502 is LISTENING according to netstat.

    When connecting via Modbus Poll or Node-RED, the connection status changes to ESTABLISHED and everything reports as fine.

    The Problem: Despite the successful connection, all holding registers return 0 no matter what. It's like the OS accepts the TCP handshake, the request counter goes up but the data payload never reaches Modbus Client (in this case Node-RED or Modbus Poll).

    Quick Stats:

    Firewall: Completely OFF.
    Unit ID: Verified & Matching.
    IP: Tried 127.0.0.1 and 192.168.0.1.
    Interface: Correctly bound in Ethernet Device settings.

    I already tried absolutely everything from changing IP address, subnet, port, deleting the project and starting new one and even nuking my old Windows install. Since I am near completion of my bachelor thesis only thing left for me to do is connect SoftPLC to NodeRED via Modbus but this issue is driving me crazy for weeks. I do not know what to do anymore.

     
  • TimvH

    TimvH - 2026-01-07

    Are you sure you need to read holding registers? Have you tried reading input registers?

     

Log in to post a comment.