DL06 Micro PLC User Manual, 3rd Edition, Rev. E
5-44
Chapter 5: Standard RLL Instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Using Counters
Counters are used to count events . The counters available are up counters, up/down counters,
and stage counters (used with RLL
PLUS
programming).
The up counter (CNT) has two inputs, a count input and a reset input. The maximum count
value is 9999. The timing diagram below shows the relationship between the counter input,
counter reset, associated discrete bit, current value, and counter preset. The CNT counter
preset and current value are bothe single word BCD values.
The up down counter (UDC) has three inputs, a count up input, count down input and
reset input. The maximum count value is 99999999. The timing diagram below shows the
relationship between the counter up and down inputs, counter reset, associated discrete bit,
current value, and counter preset. The UDC counter preset and current value are both double
word BCD values.
NOTE: The UDC uses two consecutive V-memory locations for the 8-digit value, therefore, two
consecutive timer locations. For example, if UDC CT1 is used, the next available counter number is CT3.
The stage counter (SGCNT) has a count input and is reset by the RST instruction. This
instruction is useful when programming using the RLL
PLUS
structured programming. The
maximum count value is 9999. The timing diagram below shows the relationship between the
counter input, associated discrete bit, current value, counter preset and reset instruction.
X1
X1
CT1
1
2
3
4
0
Current
alue
CNT
CT1
K3
X2
X2
Counter preset
Up
Reset
Counts
X1
X1
CT2
1
2
3
4
0
Current
Value
SGCNT
CT2
K3
RST
CT2
Counts
Counter preset
X1
X1
CT2
1
2
1
2
3
0
Current
Value
X2
X2
UDC
CT2
K3
X3
X3
Counter Preset
Up
Down
Reset
Counts