<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent posts to Modbus TCP interface get stuck</title><link>https://forge.codesys.com/forge/talk/Engineering/thread/5c41b97ddb/</link><description>Recent posts to Modbus TCP interface get stuck</description><language>en</language><lastBuildDate>Tue, 14 Apr 2026 09:24:47 -0000</lastBuildDate><atom:link href="https://forge.codesys.com/forge/talk/Engineering/thread/5c41b97ddb/feed.rss" rel="self" type="application/rss+xml"></atom:link><item><title>Modbus TCP interface get stuck</title><link>https://forge.codesys.com/forge/talk/Engineering/thread/5c41b97ddb/?limit=25#5585</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Dear Forum, &lt;/p&gt;
&lt;p&gt;I'm currently experimenting with Modbus interfaces in combination with a virtual controller. &lt;/p&gt;
&lt;p&gt;I have the following setup (Modbus_Setup.png): &lt;br/&gt;
I have an IPC with Debian installed on it (Debian 13). On this Debian machine I have installed a docker server and on this docker server a Codesys runtime container is deployed (Codesys_image.png). &lt;br/&gt;
The Modbus scanner makes connection with and IO coupler and this works well. But when I physically disconnect the ethernet connection between the IPC and the IO coupler the Modbus interface gets stuck in a state where it gets stuck in the busy state (Modbus_Stuck.png). When I plug the cable back in, the IO coupler isn't communicating until the xBusy variable is manually set to False, after this action is performed the communication goes back to normal. I have tried to set the container network to host and bridge (Network.png), but both version gives the same result (stuck scanner).&lt;/p&gt;
&lt;p&gt;I would expect that the Modbus interface is generating a timeout after 1 sec, because this is how it is setup (Modbus_settings.png), but this is not what happens. I have thought to write a piece of code that writes xBusy to false when it is stuck but because it is an output I'm not able to write to it. &lt;/p&gt;
&lt;p&gt;I have tried this with another PC (different CPU/motherboard) but this gives the same outcome. I tried updating to the latest version of Virtual control (4.20) but this gives the same result. &lt;br/&gt;
I also tried to do the same thing with an ethernet IP scanner, and this gives an error after the timeout is expired (so this works well). &lt;/p&gt;
&lt;p&gt;I have tried to connect to the IO coupler using the Modbus_FB lib (Modbus_FB.png) the FB's are giving the correct errors and behaving as expected. &lt;/p&gt;
&lt;p&gt;At last I have tried to use a Scanner on a Codesys controller (no IPC) and here the scanner behaves as expected (an alarm is triggered after the timeout has been expired). &lt;/p&gt;
&lt;p&gt;The version of the Codesys components are listed in the picture Versions.png&lt;/p&gt;
&lt;p&gt;Is there anyone that can give me a push in the right direction? &lt;/p&gt;
&lt;p&gt;Kind regards Alex&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">alexgooi</dc:creator><pubDate>Tue, 14 Apr 2026 09:24:47 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com9699864c54f1d6cb8ee5a7044adc4e714441fa74</guid></item></channel></rss>