8. Custom Characters And Graphics ............................................. 201
8.1Custom-designed Character Example ............................ 201
8.2PCX Graphics Example .................................................. 211
iv
Programming Manual1. Introduction
1.Introduction
This manual presents the commands that are used with the SATO RISC
Printers to produce labels with logos, bar codes and alphanumeric data.
All of the RISC 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 commands
affected.
H
Introduction
H
Command Codes
H
Command Codes Quick Reference
H
Command Codes Specifications
H
Interface Specification
H
Troubleshooting
H
Custom Protocol Command Codes
H
Custom Characters And Graphics
SATO RISC Printers7
1. IntroductionProgramming Manual
1.1The SATO RISC Programming Language
A programming language for a printer is a familiar concept to most programmers.Itisagroup of commands that are designedto use the internal
intelligence of the printer. The commands, which are referred to as RISC
Command Codes, contain non-printable ASCII characters (such as
<STX>, <ETX>, <ESC>) and printable characters. These commands
mustbe assembled into anorganizedblockofcode to besent 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 SATO
RISC printer.
The command codes used by the SATO RISC 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}
These commands set the operational parameters of the printer, like “set
Some commands can contain both Parameter and Data elements, such
as “print a Code 39 symbol containing the data.”
1.3Selecting Protocol Control Codes
Protocol codes are the special control characters that prepare the printer
to receiveinstructions. Forexample, the <ESC> character tells theprinter
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 setis 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 characterscannotbe sent from the
host. This manual uses the Standard Protocol Control codes for all of the
examples. Alternately,the user maydefine and download a set of custom
Protocol Control Codes.
8SATO RISC Printers
Programming Manual1. Introduction
The Protocol Control codes are selected by a DIP switch DSW2-7 (Refer
to the Operation Manual,).
Control
Character
STX02 Hex7B Hex = {Start of Data
ETX03 Hex7D Hex = }End of Data
ESC1B Hex5E Hex = ^Command Code to follow
NULL7E Hex7E Hex = ~Cutter Command
ENQ05 Hex40 Hex = @Get printer status, Bi-Com
CAN18 Hex21 Hex = !Cancel print job, Bi-Com
Standard
DSW2-7
OFF
NonStandard
DSW2-7 ON
Description
mode
mode
1.4Using 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 auto-
matically 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
3. 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.
SATO RISC Printers9
1. IntroductionProgramming Manual
4. 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.
1.5Printing with the Parallel Port
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” command
code to the LPT1 parallel port
40LPRINT E$;"H400";E$;"V100";E$;"XL1SATO";Sends thedata “SATO” to be to
be placed 400 dots horizontally
and 100 dots vertically on the
label and printed in the “XL”
font.
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.
10SATO RISC Printers
Programming Manual1. Introduction
1.6Printing with the RS232 Port
10E$=CHR$(27)Sets the “E$” string as an
<ESC> character.
20OPEN “COM1:9600,N,8,1,CS,DS”AS #1;Opens the COM1 port for out-
put and sets the parameters as
9600 baud, No parity, 8 Data
bits, 1 Stop bit and instructs the
porttoignoretheCTSand DSR
control signals.
30PRINT #1,CHR$ (2);Sends an <STX> (ASCII Code
a decimal “2”) to the printer
instructing i t to prepare to
receive a message.
50PRINT #1,E$;"A";Sends an “<ESC>A” command
codetoPrint Port #1openedby
statement 20 above.
60PRINT #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.
50PRINT #1, E$;"Q1";Instructs the printer to print a
quantity of one label.
60PRINT #1, E$; “Z”;Tells the printer that the last
command has been sent. The
printer can now create and print
the job.
70PRINT #1,CHR$ (3);Sends an <ETX> (ASCII Code
decimal“3”) totheprintertelling
it that this is the end of the message.
SATO RISC Printers11
1. IntroductionProgramming Manual
1.7The Print Area
The maximum print area for the various RISC printers are listed in the
table on the next pages. Most of your label applications will not require
tags/labels that fill the entire print area, therefore it is important to understand how to work with labels that 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 mention frustration when you cannot see the
printed output..
Max print widthMax print width
Label
50 x 75mm
OEM right-hand and
desktop printer
Max print length
Label feed direction
Base reference point
OEM left-hand
printer
Label
50 x 75mm
The diagram above illustrates the maximum print area and a sample
50mm wide by 75mm 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 base reference point is located at
theH1, V1 position of theprint area in the normal print orientation (no rotation)
12SATO RISC Printers
Programming Manual1. Introduction
Print Area for CL Printers.
CL 408CL 412CL 608 (VA)CL 612 (VA)
Resolution203 dpi
8 dot/mm
Max print
width
832 dots
4.1 in.
104 mm
Max label
width
Standard
print length
5.0 in.
128 mm
1424 dots
7.0 in.
178 mm
Expanded
print length
using
2848 dots
14.0 in.
356 mm
<ESC>AX
Expanded print length with memory card
128 Kb1257 dots
6.2 in.
157 mm
512 Kb5038 dots
24.8 in.
629 mm
305 dpi
12 dot/mm
1248 dots
4.1 in.
104 mm
5.0 in.
128 mm
2136 dots
7.0 in.
178 mm
4272 dots
14.0 in.
356 mm
838 dots
2.7 in.
69 mm
3359 dots
10.9 in.
278 mm
203 dpi
8 dot/mm
1216 dots
6.0 in.
152 mm
7.0 in.
178 mm
1424 dots
7.0 in.
178 mm
2848 dots
14.0 in.
356 mm
860 dots
4.2 in.
107 mm
3447 dots
16.9 in.
430 mm
305 dpi
12 dot/mm
1984 dots
6.5 in.
165 mm
7.0 in.
178 mm
2136 dots
7.0 in.
178 mm
4272 dots
14.0 in.
356 mm
1
528 dots
1.7 in.
44 mm
2113 dots
6.9 in.
176 mm
1Mb
2Mb
9999 dots
49.2 in.
1249 mm
9999 dots
49.2 in.
1249 mm
2
6720 dos
22.0 in.
560 mm
9999 dots
32.8 in.
833 mm
2
6896 dots
33.9 in.
862 mm
9999 dots
49.2 in.
1249 mm
2
4227 dots
13.6 in.
352 mm
8455 dots
27.7 in.
704 mm
2
1.) When a memory card is used to expand the print length, the card capacity is
used instead, not in addition to, the internal memory.
2.) Limited by the digits in the command field.
SATO RISC Printers13
1. IntroductionProgramming Manual
Print Area for S-Type Printers
M8485SM4890SM8460SM8459S
Resolution203 dpi
8 dot/mm
Max print
width
1024 dots
5.0 in.
128 mm
Max label
width
Standard
print length
5.2 in.
134 mm
1424 dots
7.0 in.
178 mm
Expanded
print length
using
2848 dots
14.0 in.
356 mm
<ESC>AX
Expanded print length with memory card
128 Kb1022 dots
5.0 in.
127 mm
512 Kb4094 dots
20.1 in.
511 mm
305 dpi
12 dot/mm
1344 dots
4.4 in.
112 mm
5.2 in.
134 mm
2136 dots
7.0 in.
178 mm
4272 dots
14.0 in.
356 mm
778 dots
2.5 in.
64 mm
3119 dots
10.1 in.
259 mm
203 dpi
8 dot/mm
1216 dots
6.0 in.
152 mm
6.4 in.
165 mm
1424 dots
7.0 in.
178 mm
2848 dots
14.0 in.
356 mm
860 dots
4.2 in.
107 mm
3447 dots
16.9 in.
430 mm
203 dpi
8 dot/mm
896 dots
4.4 in.
112 mm
5.2 in.
134 mm
1424 dots
7.0 in.
178 mm
2848 dots
14.0 in.
356 mm
1
1186 dots
5.7 in.
146 mm
4678 dots
23.0 in.
584 mm
1Mb
2Mb
8190 dots
40.3 in.
1023 mm
9999 dots
49.2 in.
1249 mm
2
6240 dos
20.4 in.
520 mm
9999 dots
32.8 in.
833 mm
2
6896 dots
33.9 in.
862 mm
9999 dots
49.2 in.
1249 mm
2
9360 dots
46.0 in.
1170 mm
9999 dots
49.2 in.
1249 mm
2
2
1.) When a memory card is used to expand the print length, the card capacity is
used instead, not in addition to, the internal memory.
2.) Limited by the digits in the command field.
14SATO RISC Printers
Programming Manual1. Introduction
PrintAreaforXLandRVprinters
XL 400XL410M8400RV
Resolution203 dpi
8 dot/mm
Max print
width
800 dots
3.9 in.
100 mm
Max label
width
Standard
print length
4.0 in.
102 mm
1920 dots
9.4 in.
240 mm
Expanded
print length
using
<ESC>AX
Expanded print length with memory card
128 Kb1168 dots
6.2 in.
146 mm
512 Kb4768 dots
24.8 in.
596 mm
305 dpi
12 dot/mm
1200 dots
3.9 in.
100 mm
4.0 in.
102 mm
1920 dots
9.4 in.
240 mm
743 dots
6.2 in.
62 mm
2977 dots
24.8 in.
248 mm
203 dpi
8 dot/mm
832 dots
4.1 in.
104 mm
5.0 in.
128 mm
1424 dots
7.0 in.
178 mm
2848 dots
14.0 in.
356 mm
1
1257 dots
6.2 in.
157 mm
5038 dots
24.8 in.
629 mm
1Mb
2Mb
9360 dots
49.2 in.
1170 mm
9999 dots
49.2 in.
1249 mm
2
2
5956 dos
49.2 in.
496 mm
9999 dots
32.8 in.
833 mm
2
9999 dots
49.2 in.
1249 mm
9999 dots
49.2 in.
1249 mm
2
2
1.) When a memory card is used to expand the print length, the card capacity is
used instead, not in addition to, the internal memory.
2.) Limited by the digits in the command field.
SATO RISC Printers15
1. IntroductionProgramming Manual
There are two methods available to make sure your printed output will
appear correctly on your label. They are as follows:
1.8First Method: Using Base Reference Point
Send the 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 closest edge
of the label. Issue the Base Reference Point command <ESC>A3 after
the Start command in your data stream.
Input:<ESC>A
<ESC>A3HnnnnV0001. . . . . .
nnnn:New horizontal Base Reference Point
Formulannnn = (Max print width[mm] - Label width [mm]) x Print head
density [dots/mm]
ExampleCL612 printer with 50mm wide label
Max. print width: 165mm
Print head density:12 dots/mm
nnnn = (165mm - 50mm) x 12 dots/mm
nnnn= 1380 dots
For the above escape sequence this results in
<ESC>A3H1380V0001
Note:
1. This operation resets the reference point for all the following
data in the non-volatile RAM
2. The <ESC>A3 Base Reference Point command can also shift the
reference point in the negative direction, towards the outside
edge of the label.
3. This calculation is not necessary for OEM left-hand printers.
1.9Second Method: Using Horizontal Offset Position
Use the normal base reference 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 closest
edge of the label.
Each <ESC>H command would have the value “nnnn" (see above example) added to it to correctly position each field.
>ESC>H position + nnnn
For CL612: <ESC>H position +1380
Note:This calculation is not necessary for OEM left-hand
printers.
16SATO RISC Printers
Programming Manual1. Introduction
On the following 2pages, the methods aboveare described witha sample
tag/label output. These samples reflect how the printed information would
appear on a 128mm wide label. If you want to test any of the sample tag/
label outputs and are using tags/labels less than 128mm 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 tags/labels.
Warning You must be careful not to print off the tag/label sur-
faceas thetag/label providesa heat sink for the print
head elements. Doing so will cause irreparable 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 tags/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 CL612
printer and the resulting label assuming a 70mm wide label:
CL612CL612
Label
100mm
If you are using a 70mm wide tag/label, the entire image may not appear
on your tag/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 be shifted over toward the inside of the
printer where it can be printed on the narrower label.
Label
70mm
SATO RISC Printers17
1. IntroductionProgramming Manual
Example for first Method, using base reference point
The image is moved horizontally to the right 95mm (1140 dots) so that it
canbeprintedona70mmwidelabel.
For more information, see the Base Reference Point command description.
SATO RISC Printers19
1. IntroductionProgramming Manual
This page is intentionally left blank.
20SATO RISC Printers
Programming Manual2. Command Codes
2.Command Codes
This section contains all the RISC printer Command Codes. The commands must be sent to the printer in an organized fashion in order for the
label(s) to print.
The objective of thischapter is to explain the different commands and provide examples of their usage, as well as to provide a detailed reference
for programming the printers.
Each command begins on a separate page with its own heading. A uniform layoutis used to help you find keyinformation about each command.
Foreach Command Code in this section, there will bea 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 Note” 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.Itis
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 andthenexttwothevalueofbb.
The maximum number of characters defined in a parameter is represented by the number of characters shownin the command structure. For
example,a command followed by an aaaa canhaveuptofourcharacters.
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
parameterslistedfollowingthe commandcodewithout acomma delimiter,
such as aaaabbbb require the exact number of digits to be entered. If the
value of aaaa is“800”and the value ofbbbb is “300”, then theparameters
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
CommandCodes anda parallelinterface. The labels forall
printers will be similar, but, because of different resolutions and print widths may be larger or scaled differently.
SATO RISC Printers21
2. Command CodesProgramming Manual
Bar Codes
Command Structure:
1:3 narrow/widebar ratio <ESC>Babbcccd
2:5 narrow/wideratio <ESC>BDabbcccd
1:2 narrow/widebar ratio <ESC>Dabbcccda:Bar Code Symbol
bb:Number of dots (01-12) for narrow bar and narrow spa-
ce
ccc:Bar height in dots (001-600)
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
22SATO RISC Printers
Programming Manual2. Command Codes
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. Each of the bar codes are unique, and it is important to know the differences.
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 decender 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, Co de 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 symbols are covered separately.
5. For U CC128, 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.
26SATO RISC Printers
Programming Manual2. Command Codes
Bar Codes, Expansion
Command Structure:
<ESC>BWaabbbaa:Expansion factor by which the width of all bars and spa-
ces will be increased (01-12)
bbb:Bar height by dot (004-600 dots)
Example:<ESC>BW02100
Placement:Immediately follows the <ESC>BT command and pre-
cedes data to be encoded.
Default:None
Function:
Thiscommand works together with the <ESC>BT command tospecify
an expansion factor and the bar code height for the particular symbol
being printed.
1. Thiscommand mustbe preceded by theVariableRatioBar Codes
<ESC>BT command.
2. The following bar codes will be affected by the Character Pitch
command: Codabar, Code 39, Interleaved 2 of 5, Matrix 2 of 5.
SATO RISC Printers27
2. Command CodesProgramming Manual
Bar Codes, Variable Ratio
Command Structure
<ESC>BTabbccddeea:Bar Code Symbol
0: Codabar
1: Code 39
2: Interleaved 2 of 5
5: Industrial 2 of 5
6: Matrix 2 of 5
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 preceding
<ESC>BW
Default:Current setting
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.
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.
SATO RISC Printers29
2. Command CodesProgramming Manual
Base Reference Point
Command Structure:
<ESC>A3H-aaaaVbbbb
-: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.
aaaa:Horizontal Print Offset (see Note 5 for field range)
bbbb:Vertical Print Offset (see Note 5 for field range)
Example:<ESC>A3H100V0050
Placement:Preceding all images that are based on the new base
reference point
Default:Current V and H offset setting in the printer configurati-
on
Function:
Toestablisha new basereferencepoint for thecurrentlabel.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:
<ESC>A<ESC>L0202
<ESC>H0100<ESC>V0025<ESC>XMNORMAL REFERENCE POINT
<ESC>A3H0300V0075
<ESC>H0100<ESC>V0050<ESC>XMNEW REFERENCE POINT
<ESC>Q1<ESC>Z
Output:
30SATO RISC Printers
Loading...
+ 182 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.