EasyManuals Logo

Allen-Bradley Logix5000 Reference Manual

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
Page #682 background imageLoading...
Page #682 background image
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: IF…THEN
Example 2: IF…THEN…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

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Allen-Bradley Logix5000 and is the answer not in the manual?

Allen-Bradley Logix5000 Specifications

General IconGeneral
BrandAllen-Bradley
ModelLogix5000
CategoryController
LanguageEnglish

Related product manuals