OPC DA - How to Determine the Full Path of a Tag and Discover the Separators Used by the OPC Server (Tag Structure)|Classic OPC: DA, A&E, HDA, XML-DA, etc.|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
OPC DA - How to Determine the Full Path of a Tag and Discover the Separators Used by the OPC Server (Tag Structure)
Avatar
Alisson Pires
New Member
Members
Forum Posts: 1
Member Since:
03/26/2017
sp_UserOfflineSmall Offline
1
08/25/2023 - 09:46
sp_Permalink sp_Print sp_EditHistory

Hello,

I am an OPC enthusiast and I am just starting in this field. I am developing an OPC client in C# using OPCAutomation.dll for OPC DA. I have made significant progress, but I have encountered a situation that I will describe below. I am able to navigate through the items, but I am unable to extract the correct path from them to populate a field and read this address in another part of the program.

For instance:
In one OPC server, the address is like this: /xxxxxx/xxxxxxx/xxxx/value
In another OPC server, the address is like this: xxxxxx/xxxxx/xxxx/real
In yet another OPC server, the address is like this: xxxxxx.yyyyy.zzzzzz.double
In this case, I need to use only the end part of the address, like zzzzzz.double, to perform a read.

I would like to know how to perform this mapping (with the correct separators). The test OPC client I am using as a reference accomplishes this.

Best regards,
Alisson

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
08/26/2023 - 12:18
sp_Permalink sp_Print sp_EditHistory

In OPC.DA the path syntax is specific to the Server. There is no convention clients can use to build paths.

Most clients will use the browse interface to discover tags and save the tags in local configuration.

If you want to save a path you can remember each hop you used to when browsing but that path may be completely different from the actual item/tag id which clients must treat as an opaque un-parseable string.

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