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?
system.tag.getConfiguration
system.tag.readBlocking([instancePath + ".Parameters"])[0].value
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"]
amarks
October 28, 2026, 9:41pm
4
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.
Nol
October 28, 2026, 9:45pm
5
Why that over an indirect binding directly to the parameter?
amarks
October 28, 2026, 9:47pm
6
No real reason I can remember atm. I don't recall if the parameters show up in the tag binding selection dialog or not
Thank you all for your help!
@Samuel_Sueur ’s suggestion worked for me. I was able to read the parameter values.
system.tag.readBlocking([inst_path + "/Parameters.myParam"])[0].va
system.tag.getConfiguration(basePath = inst_path)[0]["parameters"]
Thanks also to @Noah_Burnette and @amarks for the additional tips on tag event scripts and the “param” folder approach.