788
FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
35 Interrupt Function and Pulse Catch Function
35.3 Input Interrupt (Interrupt Triggered by External Signal) [Without Delay Function]
7. Program examples
1) When using both an external input interrupt at the rising edge and the output refresh (REF instruction)
In the program example shown below, the output Y000 immediately turns ON when the rising edge of the
external input X000 is detected.
*1.
Make sure to specify a multiple of "8" for the number of inputs/outputs to be refreshed by REF (FNC
50) instruction.
If any value other than a multiple of "8" is specified, an operation error occurs and REF (FNC 50)
instruction is not executed.
2) When using both an input interrupt and the input refresh (REF instruction)
In the program example shown below, an interrupt is processed using the latest input information.
*1.
Make sure to specify a multiple of "8" as the number of inputs/outputs to be refreshed by REF (FNC
50) instruction.
If any value other than a multiple of "8" is specified, an operation error occurs and REF (FNC 50)
instruction is not executed.
Step
0
I001
Interrupt
pointer
When the rising edge
of X000 is detected
M8000
RUN
monitor
FNC 06
FEND
FNC 04
EI
Y000
K8
*1
FNC 50
REF
FNC 03
IRET
END
SET
Y000
Interrupts are enabled by EI instruction.
The main program is described.
The main program is finished by FEND
instruction.
When an interrupt routine is executed by turning
ON of X000, Y000 is set to ON unconditionally.
The outputs Y000 to Y007 are overwritten with
the latest information by the output refresh
instruction.
If the output refresh instruction is not provided,
Y000 turns ON after END instruction after the
program execution returned to the main routine.
If "SET Y000" is changed to "RST Y000", Y000 is
immediately set to OFF by turning ON of X000.
Step
0
I101
Interrupt
pointer
When the rising edge
of X001 is detected
M8000
RUN monitor
X010
X010
FNC 04
EI
END
FNC 06
FEND
K8
*1
X010
FNC 50
REF
Y001
SET
Y001
RST
FNC 03
IRET
Interrupts are enabled by EI instruction.
The main program is described.
The main program is finished by FEND
instruction.
When an interrupt routine is executed by turning
X001 to ON, the input refresh is executed
unconditionally, and the ON/OFF information of
X010 to X017 at the current time is received.
Y001 is set to ON or OFF according to the ON/
OFF status of X010.