Nested UDT Parameter Math

Many of the OPCItemPathes within our UDTs rely on math based on parameters to get properly assigned. This has all been working well and behaving as expected. The parameter values are all integers and everything works.

Today I had reason to created a nested UDT definition, and I guess it is the first time I’ve had to do that along with the parameter math in the nested instance. I created the first nested instance, passed all the necessary parameters through to it, all seemed to work. Except the OPC tags weren’t working. On investigation, the math was coming back with a floating point value, which doesn’t work with the OPC server. It only does this on nested UDTs. The exact same binding expression on the base UDT returns an integer value and the OPCItemPath works. All the parameters that are used are integer in the parent and integer in the nested instance.

This was quickly fixed by adding a “|###” format string to the binding expression. All good, everything works. But I am concerned because I have a large number of UDTs without that formatting, and am wondering if some future release might cause floating points to crop up in the base UDTs? I know the right answer is to go back and add the formatting to every UDT I have, but that’s more work (even with a tag export and search/replace) than I want to contemplate.

Is this a known thing? How concerned should I be?

1 Like