Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Defining EURange in one or more fields of structured data
February 1, 2017
14:57, EET
Avatar
agrillo
Member
Members
Forum Posts: 22
Member Since:
June 28, 2016
sp_UserOfflineSmall Offline

Hello,
is there a way to define an EURange in one or more fields of a structured data?

If not, how can I manage value ranges in structured data fields?

Thanks in advance.
Alessandro

February 2, 2017
17:27, EET
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1032
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

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

February 3, 2017
10:36, EET
Avatar
agrillo
Member
Members
Forum Posts: 22
Member Since:
June 28, 2016
sp_UserOfflineSmall Offline

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

February 6, 2017
14:57, EET
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1032
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

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).

February 6, 2017
15:51, EET
Avatar
agrillo
Member
Members
Forum Posts: 22
Member Since:
June 28, 2016
sp_UserOfflineSmall Offline

Hi Bjarne,
thank you very much for your answer, you were very helpful!

Since I need to have all data synchronized at the same time, I think to opt for the first solution (MonitorDataLimits), I like it very much.

I’ll try it and let you know certainly.

Thanks again.
Cheers.
Alessandro

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
26 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: 730

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1529

Posts: 6471

Newest Members:

HypromeImpupe, toneylapham544, rondawolinski7, Marypof5711, roycedelargie91, kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus, Deakin

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0

Administrators: admin: 1