Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
35 Interrupt Function and Pulse Catch Function
805
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
31
Applied Instructions
(Data Transfer 3)
32
Applied Instructions
(High Speed
Processing 2)
33
Applied Instructions
(Extension File
Register Control)
34
Applied Instructions
(FX
3U
-CF-ADP)
35
Interrupt Function
and Pulse Catch
Function
A
Relationships
between devices
and addresses
B
Applied
Instruction List
35.5 Timer Interrupt (Interrupt in Constant Cycle)
35.5 Timer Interrupt (Interrupt in Constant Cycle)
35.5.1 Timer Interrupt (Interrupt in Constant Cycle)
1. Outline
An interrupt routine is executed at every 10 to 99 ms without being affected by the operation cycle of a PLC.
The FX
0S, FX0, FX0N, FX1S, FX1N or FX1NC PLC does not support the timer interrupt function.
2. Application
This type of interrupt is suitable when a certain program should be executed at high speed while the main
program operation time is long or when a program should be executed at a constant time interval in sequence
operations.
3. Basic program (programming procedure)
4. Number and operation of (three) timer interrupt pointers
An interrupt program is executed at every specified interrupt cycle time (10 to 99 ms). Use this type of
interrupt in control requiring cyclic interrupt processing regardless of the operation 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 9 ms 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 whose 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
Interrupts are enabled.
EI
EN ENO
Main program
Interrupt routine
Timer interrupts are enabled after EI instruction.
It is not necessary to program DI (disable interrupt) if there
is no zone where timer interrupts should be disabled.
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.
When interrupt is
given at every 20 ms.
[Main program]
[Interrupt program]
(Event: I620)
Main program
Interrupt program
I
Timer time 10 to 99 (ms)
Timer interrupt pointer 6,7,8