14:57, EET
June 28, 2016
17:27, EET
April 3, 2012
Hi,
What are you trying to do?
EURange is a Property defined for AnalogItemType (Spec. version 1.03, Part 8, section 5.3.2). AnalogItemType is defined as a VariableType with DataType Number, therefore you cannot put a Structure value to it. This is the only place where the term “EURange” is used in the specification.
Assuming you want to use a custom Structure as a value and have limits on those there is no standard mechanism to do that (to my knowledge). Even for the AnalogItemType the spec defines:
EURange defines the value range likely to be obtained in normal operation. It is intended for such use as automatically scaling a bar graph display.
Sensor or instrument failure or deactivat ion can result in a returned item value which is actually outside of this range. Client software must be prepared to deal with this possibility. Similarly a Client may attempt to write a value that is outside of this range back to the server. The exact behaviour (accept, reject, clamp, etc.) in this case is Server- dependent. However, in general Servers shall be prepared to handle this.
Technically you can create a custom Structure that has the fields and then create a Property node for the type that has the value e.g. “Limits” and have the value of the node be another custom Structure with equivalent ‘Range’ Structures as fields (the value of EURange node is a standard ‘Range’ Structure) and then react to writes of outside of the range.
– Bjarne
10:36, EET
June 28, 2016
Hi Bjarne,
my custom Structure is defined in the following way:
Name: MonitorData
Fields: VOut1, VOut2, …, VOut5, CurrentDB, CurrentHV –> Integer
Temperature –> Float
I have an OPC UA node (server side) that monitors (1-second interval) the MonitorData variable. On the client side I created a subscription to MonitorData, so, when it changes on the server, I receive the updated data on a GUI.
My intent is to highlight the various fields on the GUI when their values are out of a defined range, so I’m wondering if there’s an easy way to do that. As the fields could have different ranges, how can I define a range for each field?
Alessandro
14:57, EET
April 3, 2012
Create a separate Structure:
MonitorDataLimits
Fields: VOut1Range, VOut2Range … –> org.opcfoundation.ua.core.Range (this is also what the value of an EURange is)
Create subnode under the node that has the MonitorData Structure as value and set the value of that subnode to MonitorDataLimits. You can then read the limits from that node.
– Bjarne
P.S.
Unless your data nees to have “atomic updates” i.e. the values always change at the same time and you need to be sure that you get a snapshot of them at the same state, I would suggest that you model your data instead as individual AnalogItemType nodes under e.g.
MyMeasurementsObjectType
|-Measurement1 (AnalogItemType)
|-Measurement2 (AnalogItemType)
|-Measurement3 (AnalogItemType)
|-Measurement4 (AnalogItemType)
…
This way you could use an existing type (AnalogItemType).
Most Users Ever Online: 1919
Currently Online:
21 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: 737
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1524
Posts: 6450
Newest Members:
fannielima, kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerleyModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1