64
CQM1 Interrupt Functions Section 1-5
Controlling Absolute High-speed Counter Interrupts
1,2,3... 1. Use the CTBL(63) instruction to save the comparison table in the CQM1
and begin comparisons.
P specifies the port. Set P=001 to specify absolute high-speed counter 1,
or P=002 to specify absolute high-speed counter 2.
If C is set to 000, then comparisons will be made by the target matching
method; if 001, then they will be made by the range comparison method.
The comparison table will be saved, and, when the save operation is com-
plete, then comparisons will begin. While comparisons are being executed,
high-speed interrupts will be executed according to the comparison table.
Refer to 5-15-6 REGISTER COMPARISON TABLE – CTBL(63) for details
on the structure of the comparison tables.
Note The comparison results are normally stored in AR 0500 through
AR 0507 (port 1) and AR 0600 through AR 0607 (port 2) while the
range comparison is being executed.
If C is set to 002, then comparisons will be made by the target matching
method; if 003, then they will be made by the range comparison method.
For either of these settings, the comparison table will be saved, but com-
parisons will not begin, and the INI(61) instruction must be used to begin
comparisons.
2. To stop comparisons, execute the INI(61) instruction as shown below.
Specify port 1 or 2 in P (P=001 or 002).
To start comparisons again, set the second operand to “000” (execute
comparison), and execute the INI(61) instruction.
Once a table has been saved, it will be retained in the CQM1 during oper-
ation (i.e., during program execution) as long as no other table is saved.
Reading the PV
There are two ways to read the PV. The first is to read it from IR 232 and IR
233 (port 1) or IR 234 and IR 235 (port 2), and the second is to use PRV(62).
Reading IR 232 and IR 233 or IR 234 and IR 235
The PV of absolute high-speed counter 1 is stored in IR 232 and IR 233, and
the PV of absolute high-speed counter 2 is stored in IR 234 and IR 235 as
shown below.
(@)CTBL(63)
P
C
TB
P: Port specifier (001: Port 1; 002: Port 2)
C: (3 digits BCD)
000: Target table set and comparison begun
001: Range table set and comparison begun
002: Target table set only
003: Range table set only
TB: Beginning word of comparison table
(@)INI(61)
P
001
000
Leftmost 4 digits Rightmost 4 digits BCD Mode 360˚ Mode
IR 233 IR 232
0000 0000 to 0000 4095 0000 0000 to 0000 0359
Port 1:
IR 235 IR 234Port 2: