<ESC>BBarcode, Ratio 1:34-25
<ESC>BDBarcode, Ratio 2:54-25
<ESC>DBarcode, Ratio 1:24-25
<ESC>dBarcode, Human Readable Information (HRI)4-27
<ESC>BCCODE 93 Barcode4-28
<ESC>BGCODE 128 Barcode4-29
<ESC>BPPostnet4-30
<ESC>EUEAN/UCC Composite Symbol4-31
<ESC>WGSocket Port Number Settings5-8
<ESC>WHUser Name Specification5-9
<ESC>WIIP Setup Method Specification5-10
<ESC>W1IP Address5-11
<ESC>W2Subnet Maskings5-12
<ESC>W3Default Gateway Specification5-13
<ESC>W4SSID Settings5-14
<ESC>W5Channel Specification5-15
<ESC>W6WLAN Specification5-16
<ESC>W7Security Function Specification5-17
<ESC>W8WEP Key Specification5-18
<ESC>W9Authentication Specification5-19
BI-DIRECTIONAL COMMUNICATIONS
Introduction6-2
General Configuration6-2
Serial Interface6-2
Receive Buffer6-2
Data Transmission6-2
Return Status6-3
Enquire & Response6-5
Enquire (ENQ)6-5
Cancel (CAN)6-5
Print Job6-5
Printer Status (MG)6-5
Sensor Status (SG)6-7
Format Overlay Status (FO)6-7
Interface Status (IG)6-8
Battery Information (BI)6-8
System Version Information (SB)6-9
Memory Status (EB)6-9
Table 1:Character Font Set (<ESC>XU)7-8
Table 2:Character Font Set (<ESC>XS)7-9
Table 3:Character Font Set (<ESC>XM)7-10
Table 4:Character Font Set (<ESC>XB)7-11
Table 5:Character Font Set (<ESC>XL)7-12
Table 6:Character Font Set (<ESC>OA)7-13
Table 7:Character Font Set (<ESC>OB)7-14
Table 8:Barcode Type (<ESC>B)7-15
Table 9:Barcode Type (<ESC>BD)7-16
Table 10:Barcode Type (<ESC>D)7-17
Table 11:Character Font Set (<ESC>BC)7-18
Table 12:CODE128 Data Values (<ESC>BG)7-19
Table 13:Character Font Set (<ESC>2D10)7-21
Table 14:Barcode Type (<ESC>2D12)7-22
Table 15:Character Font Set (<ESC>2D12)7-23
Table 16:Character Font Set (<ESC>2D20)7-24
Table 17:Code128 Data Values (<ESC>2D30)7-25
Table 18:Code128 Data Values (<ESC>2D31)7-26
Table 19:Character Font Set (<ESC>2D32)7-27
Table 20:Character Font Set (<ESC>2D32)7-28
Table 21:Character Font Set (<ESC>2D32)7-29
Table 22:Character Font Set (<ESC>2D50)7-30
Table 23:Parameters (<ESC>PG)7-31
“i” Programming ReferencePN: 9001158B
Unit 1: Introduction
INTRODUCTION
•About This Manual
•Print Area Calculation
“i” Programming Reference
1-1PN: 9001158B
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.
ATTENTION: Provides information that is deemed of special importance but
will not result in personal injusry or product damage if unheeded.
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.
“i” Programming Reference
1-2PN: 9001158B
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 are
dependent on the particular printer to accommodate 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)
Lastly, one must calculate the horizontal distance to offset printing to accommodate 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 ensure that you send commands that represent your desired
reference point.
“i” Programming Reference
1-3PN: 9001158B
Unit 1: Introduction
Print Head
LABEL
LABEL
Label Width
Label Length
Maximum Printable Width
Initial Base Reference Point
Print Offset
New Base Reference Point
Figure 1-1, Print Area Calculation
“i” Programming Reference
1-4PN: 9001158B
Unit 2: Programming Concepts
PROGRAMMING
CONCEPTS
•Programming Language
•Selecting Protocol Codes
•Using Basic
•Print Position Commands
i Programming Reference
2-1PN: 9001158B
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.”
i Programming Reference
2-2PN: 9001158B
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 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).
It may be useful to test your printer using a BASIC program on a PC or to 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 port on 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 example uses Standard Protocol codes in BASIC.
PRINTING WITH THE RS232C PORT
5 REM Parallel ExampleIdentifies the program as a printer 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 label.
60 PRINT #1, E$; “Z”;Informs the printer that the last command has been sent
Sends the data “SATO” to be placed 400 dots horizontally
and 100 dots vertically on the label and printed in the“XL”
autosmoothed font.
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 printer RS232C port print label.
The “REM” prevents this data from being sent to the
printer and displays it only on the screen.
i Programming Reference
2-4PN: 9001158B
Unit 2: Programming Concepts
LABEL
Label Width
Label Length
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
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. . . . . .
i Programming Reference
2-5PN: 9001158B
Unit 2: Programming Concepts
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.
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.
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: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.
i Programming Reference
2-6PN: 9001158B
Unit 3: Code Quick Reference
COMMAND QUICK
REFERENCE
•A through Z (all commands)
“i” Programming Reference
3-1PN: 9001158B
Unit 3: Code Quick Reference
COMMAND QUICK REFERENCE
INSTRUCTIONDESCRIPTION
AStart Code. Begins all print jobs
A1aaaabbbbMedia Size. Specifies the label size.
aaaa=Label height in dots (0 to Vmax)
bbbb=Label width in dots (0 to Hmax)
&RForm 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.
*a,bbbClear Memory Card. Clears data stored on memory card.
a=Memory section to be cleared.
G: SATO graphics file (001 to 999)
F: Stored formats (001 to 999)
R: BMP graphic file (001 to 999)
bbb=Storage location to clear (001 to 999)
@,nn...nOffline/Pause. Signals the printer to go offline after upon job completion.
nn...n=Applicable only on models with an LCD. Message to be displayed
(maximum 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.