Gs c ; n1 ; n2 ; n3 ; n4 ; n5 – CITIZEN CT-S300 User Manual

Page 90

Advertising
background image

— 85 —

GS C ; n1 ; n2 ; n3 ; n4 ; n5 ;

[Function]

Setting the numbering counter mode (B)

[Code]

<1D>H<43>H<3B>H<n1><3B>H<n2><3B>H<n3>

<3B>H<n4><3B>H<n5><3B>H

<n1>, <n2>, <n3>, <n4>, <n5> are character codes.

[Range]

0 n1 , n2 , n5 65535

0 n3 , n4 255

[Outline]

This command sets the numbering (serial number counter) mode and a counter
value.

n1: Counter default

n2: Counter final value

n3: Counter step value

n4: Idential counter print count

n5: Counter start value

n1 < n2: Count-up system

n1 > n2: Count-down system

n1 = n 2 or n3 = 0 or n4 = 0 : Counter stop

[Caution]

• If the n5 counter start value is beyond the counter range specified with n1 and n2,

it is assumed to be n1 = n5.

• If each value of n1 through n5 contains the character code other than “0” through

“9”, the printer will invalidate the data up to that parameter and handle the
subsequent data as normal data.

[Default]

n1 = 1

n2 = 65535

n3 = 1

n4 = 1

n5 = 1

[See Also]

GS C0 , GS C1 , GS C2 , GS c

[Sample Program]

LPRINT CHR$(&H1D);"C0";

*CNT

LPRINT CHR$(3);CHR$(0);

FOR I=1 TO 5

LPRINT CHR$(&H1D);"C;";

LPRINT CHR$(&H1D);"c";

LPRINT "50;0;5;2;50";

NEXT I

GOUSAB *CNT

LPRINT CHR$(&HA);

LPRINT CHR$(&H1D);"C;";

RETURN

LPRINT "50;0;5;2;5";
GOUSAB *CNT
END

[Print Results]

When setting a count-down range = 0 to 50, step value = 5,
repeat count = 2, and start value = 50 to print a counte value.

When setting a count-down range = 0 to 50, step value = 5,
repeat count = 1, and start value = 5 to print a counter value.

50 50 45 45 40 40 <

5 5 0 0 50 50 <

Advertising