Mitsubishi Electronics FX3G User Manual

Page of 964
813
FX
3S
/FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 Series
Programming Manual - Basic & Applied Instruction Edition
36 Interrupt Function and Pulse Catch Function
36.4 Input interrupt (Interrupt by External Signal) [With Delay Function]
31
FNC277
-F
NC2
79
Da
ta
 
Trans
fer 3
32
FNC28
0-F
NC
289
H
igh-Speed 
Process
ing 2
33
FNC2
90-
FNC299
Ex
tensi
on Fi
le
 
Register C
ontrol
34
FN
C300-
FNC30
5
FX
3U
-C
F-
AD
P
35
SFC
•STL
Programming
36
Interrupt 
Function
37
Sp
ec
ia
l D
evi
ce
38
E
rror Code
A
Ve
rsi
on U
Inform
ati
on
B
Ex
ecuti
on
 T
imes
36.4
Input interrupt (Interrupt by External Signal) [With Delay Function]
1. Outline
An input interrupt has the function to delay execution of an interrupt routine in units of 1 ms.
The delay time can be specified using the pattern program shown below.
By using the delay function, the mounting position of a sensor used for input interrupts can be adjusted electrically
without changing the actual position.
2. Programming procedure
3. Timing chart
36.5
Timer Interrupt (Interrupt in Constant Cycle)
36.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.
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.
M8393
FNC 12
MOV
K
*
Delay time specification program
Make sure to describe the delay time specification 
program shown on the left at the head of an interrupt 
routine program. Do not add, change, or delete this 
routine program when writing during RUN. 
Interrupt programs may not operate normally. 
Because this program is a pattern program, change 
only the delay time ([1]). 
Only a constant (K) or data register (D) is available 
for specifying the time here*. If any other device or 
constant is used, the delay time setting becomes 
invalid and the interrupt functions as a normal input 
interrupt. If the contents of the set data register (D) are 
"0", the delay time is regarded as "0".
D8393
[1] Delay time (unit: ms)
FNC 03
IRET
Program to be executed as input interrupt
Contact for setting delay time
End of interrupt program.
I
Interrupt input
(X000 to X005)
Interrupt program is
executed
Because the previous interrupt processing
is not completed, the interrupt processing
is not executed here.
Valid
Delay time
(msec)
IRET
instruction