Example of 24-bit high-speed counter, Ladder program – KEYENCE KV-D20 User Manual
Page 60

3. Examples of Ladder Programs
3
60
0001
0002
0003
0004
0005
2002
$0061
DM1676
DW
1
0006
0007
0008
0009
0010
2008
1000
CTC1
#65535
CTC0
#65535
2504
CTH0
RES
2114
RES
2113
SET
MEMSW
$0800
CTH0
0004
2
3
4
24-bit high-speed counter 0 (phase-differential input)
ON for 1 scan
Always ON
High-speed counter display
Display the current value of high-speed counter 0 with two words.
Enable changing the screen between the operator, switch comment, and lamp comment
screens.
Initial setting
Example of 24-bit high-speed counter
Operate the KV-D20 to use the 24-bit high-speed counter function of the KV basic
unit. Set the high-speed counter comparator 0 (CTC0) and 1 (CTC1) in the numeric
value change mode of the operator screen.
➮
Refer to "Changing numeric values individually" on page 49.
The customized switches are assigned to the following functions:
F1: Turns on/off the high-speed counter operation.
F2: Not used
F3: Resets the high-speed counter.
F4: Not used
The customized lamps are assigned to the following functions:
LED1: Illuminates during high-speed counter operation.
LED2: Illuminates when high-speed counter comparator 0 is ON.
LED3: Illuminates when high-speed counter comparator 1 is ON.
LED4: Not used
➮
Refer to the NEW KV Series User's Manual "24-bit High-speed Counters" on page 615 for details.
Operator screen
Ladder program
F1
F2
F3
F4
1
2
3
4
F1
F2
F3
F4
1
2
3
4
When the high-speed counter is in operation
HIGH-SPEED COUNTER:ON
CURRENT:
PRESET0:
PRESET1:
CURRENT:
PRESET0:
PRESET1:
When the high-speed counter is stopped
kv_d20_manual.p65
08.3.10, 6:09 PM
60