Request: MultiStateValue / TwoStateDiscrete type support

Questions regarding the use of the UaExpert.

Moderator: uaexpert

Post Reply
miikka-mikkonen
Full Member
Full Member
Posts: 5
Joined: 13 Dec 2024, 11:51

Request: MultiStateValue / TwoStateDiscrete type support

Post by miikka-mikkonen »

Hi,

Adding a feature request for a dropdown list for MultiStateValueDiscrete (MultiStateDiscrete optionally, we don't plan on using it) and TwoStateDiscrete type.

OPC 11030 for best practices recommends the usage of these discrete types instead of enumerations:
If it is foreseeable that future specification versions would need to add or remove enumeration values, or that derived Companion Specifications would want to extend them, then one of the MultiState VariableTypes should be used instead of an Enumeration DataType.
These types are also better in case different nodes support different subsets of all enumeration values. So instead of making an enumeration data type for each instance, just have the nodes themselves tell what enumeration values they support.

A few screenshots of a test with these types how they appear now in UaExpert:

Node attributes:
Image
EnumValues attribute:
Image
Node value:
Image

So, instead of being able to write any Int32 value, there would be a dropdown list of:
  • "No" (0)
  • "Yes" (1)

User avatar
Support Team
Hero Member
Hero Member
Posts: 3265
Joined: 18 Mar 2011, 15:09

Re: Request: MultiStateValue / TwoStateDiscrete type support

Post by Support Team »

Hi,

at least the latest released UaExpert is doing exactly the requested drop-down for the Enumerations already.

I would disagree with the generaltiy of your interpretation of the best pratice to "use MultiStateDiscrete instead of Enum". I would read it more like: if you don't know how many states you need you may use the MultiStateDiscrete (because can extend). But should use the Enum when you know which states you have (and keep it fixed).

The beauty of the Enum is being a type, having TypeDictionary, hence easy (one time) access to the EnumStrings, which is the reason UaExpert simply fills the drop-down. Would be possible for the MultiState as well, but requires more "investigation" on the client to fetch all information (being dynamic) over the subtypes.
Best regards
Unified Automation Support Team

Post Reply