Precautions When Using Conditional Syntax And Iteration Syntax - Mitsubishi Electric MELSEC Q Series Programming Manual

Structured. fundamentals
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

Precautions when using conditional syntax and iteration syntax

The following explains the precautions when creating ST programs using conditional syntax and iteration syntax.
Precaution 1
Once the conditions (boolean expression) are met in the conditional syntax or iteration syntax, the bit device which is turned
ON in the <syntax> is always set to ON.
■A program whose bit device is always set to ON
ST program
IF M0 THEN
Y0 := TRUE;
END_IF;
To avoid the bit device to be always set to ON, add a program to turn the bit device OFF as shown below.
■A program to avoid the bit device to be always set to ON.
*1
ST program
IF M0 THEN
Y0 := TRUE;
ELSE
Y0 := FALSE;
END_IF;
*1 The above program can also be written as follows.
Y0 := M0;
or
OUT(M0,Y0);
Note that, when the OUT instruction is used in <syntax> of conditional syntax or iteration syntax, the program status becomes the same
as the program whose bit device is always set to ON.
5 WRITING PROGRAMS
82
5.1 ST
Structured ladder/FBD program equivalent to ST program
Structured ladder/FBD program equivalent to ST program

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec f seriesMelsec l series

Table of Contents