130
Absolute Encoder Interface Board
Section 2-3
Starting and Stopping Comparisons
1,2,3...
1.
Use the CTBL(63) instruction to save the comparison table in the CQM1H
and begin comparisons.
P specifies the port. Set P=001 to specify absolute high-speed counter 1
(i.e., port 1), or P=002 to specify absolute high-speed counter 2 (port 2).
Setting 000 as the value of C registers a target value comparison table,
and setting 001 registers a range comparison table. Comparison begins
upon completion of this registration. While comparisons are being per-
formed, absolute high-speed counter interrupts will be executed according
to the applicable comparison table. Refer to
5-16-7 REGISTER COMPAR-
ISON TABLE – CTBL(63)
for details on comparison table registration.
If C is set to 002, then comparisons will be made using the target value
method; if 003, then they will be made using the range comparison meth-
od. In both cases the comparison table will be saved but comparisons will
not actually begin until INI(61) is used.
Note
Unlike other high-speed counters, the interrupts of absolute high-
speed counters 1 and 2, the target value, and upper and lower limits
registered in the comparison table are all set in one word each.
2.
To stop comparisons, execute INI(61) as shown below. Specify port 1 or 2
in P (P=001 or 002).
To restart comparisons, set the first operand to the port number, and the
second operand to 000 (execute comparison), and execute INI(61).
A table that has been saved will be retained in the CQM1H during opera-
tion (i.e., during program execution) until a new table is saved.
Reading the PV of Absolute High-speed Counters 1 and 2
The following two methods can be used to read the PVs of absolute high-
speed counters 1 and 2:
• Reading PVs from memory (IR 232 or IR 234)
• Using PRV(62)
Reading PVs from Memory
The PVs of high-speed counters 1 and 4 are stored in the data area words as
8-digit BCDs, regardless of whether the Board is in BCD Mode or 360
°
Mode.
(@)CTBL(63)
P
C
TB
P: Port
001: Port 1
002: Port 2
C: Mode (3-digit BCD)
000: Target value table registration and comparison start
001: Range comparison table registration and comparison start
002: Target value table registration only
003: Range comparison table registration only
TB: First word of comparison table
(@)INI(61)
P
001
000
P: Port
001: Port 1
002: Port 2
BCD Mode
360
°
Mode
IR 233
0000 0000 to 0000 4095
0000 0000 to 0000 0359
Port 1:
IR 235
Port 2:
Leftmost
4 digits
IR 232
IR 234
Rightmost
4 digits