Gettings started with Aliases|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
Gettings started with Aliases
Avatar
Rick
New Member
Members
Forum Posts: 2
Member Since:
04/11/2019
sp_UserOfflineSmall Offline
1
08/27/2024 - 05:21
sp_Permalink sp_Print

I’m hoping to get some hints on how to get started implementing the FindAlias method on a server. I’ve been reading through the OPC Foundation documentation, but it’s still not completely clear to me as to what I need to do.

Our server supports Data Access and a few events. However, so far it has no methods. I’m not familiar with the steps needed to add support for methods, so I might be asking something here that is quite basic.

I notice that our server has been automatically allocated an Aliases folder (node id =23470) and Locations folder (node id =31915) within namespace index 0 directly under the Objects folder. The Aliases node has a FindAlias method. When I execute Call on this method I see an error message, “Call failed with status ‘BadNotImplemented'”

I’d be grateful for any hints on what to do next.

Avatar
Rick
New Member
Members
Forum Posts: 2
Member Since:
04/11/2019
sp_UserOfflineSmall Offline
2
09/04/2024 - 09:31
sp_Permalink sp_Print

I’ve been experimenting with this topic. I’ve tried the following:

  • Added a number of AliasNameState nodes (one for each alias)
  • Referenced these as children of the Aliases node (id = 23470), such that the Aliases node has HasComponent and AliasFor relationship with them.
  • Assigned a GenericMethodCallEventHandler instance to the OnCallMethod field of the FindAliases method state.
  • Configured the GenericMethodCallEventHandler to call a method that searches the Aliases node’s AliasNameState children using the name filter and reference node type passed to it via the input arguments.
  • Added a method to replace any OPC wildcard characters (%, _, [, ^, ]) that are found in the filter with a RegEx expression.

It’s not entirely clear whether the relationship I’ve added between the Aliases node and it’s aliases children are the preferred ones.

It’s also not entirely clear as to what aliases would be useful to us in our scenario. My main objective is to avoid having empty folders and methods that return BadNotImplemented, but because I was unable to find a way of configuring OPC UA to hide the Aliases folder I’m just looking to see if there is something sensible that can be done with this feature.

I probably could have built a custom SDK from source that hid the Aliases folder, but my preference is to incorporate the SDK as a nuget package, which will hopefully be quick to update in the future.

Avatar
Paul Hunkar
Cleveland, Ohio, USA
Moderator
Members

Moderators-Specifications

Moderators-Companion

Moderators-Implementation

Moderators-Certification

Moderators-COM
Forum Posts: 111
Member Since:
02/24/2014
sp_UserOfflineSmall Offline
3
09/12/2024 - 14:58
sp_Permalink sp_Print

An AliasName is an alternate name for something in your server. In the process industry it is very common to have a Tag that is used to identify something with a name that the plant personnel are use to seeing (like TIC101 which mean a temperature instrument controller at a specific location detailed by 101). It is common that you might have two or even three names that different groups used to reference the same variable. Maybe the engineering drawing have a name, the system integrate had a name and then the plant had a name. The AliasName capability allow the alternate names to be assigned. these names can be assigned to anything (and object, a variable , an input or output signal, a dataset definition or even a method).

The AliasFor reference points to the Object/Variable/Method that the name applies to

You can also define additional AliasNameCategories for grouping Aliasnames. Companion Specification may also defined some standard categories.

The findAlias method will take a string and look for any browseNames (string Part) of the objects in the given folder (and any subFolders) that match the provided filter string.  This include a wild card capability. 

If you want default AliasName that actually make sense – try creating one for something on the Server object that you expose – say something in diagnostics if you support them in what you are building

Paul Hunkar - DSInteroperability

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