I'm new to FactoryTalk and am struggling finding any information on using expressions.
1. How are you suppose to learn expressions - both correct syntax and know all what's possible to do?
2. Specifically:
I added:
IF {[PLC_1]Test_Tag_1} == 1
THEN 3
ELSE {[PLC_1]Test_Tag_2}
to the Multistate Button Indicator expression. State 3 on the button is the same button but "grayed-out" so the user sees the value but it's dull and the PLC won't do anything. And, it works! But, since I have to add this to a bunch of buttons, I was wondering if I could do something like:
IF {[PLC_1]Grayed_Out_Tag_1} == 1
THEN 3
ELSE DEFAULT
and "DEFAULT" would just use the tag that's already in the Value field...
Any suggestions would be much appreciated!
1. How are you suppose to learn expressions - both correct syntax and know all what's possible to do?
2. Specifically:
I added:
IF {[PLC_1]Test_Tag_1} == 1
THEN 3
ELSE {[PLC_1]Test_Tag_2}
to the Multistate Button Indicator expression. State 3 on the button is the same button but "grayed-out" so the user sees the value but it's dull and the PLC won't do anything. And, it works! But, since I have to add this to a bunch of buttons, I was wondering if I could do something like:
IF {[PLC_1]Grayed_Out_Tag_1} == 1
THEN 3
ELSE DEFAULT
and "DEFAULT" would just use the tag that's already in the Value field...
Any suggestions would be much appreciated!