I’m setting up a few of my devices using modbus tcp but I can’t get them to connect. Is there anything I can do to connect them? I tried pinging the devices and I got a reply. Is there a way where I can force it to connect?
Btw, here’s the status on one of the devices that aren’t connected:
If you turn the logger for that device to DEBUG it might tell you a little bit more about the error, but generally no, you can’t ‘force’ anything.
Are you sure you’ve got the right IP address? That there’s a modbus device on the other end? That there’s no outbound rules on your firewall blocking port 502? That the device can accept more connections than it currently has?
[quote]SocketIODelegate [hostname=192.168.0.246,port=502] Opening TCP connection…
(D) 9:57:12 AM ModbusDriver2[FO_CSUMB] Disconnected -> Connecting
(D) 9:57:11 AM RequestQueue Low count: 0
(D) 9:57:11 AM RequestQueue High count: 0
(D) 9:57:11 AM RequestQueue Critical count: 0
(D) 9:57:10 AM ModbusDriver2[FO_CSUMB] Acquired connect permit, calling connect().
(D) 9:57:10 AM BasicRequestCycle Shutdown complete.
(D) 9:57:10 AM BasicRequestCycle Shutting down…
(D) 9:57:10 AM RequestSchedule Canceling 0 ScheduledRequests.
(D) 9:57:10 AM ModbusDriver2[FO_CSUMB] Connecting -> Disconnected
(D) 9:57:10 AM ModbusDriver2[FO_CSUMB] Releasing connect permit.
(D) 9:57:10 AM ModbusDriver2[FO_CSUMB] Error during connect.
java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at com.inductiveautomation.xopc.driver.api.SocketIODelegate.connect(SocketIODelegate.java:76)
at com.inductiveautomation.xopc.driver.api.AbstractIODelegatingDriver.connect(AbstractIODelegatingDriver.java:21)
at com.inductiveautomation.xopc.driver.api.AbstractDriver$5.run(AbstractDriver.java:589)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
less
[/quote]
Means the Ignition box couldn’t open a connection to whatever ip:port you have configured. Verify you can ping the device from the Ignition box, then if that’s successful try using something like http://www.chipkin.com/technical-resources/cas-modbus-scanner/ to verify modbus connectivity to/from the device.
[quote=“cacordova”]Yes I can ping the device from cmd and got a reply.
What ignition box?[/quote]
He means Ignition gateway. The error message is saying a TCP connection can’t be made. It’s either a networking issue or the device (the actual device, not the device you set up in Ignition) isn’t configured correctly or responding.