03/26/2017
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
05/30/2017
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.
1 Guest(s)