11-29
11 High-speed Counters
CP2E CPU Unit Software User’s Manual(W614)
11-5 Application Example
11
When the PV of the high-speed counter matches target value 1 (3000), interrupt task 4 is executed.
When the present vale of the high-speed counter matches target value 2 (3500), interrupt task 5 is
executed.
DM Area Setup
The comparison table for the CTBL (COMPARISON TABLE LOAD) instruction is set in D600 through
D606.
Word Value Contents
D600 0002 Number of target values: 2
D601 0BB8 Target value 1: 3000 (BB8 hex)
D602 0000
D603 0004 Target value 1: Interrupt task No.4
D604 0DAC Target value 2: 3500 (DAC hex)
D605 0000
D606 0005 Target value 2: Interrupt task No.5
Interrupt task 4
Turns ON the motor
low speed output
Interrupt task 5
Turns OFF the
motor run output
Turns OFF the motor
low speed output
Turns OFF the motor
stopped output