Hello,
I've got a C# application where I'm subscribing to a few opc variables.
Currently they are the ones provided by the server in your demo application which runs locally.
As I'll have to react quickly to changes on the plc, I'm subscribing to them with a rather small update interval.
To process the changes I'm handling the MultipleItemsChanged event.
Now it seems to me that the system is accumulating about 1 second of changes and then fires a MultipleItemsChanged event where several changes of the same variable are recorded.
Is there a way to reduce this "changes accumulation time"?
I'm not certain if this is a server or a client behavior, which would be relevant as I'll
communicate with a different opc server later on.
Code:
var subscriptions = new DAItemGroupArguments[]
{
new DAItemGroupArguments(string.Empty, _ServerDesc, "Greenhouse.Sprinklers", 20, null);
new DAItemGroupArguments(string.Empty, _ServerDesc, "Greenhouse.Temperature", 20, null);
new DAItemGroupArguments(string.Empty, _ServerDesc, "Demo.Ramp", 20, null);
new DAItemGroupArguments(string.Empty, _ServerDesc, "Demo.Single", 20, null);
new DAItemGroupArguments(string.Empty, _ServerDesc, "Trends.Sine (1 s)", 20, null);
new DAItemGroupArguments(string.Empty, _ServerDesc, "Trends.Sine (10 s)", 20, null);
new DAItemGroupArguments(string.Empty, _ServerDesc, "Trends.Sine (1 min)", 20, null);
};
_Client = new EasyDAClient();
_Client.MultipleItemsChanged += _Client_MultipleItemsChanged;
_Client.SubscribeMultipleItems(subscriptions);
...
private void _Client_MultipleItemsChanged(object sender, EasyDAMultipleItemsChangedEventArgs e)
{
Log("Got a MultipleItemsChanged event");
foreach (var singleItem in e.ArgsArray)
{
Log("{0}: {1}", singleItem.ItemDescriptor.ItemId, singleItem.Vtq);
}
}
Thanks for your effort,
Christoph