From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

Lookout OPC Client – Asynchronous I/O and Update Rate serious problems (Sequence of data)

 

I am using the Lookout OPCClient driver to connect to AB PLCs (EtherNet/IP protocol) and power measurement equipment (Modbus TCP protocol). The OPC server is the NI OPC Servers. The data that are read out from PLCs and PMs are energy meter readings, energy counters, power, voltage, current, frequency, power factor and el. energy quality measurements (THD). That energy meter readings are being stored in SQL database.

 

I am experiencing a serious problem regarding the accuracy of the meter readings. Several times per day, randomly, meter readings are losing the time sequence. For example, sequence is: 167, after few seconds 165, 166.  In other words, present value followed by two previous old values. That generates a serious problem in our application that is expecting a naturally rising sequence of counter values.

 

Analyzing further, I isolated the problem to the connection between Lookout OPCClient and OPC Server. I made a simple application in Lookout 6.7 (opcproc.lkp, attached) with OPCClient parameters: NIOPCServers, OPC2, Asynchronus I/O, Update rate: 10000, Deadband: 0.0, that is reading just one tag from NI OPC Servers demo application (simdemo.opf).

 

By using OPC diagnostic tool from NI OPC Servers I record the sequence of OPC requests and responses.  I found out that OPCClient sends every 2.5 sec “IOPCAsyncIO2::Refresh2()” call that is request for refreshing of all items in one OPC group. Few milliseconds later OPC Sever responds with callback function “IOPCDataCallback:: OnDataChange()(Device Refresh)” that actually refresh the data.

This periodic sequence is intrinsic to the OPCClient and cannot be disabled or changed (by my knowledge).  This sequence is periodically interrupted by “IOPCDataCallback:: OnDataChange()” caused by update rate parameter of OPCClient (client is subscribed to server for periodic update of changed items).

In the case of demo application on every 4 refresh callbacks caused by refresh requests (2.5 sec) there is one update subscription callback determined by Update rate (10 sec).

 

QUESTION 1:

What is the purpose of update sequence and update rate when we have every 2.5 sec fresh values?

 

PROBLEM

The problem arises when we have a large number of items in OPC group. In that case the OPC Server starts to queue refresh requests because they cannot be fulfilled in 2.5 sec time because of large number of I/O points that must be scanned. At the same time update subscription callbacks are running at the period determined by Update rate. I observed in my production system that regular update callbacks has higher priority than refresh callbacks from the queue. That causes the loosing of timed sequence of data. After the update callback with fresh data, sometimes follow one or two refresh callbacks from queue with old (invalid) data. By adjusting Update rate parameter (1 hour, 2hours …) I can postpone the collision of data refreshes but I cannot eliminate it. Furthermore, the 2.5 sec automatic refresh are large burden for systems with many I/O points.

 

QUESTION 2:

Is there a way to disable automatic refresh request every 2.5 sec and just use update requests determined by Update rate?

 

QUESTION 3:

Is there a way (or parameter) to change the period of automatic refresh (2.5 sec)?

 

This problem is discovered for Lookout 6.5, 6.6 and 6.7 so I could say it is intrinsic to OPCClient. If I use synchronous I/O requests there is not an automatic refresh, but that is not an option for large systems.

 

Thanks!

 

Alan Vrana

System engineer

 

SCADA Projekt d.o.o.

Picmanova 2

10000 ZAGREB

CROATIA

T +385 1 6622230

F +385 1 6683463

e-mail scada.projekt@zg.t-com.hr

 

Alan Vrana
SCADA Projekt d.o.o.
ZAGREB, Croatia
0 Kudos
Message 1 of 1
(5,498 Views)