Version 8, Get opcTagPath From Tag Instance?

How can I get the opcTagPath from a Tag Instance? and how can I write it back?

the result object from system.tag.browse does not return this information.

have you looked at system.tag.getConfiguration() and for writing back system.tag.configure(). I don’t have an 8.0 system in front of me right now to get into more detail or try them but I believe they should let you do what your talking about.

You can directly read and write this value:

# Read OPC path.
value = system.tag.readBlocking(["[default]New Tag.OpcItemPath"])[0].value
# Write OPC path.
system.tag.writeBlocking(["[default]New Tag.OpcItemPath"], [value])

Note this may not work in some early versions of 8.0.x.

@witman

Boom, That worked. Well, read did. I haven’t tried write yet, but I assume it will work.

I have 8.0.2 BTW

Thank You!

1 Like

You bet. Write will require a different method or an upgrade to 8.0.12 in certain circumstances (UDT members).