Counter Interrupt - Interrupt Triggered By Counting Up Of High Speed Counter - Mitsubishi Electric MELSEC FX3U Programming Manual

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
36.6
Counter Interrupt - Interrupt Triggered by Counting Up of High Speed
Counter
1. Outline
This type of interrupt utilizes the current value of a high speed counter.
2. Application
This type of interrupt is used together with the comparison set instruction DHSCS (FNC 53). When the
current value of a high speed counter reaches the specified value, an interrupt routine is executed.
3. Basic program (programming procedure)
Step
0
M8000
RUN
monitor
Interrupt
pointer
I010
*1.
When the comparison value specified by a data register, etc. is changed, the current value is actually
changed to the specified value when END instruction is executed.
4. Number and operation of (six) counter interrupt pointers
I 0
0
Counter interrupt pointer (1 to 6)
Pointer No.
I010,I020,I030,I040,I050,I060
*1.
Cleared when the PLC mode is changed from RUN to STOP.
5. When setting an interrupt output (Y or M) to ON or OFF using a high speed counter
When only controlling the ON/OFF status of an output relay (Y) or auxiliary relay (M) according to the current
value of a high speed counter, a required program can be easily created using DHSCS (FNC 53), DHSCR
(FNC 54) or DHSZ (FNC 55) instruction.
866
FNC 04
EI
C255
K2,147,483,647
FNC 53
DHSCS K1000 C255
*1
FNC 06
FEND
When counter interrupt is specified
Interrupt routine
(interrupt program)
FNC 03
Interrupt return
IRET
END
Interrupt disable flag
M8059
36 Interrupt Function and Pulse Catch Function

36.6 Counter Interrupt - Interrupt Triggered by Counting Up of High Speed Counter

Main program
Interrupts are enabled after EI (FNC 04)
instruction.
The main program is described.
The coil of a high speed counter is driven, and
an interrupt pointer is specified in DHSCS (FNC
53) instruction.
I010
Interrupt pointer
number is
specified
When the current value of C255 changes from
"999" to "1000", the interrupt routine is executed.
For an interrupt routine use example, refer to the
input interrupt function described in the
preceding section.
*1

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents