Enum DataType Identifier|OPC UA Implementation: Stacks, Tools, and Samples|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Enum DataType Identifier
Avatar
Loko Vik
Member
Members
Forum Posts: 15
Member Since:
08/10/2022
sp_UserOfflineSmall Offline
1
02/08/2023 - 02:12
sp_Permalink sp_Print sp_EditHistory

Hey Everyone,

 

I am working with woodworking object. I have generated classes from NodeSet2 file via OPC Model Complier. There are 2 types of enum according to specification in the object which are CurrentMode and CurrectState.

When the woodworking object is initialized and created. This enum are also create within the object. I am accessing this enum as BaseVariableState. However, for both the enum Datatype Identifier is different.

For Current Mode has DataType Identifier = 20 (Qualified Name)

For Current State has DataType Identifier = 21 (Localizied Text)

 

Why the enum has different datatype identifier? Is this correct or am I missing anything here?

 

Thanks in advance!

Regards

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
02/09/2023 - 01:06
sp_Permalink sp_Print

Can you please find the sections you are referring to:

https://reference.opcfoundatio.....v100/docs/

Avatar
Loko Vik
Member
Members
Forum Posts: 15
Member Since:
08/10/2022
sp_UserOfflineSmall Offline
3
02/09/2023 - 04:05
sp_Permalink sp_Print

Overview => 7.6 (link)

Current Mode => 7.7 (link)

Current State => 7.8 (link)

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
4
02/09/2023 - 05:04
sp_Permalink sp_Print

Ok the datatypes make no sense.

Can you show some code that has these wrong datatypes?

Avatar
Loko Vik
Member
Members
Forum Posts: 15
Member Since:
08/10/2022
sp_UserOfflineSmall Offline
5
02/09/2023 - 07:38
sp_Permalink sp_Print

I am accessing these variable as BaseVariableState from the Object/Address Space.

CurrectState and CurrectMode as BaseVariableState.pngImage Enlarger

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
6
02/09/2023 - 17:31
sp_Permalink sp_Print

I can't see the image. The forum has an issue with uploaded images.

Where are you accessing these variables from?

Avatar
Loko Vik
Member
Members
Forum Posts: 15
Member Since:
08/10/2022
sp_UserOfflineSmall Offline
7
02/10/2023 - 05:07
sp_Permalink sp_Print

Directly within the WwMachineTypeState Object. (Click here for downloading image file. Link is valid for 30 days)

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
8
02/10/2023 - 12:52
sp_Permalink sp_Print

The DataTypes are NOT i=20 and i=21.

The DataTypes ARE ns=2;i=20 and ns=2;i=21

The ns=2 means a different namespace and therefore a completely different node.

If you look at these pages you can see that those datatypes are:

WwUnitModeEnumeration: https://reference.opcfoundatio...../100/20677

WwUnitStateEnumeration: https://reference.opcfoundatio...../100/20678

Avatar
Loko Vik
Member
Members
Forum Posts: 15
Member Since:
08/10/2022
sp_UserOfflineSmall Offline
9
02/13/2023 - 01:51
sp_Permalink sp_Print

Ok. My mistake. Thanks! Randy for the help!

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 55
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1435
Posts: 4855