Omron WS02-CXPC1-V9 - V9 Operation Manual page 175

Table of Contents

Advertisement

Statement Descriptions
■ Process Flow Diagram
False
Condition
True
Expression 1
Expression 2
■ 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:
False
Condition 1
True
False
Condition 2
True
Expression 1
Expression 1
Section 5-5
149

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cx-programmer 9Sysmac ws02-cxpc1-v9

Table of Contents