EasyManua.ls Logo

Mitsubishi Electric MELSEC iQ-F FX5 - Page 47

Mitsubishi Electric MELSEC iQ-F FX5
64 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
6 ST LANGUAGE
6.1 Configuration
45
6
When a bit type label is used
Once the Boolean expression (conditional expression) is satisfied in a conditional statement or an iteration statement, the bit
type label that is turned ON in <Statement> is always set to ON.
Program whose bit type label is always set to on
To avoid the bit device to be always set to ON, add a program to turn OFF the bit type label as shown below.
Program to avoid the bit type label to be always set to ON
*1 The above program can also be described as follows.
bLabel2 := bLabel1;
or
OUT(bLabel1,bLabel2);
However, when the OUT instruction is used in <Statement>, the program status becomes the same as the program whose bit type label
is always set to on.
When a timer function block or counter function block is used
Boolean expression (conditional expression) in a conditional statement differs for the execution conditions of the timer
function block or counter function block.
An error occurs when the program before change is used since the statement related to the timer or counter is not executed
when the selection statement is not satisfied.
ST program Ladder program equivalent to ST program
ST program
*1
Ladder program equivalent to ST program
When a timer function block is used
Program before change
Program after change
When a counter function block is used
Program before change
Program after change
Ex.
IF bLabel1 THEN
bLabel2 := TRUE;
END_IF;
bLabel1
bLabel2SET
Ex.
IF bLabel1 THEN
bLabel2 := TRUE;
ELSE
bLabel2 := FALSE;
END_IF;
bLabel1 bLabel2
Ex.
IF bLabel1 THEN
TIMER_100_FB_M_1(Coil:=bLabel2,Preset:=wLabel3,ValueIn:=wLabel4,ValueOut=>wLabel5,Status=>bLabel6);
END_IF;
(* When bLabel1 = on and bLabel2 = on, counting starts. *)
(* When bLabel1 = on and bLabel2 = off, the counted value is cleared. *)
(* When bLabel1 = off and bLabel2 = on, counting stops. The counted value is not cleared. *)
(* When bLabel1 = off and bLabel2 = off, counting stops. The counted value is not cleared. *)
TIMER_100_FB_M_1(Coil:=(bLabel1&bLabel2),Preset:=wLabel3,ValueIn:=wLabel4,ValueOut=>wLabel5,Status=>bLabel6);
IF bLabel1 THEN
COUNTER_FB_M_1(Coil:=bLabel2,Preset:=wLabel3,ValueIn:=wLabel4,ValueOut=>wLabel5,Status=>bLabel6);
END_IF;
(* When bLabel1 = on and bLabel2 = on/off, the value is incremented by 1. *)
(* When bLabel1 = off and bLabel2 = on/off, the value is not counted. *)
(* The counting operation does not depend on the on/off status of bLabel1. *)
COUNTER_FB_M_1(Coil:=(bLabel1&bLabel2),Preset:=wLabel3,ValueIn:=wLabel4,ValueOut=>wLabel5,Status=>bLabel6);

Other manuals for Mitsubishi Electric MELSEC iQ-F FX5

Related product manuals