Mitsubishi Electric FX3G SERIES Programming Manual page 244

Programmable controllers
Hide thumbs Also See for FX3G SERIES:
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
Errors
1. Watchdog timer error
When FOR-NEXT loop is repeated many times, the operation cycle (D8010) is too long, and a watchdog timer error
may occur. In such a case, change the watchdog timer time or reset the watchdog timer.
2. Examples of wrong programs
The following programs are regarded as errors.
When NEXT instruction is located before FOR
instruction
When number of FOR instructions is not
equivalent to the number of NEXT instructions
Program example
1. Program with three FOR-NEXT loops
X010
P 22
242
→ For details on changing the watchdog timer time, refer to Subsection 37.2.2.
→ For resetting the watchdog timer, refer to WDT (FNC 07) instruction.
NEXT
FOR
FOR
FOR
NEXT
← Not programmed
NEXT
FNC 08
K 4
FOR
FNC 08
D 0Z
FOR
FNC 00
P 22
CJ
FNC 08
K1X000
FOR
[1]
FNC 09
7
NEXT
times
FNC 09
6
NEXT
times
FNC 09
4
NEXT
times
8.10 FNC 09 – NEXT / End a FOR/NEXT Loop
When NEXT instruction does not exist
FOR
NEXT
When NEXT instruction is located after FEND or
END instruction
FOR
FEND
NEXT
END
NEXT
The loop [3] is repeated 4 times.
When the data value (current value) of D0Z
(D4 when Z is "4") is "6", the loop [2] is
repeated 6 times.
When X010 is OFF
When K1X000 is "7", the loop [1] is repeated
[2]
[3]
7 times.
When X010 is ON
The program execution jumps to the pointer P22,
and the loop [1] is skipped.
Number of times of repeating the loops [1],
[2] and [3]
X010 = OFF
7 × 6 × 4 =168 times
[1]
6 × 4 = 24 times
[2]
[3]
8 Program Flow – FNC 00 to FNC 09
← Not programmed
X010 = ON
0 time
24 times
4 times
4 times

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3uc series

Table of Contents