High-Speed Counter 0 Interrupts - Omron CQM1H - PROGRAM Programming Manual

Programmable controllers; inner boards
Table of Contents

Advertisement

Interrupt Functions
Application Example
1-4-6

High-speed Counter 0 Interrupts

Input Signal Types and
Input Modes
34
In this example, an interrupt is executed every 2.4 ms (0.6 ms x 4) by means
of interval timer 1. Assume the default settings for all of the PC Setup. (Inputs
are not refreshed for interrupt processing.)
25315 First Cycle Flag
ON for 1 cycle
MOV(21)
MOV(21)
00100
@STIM(69)
00100
@STIM(69)
SBN(92)
RET(93)
When the program is executed, subroutine 023 will be executed every 2.4 ms
while IR 00100 is ON.
IR 00100
Subroutine 023
Pulse signals from a pulse encoder to CPU bits 00004 through 00006 can be
counted at high speed using high-speed counter 0 (the built-in high-speed
counter), and interrupt processing can be executed according to the count.
Two types of signals can be input from a pulse encoder. The input mode used
for high-speed counter 0 will depend on the signal type.
Mode
Differential
A phase-difference 4X two-phase signal (phase-A and phase-B) and
phase mode
a phase-Z signal are used for inputs. The count is incremented or
decremented according to differences in the 2-phase signals.
Incrementing
One single-phase pulse signal and a count reset signal are used for
mode
inputs. The count is incremented according to the single-phase sig-
nal.
Interval timer set values:
Sets 4 for the decrementing counter
#0004
set value.
DM 0010
Sets 0.6 ms for the decrementing time inter-
val.
#0006
DM 0011
Interval timer 1 starts when IR 00100 turns ON.
004
DM 0010
#0023
Interval timer 1 stops when IR 00100 turns
OFF.
011
000
000
023
Every 2.4 ms the count is reached for interval
timer 1, subroutine 023 is called, and the inter-
rupt processing is executed.
2.4 ms
2.4 ms
Operation
Section 1-4
2.4 ms

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cqm1h seriesSysmac cqm1h-cpu series

Table of Contents