Mitsubishi Electric MELSEC Q Series Programming Manual page 86

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

Advertisement

Precaution 3
The following table lists operations when the STMR instruction or instructions that are executed at the rising or falling edge
are used in the IF or CASE conditional statement.
Condition
Conditional
Instruction
formula of IF or
execution
CASE
condition (EN)
conditional
statement
TRUE or CASE
TRUE
match
FALSE
FALSE or CASE
TRUE
mismatch
FALSE
*1 On the falling edge (on to off), the instruction is not executed because the condition of the IF or CASE statement is not satisfied.
Ex.
When the PLS instruction (execution condition: rising edge) is used in the IF statement
IF M0 THEN
PLS(M1, M10);
END_IF;
M0
OFF
M1
OFF
On/off
OFF
determination
result
M10
OFF
(1) When M0 is off (the conditional formula of the IF conditional statement is FALSE), the on/off determination result will be off. The PLS instruction is not
executed. (The M10 remains off.)
(2) When M0 is on (the conditional formula of the IF conditional statement is TRUE) and M1 is off (the instruction execution condition is off), the on/off
determination result will be off. The PLS instruction is not executed. (The M10 remains off.)
(3) When M0 is on (the conditional formula of the IF conditional statement is TRUE) and M1 is also on (the instruction execution condition is on), the on/off
determination result will be off to on (rising edge). The PLS instruction is executed. (The M10 is on for one scan.)
• To execute the rising or falling edge execution instruction in the iteration statement, use the edge relay (V) or perform index
modification. When the rising or falling edge execution instruction in the iteration statement is used, the instruction may not
be executed normally at rising or falling edge.
Ex.
When the rising execution instructions is used in the FOR statement
• Example that the edge relay (V) is used
FOR Z0 := 0 TO 9 BY 1 DO
INC(EGP(M100Z0, V0Z0), D100Z0);
END_FOR;
• Example that the edge relay (V) is not used
FOR Z0 := 0 TO 9 BY 1 DO
INC(M100Z0, D100Z0);
END_FOR;
*2 The edge relay (V) is used 1 bit in the system in addition to the number of bits used in the loop. The edge relay (V) is used up to a total
of 11 points (V0 to V10) in the above example.
5 WRITING PROGRAMS
84
5.1 ST
On/off
determination
result of the
instruction in
the last scan
ON
OFF
ON
OFF
ON
OFF
ON
OFF
ON
ON
ON
ON
(3)
ON
(1)
(2)
1 scan
*2
Operation result
On/off
Rising edge
determination
execution
result of the
instruction
instruction
ON
Not executed
ON
Executed
OFF
Not executed
OFF
Not executed
*1
ON
Not executed
OFF
Not executed
*1
ON
Not executed
OFF
Not executed
Falling edge
STMR
execution
instruction
instruction
Not executed
Previous value held
Not executed
Rising edge
processing
Executed
Falling edge
processing
Not executed
Previous value held
Not executed
Previous value held
Not executed
Previous value held
Not executed
Previous value held
Not executed
Previous value held

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec f seriesMelsec l series

Table of Contents