Mitsubishi Electronics FX3G Manuale Utente

Pagina di 964
240
FX
3S
/FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 Series
Programming Manual - Basic & Applied Instruction Edition
8 Program Flow – FNC 00 to FNC 09
8.8 FNC 07 – WDT / Watchdog Timer Refresh
2. The watchdog timer time can be changed.
→ For details on changing watchdog timer time, refer to Subsection 37.2.2.
By overwriting the contents of D8000 (watchdog timer time), the watchdog timer detection time (initial value: 200 ms)
can be changed.
By inputting the program shown below, the sequence program after this insertion is monitored by a new watchdog
timer time.
Program examples
1. When the operation cycle is long and causes an error
For example, by dividing a program whose operation cycle is 240 ms into two portions and inserting WDT instruction
between them, the operation cycle becomes less than 200 ms in both the former half portion and the latter half portion.
2. When a label (P) of CJ instruction is located in a step number smaller than the step number of CJ 
instruction
Put WDT instruction after the label (P).
If an input relay (X) is used as the command
contact, input refresh is disabled, so the
program execution cannot be returned from
the area between P and CJ.
As the command contact, use such device
that can be set to OFF in a program being
jumped.
3. When FOR/NEXT instruction is repeated many times
Put WDT instruction between FOR and NEXT instructions.
M8002
Initial pulse
FNC 12
MOV
K300
D8000
FNC 07
WDT
Watchdog timer time: 300 ms
0
Watchdog timer refresh
If WDT (FNC 07) instruction is not programmed, the value of
D8000 is valid during END processing.
FNC 07
WDT
END
Program
whose
operation cycle
is 240 ms
END
Program whose
operation cycle
is 120 ms
Program whose
operation cycle
is 120 ms
M8000
RUN monitor
FNC 07
WDT
Label
Pn
Command
Program
FNC 00
CJ
Pn
When the command
contact turns ON
FNC 08
FOR
Program
FNC 07
WDT
K30000
FNC 09
NEXT