Page 1 of 1

Expressions Logical Calculations

Posted: Thu Feb 14, 2013 12:49 am
by automatix
Hello
My problem is that i want to control 1 tag with two others.
I have 3 bit tags(Bit1,Bit2,Bit3).
2 of them can toggle them with a click button action.And i have a third tag that is connected to an analog numeric.
I have tried to give to third tag an expression with a logical OR.
So i connect analog numeric with the third tag,and insert expression
"Globals.Tags.Bit1.Value||Globals.Tags.Bit2.Value" (the other two tags)
But nothing happened.I have tried several ways but i cant take the result of logical OR.

Thank you very much.

Re: Expressions Logical Calculations

Posted: Thu Feb 14, 2013 9:20 am
by mark.monroe
It is not always obvious when an expression is evaluated. Take a look at the attached project. It has three buttons and three tags. the expression is on the "Exp" analog numeric box. It should give you an idea of how to use expressions and when they are and are not evaluated.