Modbus OPC tag disconnecting constantly


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(
at com.inductiveautomation.xopc.driver.api.AbstractDriver.createNewRequestCycle(
at com.inductiveautomation.xopc.driver.api.AbstractDriver.notifyDisconnectDone(
at com.inductiveautomation.xopc.driver.api.AbstractIODelegatingDriver.notifyDisconnectDone(
at com.inductiveautomation.xopc.driver.api.AbstractIODelegatingDriver.disconnect(
at com.inductiveautomation.xopc.driver.api.AbstractIODelegatingDriver.reconnect(
at com.inductiveautomation.xopc.drivers.modbus2.AbstractModbusDriver.access$000(
at com.inductiveautomation.xopc.drivers.modbus2.AbstractModbusDriver$2.notifyCommunicationTimeout(
at com.inductiveautomation.xopc.driver.api.BasicRequestCycle$TimeoutDaemon.failRequests(
at com.inductiveautomation.xopc.driver.api.BasicRequestCycle$
at java.base/java.util.concurrent.Executors$ Source)
at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$ Source)
at java.base/ 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