7 High-speed Counters
7-24
CJ2M CPU Unit Pulse I/O Module User’s Manual
High-speed counters 0 to 3 can be used for high-speed counter interrupts.
• Refer to 2-2-3 Allocating Functions to Input Terminals for information on allocating input terminals to
high-speed counters.
• Refer to Section 6 Interrupts for information on interrupts except for the high-speed counter inter-
rupts.
z Writing the Interrupt Task Program
Create programs for interrupt tasks 0 to 255, which are executed for the corresponding high-speed
counter interrupts. Right-click the program set as the interrupt task in the CX-Programmer and select
Properties. Select any interrupt task in the Task type Field of the Program Properties Dialog Box.
z Executing CTBL(882) and INI(880) Instructions in Cyclic Task
Execute the instructions in the following order.
Refer to 7-3-2 Present Value Comparison for details.
Determining High-speed Counters
Creating Ladder Programs
Register the comparison table.
Start comparison.
Stop comparison.
Execute the CTBL (REGISTER COMPARISON TABLE) instruction.
Specify the interrupt task numbers in the table.
Register the comparison table with the CTBL (COMPARISON TABLE
LOAD) or INI (MODE CONTROL) instruction. Here, high-speed
counter interrupts will be valid.
Stop with the INI (MODE CONTROL) instruction.