<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Setting the IP Address of Modbus slave]]></title><description><![CDATA[<p dir="auto">I am trying to simulate an TCP Modbus slave.</p>
<p dir="auto">I extended the class <strong>TcpSlave</strong> for this and added some Process Images.</p>
<p dir="auto">Unfortunately, the TcpSlave provides only the port to set.</p>
<p dir="auto">How can I set the IP Address of the slave ?</p>
<p dir="auto">I tried to add the following code snippet in TcpSlave but it doesn't help :</p>
<pre><code>

    @Override
    public void start() throws ModbusInitException {
        try {
            serverSocket = new ServerSocket(port);

           //Socket socket;


            
          //this should be the ip address of the slave
           Socket socket = new Socket("192.168.20.100", 502);




            while (true) {
                socket = serverSocket.accept();
                TcpConnectionHandler handler = new TcpConnectionHandler(socket);
                executorService.execute(handler);
            }



</code></pre>
<p dir="auto">Can someone help me ?</p>
]]></description><link>https://forum.mango-os.com/topic/857/setting-the-ip-address-of-modbus-slave</link><generator>RSS for Node</generator><lastBuildDate>Wed, 13 May 2026 16:20:43 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/857.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 06 Jul 2011 11:40:43 GMT</pubDate><ttl>60</ttl></channel></rss>