<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Multiple Modbus slaves using SysSockets library</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/652a59062f/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/652a59062f/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/652a59062f/</id><updated>2020-02-27T23:28:36.204000Z</updated><subtitle>Recent posts to Multiple Modbus slaves using SysSockets library</subtitle><entry><title>Multiple Modbus slaves using SysSockets library</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/652a59062f/?limit=25#e392" rel="alternate"/><published>2020-02-27T23:28:36.204000Z</published><updated>2020-02-27T23:28:36.204000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.comd6a0b1b1a5db3cbdde5f07871c8ace4fc114cb86</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; Tomasz Wisniowski&lt;/p&gt;
&lt;p&gt;Hello Everyone,&lt;/p&gt;
&lt;p&gt;I am trying to communicate with multiple Modbus TCP slaves from one controller using SysSockets library.  Currently I have been able to succesfully create two sockets.  They are set up as unblocking, reuse address and reuse port.  When trying to send/receive data, the first socket works fine and the second socket returns a -1.  (Same subroutine is used to send/receive for both sockets so the code should be fine, Modbus TCP slaves have been swapped and the issue is not with the slaves)  &lt;/p&gt;
&lt;p&gt;Is there anything else that I should be doing or not doing that I may be missing.  Thanks a lot in advance for any help.  &lt;/p&gt;
&lt;p&gt;Tom&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>