Ignition 7 String Bind to UDT Parameter

I'm trying to bind a string member directly to a string parameter for a UDT but I'm getting an evaluation error and I get "null".

The parameter's type is a string, the member is a string expression tag and only references the parameter.

If I do it with an int parameter and an int expression tag it works. I've also tried toStr() in the expression and that doesn't change anything.

Prior to v8, such string parameters needed to be quoted, as the parameters are not true expression variables.

If I'm using the same string parameter in an expression for OPC path, are the quotes going to mess that up then?

In Ignition 7.x, UDT parameters are not implemented with the expression language, like is done n v8+. In v7, UDT parameters are injected with string interpolation, independent of any other operations. If, after injection, they need to be used as string constants in an expression or script, they need to be quoted.

You will need to experiment. I don't imagine many people think about the intricacies of obsolete software like this.

1 Like

This information is not particularly useful, since 7.7 is obsolete, but I'll include it anyway.

I tested it. Using quotes, the string tag expression binding directly to the UDT works, but it breaks the OPC path and the quotes are shown when it's used in alarm configuration.

The workaround is to use 2 string parameters. One string that's used in OPC path and alarm config, one that binds directly to the string expression tag.