Engineering Units, Expression or Script

Is it possible to create an expression to be able to change the "Engineering Units" value depending on the return value of the tag that is part of?
For example if a tag labeled "Unit Status" has a value of 0, can the engineering units value show "off", but if the value is 1, then change the "Engineering Units" value to Running, and have that value change depending on the return value of the tag.

Thanks.

It might be possible, but I would not use this method. Why not use a derived tag with your state enumerations, if you want to refer to the "friendly" name instead of the process value?

Ha, I've always used an expression tag, but a derived tag makes sense. Do you know if there's any difference in performance between the two? (consider the situation there are 1000s of these)

I'm pretty sure the overhead is exactly the same, since it's still evaluating an expression. A bonus of a reference tag is that it could support writeback, though this is a pretty flimsy case for that.

1 Like