Mitsubishi MELSEC-Q Series Programming Manual page 83

Mitsubishi programmable controller
Hide thumbs Also See for MELSEC-Q Series:
Table of Contents

Advertisement

(5) CASE conditional syntax
(a) Format
CASE <Integer expression> OF
<Integer selection 1> : <Syntax 1 ...>;
<Integer selection 2> : <Syntax 2 ...>;
·
·
·
<Integer selection n> : <Syntax n ...>;
ELSE
<Syntax n+1 ...>;
END_CASE;
(b) Description
The result of the CASE conditional expression is returned as an integer value. The
CASE conditional syntax is used to execute a selection syntax by a single integer value
or an integer value as the result of a complicated expression.
When the syntax that has the integer selection value that matches with the value of
integer expression is executed, and if no integer selection value is matched with the
expression value, the syntax that follows the ELSE syntax is executed.
(c) Example
(6) FOR...DO syntax
(a) Format
FOR <Repeat variable initialization>
TO <Last value>
BY <Incremental expression> DO
<Syntax ...>;
END_FOR;
(b) Description
The FOR...DO syntax repeats the execution of several syntaxes according to the value
of a repeat variable.
(c) Example
5.1 ST Language
5.1.3 Syntaxes in ST language
5
5-7

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-l seriesMelsec-f series

Table of Contents