Click PLC connecting/disconnecting constantly?

Got a CLICK plc on our network. I am able to ping it from my laptop and open up the PLC project from the Click software to see the ladder logic.

In my gateway, I have the correct IP and port applied. But it does not seem to want to connect. I am not seeing anything in my logs. 1) What logger would I turn to a lower level like TRACE to see some information? 2) Any thoughts on what could be going wrong?

What driver are you using?

Modbus TCP

drivers.ModbusDriver2 on DEBUG will show something like this:

Actual error message may vary.

1 Like

java.net.UnknownHostException: 192.168.57.300

at java.base/java.net.InetAddress$CachedAddresses.get(Unknown Source)

at java.base/java.net.InetAddress.getAllByName0(Unknown Source)

at java.base/java.net.InetAddress.getAllByName(Unknown Source)

at java.base/java.net.InetAddress.getAllByName(Unknown Source)

at java.base/java.net.InetAddress.getByName(Unknown Source)

at com.inductiveautomation.xopc.driver.api.SocketIODelegate.connect(SocketIODelegate.java:70)

at com.inductiveautomation.xopc.driver.api.AbstractIODelegatingDriver.connect(AbstractIODelegatingDriver.java:21)

at com.inductiveautomation.xopc.driver.api.AbstractDriver$5.run(AbstractDriver.java:732)

at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.base/java.util.concurrent.FutureTask.run(Unknown Source)

at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.base/java.lang.Thread.run(Unknown Source)

Your gateway can’t route to this IP address I guess? Network problem, outside Ignition.

Ooh, actually, make sure you don’t have whitespace in the IP you configured.

Oh whoops. That’s my fault, instead of deleting the old connection configuration I pointed it to a impossible IP address so I could test a new connection. I just deleted the old configuration to avoid those issues in the logs.

Here is the actual one

java.net.ConnectException: Connection refused: connect

at java.base/java.net.PlainSocketImpl.connect0(Native Method)

at java.base/java.net.PlainSocketImpl.socketConnect(Unknown Source)

at java.base/java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)

at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)

at java.base/java.net.AbstractPlainSocketImpl.connect(Unknown Source)

at java.base/java.net.SocksSocketImpl.connect(Unknown Source)

at java.base/java.net.Socket.connect(Unknown Source)

at com.inductiveautomation.xopc.driver.api.SocketIODelegate.connect(SocketIODelegate.java:75)

at com.inductiveautomation.xopc.driver.api.AbstractIODelegatingDriver.connect(AbstractIODelegatingDriver.java:21)

at com.inductiveautomation.xopc.driver.api.AbstractDriver$5.run(AbstractDriver.java:732)

at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.base/java.util.concurrent.FutureTask.run(Unknown Source)

at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.base/java.lang.Thread.run(Unknown Source)

Looks like the PLC is rejecting the connection?

Yes. I don’t know if you have to configure these things to accept a Modbus connection first or what.

1 Like