Specifications

Program Example 2: Up/Down Counting with Standard Inputs
In this example, there is a conveyor belt “A” that transports bottles to be inspected. During
the course of the process, one sensor is keeping track of the bottles that are going onto belt
A” for inspection, and another sensor is keeping track of how many bottles are being
removed to the finished product line.
When we have reached 500 bottles in the process, an “over 500” light turns on and a
rerouting gate is activated to channel the incoming bottles to conveyor belt “B”. The
rerouting gate will stay activated for 30 seconds after the conveyor belt “A” contains less than
500 bottles.
The program below shows how ladder logic might be written to handle the job. Note the use
of V1174. This memory location stores the current count for CT174 which is used with the
DL06.
DL06 Micro PLC User Manual, 3rd Edition, Rev. C
E–32
Appendix E: High-speed Input and Pulse Output Features
1
2
3
4
E
6
7
8
9
10
11
12
13
14
A
B
C
D
SP0
LD
K20
Mode 20 Up/Down counter
OUT
V7633
LD
K202
OUT
V7634
DirectSOFT
LD
K0
OUT
V7635
LD
K7
OUT
V7636
LD
K1006
OUT
V7637
UDC
CT174
K500
Up/Down counter
Only one counter is used with mode 20. The actual
count (32-bit) is stored in V 1175/V1174. When pulses
are received at point X1, the value in V1175/V1174
will decrement.
SP1
SP1
SP1
OUT
V1174
K450
Y20
Actual counts
When the pulse count reaches and exceeds 450,
the "over 450" light (Y20) will turn on.
Standard counting
Absolute preset mode at X0 and X1
Must be zero with mode 20
External reset without interrupt (X2)
Discrete filtered input at (X3) 10 ms.
Continued on next page.