Hello,
I am using the .NET toolkit to build a small server and am testing it with UAExpert. I want it to deliver updates when the source timestamp changes so that changes in values faster than the sampling/publish rate cause updates to be sent to the client.
In UAExpert, I added a DataItem Node to the DA View and it gets the initial VQT update. I then selected the item and opened the "Monitored Item Settings" context menu, enabled the "Data Change Filter" checkbox and set the trigger to Status/Value/Timestamp.
The Server updates the timestamp of the variable once per second, but the Server never sends an update to UAExpert.
Using Wireshark I verified that the command to change the MI settings was sent and returned success, and if I refresh the Attributes display the source timestamp is shown correctly. But the subscription update is never sent and the DA view never updates.
Does the .NET toolkit support this mode of operation? Is there something else I need to do in the server to make this work?
Thanks
David
Subscription update for VQT mode not working.
Moderator: uasdknet
-
- Full Member
- Posts: 6
- Joined: 27 Jul 2020, 14:42
- Support Team
- Hero Member
- Posts: 3078
- Joined: 18 Mar 2011, 15:09
Re: Subscription update for VQT mode not working.
Hello,
YES, the OPC UA .NET SDK supports the Data Change Filter Status/Value/Timestamp.
We assume that the issue is not related to the Data Change Filter, but the Value is not updated at all.
There are several options to configure a variable. Depending on this configuration you need to implement or call different methods of the SDK to update variable's values and report data changes to MonitoredItems.
Our next assumption is that SetVariableConfiguration is not called for the Variable, so NodeHandleType.Internal is used. In this case you need to
You will get a better understanding when reading these:
YES, the OPC UA .NET SDK supports the Data Change Filter Status/Value/Timestamp.
We assume that the issue is not related to the Data Change Filter, but the Value is not updated at all.
There are several options to configure a variable. Depending on this configuration you need to implement or call different methods of the SDK to update variable's values and report data changes to MonitoredItems.
Our next assumption is that SetVariableConfiguration is not called for the Variable, so NodeHandleType.Internal is used. In this case you need to
- get the NodeAttributeHandle of the node (only once)
- set the Value of the Node
- set the Timestamp of the Node
- call ReportDataChanges
Code: Select all
NodeId variableId = ...
var InternalNode = FindInMemoryNode(variableId) as VariableNode;
GetNodeHandle(Server.DefaultRequestContext, variableId , Attributes.Value, out var HandleInternalNode);
Code: Select all
InternalNode.Timestamp = DateTime.UtcNow;
ReportDataChanges(Server.DefaultRequestContext, HandleInternalNode);
- https://documentation.unified-automation.com/uasdknet/4.0.0/html/L2ServerSdkServerManBaseNodeMan.html
- https://documentation.unified-automation.com/uasdknet/4.0.0/html/ classUnifiedAutomation_1_1UaServer_1_1BaseNodeManager.html#add0a37e23cdf0bcf0b7bc90b2eb42afd
- https://documentation.unified-automation.com/uasdknet/4.0.0/html/classUnifiedAutomation_1_1UaServer_1_1BaseNodeManager.html#a5cdd54b163ab5827d0a6fe9f03928059
Best regards
Unified Automation Support Team
Unified Automation Support Team