How to read UDT instance parameter values from a script (Ignition 8.3)

I would like to get the parameter values set on each UDT instance using a script.

Environment

  • Ignition 8.3.0 (b2025091510)
  • Run in a Perspective transform and in the Script Console

I tried the following, but could not get the data. How can I get these values with a script?

  1. system.tag.getConfiguration
  2. system.tag.readBlocking([instancePath + ".Parameters"])[0].value
  3. system.tag.browse(instancePath + "/Parameters").getResults()

If you want to do this via system.tag.readBlocking, you have to know the name of the parameter you're trying to read.

system.tag.readBlocking([instancePath + "/Parameters.myParam"])[0].value

Note the .myParam in my example above.

.getConfiguration should also give you the param values, but I think it will only give you the overriden parameters (not tested), not true, you can get the parameters via the parameters key, even the ones not overriden.

Never tried .browse to read parameter values, but I don't think this works.

Hello,

Just putting this here as it related to parameter access. You can also access the parameters in a tag event script as well via:

def valueChanged(tag, tagPath, previousValue, currentValue, initialChange, missedEvents):
    tag["parameters"]["myParam"] 

You can do this with readblocking.

However, something to consider - there are many times that I need to display the parameters of and instance in a template that is built for that UDT. I have made it a habit of having a "param" folder in every UDT that simply has one tag for every parameter and binds to each one. Then you just read/bind it like any other tag.

Why that over an indirect binding directly to the parameter?

No real reason I can remember atm. I don't recall if the parameters show up in the tag binding selection dialog or not