C Command - Counter
The C command is used in forms that require se
-
quential numbering. When initializing counters,
they must be defined in order (e.g. C0 first, C1
second...).
Field justification (p
3
) affects the printing of
counter data. When L, R or C are selected, the
counter field is the width of p
2
value. Data will
justify within the counter (p
2
) field per the se
-
lected p
3
. The N parameter will print the mini
-
mum number of characters. See programming
example 13 in Appendix H.
To print the contents of the counter, the counter
number is referenced in the “DATA” field of the
A (ASCII text) or B (Bar Code) commands.
If the starting value of a counter is “1", then no lead-
ing zero padding will be added. If the starting value is
“01”, then the counter will be padded, up to the
maximum number of digits (p
2
), with zeros.
Example:
C0,10,L,+1,"-Enter Serial Number:"¿
Saving and
Protecting
Consecutive
Numbers in
Nonvolatile Memory
This feature is useful when the counter field rep-
resents a serial number (or others types of num-
bers) that should never be repeated. This
feature allows for automatic retrieval and incre
-
menting (or decrementing) of the previous
counter value used every time a form is re
-
trieved (and printed).
By placing one minus sign as the first character
of the prompt, the prompt will appear only once
after the form is retrieved, thereby protecting
the integrity of the data.
Single Digit
Summation with
Counters
Add or subtract a single digit from the recalled
counter value in a form. If form recalled counter
C0 had a value of 3, then processing C0+1
would yield a value of 4 and C0-2 would yield a
value of 1.
3-28
980352-001 Rev.A