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 #681 background imageLoading...
Page #681 background image
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011 681
Structured Text Programming Appendix C
IF...THEN
Use IF…THEN to do something if or when specific conditions occur.
Operands:
Structured Text
Description: The syntax is described in the table.
To use ELSIF or ELSE, follow these guidelines.
1. To select from several possible groups of statements, add one or more
ELSIF statements.
· Each ELSIF represents an alternative path.
· Specify as many ELSIF paths as you need.
· The controller executes the first true IF or ELSIF and skips the rest of
the ELSIFs and the ELSE.
2. To do something when all of the IF or ELSIF conditions are false, add an
ELSE statement.
Operand Type Format Enter
Bool_
expression
BOOL Tag
expression
BOOL tag or expression that evaluates to a
BOOL value (BOOL expression)
IF bool_expression THEN
<statement>;
END_IF;
IF bool_expression1 THEN
<statement >;
Statements to execute when
bool_expression1 is true
.
.
.
optional
ELSIF bool_expression2 THEN
<statement>;
Statements to execute when
bool_expression2 is true
.
.
.
optional
ELSE
<statement>;
Statements to execute when both
expressions are false
.
.
.
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