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 #161 background imageLoading...
Page #161 background image
146
Structured Text (ST Language) Specifications Appendix B
Example:
IF <condition_1> THEN
IF <condition_2> THEN
<expression_1>;
ELSE
<expression_2>:
END_IF;
END_IF;
The processing flow diagram is as follows:
ELSE corresponds to THEN immediately before it, as shown in the above diagram.
Multiple statements can be executed within expression_1 and expression_2. Be sure to use a semicolon (;)
delimiter between multiple statements in an expression.
The ELSE statement can be omitted. When ELSE is omitted, no operation is executed if the result of the
condition equation is false.
Processing Flow Diagram
Examples
Example 1: If variable A>0 is true, variable X will be substituted with numerical value 10. If A>0 is false, variable
X will be substituted with numerical value 0.
IF A>0 THEN
X:=10;
ELSE
X:=0;
END_IF;
Example 2: If variable A>0 and variable B>1 are both true, variable X will be substituted with numerical value
10, and variable Y will be substituted with numerical value 20. If variable A>0 and variable B>1 are both false,
variable X and variable Y will both be substituted with numerical value 0.
Condition 1
Condition 2
False
Tr ue
False
Tr ue
Expression 1
Expression 1
Condition
False
Tr ue
Expression

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