How to define a method defined in ObjectType which writes to Object Property ?|OPC UA Standard|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
How to define a method defined in ObjectType which writes to Object Property ?
Avatar
Rudolf
Slovakia
Member
Members
Forum Posts: 19
Member Since:
07/13/2018
sp_UserOfflineSmall Offline
1
03/27/2019 - 05:37
sp_Permalink sp_Print sp_EditHistory

I created information model as

ns[0] = UA_Server_addNamespace(server, "https://opcfoundation.org/UA/");
ns[1] = UA_Server_addNamespace(server, "https://opcfoundation.org/UA/DI/");
ns[2] = UA_Server_addNamespace(server, "http://yourorganisation.org/Opc.NucleoF767ZI.NodeSet/");

In Opc.NucleoF767ZI.NodeSet I defined NUCLEOF767ZIDeviceType with:
Object|MethodSet|BaseObjectType|Mandatory
Object|ParametersSet|BaseObjectType|Mandatory

MethodSet contains ToggleLD2 as Method with Mandatory as ModellingRule.

ParameterSet contains LD2 as Variable PropertyType Mandatory.

I created an instance NUCLEOF767ZI_01. To generate source file I use open62541 nodeset_compiler. It creates two separate nodes for NUCLEOF767ZIDeviceType ToggleLD2 and NUCLEOF767ZI_01 ToggleLD2. So I need to add callbacks for both.

My question is, It is possible to have only one node ToggleLD2 (for NUCLEOF767ZIDeviceType) and this method will toggle LD2 for an instance (objects), which method I call?

 

Thank you

Avatar
Randy Armstrong
Admin
Forum Posts: 1438
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
04/04/2019 - 07:37
sp_Permalink sp_Print

The specification allows clients to use the Method NodeId from the Type or the Instance.

The ObjectId passed into the Call service specifies which Object the Method acts on.

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