KEYENCE Visual KV Series User Manual
Page 363

8.2 Details
3-339
1
8
Chapter 8 Programming Examples
2008
2002
CTH1
0005
RES
CTH1
SET
2203
SET
2813
#60000
CTC2
CTC2
RES
0502
RES
CTC2
T001
0502
#00030
T001
■ High-speed counter current value clear
Counts pulses at input relay 0005. When the count value reaches setting value
60000, clears the current value of high speed counter CTH1 and turns ON output
relay 0502 for 3 s.
Ladder diagram
Coding
■ Input of phase differential signal
Inputs phase differential signals to input relays 0004 and 0006 and counts pulses at
CTH0.
Writes the count value into DM0000.
When high speed counter CTH0 reaches 60000, clears the current value of CTH0,
sets output relay 0500, and stops fetching count value to CTH0.
Sets 0008 as external reset.
Ladder diagram
Note: Initial settings for special utility relays
•
Sets input time constant of input relays 0000 to 0009 to 10 µs when 2813 turns
ON.
•
Clears the current value of CTH0 when 2103 turns ON and CTC0 is ON.
•
Sets CTH0 in the X 2 mode when 2113 is ON and 2114 is OFF.
•
Enables external reset (input relay 0008) when 2115 turns ON.
Line No. Instruction
Operand
0000
LD
2008
0001
SET
2813
0002
CON
0003
SET
2203
0004
CON
0005
RES
CTH1
0006
LD
2002
0007
CTH1
0005
0008
CTC2
#60000
0009
LD
CTC2
0010
OUT
0502
0011
CON
0012
TMR
001 #00030
0013
CON
0015
AND
T001
0016
RES
CTC2
0017
CON
0018
RES
0502
2008
RES
CTH0
SET
2115
0500
RES
2114
SET
2113
SET
2103
SET
2813
EI
CTH0
00004
#60000
CTC0
2002
STA
DM0000
LDA
CTH0
END
INT
CTC0
2002
SET
0500
RETI
ENDH
Initial settings
*Note
KVNKA Chap 08.p65
08.3.11, 0:12 PM
339