<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts by egr99</title><link href="https://forge.codesys.com/u/egr99/" rel="alternate"></link><link href="https://forge.codesys.com/u/egr99/profile/feed.atom" rel="self"></link><id>https://forge.codesys.com/u/egr99/</id><updated>2026-04-08T12:17:21Z</updated><subtitle>Recent posts by egr99</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#5527" rel="alternate"></link><published>2026-04-08T12:17:21Z</published><updated>2026-04-08T12:17:21Z</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#af51" rel="alternate"></link><published>2026-04-05T20:10:38Z</published><updated>2026-04-05T20:10:38Z</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></feed>