Timer and Counter Instructions
!Caution With 10-bit and 12-bit resolution, interrupt processing might not be triggered
Operation with the
High-speed Counter
Board
248
Resolution
Converted value
5°
8-bit (0 to 255)
4
10-bit (0 to 1023)
14
12-bit (0 to 4095)
57
For higher values, find the converted value to the nearest 45 ° and add the
remainder from the table. For example, to convert 145 ° into 8-bit resolution:
32 × 3 (for 135 ° ) + 7 (for 10 ° ) = 103.
when the angular value matches the comparison value because the con-
verted values do not match exactly.
Range Comparison Operation
The following diagram illustrates the operation of range comparisons for range
settings 1 through 4 set consecutively in the comparison table.
Count
As illustrated above, the current count is compared against all the comparison
ranges at the same time and the result for each range is output.
AR Area Flags
The following AR area flags indicate the status of comparison operations for
high-speed counter 0 in the CPU Unit and high-speed counters 1 and 2 in the
Pulse I/O Board or Absolute Encoder Interface Board.
Word
Bit(s)
AR 05
00 to 07
High-speed Counter 1 (Port 1) Range Comparison Flags
Bits 00 to 07 will be turned ON when the counter PV is within the
corresponding range (1 to 8).
08
High-speed Counter 1 (Port 1) Comparison Flag
This flag will be ON during PV comparison.
09
High-speed Counter 1 (Port 1) Overflow/Underflow Flag
This flag will be ON when an overflow or underflow occurred.
AR 06
00 to 07
High-speed Counter 2 (Port 2) Range Comparison Flags
Bits 00 to 07 will be turned ON when the counter PV is within the
corresponding range (1 to 8).
08
High-speed Counter 2 (Port 2) Comparison Flag
This flag will be ON during PV comparison.
09
High-speed Counter 2 (Port 2) Overflow/Underflow Flag
This flag will be ON when an overflow or underflow occurred.
AR 11
00 to 07
High-speed Counter 0 Range Comparison Flags
Bits 00 to 07 will be turned ON when the counter PV is within the
corresponding range (1 to 8).
When the execution condition is OFF, CTBL(63) is not executed. When the
execution condition is ON, CTBL(63) registers a comparison table for use with
the high-speed counter PV. Depending on the value of C, comparison with the
high-speed counter PV can begin immediately or it can be started separately
with INI(61).
10°
15°
20°
25°
7
11
14
18
28
43
57
71
114
171
228
284
0
Range
1
Range
2
Operation
Section 5-16
30°
35°
40°
45°
21
25
28
32
85
100
114
128
341
398
455
512
Range
3
Range
4
Need help?
Do you have a question about the CQM1H - PROGRAM and is the answer not in the manual?
Questions and answers