Hi All.
Windows Server 2019 - Ignition 8.1.15
I have a UDT with a bunch of parameters and OPC tags.
I have defined custom properties at the UDT structure layer and the tag layer
The custom properties make my parameters available to my templates and pop pages.
Anyway, the problem.
At the tag layer I can read the properties (including custom) no problem,
With the structure layer I can read the properties (including custom) - however, the custom properties present the binding description and not the supplied parameter information.
Am I missing something here? I can add a memory tag for now to get by but would prefer to go the parameter path.
Regards Dave
You can’t bind tag properties to anything but udt parameters
Thanks Nick.
So why am I allowed to create custom parameters at the udt level? and why does it let me bind them to parameters if the functionality doesn’t work?!??
Regards
Dave
Actually I was on my phone before and quickly replied and missed a part of your screenshot, i’ll get back to that, but i’ve tested and this works for me:
I created a new UDT with a single UDT param param1
and a single custom property custom1
which I bound to {param1
}. I created an instance and set param1
to 4, and then bound a Label to New Instance.custom1
which shows 4 in the Label.
Back to the other thing.
Don’t do this. You should use RunScript very sparingly and cautiously (e.g. never use it to call functions that request stuff from the gateway like system.alarm.queryStatus or system.tag.read*)
For tag bindings such as this, use a Tag binding.
Other things to be cautious of are overusing script transforms. If you can use an expression, then use that as they’re faster and more efficient. Script transforms all run on the gateway so the more you have and the more clients you have, the more work the gateway has to do.
Thanks Nick.
I never even thought to use an indirect tag in my template and directly access the parameters (the udt instance of the template doesnt expose the parameters - thats why i went with custom properties)… learn something new every day.
Duly noted about the runScript… I notice it heavily used in the adHoc Trend from ignition exchange and didnt think anything of it… Luckily your insight has removed any need for me to do this now inmy templates
Regards
Dave
You should be able to ref udt params using
{path/to/udtinstance/Parameters.param1}
. These should show up in the tag browser as well