<ESC>BCCODE 93 Barcode3-4
<ESC>BDBarcode, Ratio 2:53-4
<ESC>BFBookland3-5
<ESC>BGCODE 128 Barcode3-5
<ESC>BIUCC/EAN 1283-5
<ESC>BJTrue Type Font, Store3-5
<ESC>BJDTrue Type Font, Download Bit Mapped Data3-5
<ESC>BJFCard, Format3-5
<ESC>BJRTrue Type Font, Bit Mapped Data Recall3-6
<ESC>BJSPrint Memory Card Status3-6
<ESC>BJTTrue Type Font, Recall3-6
<ESC>BKPDF 4173-7
<ESC>BPPostnet3-7
<ESC>BQQR Code3-8
<ESC>BTVariable Ratio Barcodes3-8
<ESC>BVMaxi Code3-9
<ESC>BWBarcode Expansion3-9
<ESC>BXData Matrix Code3-9
C:<ESC>CRepeat Label3-9
<ESC>CCCard, Slot for Use3-9
<ESC>CITransition to SBI Mode3-10
<ESC>CLCL/LF Deletion3-10
<ESC>CSPrint Speed3-10
D:<ESC>DBarcode, Ratio 1:23-10
<ESC>dBarcode, Human Readable Information (HRI)3-10
<ESC>DCData Matrix Code, Data3-10
<ESC>DLTransition to Download Mode3-11
<ESC>$Font, Vector3-11
<ESC>$=Outline Font Print3-11
<ESC>BBarcode, Ratio 1:34-28
<ESC>BDBarcode, Ratio 2:54-28
<ESC>DBarcode, Ratio 1:24-28
<ESC>dBarcode, Human Readable Information (HRI)4-31
<ESC>BCCODE 93 Barcode4-32
<ESC>BFBookland4-33
<ESC>BGCODE 128 Barcode4-34
<ESC>BIUCC/EAN 1284-35
<ESC>BPPostnet4-37
<ESC>BTVariable Ratio Barcodes4-38
<ESC>BWBarcode Expansion4-39
<ESC>ICInternal Buffer, Data Comparison4-82
<ESC>I*Internal Buffer, Data Print4-83
<ESC>ITData Transmission4-84
<ESC>IOExternal Signal, Input/Output4-85
<ESC>IWPrint Time Delay4-86
<ESC>IMLCD4-87
<ESC>IUBuzzer, Enable/Disable4-88
<ESC>IYExclusive Use of Display, Initiation/Termination4-89
<ESC>I#Exclusive Use of Key, Initiation/Termination4-90
<ESC>IZKey Entry4-91
<ESC>IKLabel Feed Control4-92
General Configuration6-2
Serial Interface6-2
Receive Buffer6-2
Data Transmission6-2
Enquire & Response6-3
Enquire (SOH + ENQ)6-3
Cancel (SOH + CAN)6-3
Print Job6-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
PN 9001149A
Font Configuration (SOH + FG)6-5
Interface Status (SOH + IG)6-5
Interface Settings (SOH + H2)6-5
Item Number Check6-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 & Graphics7-2
Cutsom Designed Character Example7-2
Custom Graphics Example7-4
PCX Graphics Example7-7
Custom Protocol Codes7-9
Reference Tables7-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:Parameter A & B Comparison (<ESC>RD)7-16
Table 22:Valid Commands (<ESC>$)7-16
Table 23:Valid Commands (<ESC>$=)7-16
Table 24:Barcode Type (<ESC>B)7-16
Table 25:Barcode Type (<ESC>BD)7-17
Table 26:Barcode Type (<ESC>D)7-17
Table 27:CODE128 Data Values (<ESC>BG)7-18
Table 28:Format ID List (<ESC>BX)7-19
Table 29:Parameters (<ESC>PG)7-19
Table 30:Parameters (<ESC>PC)7-20
Table 31:Parameters (<ESC>LD)7-22
Table 32:Parameter Commands (<ESC>IB)7-22
Table 33:Input/Output Direction (<ESC>IO)7-23
Table 34:Valid Commands (<ESC>YS)7-23
Table 35:Invalid Commands (<ESC>YS)7-23
Table 36:Valid Commands (<ESC>&R)7-24
Table 37:Valid Commands (<ESC>&S)7-24
Table 38:Error Commands (<ESC>&S)7-24
Table 39:Valid Commands (<ESC>/N)7-25
Table 40:Printer Configuration Commands7-25
Table 41:Specified Item Status7-26
Table 42:Item Status In Process7-26
PN 9001149A
INTRODUCTION
•About This Manual
•Print Area Calculation
SATO E+ Programming ReferencePN 9001149APage 1-1
Unit 1: Introduction
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.
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.
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, the manual’s part number in the center, 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.
SATO E+ Programming ReferencePN 9001149APage 1-2
Unit 1: Introduction
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 accomodate different print
widths and resolutions.
A1 COMMAND
The A1 command is the prefered 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
NOTE: The valid ranges for each of the above may be found in the product
manuals.
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)
SATO E+ Programming ReferencePN 9001149APage 1-3
Unit 1: Introduction
Lastly, one must calculate the horizontal distance to offset printing to accomodate 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:
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.
POWER
ON LINE
STATUS LABEL RIBBON
LINE
FEED
Print Head
LABEL
LABEL
Label Length
Label Width
Maximum Printable Width
New Base Reference Point
Print Offset
Initial Base Reference Point
Figure 1-1, Print Area Calculation
SATO E+ Programming ReferencePN 9001149APage 1-4
PROGRAMMING
CONCEPTS
•Programming Language
•Selecting Protocol Codes
•Using Basic
•Print Position Commands
SATO E+ Programming ReferencePN 9001149APage 2-1
Unit 2: Programming Concepts
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.”
SATO E+ Programming ReferencePN 9001149APage 2-2
Unit 2: Programming Concepts
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 NonStandard 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).
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 porton 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 ExampleIdentifies 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”,255Sets 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 commandhas been
sent. The printer can nowcreate and print the job.
SATO E+ Programming ReferencePN 9001149APage 2-4
Unit 2: Programming Concepts
PRINTING WITH THE RS232C PORT
5 REM CL612 Parallel ExampleIdentifies 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 #1Opens 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"
50 PRINT #1, E$;"Q1";Instructs the printer to print a quantity of one
60 PRINT #1, E$; “Z”;Informs the printer that the last command has
70 PRINT #1,CHR$ (3);Sends an <ETX> (ASCII Code decimal “3”)
Sends the data “SATO” to be placed 400 dots
horizontally and 100 dots vertically on the label
and printed in the“XL” autosmoothed font.
label.
been sent and printing can occur.
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.
SATO E+ Programming ReferencePN 9001149APage 2-5
Unit 2: Programming Concepts
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 autmatically 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
LABEL
Label Length
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.
SATO E+ Programming ReferencePN 9001149APage 2-6
Unit 2: Programming Concepts
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).
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.
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:
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.
SATO E+ Programming ReferencePN 9001149APage 2-7
COMMAND QUICK
REFERENCE
•A through Z (all commands)
SATO E+ Programming ReferencePN 9001149APage 3-1
Unit 3: Command Quick Reference
COMMAND QUICK REFERENCE
INSTRUCTIONDESCRIPTION
AStart Code. Begins all print jobs
~AaaaaCut, Label. Specifies the number of labels to print between each cut. It is
independent of the Quantity command.
aaaa=Number of labels between each cut
~aaaaCut, Job. Cuts labels at a specified interval in a print job. Quantity of labels
printed is equal to the product of the quantity specified x the value of aaaa.
aaaa=Number of labels between each cut (0001 to 9999)
~BCut, Last. Cuts any printed labels that remain in the printer.
AOaAuto Online. Allows the automatic online on power up setting to be
enabled or disabled.
a=0: Powers up in the online mode
1: Powers up in the offline mode
A1aaaabbbbMedia Size. Specifies the label size.
aaaa=Label height in dots (0 to Vmax)
bbbb=Label width in dots (0 to Hmax)
&Store Form Overlay. Stores a specified label image in the printer’s volatile
form overlay memory.
ARNormal Print Length. This command resets the printer to the Standard
print length (7 inches).
&RaaForm Overlay, Recall. Recalls a label image previously stored in
Expanded Memory.
aa=Storage number (00 to 99)
&S,aa,bbbb,ccccForm Overlay, Store. Stores a label image in Expanded Memory.
aa=Storage number (00 to 99)
bbbb=Horizontal size of window to be stored (50 to Hmax)
cccc=Vertical size of window to be stored (50 to Vmax)
A(space)ZForm Feed. Feeds a blank tag or label.
SATO E+ Programming ReferencePN 9001149APage 3-2
Unit 3: Command Quick Reference
COMMAND QUICK REFERENCE
INSTRUCTIONDESCRIPTION
*a,bbbClear Memory Card. Stores a label image in Expanded Memory.
a=Memory section to be cleared.
G: SATO graphics file (001 to 999)
P: PCX graphics file (001 to 999)
F: Stored formats (001 to 999)
O: TrueType fonts, memory card (001 to 009)
R: BMP graphic file (001 to 999)
bbb=BMP graphic file (001 to 999)
@,nn...nOffline/Pause. Signals the printer to go offline after upon job completion.
nn...n=Optional message to be displayed on the LCD (max 32
characters).
A3H-aaaa-VbbbbBase Reference Point. Establishes a new base reference point position
for the current label. Units of measurement are dots.
-=Optional character.If included, will shift reference point in
negative direction.
aaaa=Horizontal reference point
bbbb=Vertical reference point
AXPrint Area Enlargement. This command sets the printer to the Expanded
print length (14 inches). <ESC>EX0 is the recommended replacement.