Mitsubishi FX3U Series Programming Manual page 790

Hide thumbs Also See for FX3U Series:
Table of Contents

Advertisement

FX
/FX
Series Programmable Controllers
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
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.
Step
0
Interrupt
pointer
I001
*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.
Step
0
Interrupt
pointer
I101
*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.
788
When the rising edge
of X000 is detected
M8000
RUN
FNC 50
monitor
REF
When the rising edge
of X001 is detected
M8000
FNC 50
REF
RUN monitor
X010
X010
35 Interrupt Function and Pulse Catch Function
35.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
The main program is finished by FEND
FNC 06
instruction.
FEND
When an interrupt routine is executed by turning
SET
Y000
ON of X000, Y000 is set to ON unconditionally.
The outputs Y000 to Y007 are overwritten with
*1
Y000
K8
the latest information by the output refresh
instruction.
If the output refresh instruction is not provided,
FNC 03
Y000 turns ON after END instruction after the
IRET
program execution returned to the main routine.
If "SET Y000" is changed to "RST Y000", Y000 is
END
immediately set to OFF by turning ON of X000.
Interrupts are enabled by EI instruction.
FNC 04
The main program is described.
EI
The main program is finished by FEND
FNC 06
instruction.
FEND
When an interrupt routine is executed by turning
*1
X010
K8
X001 to ON, the input refresh is executed
unconditionally, and the ON/OFF information of
X010 to X017 at the current time is received.
SET
Y001
Y001 is set to ON or OFF according to the ON/
RST
Y001
OFF status of X010.
FNC 03
IRET
END

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3uc seriesMelsec-f

Table of Contents