You are on page 1of 2

Top Back Contact Us

VOL. 8 Phase differential input


Example Example: Input from rotary encoder

Outline

Phase A

Phase B

Rotary encoder Visual KV Series

■ Programming Technique
When using the phase differential input, set the high-speed counter to the double or quadruple multiplication mode.
CTH0 Phase A: Input 0004 Phase B: Input 0006
CTH1 Phase A: Input 0005 Phase B: Input 0007

Special utility relay setting for phase differential input


CTH0 CTH1
2113 2114 2213 2214
Double mode ON OFF ON OFF
Quadruple mode OFF ON OFF ON

Phase differential input in double multiplication mode


(2113: ON, 2114: OFF)
1 2 3 4
ON
Phase A
OFF
ON
Phase B OFF

Counter value
0 1 2 3 4 5 6 7 8 7 6 5 4 3 2 1 0

Phase differential input in quadruple multiplication mode


(2113: OFF, 2114: ON)
1 2 3 4
ON 1 2 3 4
Phase A OFF
ON
Phase B OFF

Counter value 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Top Back Contact Us

VOL. 8 Phase differential input


Programming Example (In double multiplication mode)
Pulses up to 30-kHz frequency can be input.

2008 2113 2114


0001 SET RES High-speed counter CTH0 is set to the double
mode.
2002 HSP
0002 The input time constants of inputs 0004 and
0004 0006 are set to 10 µs.
HSP
0003
0006
2002 CTH0
0004 The pulses from the encoder are counted with
0004
high-speed counter CTH0.
0000 CTH0
0005 RES Turning ON input 0000 resets high-speed
counter CTH0.

Tips To use 24-bit high-speed counter


The 24-bit high-speed counter can be used to count the pulses from the encoder by
setting the special utility relays. It allows reliable counting of the pulses that cannot be
counted with the 16-bit high-speed counter.

Setting method
Specify the 24-bit high-speed counter with the MEMSW instruction.
To set high-speed counter CTH0 To set high-speed counter CTH1
MEMSW MEMSW
$0800 $1000

The counter value is read at every scan and is stored in the following data memories.
DM1900: Low-order bits of current CTH0 value
DM1901: High-order bits of current CTH0 value
DM1902: Low-order bits of current CTH1 value
DM1903: High-order bits of current CTH1 value

By using the KV-D20 operator interface panel, you can display the current value of the 24-
bit high-speed counter in real time.

You might also like