High
-S
peed
Input
and
Pulse
O
utput
Features
3--20
High-speed Input and Pulse Output Features
DL105 PLC User Manual, 3rd Edition
You may recall that the Up-Down counter instruction is standard in the DL105
instruction set. Refer to the figure below. The mnemonic for the counter is
UDC
(up-down counter).The DL105 can have up to 64 counters, labeled CT0 through
CT77. The quadrature counter in the HSIO circuit is accessed in ladder logic by
using UDC CT76. It uses counter registers CT76 and CT77 exclusively when the
HSIO mode 20 is active (otherwise, CT76 and CT77 are available for standard
counter use). The HSIO counter needs two registers because it is a double-word
counter. It also has three inputs as shown, but they are redefined. The first input is
the enable signal, the middle is a preload (write), and the bottom is the reset. The
enable input must be on before the counter will count. The preload input allows you
to write a new value to the current count. The enable input must be off during a
preload.
Reset Input
UDC
CT76
Kxxxxxxxx
Enable Input
Preload Input
Reset Input
UDC
CTxx
Kxxxxxxxx
UP Count
DOWN Count
Standard Counter Function
HSIO Counter Function
D
Counts UP and DOWN
D
Counts UP and DOWN (from X0, X1)
D
Reset input is internal only
D
Reset may be internal or external
D
Preload counter by write to value
D
Can use Preload input to change count
The next figure shows the how the HSIO quadrature counter will appear in a ladder
program.
Preset Range:
--8,388,608 to
+8,388,607
Reset Input
UDC
CT76
Kxxxxxxxx
Enable Input
Preload Input
When the enable input is energized, the counter will respond to quadrature pulses
on X0 and X1, incrementing or decrementing the counter at CT76 -- CT77. The reset
input contact behaves in a logical OR fashion with the physical reset input X2. This
means the quadrature counter can receive a reset from either the contact(s) on the
reset rung in the ladder, OR the external reset X2.
Since presets are not available in quadrature counting, this mode is best suited for
simple counting and measuring. The example program on the following page shows
how to configure the quadrature counter. The program configures the HSIO circuit
for Mode 20 operation, so X0 is Phase A and X1 is Phase B clock inputs.
Writing Your
Control Program
Quadrature
Counter w/Preload
Program Example
Содержание DL105
Страница 2: ...DL105 PLC User Manual Manual Number D1 USER M...
Страница 308: ...1B DL105 Error Codes In This Appendix Error Code Table...
Страница 314: ...1C Instruction Execution Times In This Appendix Introduction Instruction Execution Times...
Страница 324: ...1D Special Relays In This Appendix DL105 PLC Special Relays...
Страница 327: ...1E PLC Memory In This Appendix DL105 PLC Memory...
Страница 329: ...1F European Union Directives CE In This Appendix European Union EU Directives Basic EMC Installation Guidelines...