High
-S
peed
Input
and
Pulse
O
utput
Features
3--15
High-Speed Input and Pulse Output Features
DL105 PLC User Manual, 3rd Edition
The following example shows how you can preload the current count with another
value. When the preload command input (X4 in this example) is energized, we
disable the counter from counting with C0. Then we write the value K3000 to the
count register (V1076-V1077). By pulsing C1 on, we preload the current count of the
counter with K3000. When the preload command (X4) is turned off, the counter
resumes counting any pulses, but now starting from K3000.
SP0
LD
K10
Load constant K10 into the accumulator. This
selects Mode 10 as the HSIO mode.
OUT
V7633
Output this address to V7633, the location of
HSIO Mode select register.
LD
K107
Load the constant required to configure X2 as
an external reset with interrupt.
OUT
V7636
Output the constant to V7636, the location of the
setup parameter for X2.
Select Mode 10
Direct
SOFT
SET
Set C0 on at powerup to enable counting.
C0
X4
RST
When the preload request is made, the user turns
on X4. First we disable counting by resetting C0,
the counter’s enable input.
UDC
CT76
K99999999
C1
C0
C2
CT76 is the HSIO counter. The first rung’s C0
contact enables the counter. The preload contact
in the middle is off until the logic near the end of
this program turns it on.
C0
PD
Generate a preload counter input pulse, which
causes the counter to preload from V1076-V1077.
C1
SP0
LDD
K3000
Load the BCD value K3000 into the
accumulator.
OUTD
V1076
Output the constant to V1076/V1077, the location
of the accumulated count for CT76.
END
END coil marks the end of the main program.
C1
C0
SET
C0
Enable the counter by setting C0, when the
preolad pulse on C1 has occurred (C1 is off).
LD
K1
Load the constant required to configure X0 as
the counter clock.
OUT
V7634
Output the constant K1 to V7634, the location of
the setup parameter for X0.
The third rung’s Reset input is normally off,
because we will use the external reset. You can
optionally reset the counter value on each powerup
using the SP0 contact.
Counter With
Preload
Program Example
Summary of Contents for DL105
Page 2: ...DL105 PLC User Manual Manual Number D1 USER M...
Page 308: ...1B DL105 Error Codes In This Appendix Error Code Table...
Page 314: ...1C Instruction Execution Times In This Appendix Introduction Instruction Execution Times...
Page 324: ...1D Special Relays In This Appendix DL105 PLC Special Relays...
Page 327: ...1E PLC Memory In This Appendix DL105 PLC Memory...