EasyManuals Logo

Omron CX-PROGRAMMER 5.0-FUNCTION BLOCK OPERATION User Manual

Omron CX-PROGRAMMER 5.0-FUNCTION BLOCK OPERATION
183 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 #162 background imageLoading...
Page #162 background image
147
Structured Text (ST Language) Specifications Appendix B
IF A>0 AND B>1 THEN
X:=10; Y:=20;
ELSE
X:=0; Y:=0;
END_IF;
Example 3: If the boolean (BOOL data type) variable A=1(ON), variable X will be substituted with numerical
value 10. If variable A=0(OFF), variable X will be substituted with numerical value 0.
IF A THEN X:=10;
ELSE X:=0;
END_IF;
IF Statement (Multiple Conditions)
Summary
This statement is used to execute an expression when a specified condition is met. If the first condition is not
met, but another condition is met, a corresponding expression is executed. If none of the conditions is met, a
different expression is executed.
Reserved Words
IF, THEN, ELSIF, (ELSE)
Note ELSE can be omitted.
Statement Syntax
IF <condition_1> THEN <expression_1>;
ELSIF <condition_2> THEN <expression_2>;
ELSIF <condition_3> THEN <expression_3>;
...
ELSIF <condition_n> THEN <expression_n>;
ELSE <expression_m>;
END_IF;
Processing Flow Chart
Usage
Use the IF statement to perform different operations depending which of multiple conditions (condition equa-
tion) is met.
Condition 1
Condition 2
Condition 3
False
False
False
Tr ue
Tr ue
Tr ue
Expression 1
Expression 2
Expression 3
Expression m

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CX-PROGRAMMER 5.0-FUNCTION BLOCK OPERATION and is the answer not in the manual?

Omron CX-PROGRAMMER 5.0-FUNCTION BLOCK OPERATION Specifications

General IconGeneral
BrandOmron
ModelCX-PROGRAMMER 5.0-FUNCTION BLOCK OPERATION
CategorySoftware
LanguageEnglish

Related product manuals