<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Modbus TCP Server connection is ESTABLISHED but all holding registers are value 0?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/7b277c4a2b/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/7b277c4a2b/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/7b277c4a2b/</id><updated>2026-04-09T03:04:50.694000Z</updated><subtitle>Recent posts to Modbus TCP Server connection is ESTABLISHED but all holding registers are value 0?</subtitle><entry><title>Modbus TCP Server connection is ESTABLISHED but all holding registers are value 0?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/7b277c4a2b/?limit=25#30ad" rel="alternate"/><published>2026-04-09T03:04:50.694000Z</published><updated>2026-04-09T03:04:50.694000Z</updated><author><name>nulltrace</name><uri>https://forge.codesys.com/u/nulltrace/</uri></author><id>https://forge.codesys.com3c3957c85e7b8bbe12451fbff0f89a47f82b6992</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;it works pretty well on codesys-version using device-tree and channels. heres the twist: each uid should be represented as a device, which in your case, it isn't.&lt;/p&gt;
&lt;p&gt;on the other hand, you found a solution which already works fine.&lt;/p&gt;
&lt;p&gt;Happy Modbus'ing&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Modbus TCP Server connection is ESTABLISHED but all holding registers are value 0?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/7b277c4a2b/?limit=25#5527" rel="alternate"/><published>2026-04-08T12:17:21.757000Z</published><updated>2026-04-08T12:17:21.757000Z</updated><author><name>egr99</name><uri>https://forge.codesys.com/u/egr99/</uri></author><id>https://forge.codesys.com8e7e0b2c91e54301309e073f2e18107e3e7ac72e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;You're absolutely right. Sorry for that.&lt;/p&gt;
&lt;p&gt;In the meantime I wrote a Function block to handle the reads and writes to the different attached RTU-devices. &lt;br/&gt;
It processes the parameter like (str_Modbus:=(usiSlave:=1, uiFC:=5, uiLEN:=1, uiOFFSET:=0, uiInterval:=500)) and the corresponding output, waits for the response and processes next request in a 5-state procedure. It's working for 2 gateways (stable without errors, although error recovery is included).  &lt;/p&gt;
&lt;p&gt;But nevertheless it should be possible with the Channel definitions of Codesys. Much easier to maintain :)  &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Modbus TCP Server connection is ESTABLISHED but all holding registers are value 0?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/7b277c4a2b/?limit=25#2273" rel="alternate"/><published>2026-04-07T02:28:36.065000Z</published><updated>2026-04-07T02:28:36.065000Z</updated><author><name>nulltrace</name><uri>https://forge.codesys.com/u/nulltrace/</uri></author><id>https://forge.codesys.comb5353e17b1fbcc62332438e2e83dc40987bfb5af</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;your case looks diferent, the first one was an codesys modbsu tcp-slave, your's an Master-Application with gateway.&lt;/p&gt;
&lt;p&gt;I dont know this Unit, but inwould say, from Point of Codesys it looks wrong configured.&lt;/p&gt;
&lt;p&gt;Just give us more detailed configuration and the please make a sketch of the topology you're trying to realise.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Modbus TCP Server connection is ESTABLISHED but all holding registers are value 0?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/7b277c4a2b/?limit=25#af51" rel="alternate"/><published>2026-04-05T20:10:38.886000Z</published><updated>2026-04-05T20:10:38.886000Z</updated><author><name>egr99</name><uri>https://forge.codesys.com/u/egr99/</uri></author><id>https://forge.codesys.com4eaa402931c0a96ed6656dea0c276a1873f67c52</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi there,&lt;/p&gt;
&lt;p&gt;Read the above description and experienced the same: Reading coil/discrete input/input register/holding register doesn't fill the mapped I/O variable.&lt;/p&gt;
&lt;p&gt;Any suggestions? &lt;/p&gt;
&lt;p&gt;Defined (see attachment):&lt;br/&gt;
- Ethernet (with parameters according to the used Ethernet adapter of my Windows 11 laptop)&lt;br/&gt;
- -Modbus TCP Client&lt;br/&gt;
- - -LOGO231 as Modbus TCP Server&lt;br/&gt;
- - -WS242 as Modbus TCP Server (WaveShare Modbus TCP &amp;lt;-&amp;gt; RTU converter)&lt;br/&gt;
- - - -WS242_01 as Modbus Server, COM port (slave-id 1 RTU)&lt;br/&gt;
- - - -WS242_03 idem (slave-id 3 RTU)&lt;br/&gt;
- - - -WS242_11 idem (slave-id 11 RTU)&lt;/p&gt;
&lt;p&gt;Writing coil/holding register works from a mapped I/O variable works fine.&lt;/p&gt;
&lt;p&gt;Verification of Modbus traffic with WireShark:&lt;br/&gt;
QUERY to and the RESPONSE of all slave-ids are correct&lt;/p&gt;
&lt;p&gt;Status of all defined is CONNECTED, RESPONSE_SUCCESS, RUNNING etc.&lt;/p&gt;
&lt;p&gt;Request counters increase with expected frequency. Error counter = 0.&lt;br/&gt;
(To have all counters works fine I had to change Modbus TCP Client's parameter  OptimizationON to FALSE). &lt;/p&gt;
&lt;p&gt;LOGO231 works fine: values in mapped I/O conform expectation&lt;br/&gt;
WS242 without Modbus Server, COM port and&lt;br/&gt;
        with defined channels (for only 1 slave-id possible) works fine.&lt;/p&gt;
&lt;p&gt;PLC Settings: &lt;br/&gt;
Update I/O while in stop: I see xBusy changing from FALSE to TRUE and vice versa.&lt;br/&gt;
Always update variables: Enabled 1&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Modbus TCP Server connection is ESTABLISHED but all holding registers are value 0?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/7b277c4a2b/?limit=25#e54a" rel="alternate"/><published>2026-01-27T12:51:08.856000Z</published><updated>2026-01-27T12:51:08.856000Z</updated><author><name>fleaplc</name><uri>https://forge.codesys.com/u/fleaplc/</uri></author><id>https://forge.codesys.com8804110609c815e962fc04594490ae2d33a9365d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Did you check the communication with a sniffer ? (ex. Wireshark) to check if the holding get to zero by a wrong writing (client initialization?) o something else?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Modbus TCP Server connection is ESTABLISHED but all holding registers are value 0?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/7b277c4a2b/?limit=25#62ac" rel="alternate"/><published>2026-01-07T08:46:17.844000Z</published><updated>2026-01-07T08:46:17.844000Z</updated><author><name>TimvH</name><uri>https://forge.codesys.com/u/timvh/</uri></author><id>https://forge.codesys.com2eddd775589c4be91ae64c779099e79d52a1076d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Are you sure you need to read holding registers? Have you tried reading input registers?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Modbus TCP Server connection is ESTABLISHED but all holding registers are value 0?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/7b277c4a2b/?limit=25#9111" rel="alternate"/><published>2025-12-25T23:56:36.806000Z</published><updated>2025-12-25T23:56:36.806000Z</updated><author><name>mil581</name><uri>https://forge.codesys.com/u/mil581/</uri></author><id>https://forge.codesys.com128b8212367653e70a733f2daa64f7c50c2be2c2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello everyone!&lt;/p&gt;
&lt;p&gt;I'm facing a weird issue with CODESYS Control Win V3 x64 on a fresh Windows install.&lt;/p&gt;
&lt;p&gt;The situation is as follows:&lt;/p&gt;
&lt;p&gt;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).&lt;/p&gt;
&lt;p&gt;Port 502 is LISTENING according to netstat.&lt;/p&gt;
&lt;p&gt;When connecting via Modbus Poll or Node-RED, the connection status changes to ESTABLISHED and everything reports as fine.&lt;/p&gt;
&lt;p&gt;The Problem: Despite the successful connection, &lt;strong&gt;&lt;em&gt;all holding registers return 0 no matter what&lt;/em&gt;&lt;/strong&gt;. 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).&lt;/p&gt;
&lt;p&gt;Quick Stats:&lt;/p&gt;
&lt;p&gt;Firewall: Completely OFF.&lt;br/&gt;
Unit ID: Verified &amp;amp; Matching.&lt;br/&gt;
IP: Tried 127.0.0.1 and 192.168.0.1.&lt;br/&gt;
Interface: Correctly bound in Ethernet Device settings.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>