EasyManua.ls Logo

SATO M-8485Se - Page 69

SATO M-8485Se
107 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Section 5. Pro
g
rammin
g
Reference
OPEN
“COM1:9600,E,8,1,CS,DS”
AS #1
This
sets
the
RS232C
communication
parameters
of
the
host
PC’s
COM1
port
fo
r
9600
baud,
Even
parity,
8
Data
bits,
1
Stop
bit
and
directing
the
port
to
ignore the
CTS
and
DSR
control
si
g
nals.
3.
You
may
want
to
minimize
keystrokes
and
program
size
by
assigning
the
<ESC>
characte
r
to
a
strin
g
variable
since
this
characte
r
is used
q
uite
often.
The
following
two
examples
in
BASIC
show
a
typical
example
using
these
hints.
Both
of
these
exam
p
les
use
the
Standard Protocol
codes.
P
r
intin
g
with
the
Parallel
Port
5 REM Parallel Example Identifies the program as a parallel port
print label. The
“REM
prevents this data
from being sent to the printer and
displays it only on the screen.
10 E$=CHR$(27) Sets the
“E$”
string as an <ESC>
character
20 WIDTH
“LPT1:”,255
Sets the width of the output to 255
characters
30 LPRINT E$;"A"; Sends an
“<ESC>A”
command code to
the LPT1 parallel port
40 LPRINT E$;"H400",E$;"V100";E$;"WL1SATO"; Sends the data
“SATO”
to be to be placed
400 dots horizontally and 100 dots
vertically on the label and printed in the
“WL”
font.
50 LPRINT E$;"Q1"; Instructs the printer to print one label.
60 LPRINT E$;
“Z”;
Tells the printer that the last command
has been sent. The printer can now
create and
p
rint the
j
ob.
Printin
g
with
the
RS232C
Port
5 REM RS232 Example Identifies the program as a RS232C port
print label. The
“REM
prevents this data
from being sent to the printer and
displays it only on the screen.
10 E$=CHR$(27) Sets the
“E$”
string as an <ESC>
character.
20 OPEN
“COM1:9600,N,8,1,CS,DS”
AS #1 Opens the COM1 port for output and
sets the parameters as 9600 baud, No
parity, 8 Data bits, 1 Stop bit and
instructs the port to ignore the CTS and
DSR control signals.
30 PRINT #1,CHR$ (2); Sends an <STX> (ASCII Code a
decimal
“2”)
to the printer instructing it to
prepare to receive a message.
50 PRINT #1,E$;"A"; Sends an
“<ESC>A”
command code to
Print Port #1 opened by statement 20
above.
SATO
“Se”
Print En
g
ines Pa
g
e 5-3

Table of Contents

Other manuals for SATO M-8485Se

Related product manuals