Section 5. Pro
rammin
Reference
Some
commands
can
contain
both
Paramete
and
Data elements,
such
as
“print
a
Code
39
s
mbol
containin
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>
characte
asks
fo
the
rinte
status.
There
are
two
different
sets
of
Protocol
Control
codes
to
choose
from
on
the
printer.
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
exam
les.
The
Protocol
Control
codes
are
selected
by
a
DIP
switch
DSW2-7
on
the
front
panel.
See
Section
3:
Printer
Confi
uration
.
CONTROL
CHARACTER
STANDARD
DSW2-7 OFF
NON-STANDARD
DSW2-7 ON
DESCRIPTION
STX 02 Hex 7B Hex = { Start of Data
ETX 03 Hex 7D Hex = } End of Data
ESC 1B Hex
5E Hex = ^ Command code to follow
ENQ
05 Hex 40 Hex = @ Get printer status
CAN
18 Hex 21 Hex = ! Cancel print job
Off-Line 40 Hex 5D Hex = ] Take printer 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
workin
in
BASIC
some
of
the
followin
hints
ma
hel
ou
et
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
port
on
the
PC
such
that
the
CTS
and
DSR
signals
will
be
ignored.
Send
your
OPEN
“COM”
statemen
in
the
followin
wa
:
Pa
e 5-2 SATO
“Se”
Print En
ines