SATO E series,Pro series Programming Manual

AND
SERIES PRINTERS
PROGRAMMING
REFERENCE
SATO Group of Companies
438A Alexandra Road #05-01/ 02,
Alexandra Technopark,
Singapore 119967
Tel: 65-6271-2122
Fax: 65-6271-2151
Website: www.barcodesato.com
Email: sales@sato-int.com
SATO UK LTD
Valley Road, Harwich, Essex England
Co12 4RR, United Kingdom
Tel: 44-1255-240000
Fax: 44-1255-240111
Website: www.satouk.com
Email: enquiries@satouk.com
SATO POLSKA SP Z O.O.
Ul Okolna 2, 50-422 Wroclaw
Poland
Tel: 48-71-335-23-20
Fax: 48-71-335-23-25
Website: www.sato-europe.com
Email: info@sato-europe.com
SATO EUROPE NV
Leuvensesteenweg 369,
1932 Sint-Stevens-Woluwe, Brussels, Belgium
Tel: 32 (0)-2-788-80-00
Fax: 32 (0)-2-788-80-80
Website: www.sato-europe.com
Email: info@sato-europe.com
SATO DEUTSCHLAND GMBH
Schaberweg 28, 61348
Bad Homburg, Germany
Tel: 49 (0)-6-1726-8180
Fax: 49 (0)-6-1726-818-199
Website: www.sato-deutschland.de
Email: info@sato-deutschland.de
SATO AMERICA INC.
10350 Nations Ford Road Suite A,
Charlotte, NC 28273
Tel: 1-704-644-1650
Fax: 1-704-644-1662
Website: www.satoamerica.com
Email: satosales@satoamerica.com
SATO SHANGHAI CO, LTD
11 Floor, D, Pudong South Road 1111,
Pudong New Area, Shanghai,
China 200120
Tel: 86 (0)-21-58307080
Fax: 86 (0)-21-58307978
Website: www.barcodesato.com
Email: sales@satochina.com
SATO BAR CODE & LABELLING SDN BHD
Suite B-08-11&12, Block B Plaza Mont'
Kiara, No.2, Jalan Kiara Mont' Kiara,
50480 Kuala Lumpur, Malaysia
Tel: 60-3-6203-5950
Fax: 60-3-6203-1209
Website: www.barcodesato.com
Email: sales@satosbl.po.my
BAR CODE SATO ELECTRONICS (S) PTE LTD
438A Alexandra Road #05-01/02,
Alexandra Technopark, Singapore 119967
Tel: 65-6271-5300
Fax: 65-6273-6011
Website: www.barcodesato.com
www.satosingapore.com
Email: sales@satosingapore.com
BARCODE SATO (THAILAND) CO., LTD
370/8 Supattra Building, 5th Floor, Rama9
Road, Bangkapi, Huay Kwang
Bangkok 10320, Thailand
Tel: 662-719-7780-3
Fax: 662-719-7784
Website: www.barcodesato.com
Email: sales@satothailand.co.th
SATO M-84PRO ii
Programming Manual
iii e & Pro Series
Warranty and Copyright
SATO Europe NV makes no guarantee of any kind with regard to this material, including, but not limited to, the implied guaranties of merchantability and fitness for a particular purpose.
SATO Europe NV shall not be liable for errors contained herein or for any incidental con­sequential damages in connection with the furnishing, performance, or use of this mate­rial.
This document contains proprietary information which is protected by copyright.
All rights are reserved.
No part of this document may be reproduced or issued to third parties in any form what­soever without the express permission of SATO Europe NV.
The information in this document is subject to change without notice.
© Copyright 2003 SATO Europe NV.
TABLE OF CONTENTS
SECTION 1. PROGRAMMING CONCEPTS
The SATO Programming Language............................................................................... 1-1
Selecting Protocol Control Codes ..................................................................................1-2
Using Basic ....................................................................................................................1-2
The Print Area ................................................................................................................1-4
Rotated Fields ................................................................................................................1-8
Command Default Settings ............................................................................................1-9
Opposite Hand “Se” Printers ........................................................................................ 1-10
SECTION 2. COMMAND CODES
Bar Codes ......................................................................................................................2-2
Bar Codes, Expansion ................................................................................................... 2-7
Bar Codes, Variable Ratio ............................................................................................. 2-8
Base Reference Point .................................................................................................2-10
Characters,Custom-Designed...................................................................................... 2-12
Character Expansion.................................................................................................... 2-14
Character, Fixed Spacing............................................................................................. 2-15
Character Pitch ........................................................................................................... 2-16
Character, Proportional Spacing .................................................................................2-18
Clear Print Job(s) & Memory ....................................................................................... 2-19
Continuous Forms Printing .......................................................................................... 2-20
Copy Image Area ........................................................................................................2-21
Cut ............................................................................................................................... 2-23
Cut Job ........................................................................................................................2-24
Cut Last .......................................................................................................................2-25
Fonts U, S, M, OA, OB, XU, XS & XM ........................................................................2-26
Font, Raster ................................................................................................................. 2-28
Font, Vector..................................................................................................................2-29
Fonts WB, WL, XB & XL .............................................................................................. 2-31
Form Feed ................................................................................................................... 2-33
Form Overlay, Recall ................................................................................................... 2-34
Form Overlay, Store ....................................................................................................2-35
SATO Programming Reference v
Table of Contents
Graphics, Custom ....................................................................................................... 2-36
Graphics, BMP............................................................................................................. 2-38
Graphics, PCX ............................................................................................................. 2-39
Job ID Store ................................................................................................................. 2-40
Job Name .................................................................................................................... 2-41
ournal Print .................................................................................................................. 2-42
Lines and Boxes ......................................................................................................... 2-43
Line Feed .................................................................................................................... 2-45
Media Size ................................................................................................................... 2-46
Mirror Image ................................................................................................................ 2-47
Off-Line/Pause ............................................................................................................ 2-48
Postnet ........................................................................................................................2-49
Print Darkness ............................................................................................................ 2-50
Print Length, Expanded .............................................................................................. 2-51
Print Position................................................................................................................ 2-53
Print Quantity .............................................................................................................. 2-55
Print Speed .................................................................................................................. 2-56
Repeat Label................................................................................................................ 2-57
Replace Data (Partial Edit) ......................................................................................... 2-58
Reverse Image ............................................................................................................ 2-60
Rotate, Fixed Base Reference Point ........................................................................... 2-62
Sequential Numbering ................................................................................................ 2-64
Start/Stop Label ........................................................................................................... 2-66
SECTION 3. CALENDAR COMMANDS
Increment .......................................................................................................................3-2
Print ............................................................................................................................... 3-4
Set ................................................................................................................................. 3-6
SECTION 4. EXPANDED MEMORY
Clear Expanded Memory ............................................................................................... 4-2
Fonts, TrueType Recall.................................................................................................. 4-3
Fonts, TrueType Store .................................................................................................. 4-4
Format/Field Recall........................................................................................................ 4-5
Format/Field Store ........................................................................................................ 4-6
Form Overlay Recall ..................................................................................................... 4-7
vi SATO Programming Reference
Form Overlay Store .......................................................................................................4-8
BMP Graphics Recall .....................................................................................................4-9
BMP Graphics Store ................................................................................................... 4-10
Graphics, Custom Recall ............................................................................................. 4-11
Graphics, Custom Store .............................................................................................. 4-12
Graphics, PCX Recall ..................................................................................................4-14
Graphics, PCX Store....................................................................................................4-15
Initialize ....................................................................................................................... 4-16
Memory Area Select..................................................................................................... 4-17
Status .......................................................................................................................... 4-18
SECTION 5. TWO-DIMENSIONAL SYMBOLS
Data Matrix, Data Format...............................................................................................5-2
Data Matrix, Print Data...................................................................................................5-5
Data Matrix, Sequential Numbering ...............................................................................5-6
Table of Contents
Maxicode........................................................................................................................5-8
TPDF417......................................................................................................................5-10
QR Code ......................................................................................................................5-12
SECTION 6. CONFIGURATION COMMANDS
Custom Protocol Command Codes Download............................................................... 6-2
Printer Setting ............................................................................................................... 6-4
Pitch Offset.....................................................................................................................6-7
Print Mode .....................................................................................................................6-8
Print Type ...................................................................................................................... 6-9
Sensor Type ................................................................................................................6-10
Serial Interface Parameters ........................................................................................ 6-11
CR/LF Delete ............................................................................................................... 6-12
Zero Slash....................................................................................................................6-13
Auto Online .................................................................................................................. 6-14
Online Feed.................................................................................................................. 6-15
Test Print......................................................................................................................6-16
SECTION 7. BI-DIRECTIONAL COMMUNICATIONS
ENQUIRE/ACK/NAK ......................................................................................................7-2
Status Response............................................................................................................7-2
SATO Programming Reference vii
Table of Contents
COMMAND CODE QUICK REFERENCE
Basic Commands...........................................................................................................A-1
Calendar Commands ...................................................................................................A-10
Expanded Memory Commands ...................................................................................A-11
Configuration Commands ............................................................................................A-14
Legacy Commands ......................................................................................................A-15
APPENDIX B. BAR CODE SPECIFICATIONS
Codabar .........................................................................................................................B-2
Code 39 .........................................................................................................................B-3
Interleaved Two of Five (I 2/5) .......................................................................................B-4
UPC-A/EAN-13 ..............................................................................................................B-5
EAN-8 ............................................................................................................................B-7
Industrial Two of Five.....................................................................................................B-8
Matrix Two of Five..........................................................................................................B-9
Code 128 .....................................................................................................................B-10
MSI...............................................................................................................................B-11
Code 93 .......................................................................................................................B-12
UPC-E..........................................................................................................................B-13
Bookland (UPC/EAN Supplements).............................................................................B-14
UCC-128 ......................................................................................................................B-15
Postnet.........................................................................................................................B-17
Data Matrix...................................................................................................................B-18
Maxicode......................................................................................................................B-20
PDF417........................................................................................................................B-22
Code 128 Character Table...........................................................................................B-23
APPENDIX C. CUSTOM CHARACTERS AND GRAPHICS
Custom Designed Character Example...........................................................................C-1
Custom Designed Graphics Example ............................................................................C-4
PCX Graphics Example .................................................................................................C-8
viii SATO Programming Reference
APPENDIX D. CUSTOM PROTOCOL COMMAND CODES
Description .................................................................................................................... D-1
Download Command Structure ..................................................................................... D-2
Reset............................................................................................................................. D-2
Download Procedure..................................................................................................... D-3
Table of Contents
SATO Programming Reference ix
SATO Programming Reference Page 1-1
SECTION 1.
PROGRAMMING CONCEPTS
INTRODUCTION
This section presents the commands that are used with the SATO Series “e” and PRO printers to produce labels with logos, bar codes and alphanumeric data. All of the SATO Programming Language commands use the same syntax. Some commands reference a physical point on the label using horizontal and vertical dot reference numbers. The allowable range for these references is dependent upon the particular printer to accomodate different print widths and resolutions. These differences are noted in tables under the commandsaffected
The following information is presented in this section:
• The SATO Programming Language
• Selecting Protocol Control Codes
• Using Basic
• The Print Area
• Command Codes
THE SATO 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 command codes used by the printers 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}
Section 1. Programming Concepts
Page 1-2 SATO Programming Reference
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.”
SELECTING PROTOCOL CONTROL 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 E).
The Protocol Control codes are selected by DIP switch DSW2-7.
USING BASIC
It may be useful to test your printer using a BASIC program on a PC. You may also write your actual production programs in BASIC. Whatever the reason, if you will be working in BASIC, some of the following hints may help you get started:
1. 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 one line and do not contain any <CR> and/or <LF> characters. If these characters are needed, they are explicitly noted by the inclusion of <CR> and<LF> notations.
CONTROL
CHARACTER
STANDARD
DSW2-7 OFF
NON-STANDARD
DSW2-7 ON
DESCRIPTION
STX 02 Hex 7 B Hex = { Start of Data
ETX 03 Hex 7 D Hex= } End of Data
ESC 1B Hex 5 5 E Hex = Command code to follow
ESC 1B Hex 5E Hex = ^ Command code to follow
ENQ 05 Hex 40 Hex = @ Get printer status, Bi-Com mode
CAN 18 Hex 21 Hex = ! Cancel print job, Bi-Com mode
Off-Line 40 Hex 5D Hex = ] Take printer Off-Line
Section 1. Programming Concepts
SATO Programming Reference Page 1-3
2. If you are using the printer’s RS232C interface, it is necessary to set the COM porton on the PC such that the CTS and DSR signals will be ignored. Send your OPEN “COM” statement in the following way:
OPEN “COM1:9600,E,8,1,CS,DS”AS #1
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
PRINTING WITH THE RS232C 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 displays it only on thescreen.
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 tothe
LPT1 parallel port
40 LPRINT E$;"H400";E$;"V100";E$;"XL1SATO"; Sends the data “SATO” to be to be placed
400 dots horizontally and 100dots 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.
REM CL612 RS232 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.
Section 1. Programming Concepts
Page 1-4 SATO Programming Reference
THE PRINT AREA
The maximum print area for the different printer models is listed in Table 1. Many of your label applications may not require labels that fill the entireprint area, therefore it is important to understand how to work with labelsthat do not use the entire print area. The goal is to help you avoid printing where no label exists, which may lead to print head damage, not to mentionfrustration when you cannot see the printed output.
The diagram below illustrates the maximum print area and a sample 2 inch wide by 3 inch long label placed within this area. As can be seen, your label will be oriented against the inside left edge of the printer as viewed from the front of the printer. The normal reference point is located at the H1, V1 position of the print area in the normal print orientation (no rotation).
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” autosmoothed font.
50 PRINT #1, E$;"Q1"; Instructs the printer to print a quantity of
one label.
60 PRINT #1, E$; “Z”; Tells the printer that the last
commandhas been sent. The printer can nowcreate and print the job.
70 PRINT #1,CHR$ (3); Sends an <ETX> (ASCII Code decimal
“3”) to the printer telling it that this is the end of the message. 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.
Section 1. Programming Concepts
SATO Programming Reference Page 1-5
l
There are three methods available to make sure your printed output will appear correctly on your label. They are as follows:
Table 1: Print Area
CL412e
M-84 Pro-3
CL612e
M-10e
M-8490Se
M-84 Pro-6
M-5900RVE
M-8459E
M-8485Se
CL608e
M-8460Se
CL408e
M-8400RVe
M-84 Pro-2
Resolution dpi/dpmm
305
12
305
12
305
12
305
12
609
24
203
8
203
8
203
8
203
8
Max Print Width (Hmax) dots/inches/mm
1248
4.1
104
1984
6.5
165
6400
10.5
266.7
1344
4.4
112
2496
4.1
104
896
4.4
112
1024
5.0
128
1216
6.0
152
832
4.1
104
Std Print Length (Vmax) dots/inches/mm
2136
7.0
178
2136
7.0
178
3600
11. 8 300
2136
7.0
178
4272
7.0
178
2136
7.0
178
1424
7.0
178
1424
7.0
178
1424
7.0
178
Expanded Print Length (Vmax Expanded) dots/inches/mm
9999
32.8 833
9999
32.8 833
10080
16.5 420
9999
32.8 833
9999
16.4 416
9999
49.2
1249
9999
49.2
1249
9999
49.2
1249
9999
49.2
1249
Section 1. Programming Concepts
Page 1-6 SATO Programming Reference
1. Media Size Command. Use the <ESC>A1 Media Size Command. This command specifies the width and length of the label. The printer will automatically calculate the correct offsets for printing labels of that size. However, if you specify a label size with this command, the labels loaded should match the size specified to cor­rectly position the label.
2. Base Reference Point Command. Send the <ESC>A3 Base Reference Point command as part of your data to the printer to set a new base reference point for your label.
Calculate the distance (in dots) from the normal base reference point to the clos­est edge of the label.
For an M-8400RVe 8 dpmm printer , this would be:
LABEL WIDTH = 2" X 25.4 MM/IN X 8 DPMM = 406 DOTS
The new Base Reference Point then becomes:
NEW BASE REFERENCE POINT = MAXIMUM PRINT WIDTH - LABEL WIDTH
= (832 DOTS) - (406 DOTS) = 426 DOTS
Issue the Base Reference Point command <ESC>A3 after the Start command in your data stream.
<ESC>A<ESC>A3H0426V0001. . . . . .
This resets the reference point for all the following data.
3. Add the correct offset to all horizontal commands. Use the normal base refer- ence point from the print area and use the horizontal position for each field to properly locate it on the label.
Calculate the distance (in dots) from the normal base reference point to the clos­est edge of the label.
For an M-8400RVe 8 dpmm printer:
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 posi­tion 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 five inch wide label. If you want to test any of the sample label outputs and are using labels less than five inches in width, we suggest that you add the Base Reference Point command to the data stream in order for the images to print on your labels.
You must be careful not to print off the label surface as the label provides a heat sink
Section 1. Programming Concepts
SATO Programming Reference Page 1-7
for the print head elements. Doing so will cause irrepairable damage to the head. This damage is not covered under the print head warranty. The addition of the Base Reference Point command to the sample data stream may help to adjust the print for your labels. See the following two examples or refer to the Base Reference Point command description.
For example, the following illustrates a sample data stream for a M-8400RVe printer and the resulting label assuming a 4 inch wide label:
<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 you are using a 2 inch wide label, the entire image may not appear on your 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 theimage to be shifted over toward the inside of the printer where it can beprinted on the narrower 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.
Section 1. Programming Concepts
Page 1-8 SATO Programming Reference
ROTATED FIELDS
The M-8400RVe printer can rotate each print field in 90° increments using the Rotate command.
• <ESC>% - The field rotates, but the base reference point for the field remains
the same.
The following data stream will rotate the print field but will not change the base reference point of the field:
<ESC>A<ESC>%1<ESC>V800<ESC>H200<ESC>L0202<ESC>XB1E<ESC>Q1<ESC>Z
Section 1. Programming Concepts
SATO Programming Reference Page 1-9
COMMAND DEFAULT SETTINGS
There are some types of commands that must have a value specified before a label can be printed. If the data stream does not contain these commands, a default value is assumed. The commands and the corresponding default values are:
COMMAND DEFAULT NOTE
Print Rotation (1)
Vertical Reference Point 0 (1)
Horizontal Reference Point 0 (1)
Character Pitch 2 ( 1)
Base Reference Point H=0, V=0 (2)
Character Expansion 1 (1)
Print Darkness - (1)(3)
Print Speed (DSW2-8 = On) - (2)(3)
Print Speed (DSW2-8 = Off) - (2)(3)
Proportional Spacing Enabled (1)
Cutter Command Disabled (1)
Section 1. Programming Concepts
Page 1-10 SATO Programming Reference
NOTES:
1. The settings for these commands will revert to the default value when the printer receives an <ESC>Z or an <ESC>*.
2. The values transmitted with these commands will remain in effect until a new command is received.
3. This default setting is printer dependent.
OPPOSITE HAND”SE” PRINTERS
The standard “Se” print engine is referred to as a“right-hand”printer (i.e., when facing the Control Panel, the label comes out from left to right). The M-8485Se, M-8460Se and M-8490Se are also available in a “left-hand” (i.e., the label comes out right-to-left) version. The M-8459Se is only available in the standard Right-Hand configuation.
The only difference in the print area is the horizontal base reference point for the label.With the standard “Se” printer, the reference point is the first print position
nearest the inside frame. With the “left-hand” version, the reference point is the first print position away from the frame. The same command stream sent to both printers should print an identical label except the image may be shifted because of the relative positioning of the label under the print head.
SECTION 2.
COMMAND CODES
This section contains the basic Command Codes for the SATO “e” and PRO Series printers. Commands for the oprions and specialized functions are provided in the following sections. Commands must be sent to the printer in an organized fashion in order for the label(s) to print.
The purpose of this section is to:
• Explain the different commands and provide examples of their usage.
• To provide a detailed reference for programming the printers.
Each command begins on a separate page with its own heading. A uniform layout is used to help you find key information about each command. For each Command Code in this section, there will be a sample data input stream to the printer and the expected print output. By studying the examples, you can learn how to use the particular command within a whole block of printer code. Pay particular attention to the “Special Notes” with each command to learn other important information.
The subject commands are highlighted in bold letters in the Reference Sheets. There are two parts of most, but not all, commands. The first is the command character which immediately follows the <ESC> code. It is always an upper case alpha or a special character (such as an “&” or a “%”). It is never a lower case alpha character. If the command requires additional variable information, it is represented by a group of lower case alpha characters immediately following the command character. For example, if an aaaabb is listed following the basic command, the printer will look for six characters immediately following the command. The first four would represent the value of aaaa and the next two the value of bb.
The maximum number of characters defined in a parameter is represented by the number of characters shown in the command structure. For example, a command followed by an aaaa can have up to four characters. In general, commands with only one parameter following the command can be entered without the leading zeroes. However, certain commands require the exact number of matching characters. A command with two parameters listed following the command code without a comma delimiter, such as aaaabbbb require the exact number of digits to be entered. If the value of aaaa is “800” and the value of bbbb is “300”, then the parameters must be entered as “08000300”. It is recommended that you make it a practice to always enter leading zeros to prevent any mistakes.
NOTE: These examples assume the use of the Standard Protocol Command
Codes, a parallel interface and a 5 inch wide label in a M-8400RVe printer. The labels for all other printers will be similar, but, because of different resolutions and print widths may be larger or scaled differently.
An alphabetical listing of the command codes is contained in Appendix A:Command Code Quick Reference.
SATO Programming Reference Page 2-1
Section 2: Command Codes
Bar Codes
Command Structure 1:3 narrow/wide bar ratio: <ESC>Babbcccd
2:5 narrow/wide ratio: <ESC>BDabbcccd
1:2 narrow/wide bar ratio: <ESC>Dabbcccd
a= 0 Codabar
1 Code 39 2 Interleaved 2 of 5 (I 2/5) 3 UPC-A / EAN-13 4 EAN­5 Industial 2 of 5 6 Matrix 2 of 5 7 reserved 8 reserved 9 reserved A MSI B reserved C Code 93 D reserved E UPC-E F Bookland G Code 128 I UCC 128
bb = Number of dots (01-12) for narrow bar and narrow
space
ccc = Bar height in dots (001-999)
d = UCC 128 only. Not used for other bar code types
0 No human readable text 1 Human readable at top 2 Human readable at bottom
Example: <ESC>BD103200
Placement: Immediately preceding data to be encoded
Default: None
Command Function To print bar code images on a label. With this command, there are 14
standard bar code symbologies available to be printed and three two dimensional symbols (see Section 5. Two Dimensional Symbols). Each of the bar code symbologies are unique, and it is important to know the differences. See Appendix B for specific information on using each individual bar code symbol.
SATO Programming Reference PN 9001096 Rev. A Page 2-3
Section 2: Command Codes
Input to Printer
<ESC>A <ESC>H0025<ESC>V0025<ESC>B103100*CODE 39* <ESC>H0155<ESC>V0130<ESC>XS*CODE 39* <ESC>H0025<ESC>V0200<ESC>BD20210045676567 <ESC>H0075<ESC>V0310<ESC>XM45676567 <ESC>H0025<ESC>V0375<ESC>BD30215001234567890 <ESC>H0025<ESC>V0600<ESC>BD50210012345 <ESC>H0175<ESC>V0710<ESC>XS12345 <ESC>H0025<ESC>V0775<ESC>BD60210012345 <ESC>H0105<ESC>V0885<ESC>XS12345 <ESC>H0025<ESC>V0950<ESC>BA03100123455 <ESC>H0095<ESC>V1060<ESC>XS12345 <ESC>H0025<ESC>V1125<ESC>BC03100081234ABCD <ESC>H0080<ESC>V1240<ESC>XS1234ABCD <ESC>H0525<ESC>V0025<ESC>B002100A12345B <ESC>H0565<ESC>V0135<ESC>XS12345 <ESC>H0475<ESC>V0200<ESC>BD303100123456789012 <ESC>H0525<ESC>V0375<ESC>BD4031001234567 <ESC>H0525<ESC>V0550<ESC>DE03100123456 <ESC>H0500<ESC>V0600<ESC>OB0 <ESC>H0533<ESC>V0655<ESC>OB123456 <ESC>H0350<ESC>V0725<ESC>D30315009827721123 <ESC>L0101<ESC>H0320<ESC>V0800<ESC>OB0 <ESC>H0365<ESC>V0878<ESC>OB98277 <ESC>H0505<ESC>V0878<ESC>OB21123 <ESC>H0665<ESC>V0760<ESC>BF0313021826 <ESC>H0680<ESC>V0730<ESC>OB21826 <ESC>H0425<ESC>V1125<ESC>D30315000633895260 <ESC>L0101<ESC>H0395<ESC>V1200<ESC>OB0 <ESC>H0440<ESC>V1278<ESC>OB06338 <ESC>H0580<ESC>V1278<ESC>OB95260 <ESC>H0730<ESC>V1155<ESC>BF0314024 <ESC>H0745<ESC>V1125<ESC>OB24 <ESC>H0325<ESC>V0950<ESC>BG03100>GAB>B789>C123456 <ESC>H0435<ESC>V1055<ESC>XSAB789123456 <ESC>Q1<ESC>Z
Note: Carriage Returns and Line Feeds have been added to the command listing for
clarity and should not be included in the actual data stream.
Page 2-4 SATO Programming Reference
Section 2: Command Codes
Printer Output
SATO Programming Reference PN 9001096 Rev. A Page 2-5
UCC-128 Without Incrementing
<EXC>A<EXC>H0100<EXC>V0100 <EXC>B107150101234567000000001 <ESC>Q2<ESC>Z
Section 2: Command Codes
With Incrementing
<ESC>A<ESC>H0100<ESC>V0100 <ESC>F001+001<ESC>B107150101234567000000001 <ESC>Q2<ESC>Z
Page 2-6 SATO Programming Reference
Section 2: Command Codes
Special Notes 1. UPC and EAN bar codes are not affected by the different types of
narrow to wide ratios. Instead, the <ESC>D command adds descender bars to these codes where needed to meet UPC specifi­cations. The <ESC>BD command puts desender bars and human readable text below the symbol.
2. The Code 128, UCC 128, MSI, and Code 93 bar codes are not affected by the narrow to wide ratios.
3. The Codabar, Code 39, Industrial 2 of 5, and Matrix 2 of 5 bar codes are affected by the Character Pitch command. This command must be placed before the Bar Code command.
4. Because of their unique characteristics, two-dimensional (2D) sym­bols are covered separately.
5. For UCC128, the FNC1 code is automatically inserted and the Mod 10 and Mod 103 check digits are automatically calculated. For the MSI bar code, the check digit is not automatically calculated.
6. The <ESC>D and <ESC>BD commands are not valid for the MSI, Code 128, Code 93, UPC-E, Bookland, UCC128 and Postnet sym­bologies.
SATO Programming Reference PN 9001096 Rev. A Page 2-7
Section 2: Command Codes
Bar Codes, Expansion
Command Structure <ESC>BWaabbb
aa = Expansion factor by which the width of all bars and
spaces will be increased (01-12)
bbb = Bar height by dot (004-999 dots)
Example: <ESC>BW02100
Placement: Immediately follows the <ESC>BT command and
precedes data to be encoded.
Default: None
Command Function This command works together with the <ESC>BT command to specify an
expansion factor and the bar code height for the particular symbol being printed.
Input to Printer
Printer Output
Special Notes 1. This command must be preceded by the Variable Ratio Bar Codes
<ESC>A
<ESC>H0050<ESC>V0050<ESC>BT101030103 <ESC>BW04100*1234* <ESC>Q1<ESC>Z
<ESC>BT command.
2. The following bar codes will be affected by the Character Pitch com­mand: Codabar, Code 39, Interleaved 2 of 5, Matrix 2 of 5.
Page 2-8 SATO Programming Reference
Section 2: Command Codes
Bar Codes, Variable Ratio
Command Structure <ESC>BTabbccddee
a = Bar Code Symbol:
bb = Narrow space in dots (01-99)
cc = Wide space in dots (01-99)
dd = Narrow bar in dots (01-99)
ee = Wide bar in dots (01-99)
0 Codabar 1 Code 39 2 Interleaved 2 of 5 5 Industrial 2 of 5 6 Matrix 2 of 5
Example: <ESC>BT101030103
Placement: Following print position commands and preceding
<ESC>BW
Default: Current setting
Command Function To print a bar code with a ratio other than those specified through the
standard bar code commands (B,BD, and D). This is done through individual control of each of the bar code elements (bars, spaces) as shown above. Remember that this command only applies to the five bar code types shown.
Input to Printer <ESC>A
<ESC>H0050<ESC>V0050<ESC>BT101030103 <ESC>BW03100*1234* <ESC>Q1<ESC>Z
Printer Output
SATO Programming Reference PN 9001096 Rev. A Page 2-9
Section 2: Command Codes
Special Notes 1. This command must be immediately followed by the <ESC>BW Bar
Code Expansion command.
2. You may use only one variable ratio bar code per label.
3. If the data specified in this command is incorrect, the command is ignored and the ratio used will be based on the previous setting.
Page 2-10 SATO Programming Reference
Section 2: Command Codes
Base Reference Point
Command Structure <ESC>A3H-aaaa-Vbbbb
-
aaaa
bbbb
Example:
Placement: Preceding all images that are based on the new base
Default: Current V and H offset setting in the printer
Command Function To establish a new base reference point for the current label. The base
reference point is the top left corner or ìoriginî from where all print position commands are based. This command may be very helpful when using labels less than four inches wide to place images on the printable label surface. It may also be used to move images past preprinted fields on a label.
Input to Printer <ESC>A<ESC>L0202
<ESC>H0025<ESC>V0025<ESC>WB0MNORMAL REFERENCE POINT <ESC>A3H0300V0075 <ESC>H0100<ESC>V0050<ESC>WB0MNEW REFERENCE POINT <ESC>Q1<ESC>Z
This character is optional. When present, it specifies
=
that The horizontal offset is in the negative direction. If it is left out the offset direction is positive.
Horizontal Print Offset (-Hmax to +Hmax)
=
Vertical Print Offset (-Vmax to +Vmax)
=
<ESC>A3H100V0050
reference point
configuration
Printer Output
SATO Programming Reference PN 9001096 Rev. A Page 2-11
Section 2: Command Codes
Special Notes 1. Use of this command will set the Vertical/Horizontal Offset setting of
the printer configuration until a new Base Reference Point command is issued or the setting is changed from the operator panel.
2. This command may be used more than once in a print job.
3. An alternative to using this command is to make changes to your cur­rent Horizontal and Vertical Print Position commands.
Example: Let us say the current base reference point is H=1, V=1 and you wish to move all the fields on your label downward vertically by 150 dots. You could either (1) add the Base Reference Point command or (2) change all the vertical position commands by an additional 150 dots.
4. For a more detailed example of the Base Reference Point command, see Section 1. Print Area.
5. The "Se" print engines can print as close as 2 mm to the inside edge of the label.
6. The printers will not “wrap” (i.e. if any part of a character or image extends beyond the last print dot position, it will disappear and not be visible on any part of the label).
7. See Table 1 in Section 1. Programming Concepts for values of Hmax and Vmax.
Page 2-12 SATO Programming Reference
Section 2: Command Codes
Characters,Custom-Designed
Command Structure Store Command: <ESC>Tabcc
Recall Command: <ESC>Kab90cc
a = 1 16x16 matrix
2 24x24 matrix
b= Specifies the character encoding method for the data
stream H Hexadecimal characters B Binary characters
cc = Memory location to store/recall the character. Valid
memory locations are 21 to 52 (counting in Hex) or “!” or “R” in Binary.
(data) = Data to describe the character
Example: <ESC>T1H3F
<ESC>K1H903F See Appendix C for a more detailed explanation
Placement: The Store command is typically sent in its own data
stream to the printer, between the Start/Stop commands. The Recall command is sent in a secondary data stream to print the character, and follows any necessary position or size commands.
Default: None
Command Function To allow for the creation, storage, and printing of custom characters, such
as special fonts or logos. Up to 50 individual characters may be stored in the custom character volatile memory.
Printer Input See Appendix C for a detailed explanation.
<ESC>A <ESC>T1H3F0100038007C00FE01FF03FF87FFCFFFE
07C007C007C007C007C007C007C007C0
<ESC>Z
<ESC>A <ESC>H150<ESC>V100<ESC>L0505<ESC>K1H903F <ESC>H350<ESC>V100<ESC>L1010<E SC>K1H903F <ESC>Q1 <ESC>Z
SATO Programming Reference PN 9001096 Rev. A Page 2-13
Loading...
+ 169 hidden pages