SATO CX400 Programming Reference Manual page 9

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

Advertisement

This sets the RS232C communication parameters of the host PC's COM1 port for 9600
baud, Even parity, 8 Data bits, 1 Stop bit and directing the port to ignore the CTS and DSR
control signals.
3. You may want to minimize keystrokes and program size by assigning the <ESC>character
to a string variable since this character is used quite often.
The following two examples in BASIC show a typical example using thesehints. Both of these
examples use the Standard Protocol codes.
PRINTING WITH THE PARALLEL PORT
5 REM Parallel Example
10 E$=CHR$(27)
20 WIDTH "LPT1"255
30 LPRINT E$;"A";
40 LPRINT E$;"H400";E$;"V100";E$;"WL1SATO"; Sends the data "SATO" to be to be placed
50 LPRINT E$;"Q1";
60 LPRINT E$; "Z";
PRINTING WITH THE RS232C PORT
REM RS232 Example
10 E$=CHR$(27)
OPEN COM1:9600,N,8,1,CS,DS AS #1
SATO CX400
OPEN "COM1:9600,E,8,1,CS,DS"AS #1
PN 9001106 Rev. A
Section1. Programming Concepts
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 thescreen.
Sets the "E$" string as an <ESC>character
Sets the width of the output to 255
characters
Sends an "<ESC>A" command code tothe
LPT1 parallel port
400 dots horizontally and 100dots
vertically on the label and printed in the
"WL" font.
Instructs the printer to print one label.
Tells the printer that the last commandhas
been sent. The printer can nowcreate and
print the job.
Identifies the program as an RS232C
port print label. The "REM" prevents
this data from being sent to the printer
and displays it only on the screen.
Sets the"E$"string as an
<ESC>character.
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.
Page 1-3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents