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
BAR CODE SATO ELECTRONICS (S) PTE
438A Alexandra Road #05-01/02,
Alexandra Technopark, Singapore 119967
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
Website: www.barcodesato.com
Email: sales@satothailand.co.th
LT D
Tel: +65-6271-5300
Fax: +65-6273-6011
Tel: +662-719-7780-3
Fax: +662-719-7784
SATO CX Series Printer
Warning
It is essential that the safety and operating procedures contained within
this manual be brought to the attention of, and are used by, all personnel
likely to operate this printer/product.
This printer/product must only be used for the purpose for which it was
designed.
In the case of fire, water must not be used on the product to extinguish the
fire, and the appropriate type of fire extinguisher should be readily available.
No modifications, either mechanical or electrical, should be made to this
printer/product or accessory without the written consent of SATO Europe
GmbH. Any modifications made without this consent may invalidate guarantee
claims.
Other manuals relating to this printer include additional information relating to
other aspects of the safe operation of the printer, and are available from your
SATO supplier.
All consumable waste, such as the label backing paper and used carbon ribbon must be disposed of carefully, and in a manner that will cause the minimum of environmental pollution.
Should you have any doubts regarding the setting, operating or any safety
aspects of this printer/product, please contact your SATO supplier.
SATO Europe GmbH makes no guarantee that all the features described in this
manual are available in all models, and, due to SATO’s policy of continuous
development and improvement, specifications are liable to change, without
notice.
Consumables
Always use SATO carbon ribbons or equivalent. The use of incorrect materials
may cause malfunctions of the printer and void the warranty.
Conventions
Text that appears bold italic and all in capitals such as LABEL refers to a key
or an LED on the operation panel.
Text that appears enclosed in brackets such as <ESC> refers to an Escape
sequence of a data string.
Text that appears bold italic such as On-Line refers to a function or to a result.
Text that appears in bold such as VR1 refers to electrical components like
pins, resistors connectors and so on.
SATO CX Series Printer
Warranty and Copyright
SATO Europe GmbH 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 GmbH shall not be liable for errors contained herein or for any
incidental consequential damages in connection with the furnishing, performance, or use of this material.
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 whatsoever without the express permission of SATO Europe GmbH.
The information in this document is subject to change without notice.
Print Darkness Fine Adjustment ........................................ 100
Print Test Label ................................................................. 102
Set Print Mode ..................................................................103
Set RS232 Parameters ...................................................... 104
Set Sensor Type ................................................................ 105
Back Feed Enable ............................................................. 106
iii
SATO CX Series Printer
This page is intentionally left blank.
iv
SATO CX Series Printer
CX SERIES PROGRAMMING GUIDE
CX SERIES PROGRAMMING GUIDE
CX SERIES PROGRAMMING GUIDECX SERIES PROGRAMMING GUIDE
INTRODUCTION
This section presents the commands that are used with the SATO CX printers
to produce labels with logos, bar codes and alphanumeric data.
The following information is presented in this section:
❒The SATO Programming Language
❒Selecting Protocol Control Codes
❒Using Basic
❒The Print Area
❒Printer Configuration
❒Command Codes
THE SATO PROGRAMMING LANGUAGE
THE SATO PROGRAMMING LANGUAGE
THE SATO PROGRAMMING LANGUAGETHE 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 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.”
1
SATO CX Series Printer
<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
SELECTING PROTOCOL CONTROL CODES
SELECTING PROTOCOL CONTROL CODESSELECTING 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.
The Protocol Control Code set is made up of six special characters. The Standard Protocol Control codes are non-printable characters. They can be changed to printable characters using the Protocol Control code down-load
command. This 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.
The Protocol Control codes must be down-loaded from the host using the
<ESC>LD command (See page 97). Once they are down-loaded, the printer
will not respond to standard protocol codes. The current protocol codes active
in a printer can be determined by printing a Test Label (see CX Series User’s
Guide).
Control
Control
Control Control
Character
Character
CharacterCharacter
STX02Start of Data
ETX03End of Data
ESC1BCommand Code to follow
ENQ05Not used on CX Series
CAN18Not used on CX Series
Off-Line40Take printer off-line
USING BASIC
USING BASIC
USING BASICUSING 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:
HEX Value
HEX ValueDescription
HEX ValueHEX Value
Description
DescriptionDescription
2
SATO CX Series Printer
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.
2. If you are using the printer’s RS232 interface, it is necessary to set
the COM port 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 RS232 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 these
hints. Both of these examples use the Standard Protocol codes.
Printing with the Parallel Port
Printing with the Parallel Port
Printing with the Parallel PortPrinting with the Parallel Port
5REM Parallel ExampleIdentifies the program as a
parallel port print label. The
“REM” prevents this data from
being sent to the printer and
displays it only on the screen.
10E$=CHR$(27)Sets the “E$” string as an
<ESC> character
20WIDTH “LPT1:”,255Sets the width of the output to
255 characters
30LPRINT E$;"A";Sends an “<ESC>A” com-
mand code to the LPT1 parallel port
40LPRINT E$;"H400";E$;"V100";E$;"WL1SATO";Sends the data “SATO” to be
to be placed 400 dots horizontally and 100 dots vertically on
the label and printed in the
“WL” font.
3
SATO CX Series Printer
50LPRINT E$;"Q1";Instructs the printer to print
one label.
60LPRINT E$; “Z”;Tells the printer that the last
command has been sent. The
printer can now create and
print the job.
Printing with the RS232 Port
Printing with the RS232 Port
Printing with the RS232 PortPrinting with the RS232 Port
5 REM RS232 ExampleIdentifies the program as a
RS232 port print label. The
“REM” prevents this data from
being sent to the printer and
displays it only on the screen.
10E$=CHR$(27)Sets the “E$” string as an
<ESC> character.
20OPEN “COM1:9600,N,8,1,CS,DS” AS #1Opens the COM1 port for out-
put 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.
30PRINT #1,CHR$ (2);Sends an <STX> (ASCII Code
a decimal “2”) to the printer
instructing it to prepare to
receive a message.
40PRINT #1,E$;"A";Sends an “<ESC>A” com-
mand code to Print Port #1
opened by statement 20
above.
50PRINT #1, E$;"H400";E$;"V100";E$;"WL0SATO"; Sends the data “SATO” to be
to be placed 400 dots horizontally and 100 dots vertically on
the label and printed in the
“WL” font.
60PRINT #1, E$;"Q1";Instructs the printer to print a
quantity of one label.
70PRINT #1, E$; “Z”;Tells the printer that the last
command has been sent. The
printer can now create and
print the job.
80PRINT #1,CHR$ (3);Sends an <ETX> (ASCII Code
decimal “3”) to the printer telling it that this is the end of the
message.
4
SATO CX Series Printer
ROTATED FIELDS
ROTATED FIELDS
ROTATED FIELDSROTATED FIELDS
The printers can rotate each print field in 90° increments using the Rotate
command. There are two variations of this command.
•<ESC>% - The field rotates, but the base reference point for the field
remains the same.
•<ESC>R - The field and the base reference point rotate.
The following data stream will rotate the print field but will not change the
base reference point of the field:
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
CommandDefault
CommandCommand
Print Rotation
DefaultNote
DefaultDefault
0°
Note
NoteNote
(1)
5
SATO CX Series Printer
Command
CommandDefault
CommandCommand
Vertical Reference Point0(1)
Horizontal Reference Point0(1)
Character Pitch2(1)
Base Reference PointH=0, V=0(2)
Character Expansion1(1)
Print Darkness3(1)
Print Speed75 mm/second(2)
NOTES:
(1) The settings for these commands will revert to the default value when the
printer receives an <ESC>Z or an <ESC>*.
(2) These values transmitted with these commands will remain in effect until
a new command is received.
PRINTER CONFIGURATION
PRINTER CONFIGURATION
PRINTER CONFIGURATIONPRINTER CONFIGURATION
The CX Series printers are different from other SATO models in that they do
not use DIP switches for printer configuration. Instead, all printer configuration is done via software commands. The parameters that can be configured
are:
❒Sensor Calibration
❒Protocol Codes
❒Print Darkness Range
❒Sensor Type
❒RS232 Parameters
❒Label Tear-Off Position
❒Back-feed Enable/Disable
Because there are no DIP switches to indicate the current printer settings, a
Test Label can be printed that lists the active settings in the printer. This Test
Label lists all of the information a user needs to ascertain the printer configuration. Test Labels can be printed out by sending a command via software
(See page 102) or by using the FEED and On-LINE/Off-Line Indicator buttons
on the control panel (see the CX Series User’s Guide).
This section contains all the printer Command Codes. The 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.
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. In the above example, you could enter either
“809” or “0809”. However, certain commands require the exact number of
matching characters. A command with two parameters listed following the
command code, 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.
7
SATO CX Series Printer
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=Bar Code Symbol
bb=Number of dots (01-12) for narrow bar and
ccc=Bar height in dots (001-600)
d=UCC 128 only. Not used for other bar code ty-
Example:<ESC>BD103200
Placement:Immediately preceding data to be encoded
Default:None
Bar Codes
Bar Codes
Bar CodesBar Codes
0 Codabar
1Code 39
2 Interleaved 2 of 5 (I 2/5)
3 UPC-A / EAN-13
4EAN-8
AMSI
CCode 93
EUPC-E
F Bookland
G Code 128
IUCC 128
narrow space
pes
0 No human readable text
1 Human readable at top
2 Human readable at bottom
Command Function
To print bar code images on a label. With this command, there are 13 standard bar code symbologies available to be
printed and three two dimensional symbols (Two Dimensional bar code symbols (See page 88)).
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 specifications. The <ESC>BD command puts descender 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 and Code 39 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
symbols are covered separately(See page 88).
5. For UCC128, the FNC1 code is automatically inserted
and the Mod 10 and Mod 103 check digits are automatically calculated.
6. For the MSI bar code, the check digit is not automatically
calculated.
7. To select UPC-A, 11 digits of data is sent. The printer
adds a “0” and automatically generates the check digit.
If 12 digits of data are sent, the printer assumes an EAN13 symbol and automatically generates the check digit.
The last digit of the bar code data is a modulo 10 check
digit. If 13 digits of data are sent to the printer, the check
digit is not created and must be supplied by the programmer. It must be the last character of the 13 digit
string.
12
Bar Codes, Expansion
Bar Codes, Expansion
Bar Codes, ExpansionBar Codes, Expansion
Command Structure
<ESC>BWaabbb
aa=Expansion factor by which the width of all bars
bbb=Bar height by dot (004-600 dots)
Example:<ESC>BW02100
Placement:Immediately follows the <ESC>BT command
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.
1. This command must be preceded by the Variable Ratio
Bar Codes <ESC>BT command(See page 15)).
2. The following bar codes will be affected by the Character
Pitch command:
Codabar, Code 39 and Interleaved 2 of 5.
14
Bar Codes, Variable Ratio
Bar Codes, Variable Ratio
Bar Codes, Variable RatioBar 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)
Example:<ESC>BT101030103
Placement:Following print position commands and prece-
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 three bar code types shown.
1. This command must be immediately followed by the
<ESC>BW Bar Code Expansion command (See page
13).
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.
16
Base Reference Point
Base Reference Point
Base Reference PointBase Reference Point
Command Structure
<ESC>A3H-aaaaVbbbb
-=This character is optional. When present, it
aaaa=Horizontal Print Offset (-0832 to +0832)
bbbb=Vertical Print Offset (0001 to 1424)
Example:<ESC>A3H100V0050
Placement:Preceding all images that are based on the
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 pre-printed
fields on a label.
SATO CX Series Printer
specifies that the horizontal offset is in the negative direction. If it is left out the offset direction is positive.
new base reference point.
configuration
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
17
SATO CX Series Printer
Printer Output:
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.
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 current Horizontal and Vertical Print Position
commands (See page 57).
Example:
Let’s 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 “Print Area” in this section(See page 5).
5. The CX Series 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).
Store Command:<ESC>Tabcc
Recall Command:<ESC>Kab90cc
a=1 16x16 matrix
b=Specifies the character encoding method for
cc=Memory location to store/recall the character.
Example:<ESC>T1H3F
Placement:The Store command is typically sent in its own
Default:None
SATO CX Series Printer
2 24x24 matrix
the data stream
H Hexadecimal characters
B Binary characters
Valid memory locations are 21 to 52 (counting
in Hex or “!” to “R” in Binary
<ESC>K1H903F
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.
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.
1. When printing the custom character using the <ESC>K
Recall command, the character is affected by the following commands:
Character Expansion, (See page 21)
Character Pitch, (See page 24)
Line Feed, (See page 50)
Rotate, Fixed Base Reference Point, (See page 66))
Rotate, Moving Base Reference Point, (See page 68)
2. The characters are stored in volatile memory and must
be reloaded if the printer power is lost.
3. Do not use ASCII <CR> or <LF> characters within the
graphic data or the actual image will not be printed as
specified.
Character Expansion
Character Expansion
Character ExpansionCharacter Expansion
Command Structure
<ESC>Laabb
aa=Multiple to expand horizontally (01- 04)
bb=Multiple to expand vertically (01- 04)
Example:<ESC>L0304
Placement:Preceding the data to be expanded
Default:<ESC>L0101
Command Function
To expand characters independently in both the horizontal
and vertical directions. The command allows you to enlarge
the base size of each font up to 4 times in either direction. Expanded characters are typically used for added emphasis or
for long distance readability.
2. Fonts U, S, M, XU, XS, XM, OA & OB (See page 33), and
fonts WB, WL, XB and XL, (See page 35).
3. This command will also affect the following commands:
Character Pitch, (See page 24).
Characters, Custom-Designed, (See page 19).
4. The Character Expansion value is in effect for the current
print job until a new expansion command is specified.
5. The Line and Box command, if used within the data
stream, may return all subsequent text to the default
expansion of 1 x 1. Therefore, either send the Character
Expansion command before all printed data, or send
Line and Box commands last, preceding the <ESC>Q
Quantity command.
22
Loading...
+ 86 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.