<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Automatic  xExecute NBS.TCP_write</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/f778fef1b6/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/f778fef1b6/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/f778fef1b6/</id><updated>2024-03-05T15:18:54Z</updated><subtitle>Recent posts to Automatic  xExecute NBS.TCP_write</subtitle><entry><title>Automatic  xExecute NBS.TCP_write</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/f778fef1b6/?limit=25#fbf2" rel="alternate"/><published>2024-03-05T15:18:54Z</published><updated>2024-03-05T15:18:54Z</updated><author><name>TimvH</name><uri>https://forge.codesys.com/u/timvh/</uri></author><id>https://forge.codesys.com6b75ad7723e42cab0c91129155f511577b99e87f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Use e.g. the condition:&lt;br/&gt;
TCP_Connection_0.xActive AND NOT(TCP_Write_0.xDone)&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Automatic  xExecute NBS.TCP_write</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/f778fef1b6/?limit=25#a3b2" rel="alternate"/><published>2024-03-05T12:37:51.471000Z</published><updated>2024-03-05T12:37:51.471000Z</updated><author><name>brell</name><uri>https://forge.codesys.com/u/brell/</uri></author><id>https://forge.codesys.combe1a89e5d8f87f5e05cbe0bcc29ed89ed4ddb233</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I've recently started experimenting with CODESYS for a project and am fairly new to it. I'm currently working with Function Block Diagrams (FBD) to set up TCP communication between a server and a client, where the client is implemented as a Python script. Once the communication is established, my connection status changes to True, which is the expected behavior.&lt;/p&gt;
&lt;p&gt;My challenge arises with the TCP write module, which requires the xEnable_write flag to toggle between True and False. If xEnable_write remains True, the module only performs a single write operation. To address this, I introduced a falling edge trigger (F_TRIG), expecting it to help in toggling xEnable_write and it does, However, I've encountered an issue where in the beginning after connxion established I need to manually set xEnable_write to True for the system to work as intended. I'm looking for a way to automate this process so that xEnable_write becomes True automatically upon establishing a connection .&lt;/p&gt;
&lt;p&gt;Initially, I tried setting xEnable_write to True from the start, but this approach didn't work well since it left the flag permanently True, preventing further toggling. I also experimented with using a TON timer, but I faced similar issues.&lt;/p&gt;
&lt;p&gt;I am seeking a solution that automatically toggles xEnable_write between True and False after a connection is established, ensuring continuous write operations without manual intervention. Any advice or guidance on how to achieve this would be greatly appreciated."&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>