Node-Red fast retrieval of variables

I am currently using Node-Red with the Opto22 Provided OPC pac control node, it works great, I am able to retrieve a fairly large table once per second.
I have noticed, specially when running node-red on a non-local instance, that when there is a network issue, and it gets reconnected, data starts lagging, with events where the observed data is minutes behind the real condition.
I am not sure if this is caused by the tcp nature of the request, or if the node itself has a buffer, attempting to retrieve older messages.
The issue is cleared when the node-red is restarted, or a change is deployed.

but my question is regarding the best approach when it comes to retrieving the “latest” status of the variable, in my case, I dont need the older values, I just need the latest “current” value, is the Opto22 node still a good approach? or should I look into a Modbus request instead?

Regards

For high-speed reading (less than 1s scan time) I have gotten really great results with UDP streaming configured via OptoMMP, is that something that would work for your application?

Here are some posts on how I’ve set up UDP streaming with Node-RED:

1 Like

Yes, that would actually work. the only difference is that I would need to read a pac control variable, rather than a digital input, I need to dive a little into the documentation to find out the mapping, worst case scenario I can use a PID loop and read the address from there.
I will post the results, thank you.