Access UDT parameter in script

A job for a derived tag, perhaps, if the member node ID is available? Basically a different write path.

Regarding this,

I have a UDT instance called T103 (basically I have them from T101 to T120) and under UDT members are as follows:
T103
-ID
-Name
-Status

I tried this approch, reading T103.value in tagPath and later used tagPath=system.util.jsonDecode(str(tagPath)). However when I print this, I get blank dictionary. hence tagPath.keys() doesn’t work either. Am I doing something wrong here?

Also tried eval() instead of jsonDecode its the same {} output. Thanks in advance

@Gaurav.Shitole

This thread is specifically about reading structured values over OPC from the built-in Siemens server. I can’t tell from the information you’ve provided if that’s what you’re trying to do or if you should be starting a new topic with more details.

Hi Kevin,

No I was trying to read a Memory parameter (which will later be converted into OPC) present inside UDT.

I came across this thread while considering the same question but on v8.1.35. though I'd add some v8.1 relevant detail.

One oddity I observed is that you can use {ABC} style parameter references in a "value changed" script on a member tag in a UDT instance but that appears to resolve the the value of the parameter the last time the UDT instance was restarted, not its current value.

Update: Looks like this documented behavior. Still adding my comment here as a breadcrumb for the next person who forgets the right place in the documentation to find this info.
(Tag Event Scripts - Ignition User Manual 8.1 - Ignition Documentation)

2 Likes

I rediscovered this bug/behavior today in v8.1.35. Cross-posting here as it has some relevance. It seems Ignition attempts parameter resolution even on commented lines and will fail silently if there is something in curly brackets that is not a valid parameter.

1 Like