Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual page 48

Program design
Hide thumbs Also See for MELSEC iQ-F FX5:
Table of Contents

Advertisement

When the timer or counter is operated according to the AND condition of bLabel1 and bLabel2, do not use any control
statement, just use a function block only.
Using the program after change operates the timer and counter.
■When the FOR...DO statement is used
• Structure members and array elements cannot be used as repeat variables.
• Match the type used for a repeat variable with the types of <Last value expression> and <Incremental expression>.
• <Incremental expression> can be omitted. When omitted, <Incremental expression> is treated as 1 and executed.
• When 0 is assigned to <Incremental expression>, the statements after the FOR syntax may not be executed or the
processing goes into an infinite loop.
• In the FOR...DO syntax, the counting process of repeat variables is executed after the execution of <Statement> in the
FOR syntax. If the count is greater than the maximum value or smaller than the minimum value of the data type of the
repeat variable, the processing goes into an infinite loop.
■When a rising execution instruction or a falling execution instruction is used
Shown here is the operation when a rising execution instruction or an fall execution instruction is used in an IF statement or a
CASE statement.
Condition
Conditional
expression of an IF
statement or a
CASE statement
Agreement of TRUE or
CASE
Disagreement of FALSE
or CASE
*1 This is a fall (ON to OFF), but the instruction is not executed because the condition in the IF statement or the CASE statement is not
satisfied.
When the PLS instruction (rising execution instruction) is used in an IF statement
Ex.
IF
bLabel0
THEN
PLS(bLabel1,bLabel10);
END_IF;
bLabel0
OFF
bLabel1
OFF
ON/OFF
judgment
OFF
result
bLabel10
OFF
6 ST LANGUAGE
46
6.1 Configuration
Condition to
Result of the ON/
execute an
OFF judgment of
instruction (EN)
the instruction at
the time of the
previous scan
TRUE
ON
OFF
FALSE
ON
OFF
TRUE
ON
OFF
FALSE
ON
OFF
ON
ON
(1)
(2)
Result of operation
Result of the ON/
OFF judgment of
the instruction
ON
ON
OFF
OFF
OFF
OFF
OFF
OFF
(1)
If bLabel0 = OFF (the condition expression in the IF statement is
FALSE), the ON/OFF judgment result is OFF. The PLS instruction
is not executed. (bLabel10 = OFF does not change.)
(2)
If bLabel0 = ON (the condition expression in the IF statement is
ON
TRUE) and bLabel1 = OFF (the condition for executing the
instruction is OFF), the ON/OFF judgment result is OFF. The PLS
instruction is not executed. (bLabel10 = OFF does not change.)
ON
(3)
If bLabel0 = ON (the condition expression in the IF statement is
TRUE) and bLabel1 = ON (the condition for executing the
instruction is ON), the ON/OFF judgment result is OFF to ON (the
(3)
condition for a rise is satisfied). The PLS instruction is executed.
ON
(bLabel10 turns ON for once scan only.)
1 scan
Rising execution
Falling execution
instruction
instruction
Not executed
Not executed
Executed
Not executed
Not executed
Executed
Not executed
Not executed
Not executed
Not executed
Not executed
Not executed
Not executed
Not executed
Not executed
Not executed
*1
*1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents