Mitsubishi Electric MELSEC FX3U Programming Manual page 860

Melsec fx series programmable logic controllers
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
3) When counting the number of times of input generation (in the same way as 1-phase high speed counter)
In the program example shown below, external inputs are counted.
Step
0
Interrupt
pointer
I201
4) When catching a short pulse
In the program example shown below, the ON status is held for a certain period of time after a short pulse
turns ON.
Pulse input
X003
M0
Step
0
Interrupt
pointer
I301
858
When the rising edge of X002 is detected
M8000
FNC 24
INC
RUN monitor
ON
TO
M0
M0
T0
RST
When the rising edge of X003 is detected
M8000
RUN monitor
36 Interrupt Function and Pulse Catch Function
36.3 Input Interrupt (Interrupt Triggered by External Signal) [Without Delay Function]
Interrupts are enabled by EI instruction.
FNC 04
The main program is described.
EI
FNC 06
The main program is finished by FEND
FEND
instruction.
When X002 turns ON, "1" is added to the value
D0
of D0.
INC instruction executes increment in every
operation cycle, but the interrupt routine is
FNC 03
executed only once by an input signal.
IRET
Accordingly, it is not necessary to use INCP
(pulse operation type) instruction.
END
ON
TO
FNC 04
Interrupts are enabled by EI instruction.
EI
The ON/OFF signal in M0 is utilized in this
program.
The period of time to hold M0 is specified.
K10
T0
M0
After the timer time, M0 is reset.
FNC 06
The main program is finished by FEND
instruction.
FEND
When X003 turns ON and the interrupt routine is
SET
M0
executed, M0 is set to ON unconditionally.
FNC 03
IRET
END

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents