Mitsubishi Electronics Mitsubishi Digital Electronics Video Gaming Accessories FX3G User Manual

Page of 936
809
FX
3G
/FX
3U
/FX
3UC
 Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
36 Interrupt Function and Pulse Catch Function
36.5 Timer Interrupt (Interrupt in Constant Cycle)
31
FN
C
275
-F
N
C
27
9
Da
ta
 
Trans
fe
r 3
32
FN
C
280-
FN
C
289
H
igh Speed 
Pr
ocessing 2
33
FN
C
290-
FN
C
299
E
xtension Fi
le 
R
egister
34
FN
C
300-
FN
C
30
5
FX
3U
-C
F-A
D
P
35
SFC•
STL
Pr
ogr
am
m
ing
36
In
ter
rupt
 
Funct
ion
37
S
pecial
 D
evice
38
Er
ro
r C
ode
A
Ve
rs
ion U
In
fo
rm
atio
n
B
Executi
on
 T
im
es
3. Basic program (programming procedure)
4. Number and operation of (three) timer interrupt pointers
An interrupt routine program is executed at every specified interrupt cycle time (10 to 99 ms).  Use the type of interrupt
in control requiring cyclic interrupt processing regardless of the operating cycle of a PLC.
*1.
Cleared when the PLC mode is changed from RUN to STOP.
Caution
If the timer interrupt time is set to 9ms or less, the timer interrupt processing may not be executed in an accurate cycle
in the following cases.  Therefore, using a time that is over 10 ms is recommended.
• When the interrupt program processing time is long
• When the main program contains an applied instruction which processing time is long
5. Cautions
• Each pointer number (I6, I7 or I8) can be used only once.
• When M8056 to M8058 is set to ON in a program, a corresponding timer interrupt is disabled.
Input number
Interrupt cycle (ms)
Interrupt disable Flag
I6……
An integer in the range from 10 to 99 is put in "……" in the pointer name.
Example: "I610" indicates a timer interrupt at every 10 ms.
M8056
*1
I7……
M8057
*1
I8……
M8058
*1
Step
0
I620
Interrupt
pointer
Interrupt
routine
Interrupts are
enabled
End of
main program
Main
program
When interrupt is
given at every 20 ms
Interrupt return
FNC 04
EI
FNC 06
FEND
FNC 03
IRET
END
Timer interrupts are enabled after EI instruction.
It is not necessary to program DI (disable
interrupt) if there is no zone where input
interrupts should be disabled.
FEND instruction indicates the end of the main
program.
Make sure to describe an interrupt routine after
FEND instruction.
The interrupt routine is executed at every 20 ms.
Create a program to be executed as interrupt.
IRET instruction returns the program execution
to the main program.
Main program
Interrupt subroutine
  
Timer time: 10 to 99 (ms)
Timer interrupt pointer (6, 7 or 8)