Mitsubishi Electronics FX3G Video Gaming Accessories User Manual


 
809
FX3G/FX3U/FX3UC 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
FNC275-FNC279
Data
Transfer 3
32
FNC280-FNC289
High Speed
Processing 2
33
FNC290-FNC299
Extension File
Register
34
FNC300-FNC305
FX
3U
-CF-ADP
35
SFC•STL
Programming
36
Interrupt
Function
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
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
I
Timer time: 10 to 99 (ms)
Timer interrupt pointer (6, 7 or 8)