Using Basic - SATO GL408e Programming Reference Manual

Sbpl
Hide thumbs Also See for GL408e:
Table of Contents

Advertisement

Unit 2: Programming Concepts

USING BASIC

It may be useful to test your printer using a BASIC program on a PC or write your actual
production programs in BASIC. Whatever the reason, if working in BASIC, some of the following
hints may be helpful.
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 a single line and do not contain <CR> and/or <LF> characters. If
these characters are needed, they are explicitly noted by the inclusion of <CR> and <LF>
notations.
If using the printer's RS232C interface, it is necessary to set the computer COM portion so the
CTS and DSR signals are ignored. Send OPEN "COM" statements as follows:
This sets the host computer's COM1 port RS232C communication parameters for 9600 baud,
Even parity, 8 Data bits, 1 Stop bit and directs the port to ignore the CTS and DSR control
signals.
It may be desirable to assign the <ESC> character to a string variable to reduce keystrokes since
this character is often used.
The following two examples use Standard Protocol codes in BASIC.
PRINTING WITH THE PARALLEL PORT
5 REM CL612 Parallel Example
10 E$=CHR$(27)
20 WIDTH "LPT1",255
30 LPRINT E$;"A";
40 LPRINT E$;"H400";E$;"V100";E$;"XL1SATO";
50 LPRINT E$;"Q1";
60 LPRINT E$; "Z";
SATO GL4xxe SBPL Programming Reference
OPEN "COM1:9600,E,8,1,CS,DS"AS #1
Identifies the program as a CL612 parallel port
print label. The "REM" prevents this data from
being sent to the printer and is only displayed on
the screen.
Sets the "E$" string as an <ESC> character
Sets the width of the output to 255 characters
Sends an "<ESC>A" command code to the LPT1
parallel port
Sends the data "SATO" to be to be placed 400
dots horizontally and 100 dots vertically on the
label and printed in the "XL" font.
Instructs the printer to print one label.
Tells the printer that the last command has been
sent. The printer can now create and print the job.
Page 2-4

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Gl412e

Table of Contents