Type conversion error = squishy spot on forehead

OK… this one is just killing me… and the answer is probably ‘DOH’ simple:

Trying to multiply two UDT tag values to get a result.

UDT
----- Tag1 (expression tag) (float8) – has a working expression
----- Tag2 (expression tag) (float8) – will be a user input value
----- Tag3 (expression tag) (float8) – the result

Tag3 expression:

toFloat({[~]UDT/Tag1}) * toFloat({[~]UDT/Tag2})

I’ve tried other versions using tag(toFloat( and tag(

Anyone have any ideas?
Thanks!

Hi,

I think those references are simply incorrect. If all three tags are side by side like you describe, try:

{[.]Tag1}*{[.]Tag2}

When you use [~], it’s going to the root of the tag provider, which I doubt is what you want. It didn’t give you that through a tag selector, did it? If so, what version are you using?

Otherwise, perhaps you could export the udt in question, and I could try to import it.

Regards,

Yep... in the tag selector for an expression tag that is within a UDT. Version=7.6.4.2013112117 in an active production environment.

This only happens if I try to do any manipulation using tags within a UDT as such (this is an expression in UDT/Tag6):

({[~]UDT/Tag1}+{[~]UDT/Tag2}+{[~]UDT/Tag3}+{[~]UDT/Tag4}+{[~]UDT/Tag5})/5

Perhaps I am trying to do something outside of the scope of Ignition. Note that the above does work if I throw it into an expression for a numeric field value.

Meanwhile... I'm reading through documentation. Thanks!