Selecting Protocol Control Codes; Using Basic - SATO CX400 Programming Reference Manual

Desktop printer
Hide thumbs Also See for CX400:
Table of Contents

Advertisement

Section1. Programming Concepts
Some commands can contain both Parameter and Data elements, such as "print a Code 39
symbol containing the data."

SELECTING PROTOCOL CONTROL CODES

Protocol codes are the special control characters that prepare the printer to receive instructions.
For example, the <ESC> character tells the printer that a command code will follow and the
<ENQ> character asks for the printer status. There are two pre-defined different sets of
Protocol Control codes to choose from. Each set is made up of six special characters. The
Standard Protocol Control codes are non-printable characters, and the Non-Standard Protocol
Control codes are printable characters. The Non-Standard set may be useful on host computers
using protocol converters or in an application where non-printable ASCII characters cannot be
sent from the host. This manual uses the Standard Protocol Control codes for all of the
examples.
If Protocol Control codes other than the standard set are desired, they must be downloaded
from the host using the <ESC>LD command. Once they are downloaded, the printer will not
respond to standard protocol codes. The current protocol codes active in a printer can be
determined by printing a Test Label (see CX400 User's Guide, page 9)..
CONTROL
CHARACTER
STX
ETX
ESC
ESC
ENQ
CAN
Off-Line

USING BASIC

It may be useful to test your printer using a BASIC program on a PC. You may also write your
actual production programs in BASIC. Whatever the reason, if you will be working in BASIC,
some of the following hints may help you get started:
1.
Set the WIDTH of the output device to 255 characters to avoid automatically sending
<CR> and <LF> characters after every line. The command string should be continuous
and uninterrupted by <CR> and/or <LF> commands. The examples given in this manual
are printed on separate lines because they will not fit on one line and do not contain any
<CR> and/or <LF> characters. If these characters are needed, they are explicitly noted by
the inclusion of <CR> and<LF> notations.
2. If you are using the printer's RS232C interface, it is necessary to set the COM porton on
the PC such that the CTS and DSR signals will be ignored. Send your OPEN "COM"
statement in the following way:
Page 1-2
STANDARD
HEX VALUE
02 Hex
Start of Data
03 Hex
End of Data
1B Hex 5
Command code to follow
1B Hex
Command code to follow
05 Hex
Get printer status, Bi-Com mode
18 Hex
Cancel print job, Bi-Com mode
40 Hex
Take printer Off-Line
PN 9001106 Rev. A
DESCRIPTION
CX400
SATO

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents