<?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[The read is timiing out]]></title><description><![CDATA[<p dir="auto">Here is the code for the following info we need to pull</p>
<p dir="auto">ModbusFactory factory = new ModbusFactory();<br />
IpParameters params = new IpParameters();<br />
params.setHost("192.168.1.100");<br />
params.setPort(502);<br />
params.setEncapsulated(true);<br />
ModbusMaster master = factory.createTcpMaster(params, false);<br />
// master.setRetries(4);<br />
master.setTimeout(50000);<br />
master.setRetries(5);</p>
<pre><code>		long start = System.currentTimeMillis();
		try {
			master.init();
			for (int i = 0; i &lt; 40; i++) {
				System.out.println(master.getValue(100,
						RegisterRange.COIL_STATUS, 100+i,
						DataType.BINARY));
			}
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			master.destroy();
		}

		System.out.println("Took: " + (System.currentTimeMillis() - start)
				+ "ms");
</code></pre>
<p dir="auto">We are trying to pull the values from the following information</p>
<p dir="auto">Slave ID: 100<br />
Function: 01 Read Coils (0x)<br />
Address: 100<br />
Quantity: 40</p>
<p dir="auto">This works on another program we downloaded just to see if the PLC was ok and the PLC is working.  Whenever we try with Modbus4j it times out.  Any help is appreciated!</p>
]]></description><link>https://forum.mango-os.com/topic/893/the-read-is-timiing-out</link><generator>RSS for Node</generator><lastBuildDate>Mon, 18 May 2026 03:13:27 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/893.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 18 Aug 2011 05:21:28 GMT</pubDate><ttl>60</ttl></channel></rss>