High
-S
peed
Input
and
Pulse
O
utput
Features
3--11
High-Speed Input and Pulse Output Features
DL105 PLC User Manual, 3rd Edition
You may recall that the counter instruction is a standard instruction 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 high speed 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 10 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
has three inputs as shown. The first input (Enable) allows counting when active. The
middle input (Preload) allows you to change the current count. The bottom signal is
the reset. The preload input must be off while the counter is counting.
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 only
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 how the HSIO counter will appear in a ladder program. Note
that the Enable Interrupt (ENI) command must execute before the counter value
reaches the first preset value. We do this at powerup by using the first scan relay.
When using the counter but not the presets and interrupt, we can omit the ENI.
Direct
SOFT
Required
Preset Range:
1--99999999
Reset Input
UDC
CT76
Kxxxxxxxx
Enable Input
Preload Input
ENI
SP0
When the enable input is energized, the high-speed counter will respond to pulses
on X0 and increment the counter at CT76 -- CT77. The reset input contact behaves in
a logical OR fashion with the physical reset input X2 (when selected). So,the high
speed counter can receive a reset form either the contact(s) on the reset rung in the
ladder, OR the external reset X2 if you have configured X2 as an external reset.
The following example is the simplest way to use the high-speed counter, which
does not use the presets and special relays in the interrupt routine. The program
configures the HSIO circuit for Mode 10 operation, so X0 is automatically the counter
clock input. It uses the Compare-double (CMPD) instruction to cause action at
certain count values. Note that this allows you to have more than 24 “presets”.Then it
configures X2 to be the external reset of the counter.
Writing Your
Control Program
Program Example:
Counter Without
Preset
Содержание 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...