Citizen CT-S300 manual Example, Program coding

Models: CT-S300

1 158
Download 158 pages 42.99 Kb
Page 6
Image 6

1.OUTLINE

1.1Operation Mode

CT-S300 has ESC/POSTM as control commands.

1.2 Character Set

All print data sent from the host computer to the printer are automatically converted to one-byte alphanumeric or katakana characters (ANK) or two-byte Kanji corresponding to the characters and symbols.

NOTE: For the contents of character set, refer to Chatacter Code Table of this document.

1.3Control Commands

1.3.1Control Command Details

Control Commands are used for controlling the operations of the printer such as starting/stopping of printing, line feeding, paper feeding, etc. They control all functions related to printing, such as type of characters, enlargement of characters or setting of format.

1.3.2 How to Send Control Commands

Some methods are available for sending Control Commands from the host computer to the printer. Here, a method of sending by BASIC programming is explained.

Example 1

Let’s print a character string “CITIZEN” in enlarged (double-height, double-width) and in normal format.

Program coding

The Control Command shows that the command name for setting the size of a character is GS !. Let’s make a program using this code. An example is shown below.

Program List

10 A$="CITIZEN"

20 LPRINT CHR$(&H1D);"!";CHR$(&H33);

30 LPRINT A$;

40 LPRINT CHR$(&HA);CHR$(&HA);

50 LPRINT CHR$(&H1D);"!";CHR$(&H00);

60 LPRINT A$;

70 END

Print Result

CITIZEN

CITIZEN

In lines 20 and 50, setting and canceling of enlarging a character is sent. As a result, lines 30 and 60 print the same character string but line 30 prints enlarged characters and line 60 cancels the enlargement and prints in normal format.

*In this document, sample programs are in BASIC. For details of BASIC programming, refer to the manual for BASIC.

— 1 —

Page 6
Image 6
Citizen CT-S300 manual Example, Program coding