Mitsubishi Electronics FX3GC Garage Door Opener User Manual


 
811
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
36 Interrupt Function and Pulse Catch Function
36.3 Input Interrupt (Interrupt Triggered by External Signal) [Without Delay Function]
31
FNC277-FNC279
Data
Transfer 3
32
FNC280-FNC289
High-Speed
Processing 2
33
FNC290-FNC299
Extension File
Register Control
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
36.3.2 Examples of practical programs (programs to measure short pulse width)
By using a 1 ms retentive type timer or the special data register D8099 (high-speed ring counter), the short pulse width
can be measured in 1 ms or 0.1 ms units.
1. Example of program to measure the short pulse width using a retentive type 1ms timer
0V S/S X000 X001
SW
ex:FX
3U
PLC(sink input)
24V
This period of time is measured.
X010:Preparation
for measurement
SW(X000,X001)
Step
0
I001
Interrupt
pointer
M8000
X010
K32767
I100
Interrupt
pointer
When the falling edge of
X001 is detected
X010
M0
K1
M8000
The reset
status is
cleared
Timer is driven
Measurement
is completed
Timer is stopped
Timer is
reset
Measurement data
When the rising edge of
X000 is detected
FNC 04
EI
FNC 06
FEND
T246
FNC 03
IRET
FNC 12
M0V
T246
FNC 03
IRET
END
T246 D0
SET M0
RST T246
RST T246
RST M0
RST D0
Interrupts are enabled by the EI instruction.
The main program is described.
The main program is finished by the FEND
instruction.
When X000 turns ON, the 1 ms timer
T246 is started up by the interrupt I001.
When X001 turns OFF, the current value
of T246 is transferred to the data register
D0 for storing the measured value by the
interrupt I100, and M0 for the complete
signal is set to ON.
"T246" is set to OFF, and the timer is
stopped.
A
B