Omron CQM1H - PROGRAM Programming Manual page 269

Programmable controllers; inner boards
Table of Contents

Advertisement

Timer and Counter Instructions
244
The function of CTBL(63) is determined by the control data, C, as shown in
the following table. These functions are described after the table.
C
000
Registers a target value comparison table and starts comparison.
001
Registers a range comparison table and starts comparison.
002
Registers a target value comparison table. Start comparison with INI(61).
003
Registers a range comparison table. Start comparison with INI(61).
When the PV agrees with a target value or falls within a specified range, the
specified subroutine is called and executed. Refer to 1-4-6 High-speed
Counter 0 Interrupts for more details on table comparison.
If the high-speed counter is enabled in the PC Setup (DM 6642), it will begin
counting from zero when the CQM1H begins operation. The PV will not be
compared to the comparison table until the table is registered and comparison
is initiated with INI(61) or CTBL(63). Comparison can be stopped and started,
or the PV can be reset with INI(61).
Once a comparison table has been registered, it is valid until the CQM1H is
halted or until an error occurs in attempting to register a new table. The differ-
entiated form of CTBL(63) is recommended when possible to reduce cycle
time.
Target Value Comparison
For high-speed counter 0 in the CPU Unit, up to 16 target values can be regis-
tered. A subroutine number (1 to 16) is also registered for each target value.
For high-speed counters 1 and 2 on a Pulse I/O Board or Absolute Encoder
Interface Board, up to 48 target values can be registered. A subroutine num-
ber (1 to 48) is also registered for each target value. In either case, the corre-
sponding subroutine is called and executed when the PV matches a target
value. (When interrupt processing is not required, an undefined subroutine
number may be entered.)
High-speed counter PV
Target value comparisons are performed one item at a time in order of the
comparison table. When the PV reaches the first target value in the table, the
interrupt subroutine is executed and comparison continues to the next value in
the table. When processing has been completed for the last target value in the
table, comparison returns to the first value in the table and the process is
repeated.
The following diagram shows the structure of a target value comparison table
for use with the CPU Unit's built-in high-speed counter 0 or the Pulse I/O
Board's high-speed counters 1 or 2 set for linear counting. The number of tar-
get values can be 0001 to 0048.
CTBL(63) function
Match
Target value 1
Execute subroutine.
Execute subroutine.
Target value 2
Target value 16/48
Execute subroutine.
Section 5-16

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cqm1h seriesSysmac cqm1h-cpu series

Table of Contents