17:44, EEST
March 16, 2017
Hi,
assume I have a complex data type like:
ComplexDataType
+ Name (String)
+ Value (Integer)
+ Toggle (Boolean)
And I subscribe to a node which has such a complex data type as value.
If then one of Name, Value or Toggle changes, I’ll get a onDataChanged notification when one of these values changes, right?
But would it be also possible to subscribe to the node and somehow get only onDataChanged notifications from the subscription when e.g. the Toggle changes?
Thanks!
10:49, EEST
Moderators
February 11, 2020
Hello,
In general, OPC UA doesn’t support definining MonitoredItems in a way where they would report data changes only when the Value of a selected Field of a Structure Value changes. If you create a MonitoredItem for a Variable with a Structure Value, it will report data changes whenever any Field or Fields of the Structure Value change.
If the Variable with the Structure Value has “child” Nodes that represent the individual Fields of the Structure Value, then you could make the MonitoredItem for one of those Nodes instead of the “parent” Node with the Structure Value. However, that would mean that you get data change notifications for the Value of only that Field, which is not the same as getting data change notifications for the entire Structure Value when the Value of the selected Field changes. Though, you could use this data change notification to trigger reading the entire Structure Value from the “parent” Node, which could be better if you do not wish to create MonitoredItem for that Node directly to avoid getting data change notifications when Values of other Fields change.
Note, that whether or not the Variable with the Structure Value has “child” Nodes representing Fields of the Structure depends on the VariableType of the Node and sometimes Server implementation. There is no guarantee that all Variables with Structure Values would have “child” Nodes for the Fields of their Structure Values especially if the DataType of the Variable would allow it to have different types of Structure Values.
Most Users Ever Online: 1919
Currently Online:
47 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 726
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardo, jeromechubb7, franciscagrimwad, adult_galleryModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1