EasyManua.ls Logo

Allen-Bradley Logix5000 - Page 682

Allen-Bradley Logix5000
708 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
682 Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Appendix C Structured Text Programming
The table summarizes different combinations of IF, THEN, ELSIF,
and ELSE.
Arithmetic Status Flags Not affected
Fault Conditions: None
Example 1: IFTHEN
Example 2: IFTHEN…ELSE
If you want to And Use this construct
Do something if or when conditions are
true
Do nothing if conditions are false IF…THEN
Do something else if conditions are false IF…THEN…ELSE
Choose from alternative statements (or
groups of statements) based on input
conditions
Do nothing if conditions are false IF…THEN…ELSIF
Assign default statements if all conditions
are false
IF…THEN…ELSIF…ELSE
If you want this Enter this structured text
IF rejects > 3 then IF rejects > 3 THEN
conveyor = off (0) conveyor := 0;
alarm = on (1) alarm := 1;
END_IF;
If you want this Enter this structured text
If conveyor direction contact = forward (1) then IF conveyor_direction THEN
light = off light := 0;
Otherwise light = on ELSE
light [:=] 1;
END_IF;

Table of Contents

Other manuals for Allen-Bradley Logix5000

Related product manuals