![Omron SYSMAC CX-Programmer 9 Operation Manual Download Page 175](http://html1.mh-extra.com/html/omron/sysmac-cx-programmer-9/sysmac-cx-programmer-9_operation-manual_744241175.webp)
149
Statement Descriptions
Section 5-5
■
Process Flow Diagram
■
Usage
Use the IF statement to perform a different operation depending on whether a
single condition (condition equation) is met.
■
Description
Condition = If true, execute expression_1
Condition
= If false, execute
expression_2
■
Precautions
• IF must be used together with END_IF.
• The
condition
must include a true or false equation for the evaluation
result.
Example: IF(A>10)
The
condition
can also be specified as a boolean variable only rather than
an equation. As a result, the variable value is 1 (ON) = True result, 0
(OFF) = False result.
• Statements that can be used in
expression_1
and
expression_2
are
assignment statements, IF, CASE, FOR, WHILE, or REPEAT.
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:
Condition
False
True
Expression 1
Expression 2
Condition 1
Condition 2
False
True
False
True
Expression 1
Expression 1
Summary of Contents for SYSMAC CX-Programmer 9
Page 2: ......
Page 4: ...iv ...
Page 6: ...vi ...
Page 8: ......
Page 16: ...xvi ...
Page 20: ...xx ...
Page 26: ...xxvi Application Precautions 4 ...
Page 27: ...Part 1 Function Blocks ...
Page 28: ......
Page 154: ...128 Procedures Section 3 2 ...
Page 155: ...Part 2 Structured Text ST ...
Page 156: ......
Page 160: ...134 CX Programmer Specifications Section 4 2 ...
Page 206: ...180 Procedures Section 6 1 ...
Page 208: ...182 System defined external variables supported in function blocks Appendix A ...
Page 230: ...204 Revision History ...
Page 231: ......