43
Interrupt Functions Section 1-4
2. The 6th and 7th digits of high-speed counter 0’s PV are normally 00, but
can be used as “Overflow/Underflow Flags” by detecting values beyond the
allowable counting ranges.
High-speed counter 0 can be reset as described in the previous section or it
can be reset automatically by restarting program execution. High-speed
counter 0 and related operations will not function normally until the overflow/
underflow status is cleared. Operations during overflow/underflow status will
be as follows.
• Comparison table operation will stop.
• The comparison table will not be cleared.
• Interrupt routines for the high-speed counter will not be executed.
• CTBL(63) can be used only to register the comparison table. If an attempt
is made to start comparison table operation, operation will not start and
the comparison table will not be registered.
• INI(61) cannot be used to start or stop comparison table operation or to
change the present value.
• PRV(62) will read out only 0FFF FFFF or FFFF FFFF as the present
value.
Recovery Use the following procedure to recover from overflow/underflow status.
With Comparison Table Registered
1,2,3... 1. Reset the counter.
2. Set the PV with PRV(62) if necessary.
3. Set the comparison table with CTBL(63) if necessary
4. Start comparison table operation with INI(61).
Without Comparison Table Registered
1,2,3... 1. Reset the counter.
2. Set the PV with PRV(62) if necessary.
3. Set the comparison table and start operation with CTBL(63) and INI(61).
Note The range comparison results in AR 11 will remain after recovery. The inter-
rupt routine for a interrupt condition meet immediately after recovery will not
be executed if the interrupt condition was already met before the overflow/
underflow status occurred. If interrupt routine execution is necessary, clear AR
11 before proceeding.
Reset Operation When high-speed counter 0 is reset, the PV will be set to 0, counting will
begin from 0, and the comparison table, execution status, and execution
results will be maintained.
Startup Counter Status When high-speed counter 0 is started, the counter mode in the PC Setup will
be read and used, the PV will be set to 0, overflow/underflow status will be
cleared, the comparison table registration and execution status will be
cleared, and range execution results will be cleared. (Range execution results
are always cleared when operation is begun or when the comparison table is
registered.)
Stopped Counter Status When high-speed counter 0 is stopped, the PV will be maintained, the com-
parison table registration and execution status will be cleared, and range exe-
cution results will be maintained.