Mitsubishi Electric MELSEC Q Series Structured Programming Manual page 87

Fundamentals
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

(2) IF THEN conditional syntax
(a) Format
IF <Boolean expression> THEN
<Syntax ...>;
END_IF;
(b) Description
The syntax is executed when the value of Boolean expression (conditional expression)
is TRUE. The syntax is not executed if the value of Boolean expression is FALSE.
Any expression that returns TRUE or FALSE as the result of the Boolean operation with
a single bit type variable status, or a complicated expression that includes many
variables can be used for the Boolean expression.
(c) Example
(3) IF ...ELSE conditional syntax
(a) Format
IF <Boolean expression> THEN
<Syntax 1 ...>;
ELSE
<Syntax 2 ...>;
END_IF;
(b) Description
Syntax 1 is executed when the value of Boolean expression (conditional expression) is
TRUE.
Syntax 2 is executed when the value of Boolean expression is FALSE.
(c) Example
5.1 ST
5.1.3 Syntax in ST language
5
5-5

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l seriesMelsec-f

Table of Contents