Crimson 3 syntax question

mvaughan

Lifetime Supporting Member
Join Date
Sep 2007
Location
South West Michigan
Posts
62
OK, I am feeling a little stupid. I can't figure out the syntax for an (IF, OR) statement in Crimson 3. Maybe because It's Sunday and I am still working on this?o_O

I have 8 Boolean var. and if any are true I need to return a true to a 9th flag.

Any help would be appreciated!

Regards
 
The OR operator in Crimson is a double pipe (||). Two methods to accomplish what you want:

Code:
if(Var1 || Var2 || Var3 ...) Flag9:=true;
else Flag9:=false;
Code:
Flag9 := Var1 || Var2 || Var3 ... ;
The second method can be simplified even further. Just set the Source of the Flag9 tag to "General" and use the expression "Var1 || Var2 || Var3 ..."
 

Similar Topics

Hello all, first time poster here! I have a toggle button "REVERSE_ENABLE_BUTTON" on our HMI's that disables our "bad product rejections" by...
Replies
4
Views
2,174
Hi, I have a Red Lion E3 io counting output from weld cells, connected to a PTV station for the visuals. Our number of weld cells is set to...
Replies
2
Views
1,555
Can anyone help me with proper code syntax for setting or stuffing the value of one tag into another (PLC = HMI tag). I have FactoryTalk SE...
Replies
7
Views
2,688
Hey guys, hoping someone here could give me a little advice. I'm working with a CR1000-04000 in Crimson 3.1 and I was interested in adding the...
Replies
4
Views
115
Hi, I'm having an issue in crimson 3.0 when I create a programme using a case statement referencing a fault word that each bit needs to change the...
Replies
4
Views
191
Back
Top Bottom