Hello,
I have a question regarding the behavior of a callbackFunction in a scenario where we have let's say 4 unique items that all have the same callbackFunction defined like this :
tmpItemArguments.Add(
new EasyUAMonitoredItemArguments(
BasketInPositionHandler, -- callback triggered on DataChangeEvent
new UAMonitoredItemArguments(
pozycja,
pozycja.OPCServerURL,
pozycja.OPCNodeID + pozycja.Tags.KoszNaPozycji,
new OpcLabs.EasyOpc.UA.UAMonitoringParameters() {
SamplingInterval = 100
}
)
));
opc.tcp://192.168.52.99:49320 NodeId="nsu=KEPServerEX;ns=2;s=Destacker_1.Station_1.Pos_0.Basket_in_position" Void BasketInPositionHandler
opc.tcp://192.168.52.99:49320 NodeId="nsu=KEPServerEX;ns=2;s=Destacker_1.Station_1.Pos_1.Basket_in_position" Void BasketInPositionHandler
opc.tcp://192.168.52.99:49320 NodeId="nsu=KEPServerEX;ns=2;s=Destacker_1.Station_2.Pos_0.Basket_in_position" Void BasketInPositionHandler
opc.tcp://192.168.52.99:49320 NodeId="nsu=KEPServerEX;ns=2;s=Destacker_1.Station_2.Pos_1.Basket_in_position" Void BasketInPositionHandler
Now my understanding was that the function would only be called when individual item has a change for example,
if Station_1.Pos_0.Basket_in_position changed status or value from 0 to 1 function BasketInPositionHandler would fire once for this particular item.
From what I observed this function is fired 4 times if any of the items Status or Value changes or connection is reestablished? Is this the correct behavior?
Should I write 4 unique callbackFunctions for each of the items to achieve what I originally expected?
Best regards, Piotr