Please consider registering

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
help MultiStateValueDiscreteType
December 13, 2022
10:46, EET
Francesco Zambon
Forum Posts: 30
Member Since:
December 20, 2021
sp_UserOfflineSmall Offline

Good morning,

I am using the prosys-opc-ua-sdk-for-java-4.9.0-43-client-server-binary library.

I’m trying to implement an OPC UA server with classes generated by the codegen tool (information model: EUROMAP 82.1 url: https://www.euromap.org/euromap82-1).

Please can you explain me how to handle MultiStateValueDiscreteType? I don’t understand how to set the possible values ​​and how to read the selected value.

I am working with the following variable:

– Parent: DeviceZoneType
– Node Class: Variable
– BrowseName: InternalMeasuringPoint
– DataType: 0:UInt16
– TypeDefinition: 0:MultiStateValueDiscreteType
– Other: O, RW
– file: EUROMAP82.1_Release_1.01.pdf
– page: 17.

Thanks in advance for the support,

December 13, 2022
12:15, EET
Matti Siponen

Forum Posts: 230
Member Since:
February 11, 2020
sp_UserOfflineSmall Offline


First of all, since InternalMeasuringPoint is an Optional component of DeviceZoneType, you must specify that it is created when creating an instance of DeviceZoneType. If you’ve already done this, you can skip the next part.

To create Optional components, you must set the NodeBuilderConfiguration of your NodeManager. To create InternalMeasuringPoint, you would use the following configuration:

TypeDefinitionBasedNodeBuilderConfiguration.Builder conf = TypeDefinitionBasedNodeBuilderConfiguration.builder();
conf.addOptional(UaQualifiedName.from(“http://opcfoundation.org/UA/PlasticsRubber/TCD/”, “InternalMeasuringPoint”));

You would then create an instance of DeviceZoneType using the following method:

DeviceZoneType deviceZone = nodeManager.createInstance(DeviceZoneType.class, “DeviceZone”);

At this point you should have an instance of DeviceZoneType that has InternalMeasuringPoint component. You can access this component by calling:

MultiStateValueDiscreteType internalMeasuringPoint = deviceZone.getInternalMeasuringPointNode();

You can then get and set the Values of ValueAsText and EnumValues Properties with the following methods:

internalMeasuringPoint.setValueAsText(LocalizedText value);
internalMeasuringPoint.setEnumValues(EnumValueType[] value);

Since the NodeSet file doesn’t specify an initial Value for the EnumValues Property, you will need to set it following the Table 8 of EUROMAP 82.1 companion specification. You would also need to manually set the Value of ValueAsText Property whenever the Value of InternalMeasuringPoint changes. You can do this with an IoManagerListener that uses onWriteValue method to check if a Value is being written to InternalMeasuringPoint and have it update the Value of the ValueAsText Property depending on the Value being written.

December 14, 2022
13:47, EET
Francesco Zambon
Forum Posts: 30
Member Since:
December 20, 2021
sp_UserOfflineSmall Offline

Hello Matti,

Thanks for your help.


Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
10 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 124

pramanj: 86

ibrahim: 74

rocket science: 65

kapsl: 57

Sabari: 51

gjevremovic: 49

Xavier: 43

fred: 41

TimK: 41

Member Stats:

Guest Posters: 0

Members: 684

Moderators: 15

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1335

Posts: 5711

Newest Members:

daniel.boada@soprasteria.com, Ratheesh, Dustingen, janessawhittell, ravi_prabhakar, dustyy137676428, Douglasabibe, DonaldWibip, kennithmazza4, Heiko Geissler

Moderators: Jouni Aro: 963, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 877, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 25, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 230, Lusetti: 0

Administrators: admin: 1