Modbus OPC tag disconnecting constantly

Hi,

I’ve been connecting to a Modbus device to gather data measurements and the data comes through from OPC tags for ~10 seconds (data is updating), but then it stops.

The logs show this message: ReadHoldingRegistersRequest , Request failed. FailureType==DISCONNECTED

I’ve been playing around with my tag groups and their common Rate (~10,000) and custom opcRate (~10,000). Should I be using both of these rates with the same value? I have been using two different values.

Is this the same case as (Modbus TCP Request Failed)? Could you direct me to the fixes that were mentioned here ([bug-14313]Direct Tag Group running on Leased/Driven rate)?

Detailed message below:
java.lang.Exception: RequestCycle stopped.
at com.inductiveautomation.xopc.driver.api.BasicRequestCycle.shutdown(BasicRequestCycle.java:281)
at com.inductiveautomation.xopc.driver.api.AbstractDriver.createNewRequestCycle(AbstractDriver.java:763)
at com.inductiveautomation.xopc.driver.api.AbstractDriver.notifyDisconnectDone(AbstractDriver.java:722)
at com.inductiveautomation.xopc.driver.api.AbstractIODelegatingDriver.notifyDisconnectDone(AbstractIODelegatingDriver.java:71)
at com.inductiveautomation.xopc.driver.api.AbstractIODelegatingDriver.disconnect(AbstractIODelegatingDriver.java:43)
at com.inductiveautomation.xopc.driver.api.AbstractIODelegatingDriver.reconnect(AbstractIODelegatingDriver.java:93)
at com.inductiveautomation.xopc.drivers.modbus2.AbstractModbusDriver.access$000(AbstractModbusDriver.java:97)
at com.inductiveautomation.xopc.drivers.modbus2.AbstractModbusDriver$2.notifyCommunicationTimeout(AbstractModbusDriver.java:138)
at com.inductiveautomation.xopc.drivers.modbus2.requests.AbstractModbusRequest.fail(AbstractModbusRequest.java:169)
at com.inductiveautomation.xopc.drivers.modbus2.requests.AbstractModbusReadRequest.fail(AbstractModbusReadRequest.java:121)
at com.inductiveautomation.xopc.driver.api.requests.TimedRequest.fail(TimedRequest.java:44)
at com.inductiveautomation.xopc.driver.api.BasicRequestCycle$TimeoutDaemon.failRequests(BasicRequestCycle.java:374)
at com.inductiveautomation.xopc.driver.api.BasicRequestCycle$TimeoutDaemon.run(BasicRequestCycle.java:329)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.runAndReset(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 this post may be a similar issue to what you’re seeing: modbus connection toggling between connected disconnected

Hmm I tried changing the poll rates, having some tags with a 5s scan rate and the rest around 7s but still no luck. If I make the scan rate extremely small, it seems to just timeout faster (from 2min to 1min).

Looking at all of the log messages, is LegacyScripting[system_util_tag] relevant to the disconnection?

What loading is showing on the diagnostics page for that device?

There’s a setting on the Modbus driver called “Reconnect After Consecutive Timeouts”. Try disabling this.

Sorry, I wasn’t sure if you meant the Execution or Threads page, so I’ve taken some screenshots of both, related to this device

Now my device is connected, but the data does not come through once it has a timeout

Perhaps an unrelated question, but what is the differenc between the Common Rate and Custom OPCrate matter? Should they be the same? I’ve tried setting them <10s to avoid device inactivity

1 Like