SATO GL408e User manual

SBPL PROGRAMMING REFERENCE
For printer model:
GL408e / GL412e
www.satoamerica.com
Read this Programming Guide before and during any development work in SBPL. Keep
this Guide handy for future reference.
31$

SATO America, Inc.
10350A Nations Ford Road
Charlotte, NC 28273
Main Phone: (704) 644.1650
Technical Support: (704) 644.1660
Technical Support Fax: (707) 644.1661
E-Mail: satosale[email protected]
techsupport@satoamerica.com
www.satoamerica.com
Copyright 2009 SATO America, Inc.
All rights reserved.

i
TABLE OF CONTENTS
INTRODUCTION
About This Manual 1-2
Print Area Calculation 1-3
PROGRAMMING CONCEPTS
Programming Language 2-2
Selecting Protocol Codes 2-3
Using Basic 2-4
Print Position Commands 2-6
COMMAND CODE QUICK REFERENCE
A: <ESC>A Start Label 3-2
<ESC>~A Cut, Label 3-2
<ESC>~a Cut, Job 3-2
<ESC>~B Cut, Last 3-2
<ESC>AO Auto Online 3-2
<ESC>A1 Media Size 3-2
<ESC>& Form Overlay, Store 3-2
<ESC>AR Standard Print Area 3-2
<ESC>&R Form Overlay, Recall 3-2
<ESC>&S Form Overlay, Store 3-2
<ESC>* Clear (Memory Card) 3-3
<ESC>@ Offline/Pause 3-3
<ESC>A3 Start Point Correction 3-3
<ESC>AX Print Area Enlargement 3-3
B: <ESC>B Barcode, Ratio 1:3 3-4
<ESC>BC CODE 93 Barcode 3-4
<ESC>BD Barcode, Ratio 2:5 3-4
<ESC>BF Bookland 3-5
<ESC>BG CODE 128 Barcode 3-5
<ESC>BI UCC/EAN 128 3-5
<ESC>BJ True Type Font, Store 3-5
<ESC>BJD True Type Font, Download Bit Mapped Data 3-5
<ESC>BJF Card, Format 3-5
<ESC>BJS Print Memory Card Status 3-5
<ESC>BJT True Type Font, Recall 3-6
<ESC>BK PDF 417 3-6
<ESC>BP Postnet 3-6
<ESC>BQ QR Code 3-7
<ESC>BT Variable Ratio Barcodes 3-7
<ESC>BV Maxi Code 3-8
<ESC>BW Barcode Expansion 3-8
<ESC>BX Data Matrix Code 3-8
C: <ESC>C Repeat Label 3-8
<ESC>CC Card, Slot for Use 3-8
<ESC>CL CL/LF Deletion 3-9
<ESC>CS Print Speed 3-9
D: <ESC>D Barcode, Ratio 1:2 3-9
<ESC>d Barcode, Human Readable Information (HRI) 3-9
<ESC>DC Data Matrix Code, Data 3-9
<ESC>$ Font, Vector 3-10
<ESC>$= Outline Font Print 3-10
E: <ESC>E Line Feed 3-10
<ESC>EP Print End Position 3-10
<ESC>EU EAN/UCC Composite Symbol 3-10
<ESC>EX0 Print Length Expansion 3-10
F: <ESC>F Sequential Numbering 3-10
<ESC>FC Printing, Circles 3-11

ii
<ESC>FM Memory Cartridge Format 3-11
<ESC>FP Memory Cartridge Printing 3-11
<ESC>FT Printing, Triangles 3-11
<ESC>FW Printing, Lines & Boxes 3-11
<ESC>FX Data Matrix Code, Sequential Number 3-12
G: <ESC>G Graphics, Custom 3-12
<ESC>GC BMP File, Recall 3-12
<ESC>GI Graphic, Store 3-12
<ESC>GM Graphics, BMP File 3-12
<ESC>GP Graphics, PCX File 3-12
<ESC>GR Graphic, Recall 3-13
<ESC>GT BMP File, Store 3-13
H: <ESC>H Horizontal Print Position 3-13
I: <ESC>ID Job Store ID 3-13
J: <ESC>J Journal Printing 3-13
K: <ESC>K Custom Designed Characters, Recall 3-13
L: <ESC>L Character, Expansion 3-13
<ESC>LA Language 3-13
<ESC>LD User Download 3-14
<ESC>LF Online Feed 3-14
<ESC>LH Zero Slash 3-14
M: <ESC>M M Font 3-14
N: <ESC>NC Auto Feed, Cut 3-14
O: <ESC>OA OA Font 3-14
<ESC>OB OB Font 3-14
<ESC>OL Online 3-14
P: <ESC>P Character, Pitch 3-14
<ESC>( Reverse Image 3-14
<ESC>PC Flash ROM Setup 3-14
<ESC>#E Print Darkness 3-14
<ESC>% Rotate, Fixed Base Reference Point 3-14
<ESC>PG EEPROM Setup 3-14
<ESC>PI PCX File, Store 3-14
<ESC>PR Character, Fixed Spacing 3-14
<ESC>PS Character, Proportional Spacing 3-15
<ESC>PY PCX File, Recall 3-15
Q: <ESC>Q Print Quantity 3-15
R: <ESC>RD Font, Raster 3-15
<ESC>RF Recall and Print of Font & Logo 3-15
<ESC>RM Mirror Image 3-15
S: <ESC>S S Font 3-15
<ESC>/ Form Overlay, Recall 3-15
<ESC>/D Field, Recall 3-16
<ESC>/N Field, Store 3-16
T: <ESC>T Custom designed Characters 3-16
U: <ESC>U U Font 3-16
V: <ESC>V Vertical Print Position 3-16
W: <ESC>WA Calendar Printing 3-16
<ESC>WB WB Font 3-17
<ESC>WDH Copy Image Area (Partial Copy) 3-17
<ESC>WK Job Name 3-17
<ESC>WL WL Font 3-17
<ESC>WP Calendar Increment 3-17
<ESC>WT Calendar Configuration 3-17
X: <ESC>XB XB Font 3-17
<ESC>XL XL Font 3-18
<ESC>XM XM Font 3-18
<ESC>XS XS Font 3-18
<ESC>XU XU Font 3-18
Y: <ESC>YR Format, Recall 3-18
<ESC>YS Format, Store 3-18
Z: <ESC>Z Stop Label 3-18
<ESC>0 Replace Data (Partial Edit) 3-18

iii
STANDARD COMMAND CODES
Control Commands 4-2
<ESC>A Start Label 4-2
<ESC>Z Stop Label 4-2
<ESC>Q Print Quantity 4-3
<ESC>ID Job ID Store 4-4
<ESC>WK Job Name 4-5
Modification Commands 4-6
<ESC>L Character, Expansion 4-6
<ESC>P Character, Pitch 4-7
<ESC>PR Character, Fixed Spacing 4-8
<ESC>PS Character, Proportional Spacing 4-8
<ESC>% Rotate, Fixed Base Reference Point 4-9
<ESC>F Sequential Numbering 4-10
<ESC>FC Print, Circles 4-11
<ESC>FT Print, Triangles 4-12
<ESC>FW Print, Lines & Boxes 4-13
<ESC>( Reverse Image 4-14
<ESC>& Form Overlay, Store 4-15
<ESC>/ Form Overlay, Recall 4-16
<ESC>0 Replace Data (Partial Edit) 4-17
<ESC>WD Copy Image Area (Partial Copy) 4-18
<ESC>J Journal Printing 4-19
<ESC>RF Recall and Print of Font & Logo 4-20
<ESC>RM Mirror Image 4-21
Print Position Commands 4-22
<ESC>A1 Media Size 4-22
<ESC>H Horizontal Print Position 4-23
<ESC>V Vertical Print Position 4-23
Font Commands 4-24
<ESC>XB XB Font 4-24
<ESC>XL XL Font 4-24
<ESC>XM XM Font 4-24
<ESC>XS XS Font 4-24
<ESC>XU XU Font 4-24
<ESC>S S Font 4-24
<ESC>M M Font 4-24
<ESC>U U Font 4-24
<ESC>OA OA Font 4-24
<ESC>OB OB Font 4-24
<ESC>WB WB Font 4-25
<ESC>WL WL Font 4-25
<ESC>RD Font, Raster 4-26
<ESC>$ Font, Vector 4-27
<ESC>$= Outline Font Print 4-27
Barcode Commands 4-28
<ESC>B Barcode, Ratio 1:3 4-28
<ESC>BD Barcode, Ratio 2:5 4-28
<ESC>D Barcode, Ratio 1:2 4-28
<ESC>d Barcode, Human Readable Information (HRI) 4-31
<ESC>EU EAN/UCC Composite Symbol 4-32
<ESC>BC CODE 93 Barcode 4-33
<ESC>BF Bookland 4-34
<ESC>BG CODE 128 Barcode 4-35
<ESC>BI UCC/EAN 128 4-36
<ESC>BP Postnet 4-38
<ESC>BT Variable Ratio Barcodes 4-39
<ESC>BW Barcode Expansion 4-40
2D Code Commands 4-41
<ESC>BK PDF417 4-41
<ESC>BQ QR Code 4-42

iv
<ESC>BV Maxi Code 4-43
<ESC>BX Data Matrix Code 4-44
<ESC>DC Data Matrix Code, Data 4-45
<ESC>FX Data Matrix Code, Sequential Number 4-46
System Commands 4-47
<ESC>CS Print Speed 4-47
<ESC>#E Print Darkness 4-48
<ESC>NC Cutting Operation 4-49
<ESC>A3 Base Reference Point 4-50
<ESC>AR Print Area, Standard 4-51
<ESC>AX Print Area Enlargement 4-51
<ESC>EP Print End Position 4-51
<ESC>~a Cut, Job 4-52
<ESC>~A Cut, Label 4-53
<ESC>~B Cut, Last 4-54
<ESC>* Clear Print Jobs & Memory 4-55
<ESC>@ Offline/Pause 4-56
<ESC>OL Online 4-56
<ESC>C Repeat Label 4-57
<ESC>PG EEPROM Setup 4-58
<ESC>PC Flash ROM Setup 4-58
<ESC>I2 Serial Interface, Configuration 4-59
<ESC>IG Sensor Type Selection 4-60
<ESC>E Line Feed 4-61
<ESC>LD User Download 4-62
<ESC>LA Language 4-63
<ESC>CL CL/LF Deletion 4-63
<ESC>LH Zero Slash 4-64
<ESC>AO Auto Online 4-64
<ESC>LF Online Feed 4-65
<ESC>EX0 Print Length Expansion 4-66
Graphic Commands 4-67
<ESC>G Graphics, Custom 4-67
<ESC>GM Graphics, BMP File 4-68
<ESC>GP Graphics, PCX File 4-69
<ESC>WDH Copy Image Area 4-70
OPTIONAL COMMAND CODES
Calendar Commands 5-2
<ESC>WA Calendar Printing 5-2
<ESC>WP Calendar Increment 5-3
<ESC>WT Calendar Configuration 5-4
Memory Card Commands 5-5
<ESC>CC Card, Slot for Use 5-5
<ESC>BJF Card, Format 5-6
<ESC>FM Memory Cartridge Format 5-7
<ESC>FP Memory Cartridge Printing 5-7
<ESC>* Memory Card Clear 5-8
<ESC>BJS Print Memory Card Status 5-9
<ESC>BJT True Type Font, Recall 5-10
<ESC>BJ/BJD True Type Font, Store 5-11
<ESC>YR/ID Format/Field, Recall 5-12
<ESC>YS/IN Format/Field, Store 5-13
<ESC>&R Form Overlay, Recall 5-14
<ESC>&S Form Overlay, Store 5-15
<ESC>GC BMP File, Recall 5-17
<ESC>GT BMP File, Store 5-18
<ESC>PY PCX File, Recall 5-19
<ESC>PI PCX File, Store 5-20
<ESC>GR Custom Graphic, Recall 5-21
<ESC>GI Custom Graphic, Store 5-22
<ESC>T Character, Custom Designed 5-23

v
BI-DIRECTIONAL COMMUNICATIONS
Introduction 6-2
General Configuration 6-2
Serial Interface 6-2
Receive Buffer 6-2
Data Transmission 6-2
Enquire & Response 6-3
Enquire (SOH + ENQ) 6-3
Cancel (SOH + CAN) 6-3
Print Job 6-3
Print Stop (SOH + DLE) 6-3
Print Start (SOH + DC1) 6-4
Obtain History Data (SOH + LW) 6-4
Release Return Error (SOH + SUB) 6-4
Printer Status (SOH + MG) 6-4
Counter Status (SOH + ME) 6-5
Sensor Status (SOH + SG) 6-5
Head Status (SOH + HC) 6-5
System Version Information (SOH + SB) 6-5
Memory Status (SOH + EB) 6-5
Format Overlay Status (SOH + FO) 6-5
Font Configuration (SOH + FG) 6-5
Interface Status (SOH + IG) 6-5
Interface Settings (SOH + H2) 6-5
Item Number Check 6-6
BCC Check (Block Check Code) 6-6
Designation of Start Item Number (ESC + IQ) 6-6
Designation of Switching Status 5 Return (ESC+ PL) 6-7
Designation of Status 5 Return Check (ESC+ CR) 6-7
APPENDIX
Custom Characters & Graphics 7-2
Custom Designed Character Example 7-2
Custom Graphics Example 7-4
PCX Graphics Example 7-7
Custom Protocol Codes 7-9
Reference Tables 7-10
Table 1: Valid Commands (<ESC>L) 7-10
Table 2: Valid Commands (<ESC>P) 7-10
Table 3: Valid Commands (<ESC>PR) 7-10
Table 4: Valid Commands (<ESC>PS) 7-10
Table 5: Valid Commands (<ESC>%) 7-10
Table 6: Valid Commands (<ESC>F) 7-10
Table 7: Valid Commands (<ESC>&) 7-11
Table 8: Valid Commands (<ESC>/) 7-11
Table 9: Valid Commands (<ESC>H) 7-11
Table 10: Valid Commands (<ESC>V) 7-11
Table 11: Valid Commands (<ESC>XU, XS, XM, XB, XL) 7-11
Table 12: Character Font Set (<ESC>XU) 7-12
Table 13: Character Font Set (<ESC>XS) 7-12
Table 14: Character Font Set (<ESC>XM) 7-13
Table 15: Character Font Set (<ESC>XB) 7-13
Table 16: Character Font Set (<ESC>XL) 7-14
Table 17: Valid Commands (<ESC>OA, OB) 7-14
Table 18: Character Font Set (<ESC>OA) 7-15
Table 19: Character Font Set (<ESC>OB) 7-15
Table 20: Valid Commands (<ESC>RD) 7-16
Table 21: Valid Commands (<ESC>$) 7-16
Table 22: Valid Commands (<ESC>$=) 7-16
Table 23: Barcode Type (<ESC>B) 7-16
Table 24: Barcode Type (<ESC>BD) 7-17
Table 25: Barcode Type (<ESC>D) 7-17

vi
Table 26: CODE128 Data Values (<ESC>BG) 7-18
Table 27: Format ID List (<ESC>BX) 7-19
Table 28: Parameters (<ESC>PG) 7-19
Table 29: Parameters (<ESC>PC) 7-21
Table 30: Parameters (<ESC>LD) 7-22
Table 31: Valid Commands (<ESC>YS) 7-22
Table 32: Invalid Commands (<ESC>YS) 7-22
Table 33: Valid Commands (<ESC>&R) 7-23
Table 34: Valid Commands (<ESC>&S) 7-23
Table 35: Error Commands (<ESC>&S) 7-23
Table 36: Valid Commands (<ESC>/N) 7-24
Table 37: Specified Item Status 7-24
Table 38: Item Status In Process 7-24
SATO CONTACTS 8-1

Unit 1: Introduction
SATO GL4xxe SBPL Programming Reference Page 1-1
INTRODUCTION
• About This Manual
• Print Area Calculation

Unit 1: Introduction
SATO GL4xxe SBPL Programming Reference Page 1-2
ABOUT THIS MANUAL
This manual is laid out consistent with the product discussed and provides all of the information
required for printer programming.
This manual also incorporates the use of special information boxes. Examples of these boxes
and the type of information provided in each, are below.
A comprehensive Table Of Contents provided at the front of this manual facilitates rapid
movement within. The contents identify the different Units, Chapters, and Sections. Each
references the page number of their commencement.
The pages of this manual have embedded headers and footers to assist the user in identifying
his or her exact position within the manual. The header provides the unit number followed by its
name. The footer identifies the product on the left and the page number to the right side of the
page.
Page enumeration is two-part with each separated by a hyphen. The first character set
references the Unit and the second identifies the page number. Page numbers begin with the
numeral (1) one at the commencement of a new unit and ascends sequentially.
WARNING: PROVIDES INFORMATION THAT, IF UNHEEDED, MAY
RESULT IN PRESONAL INJURY.
CAUTION: PROVIDES INFORMATION THAT, IF UNHEEDED, MAY
RESULT IN EQUIPMENT DAMAGE.
NOTE: Provides helpful hints to assist in performing the tasks at hand.
LCD DISPLAY: Provides the specific display that should be visible on the
LCD at that point.

Unit 1: Introduction
SATO GL4xxe SBPL Programming Reference Page 1-3
PRINT AREA CALCULATION
Many print applications may not require labels that fill the entire printable area of the printer.
Therefore it is important to understand how to calculate print size so that the printed image does
not exceed the label size.
There are two axis to consider when calculating for print position; horizontal and vertical. The
horizontal axis is lateral positioning parallel with the print head and is measured from the right
side of the media to the left. The vertical axis is the label length from the front to its rear.
This juncture point of the horizontal and vertical axis is referred to as the Base Reference Point
(or zero point) and all measurement is incremental along those axis’ from there. The allowable
ranges for these references is dependent on the particular printer to accommodate different print
widths and resolutions.
A1 COMMAND
The A1 command is the preferred method of configuring the printer for media size. If using media
smaller than the print head width, use this command to specify the media size and adjust the
start position corresponding to that. The backing paper must be included in media size
considerations. This command would be as follows:
<A1>aaaaabbbb
a = Height of Label
b = Width of Label
A3 COMMAND
Before beginning to send code, one must perform some simple calculations to determine print
positioning. Firstly, determine the print resolution and maximum print width of the printer. This
information is provided in the Technical Data unit of the Operator Manual and Service Manuals.
The print resolution of the print head has a direct bearing on the “dots per inch” (DPI) of print
density. The corresponding formula for a 203 Resolution print head on a printer with 4.1
Maximum Print Width would be:
Resolution (DPI) x Maximum Printable Width (Linear Inches) =
Maximum Printable Width (Linear Dots)
203 (DPI) x 4.1 (Linear Inches) = 832 (Linear Dots)
Once this is done, one must calculate the label width in linear dots. That formula would be as
follows for a 2 inch wide label:
Resolution (DPI) x Label Width (Linear Inches) =
Label Width (Linear Dots)
203 (DPI) x 2.0 (Linear Inches) = 406 (Linear Dots)
NOTE: The valid ranges for each of the above may be found in the product
manuals.

Unit 1: Introduction
SATO GL4xxe SBPL Programming Reference Page 1-4
Lastly, one must calculate the horizontal distance to offset printing to accommodate for the
difference in size from the printer’s maximum printable width to the label width. That formula
would be as follows using the above examples:
Maximum Printable Width (Linear Dots) - Label Width (Linear Dots) =
Print Offset (Linear Dots)
832 (Linear Dots) - 406 (Linear Dots) = 426 (Linear Dots)
In the above example, 426 would be the required command entry to reset the initial base
reference point (or zero point) to the new base reference point (or zero point) based on the
label’s width.
Note that with each additional horizontal or vertical adjustment, the New Base Reference Point
will always be positioned relative to the last base reference point - not the Initial Base Reference
Point. In other words, the only way to return to the Initial Base Reference Point is to either
commands to reverse the prior commands or to delete all positioning commands to return the
printer to its default state.
Figure 1-1, Print Area Calculation
POWER ON LINE STATUS LABEL RIBBON
LINE FEED
Print Head
LABEL
LABEL
Label Width
Label Length
Maximum Printable Width
Initial Base Reference Point
Print Offset
New Base Reference Point

SATO GL4xxe SBPL Programming Reference Page 2-1
PROGRAMMING
CONCEPTS
• Programming Language
• Selecting Protocol Codes
• Using Basic
• Print Position Commands
• GL-specific Commands

Unit 2: Programming Concepts
SATO GL4xxe SBPL Programming Reference Page 2-2
PROGRAMMING LANGUAGE
A programming language for a printer is a familiar concept to most programmers. It is a group of
commands that are designed to use the internal intelligence of the printer. The commands, which
are referred to as SATO Command Codes, contain non-printable ASCII characters (such as
<STX>, <ETX>, <ESC>) and printable characters. These commands must be assembled into an
organized block of code to be sent as one data stream to the printer, which in turn interprets the
command codes and generates the desired label output. The programmer is free to use any
programming language available to send the desired data to the printer.
The printer command codes used are based upon “Escape” (1B hexadecimal) sequences.
Typically there are four types of command sequences:
<ESC>{Command}
These commands generally tell the printer to perform a specific action, like “clear the memory.”
<ESC>{Command} {Data}
Commands with this format tell the printer to perform a specific action which is dependent upon
the following data, like “print X labels”, where the value for X is contained in the data.
<ESC>{Command} {Parameter}
These commands set the operational parameters of the printer, like “set the print speed to 3.”
<ESC>{Command} {Parameter} {Data}
Some commands can contain both Parameter and Data elements, such as “print a Code 39
symbol containing the data.”

Unit 2: Programming Concepts
SATO GL4xxe SBPL Programming Reference Page 2-3
SELECTING PROTOCOL 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. Alternately, the user may define and download a set of custom
Protocol Control Codes (see Appendix D).
PROTOCOL CODES
CONTROL
CHARACTER
STANDARD
DSW2-7 OFF DESCRIPTION
STX 02 Hex Data start
ETX 03 Hex Data end
ESC 1B Hex Command Code to follow
ENQ 05 Hex Get printer status, Bi-Com Mode
CAN 18 Hex Cancel print job, Bi-Com mode
Off-Line 40 Hex Take printer Off-Line

Unit 2: Programming Concepts
SATO GL4xxe SBPL Programming Reference Page 2-4
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:
OPEN “COM1:9600,E,8,1,CS,DS”AS #1
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 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.
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$;"XL1SATO"; 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.
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 print the job.

Unit 2: Programming Concepts
SATO GL4xxe SBPL Programming Reference Page 2-5
PRINTING WITH THE RS232C PORT
5 REM CL612 Parallel Example Identifies the program as a CL612e 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.
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.
60 PRINT#1, E$; "H400"; E$; "V100"; E$;
"XL1SATO"
Sends the data “SATO” to be placed 400 dots
horizontally and 100 dots vertically on the label
and printed in the “XL” auto smoothed font.
50 PRINT #1, E$;"Q1"; Instructs the printer to print a quantity of one
label.
60 PRINT #1, E$; “Z”; Informs the printer that the last command has
been sent and printing can occur.
70 PRINT #1,CHR$ (3); Sends an <ETX> (ASCII Code decimal “3”)
informs the printer of message end.
Identifies the program as a CL612e RS232C port
print label. The “REM” prevents this data from
being sent to the printer and displays it only on
the screen.

Unit 2: Programming Concepts
SATO GL4xxe SBPL Programming Reference Page 2-6
PRINT POSITION COMMANDS
There are three methods using command codes to properly orient print images on a label. They
are as follows:
MEDIA SIZE COMMAND
The Media Size Command (<ESC>A1) allows specification of the label width and
length so the printer may automatically adjust itself relative to the command entry.
However, the label size specified and the actual label size must match.
Example: <ESC>A1aaaaabbbb
a = Label Length
b = Label Width
Figure 2-1, Media Measurement
BASE REFERENCE POINT COMMAND
The Base Reference Point Command (<ESC>A3) establishes the zero point of
the Horizontal and Vertical axis so the distance may be calculated in dots from
that point to the label’s edge. This command immediately follows the Data Start
Command.
Example: Label Width = total dots - = 406 dots
New Base Ref Point = Max Print Width - Label Width
= (dot quantity) - (406 dots) = 426 dots
Issue Base Reference Point command <ESC>A3 after the data Start command.
<ESC>A<ESC>A3H0426V0001. . . . . .
HORIZONTAL OFFSET COMMAND
Allows print image orientation by combining a part of both methods above by
establishing the media size and then orienting it through base reference point
adjustment.
Example: A Printer with 8-dpmm:
Label Width = 2" x 25.4 mm/in x 8 dpmm = 406 dots
New Base Reference Point = Maximum Print Width - Label Width
= (832 dots) - (406 dots) = 426 dots
Each <ESC>H command would have the value “426” added to it to correctly
position each field.
LABEL
Label Width
Label Length

Unit 2: Programming Concepts
SATO GL4xxe SBPL Programming Reference Page 2-7
The Command Code subsection contains a sample label output for each command code. These
samples reflect how the printed information would appear on a 4.25 inch wide label.
If you want to test any of the sample label outputs and are using labels less than five inches in
width, it is recommended that the Base Reference Point command be added to the data stream
to print the image onto the label.
The addition of the Base Reference Point command to the data stream will help adjust the print.
See the following two examples or refer to the Base Reference Point command description.
Example: <ESC>A
<ESC>H0050<ESC>V0100<ESC>L0303<ESC>XMSATO
<ESC>H0050<ESC>V0200<ESC>B103100*SATO*
<ESC>H0070<ESC>V0310<ESC>L0101<ESC>XUSATO
<ESC>Q1<ESC>Z
If using a 2 inch wide label, the entire image may not appear on the label. By adding the following
Base Reference Point command to the second line of the data stream, the base reference point
will be changed, causing the image to shift toward the inside of the printer where it can be printed
on the narrower label.
Example: M8400RVe data stream results in a 2 inch wide label:
<ESC>A
<ESC>A3H0406V0001
<ESC>H0050<ESC>V0100<ESC>L0303<ESC>XMSATO
<ESC>H0050<ESC>V0200<ESC>B103100*SATO*
<ESC>H0170<ESC>V0310<ESC>L0101<ESC>XUSATO
<ESC>Q1
<ESC>Z
The image is moved horizontally to the right 2 inches (406 dots) so that itcan be printed on a 2
inch wide label. For more information, see the Base Reference Point command description.
NOTE: The <ESC>A3 Base Reference Point command can also shift the
reference point in a negative direction (toward the outside edge of the label).

Unit 2: Programming Concepts
SATO GL4xxe SBPL Programming Reference Page 2-8
This page is left blank intentionally
Other manuals for GL408e
5
This manual suits for next models
1
Table of contents
Other SATO Label Maker manuals

SATO
SATO CL4NX RIDF User manual

SATO
SATO KENDO 22.6 User manual

SATO
SATO RWG500 User manual

SATO
SATO TG3 Series User manual

SATO
SATO CW408 User manual

SATO
SATO DR300 User manual

SATO
SATO Argox LK-200 Series User manual

SATO
SATO Argox O4-250 User manual

SATO
SATO s84ex User manual

SATO
SATO PB1 Series User manual