THE EQUIPMENT REFERENCED IN THIS DOCUMENT COMPLIES WITH THE REQUIREMENTS IN PART 15
OF FCC RULES FOR A CLASS B COMPUTING DEVICE. OPERATION OF THIS EQUIPMENT IN A
RESIDENTIAL AREA MAY CAUSE UNACCEPTABLE INTERFERENCE TO RADIO AND TV RECEPTION.
Printer Job Language Support ................................................................................................ 4-2
Barcode Commands
Bar code Commands............................................................................................................... 5-2
Two-dimensional bar codes.................................................................................................................. 5-5
Printer Language Change Commands
Setting the Printer to SBPL Language .................................................................................... 6-2
Setting the Printer to PCL Language....................................................................................... 6-2
SATO Contacts
SATO Group of Companies .................................................................................................... 7-2
SATO D512 PCL PROGRAMMING MANUALPN: 9001180B
PN: 9001180BSATO D512 PCL PROGRAMMING MANUAL
1PCL EMULATION
•Selecting PCL Emulation
•Page Formatting
•Font and Symbol Set Support
•Command Structure
•PCL Emulation Commands
•GL/2 Commands
•Raster Image Graphics
•Macros
SATO D512 PCL Programming ManualPage 1-1
Unit 1: PCL Emulation
PCL EMULATION
The D512 printer supports the Hewlett-Packard Company’s LaserJet Printer Command
Language. This chapter discusses PCL emulation commands, along with resident PCL
emulation font and symbol set support.
To determine which commands your printer supports, see Section, “PCL Support.”
SELECTING PCL EMULATION
USING YOUR SOFTWARE PROGRAM
The D512 requires a PJL prologue, or series of commands, at the start of each print job,
including the Printer Job Language (PJL) Enter Language Command. See “ENTER LANGUAGE
Command” in Printer Job Language section for more information. See “Printer Job Language” in
the Printer Job Language section for the syntax and use of PJL. An example of a well-structured
PJL prologue would be the following:
esc
[
]%-12345X
@PJL SET LCUSTOMPAPERUNITS=INCHES
@PJL SET LCUSTOMPAPERHEIGHT=6
@PJL SET LCUSTOMPAPERWIDTH=4
@PJL SET RESOLUTION=300
@PJL ENTER LANGUAGE=PCL
Page 1-2SATO D512 PCL Programming Manual
Unit 1: PCL Emulation
PAGE FORMATTING
The printable areas and logical pages for PCL emulation (both portrait and landscape
orientation) are illustrated below. See the Legend that follows for definitions of areas A through I.
DLandscape logical page width
EDistance between the side edge of the physical page and the logical
page in portrait
FDistance between the side edge of the physical page and the logical
page in landscape
GDistance between the top and bottom edge of the physical page and
logical page
HDistance between the left and right edge of the physical page and the
printable area in portrait, or distance between the top and bottom edge
of the physical page and printable area in landscape
IDistance between the top and bottom edge of the physical page and the
printable area in portrait, or distance between the left and right edge of
the physical page and the printable area in landscape
SATO D512 PCL Programming ManualPage 1-3
Unit 1: PCL Emulation
FONT AND SYMBOL SET SUPPORT
Your printer has 10 resident scalable PCL fonts.
Several parameters are used to select a font from the data stream. These include symbol set,
spacing, point, or pitch, style, weight, and typeface number. For scalable fonts, you can vary the
size of a font by specifying pitch or point size (point size for proportional fonts, pitch for fixed
space fonts.
A symbol set defines which characters are available for a font and the code point for each of
these characters. Your printer supports 16 resident symbol sets. The table beginning on page
1-5 shows the symbol sets available for each font in PCL emulation. Not all fonts support all
symbol sets.
S
TANDARD PCL EMULATION FONTS
The following table lists the parameters to be used in the font selection commands for each of
the10 standard PCL emulation fonts.
Table 1-1: Forward and Backward Compatibility Font Selection Commands
Forward and Backward Compatibility Mode
Standard PCL Emulation Font Name
Courier Regular0004099
Univers Medium1004148
Univers Bold1034148
CG Triumvirate Condensed Bold1434100
Roman Pillar Regular00030211
Roman Pillar Italic01030211
Roman Pillar Bold00330211
Roman Pillar Bold Italic01330211
OCR-A00023584
OCR-B00023590
SpacingStyleWei ghtTyp ef ace
Page 1-4SATO D512 PCL Programming Manual
Unit 1: PCL Emulation
SELECTING SYMBOL SETSFORTHE SATO D512
To determine if a font or typeface supports a symbol set, see the complete listing of PCL
emulation fonts and symbol sets in the table below.
Table 1-2: PCL Emulation Symbol Sets
Typeface / Symbol Set
Symbol Set ID
Courier Regular
Univers Medium
Univers Bold
CG Triumvirate Condensed
Bold
Roman Pillar Regular
Roman Pillar Italic
Roman Pillar Bold
Roman Pillar Bold Italic
OCR-A
OCR-B
Indicates Typeface supports the specified Symbol Set.
US Ascii (0U)
Windows Latin 1 (19U)
Windows Latin 1 (9E)
Windows Latin 1 (5T)
Windows Latin 1 (19L)
Windows Cyrillic (9R)
0U
19U
9E
5T
19L
9R
Indicates Typeface does not support the specified Symbol Set.
Windows Greek (9G)
9G
ISO8859-1 (0N) (Latin 1)
ISO8859-2 (2N) (Latin 2)
0N
2N
ISO8859-9 (5N) (Latin 5)
ISO8859-10 (6N) Latin 6)
5N
6N
ISO8859-5 (10N) Cyrillic)
Roman 8 (8U)
10N
8U
IBM CP850 (12U)
12U
OCR-A (0O)
0O
OCR-B (1O)
1O
SATO D512 PCL Programming ManualPage 1-5
Unit 1: PCL Emulation
COMMAND STRUCTURE
This section introduces the different types of PCL emulation commands and their structure, or
syntax. It also demonstrates how you can link commands to abbreviate them.
C
ONTROL CODES
Control Codes are single-character instructions.
Table 1-3: Control Codes
CodeDecHexFunctionResult
BS808BackspaceMoves the cursor toward the left margin one horizontal space equal to the
last printed character
HT909Horizontal TabMoves the cursor to the next defined tab stop
LF100ALine FeedAdvances the cursor to the same horizontal position on the following line as
determined by either the Vertical Motion Index (VMI) or Set Line Spacing
command
FF120CForm FeedAdvances the cursor to the same horizontal position at the top margin of the
next page
CR130DCarriage ReturnMoves the cursor to the left margin
SP3220SpaceMoves the cursor to the right one column
SI150FPrimary FontSelects the primary font
SO140ESecondary FontSelects the secondary font
OMMANDS
C
PCL commands are multibyte strings (also known as “escape sequences”) that begin with the
Escape control code (
ESC
, ¬, decimal 27, or hexadecimal 1B). The
ESC
control code notifies the
printer that the characters that follow are to be interpreted as part of a command and are not
control codes or data to be printed.
Page 1-6SATO D512 PCL Programming Manual
Unit 1: PCL Emulation
COMMAND STRUCTURE
Most PCL emulation commands have the following structure:
ESC
& a # C
Spaces have been added to this example for readability. The command parameter variables are
indicated by a number sign (#).
Table 1-4: Description of Command Structure
ElementDescription
ESC
&Parameterized character from American National Standard Code for Information
aGroup character from ASCII table (ranging from 96 to 126 decimal) that specifies a
#Decimal character string value within specified numeric ranges; may be preceded by a +
Decimal 27 or hex 1B
Interchange (ASCII) table (ranging from 33 to 47 decimal)
group type of control
or - sign and contain a decimal point
CTermination character from ASCII table (ranging from 64 to 94 decimal)
C
OMMAND PARAMETERS
A command parameter sets the value for a command. This value stays constant until either a
different value resets the command or a command resets the printer to the default values. For
example, after the printer receives a command that selects a right margin beginning at column
63, the right margin of each printed page begins at column 63. That margin stays constant until a
right margin command with a different value resets it or until the printer is reset.
Parameters for each command are listed in the command tables beginning on page 9. Use the
Symbol Set Tables to determine the decimal or hexadecimal value for each parameter. To
determine a decimal or hex value, first locate the value of the parameter you require in the
Symbol Set Table. The decimal value is the value shown in the bottom of the cell or box with that
parameter. To find a hex value, go straight up the grid from the desired parameter and read the
value in the top heading. This is the first character of the hex value. Next, go straight across the
grid to the left of the parameter and read the value in the left column heading. This is the second
character of the hex value. For example,
ESC
(¬) is coded 1B in Hex and 27 in decimal. (Any one
of the three values ¬, 1B, or 27 might be used in your application. Read your documentation to
determine which to use.) The example sets the pitch of the primary font to16.66 characters per
inch.
Example:
ESC
(s16.66H
•Decimal: 27 40 115 49 54 46 54 54 72
•Hex: 1B 28 73 31 36 2E 36 36 48
SATO D512 PCL Programming ManualPage 1-7
Unit 1: PCL Emulation
Use the plus symbol (+) or the minus symbol (-) to select a position relative to the current cursor
position. For example:
ESC
&a6CMove to horizontal cursor position, column six
ESC
&a+6CMove six columns to the right of the current position
ESC
&a-6CMove six columns to the left of the current position
L
INKING COMMANDS
You can combine PCL emulation commands by linking them if the first 3 bytes of the commands
are identical. The combined, short form sends the first 3 bytes only once in the string. To
combine commands:
•Use the first 3 bytes (characters) of the command only once at the
start of the command string.
•Make the last letter of each command in the string lowercase.
•Capitalize the last letter of the string.
For example, notice that the first 3 bytes of these two commands are the same:
ESC
(s10HSelect 10 characters per inch
ESC
(s4099TSelect Courier typeface
To combine these two commands, use this form:
ESC
(s10h4099T
which is 3 bytes shorter than the long form:
ESC
(s10H
ESC
(s4099T
You can combine more than two commands; for example, you can add Select Stroke Weight
ESC
Bold (
(s3B) to the previous two commands:
ESC
(s10h3b4099T
or in the long form:
ESC
(s10H
ESC
(s3B
ESC
(s4099T
Page 1-8SATO D512 PCL Programming Manual
Unit 1: PCL Emulation
PCL EMULATION COMMANDS
See the following tables for a listing of the commands grouped by function.
To determine which commands your printer supports, see “Table 3-1: PCL Emulation
Commands” in the PCL Support section.
PCL E
MULATION COMMANDSBY FUNCTION
Table 1-5: Job Control
Command / ParametersFunction / Result
ESC
EPrinter Reset
-
• Prints any partial pages.
• Resets printer environment to defaults.
• Deletes all temporary downloaded resources.
ESC
&d#A
0 = Collation off
1 … 999 (number of Copies)
ESC
&l#X
# = number of Copies (1 to 32767)
Default = 1
ESC
&l#SSimplex/Duplex Print
ESC
&l#U
# = number of Decipoints
Range = -32767 to 32767
(1 Decipoint = 1/720 inch)
Default = 0
ESC
&l#Z
# = number of Decipoints
Range = -32767 to 32767
(1 Decipoint = 1/720 inch)
Default = 0
Number of Collated Copies
Turns collation of pages off or sets the number of collated copies.
Number of Copies
Affects the page currently in process and subsequent pages.
This command is parsed and ignored.
Long-Edge Offset Registration
Also known as Left Offset.
Adjusts placement of logical page along the width of the physical page.
Short-Edge Offset Registration
Also known as Top Offset.
Adjusts placement of logical page along the length of the physical page.
SATO D512 PCL Programming ManualPage 1-9
Unit 1: PCL Emulation
Table 1-5: Job Control (continued)
Command / ParametersFunction / Result
ESC
&u#D
Range = 300
ESC
% – 12345X Universal Exit Language (UEL) / Start of PJL
Unit of Measure
Sets the size for the PCL Unit (units per inch).
The Unit of Measure defines the unit used in the following commands:
• Horizontal Cursor Position by PCL Unit (
• Vertical Cursor Position by PCL Unit (
• Horizontal Rectangle Size by PCL Unit (
• Vertical Rectangle Size by PCL Unit (
The Unit of Measure also affects the rounding of character escapements
and the Horizontal Motion Index.
Note: This command does not affect the interpretation of binary raster
data for bitmapped fonts, raster graphics, or user defined fill patterns.
This command terminates the current printer language and allows
switching into PJL. For more information, see “UNIVERSAL EXIT
LANGUAGE Command” in Section 2, Printer Job Language.
Specifies the position of the logical page with respect to the physical
page.
Note: This setting resets margins, the number of printable lines per page,
and the cursor position.
Print Direction
Rotates the coordinate system counter-clockwise in 90° increments with
respect to the current orientation.
Note: Margins are not rotated or cleared.
Page 1-10SATO D512 PCL Programming Manual
Unit 1: PCL Emulation
Table 1-6: Page Control (continued)
Command / ParametersFunction / Result
ESC
&c#T
0Horizontal Printing
-1Vertical Rotated Printing
ESC
&a#L
# = Column
Default = 0
ESC
&a#M
# = Column
Default = Logical Page Width
ESC
9Clear Horizontal Margins
ESC
&l#E
# = number of lines
Default = 3 (1/2 inch)
ESC
&l1T Job Separation
ESC
&l#F
# = number of lines
Default = 60 or 64 (Country specific)
ESC
&l#GSet Output Bin
ESC
&l#L
0 Off
1 On (Default)
ESC
&k#H
# = number of 1/120 inch increments
(Valid to 4 decimal places)
ESC
&l#C
# = number of 1/48 inch increments
(Valid to 4 decimal places)
Default = 8
Character Text Path Direction
Vertically rotates text for use in vertical writing, such as printing
Japanese text.
Set Left Margin
Sets the left margin to the left edge of the designated column.
Note: The column width is defined by the space character of the active
font and the Horizontal Motion Index (HMI).
Set Right Margin
Sets the right margin to the right edge of the designated column.
Note: The column width is defined by the space character of the active
font and the HMI.
Clears left and right margins.
Set Top Margin
Sets the number of lines between the top of the physical page and first
line of print. Line height is determined by the current Vertical Motion
Index (VMI) and/or line spacing value.
Note: Setting a top margin of 0 results in the first line of text falling
outside of the printable area.
This command is parsed and ignored.
Set Text Length
Sets the bottom margin length in lines, measured from the first line of the
page.
Text Length equals Logical Page Length –1 inch (–1/2 inch for top and –
1/2 inch for bottom).
This command is parsed and ignored.
Skip Perforation
Perforation area includes the area from the bottom margin of the current
page to the top margin of the next page. When skipping perforations, a
line feed past the bottom margin ejects a page and places the cursor at the
top margin of the next page.
Set Horizontal Motion Index (HMI)
Sets the width of all characters for fixed-space fonts. Sets only the width
of the space for proportional spaced fonts.
Set Vertical Motion Index (VMI)
Sets Vertical Motion Index in 1/48 inch increments. The VMI determines
the vertical distance between lines.
Notes:
• Use of this command alters any previous Set Line Spacing command
settings.
See Table 9-2 for the symbol sets which are supported.
Select Spacing
Selects a font with proportional or fixed spacing.
Select Pitch
Selects the number of characters per inch (cpi) for a fixed-space
bitmapped or monospaced scalable font. Valid to 2 decimal places.
Note: Pitch is not needed for proportional spaced fonts.
Height (Select Point Size)
Sets the font height in points. Valid to 2 decimal places.
Note: Point size is not needed for monospaced fonts. For fonts larger
than 12 points, it may be necessary to change the line spacing.
Select Style
Identifies the physical traits of a character and the composition of the
font symbols.
Note: You can only use this command to select fonts currently available
in the printer. It cannot alter the appearance of the available fonts.
Page 1-14SATO D512 PCL Programming Manual
Unit 1: PCL Emulation
Table 1-8: Font Selection (continued)
Command / ParametersFunction / Result
ESC
(s#B (primary)
ESC
)s#B (secondary)
-7 Ultra Thin
-6 Extra Thin
-5 Thin
-4 Extra Light
-3 Light
-2 Demi Light
-1 Semi Light
0 Medium (Default)
1 Semi Bold
2 Demi Bold
3 Bold
4 Extra Bold
5 Black
6 Extra Black
7 Ultra Black
ESC
(s#T (primary)
ESC
)s#T (secondary)
# Typeface identifier (0 - 65535)
Select Stroke Weight
Selects a font with a particular thickness.
Note: This command will not alter the stroke weight of an available font.
See Table1 in this section “Forward and Backward Compatibility Font
Selection Commands” for the stroke weight variations available for the
resident fonts.
Select Typeface
Selects the best fit font design.
Note: For a list of typeface numbers, see Table 1 in
this section: “Forward and Backward Compatibility
Font Selection Commands.” See “Font and Symbol
Set Support” on page 4.
ESC
(#X (primary)
ESC
)#X (secondary)
Select Font by Font ID
Selects the font by the identification number.
# = Font ID (0 - 32767)
ESC
(3@ (primary)
ESC
)3@ (secondary)
ESC
&p#X[data]
# = number of data of bytes to print as text
Select Default Font
Sets all font selection characteristics to the Default Font.
Transparent Print Data
This command is only supported when used to enter data to be encoded
in a Maxicode barcode.
• Fixed underline is drawn 5 pels below cursor position.
• Floating underline position is determined by all the positions of the
characters with descenders in the fonts that are to be underlined.
• Underline thickness is 1/100 inch. Double underline is not supported
and will be printed as a single underline.
ESC
&d@Underline - Disable
SATO D512 PCL Programming ManualPage 1-15
Unit 1: PCL Emulation
Table 1-8: Font Selection (continued)
Command / ParametersFunction / Result
ESC
&t#P
0, 1 1 byte characters
21 1 or 2 byte characters
31 1 or 2 byte characters
Text Parsing Method
Communicates to the PCL parser whether character codes are interpreted
as 1-byte or 2-byte character codes. This command is parsed and
ignored.
38 1 or 2 byte characters
1008 1, 2, or 3 byte characters (UTF-8)
ESC
&k#S
010.00 cpi
Select Primary and Secondary Pitch
Selects the pitch for the primary and secondary font.
216.66 cpi
412.00 cpi
Table 1-9: User-Defined Symbol Set
Command / ParametersFunction / Result
ESC
*c#R
# = Symbol Set ID (0 - 32767)
Default = 0
ESC
(f#W[data]
# = number of data bytes
ESC
*c#S
0Delete all (temporary and permanent)
1Delete all temporary
2Delete current (ID)
4Make current temporary
5Make current permanent
Symbol Set ID Code
Sets the symbol set identification for the symbol set downloaded.
Define Symbol Set
Contains the data for the user-defined symbol sets.
Symbol Set Control
Manages user-defined symbol sets.
Page 1-16SATO D512 PCL Programming Manual
Unit 1: PCL Emulation
Table 1-10: Font Creation
Command / ParametersFunction / Result
ESC
*c#D
# = Font ID # (0 - 32767)
Default = 0
ESC
)s#W[data]
# = number of data bytes
ESC
*c#F
0Delete all (temporary and permanent)
1Delete all temporary
2Delete previous font ID
3Delete previous specified character
4Make previous font ID temporary
5Make previous font ID permanent
6Copy current font
ESC
*c#E
# = Code Point (0 - 65536)
Default = 0
ESC
(s#W[data]
# = number of data bytes
Set Font ID
Sets the identification number for the font being downloaded.
Load Font Header
Downloads soft font header information.
Note: Set Font ID before using this command.
Font Control
Manages soft fonts.
Set Character Code
Sets the decimal code point associated with the next character
downloaded or deleted.
Load Character
Downloads character descriptor and data to the current character code.
Table 1-11: Macros
Command / ParametersFunction / Result
ESC
&f#Y
# = Macro ID (0 - 32767)
Default = 0
ESC
&f#X
0Start definition
1End definition
2Execute macro (previous macro ID)
3Call macro (previous macro ID)
4Enable overlay (previous macro ID)
5Disable overlay
6Delete all macros
7Delete all temporary macros
8Delete current macro ID
9Make last ID temporary
10Make last ID permanent
SATO D512 PCL Programming ManualPage 1-17
Set Macro ID
Sets the ID for the macro you have created on flash.
Macro Control
Manages use of macros.
Notes:
• GL/2 commands are supported inside macros.
• Only call and execute macro commands are allowed within a macro.
• A macro may call or execu
•
• e another macro. This is called nesting. A maximum of two nesting
levels are allowed, for a total of three levels.
See “Macros” later in this section for additional information.
1Horizontal line
2Vertical line
3Diagonal line
4Diagonal line
5Square grid
6Diagonal grid
User-Defined Patterns
# = User-Defined Pattern ID
ESC
*v#N
0Transparent (Default)
1Opaque
ESC
*v#O
0Transparent (Default)
1Opaque
ESC
*l#OLogical Operation
ESC
*l#RPixel Placement
ESC
*v#T
0Solid Black (Default)
1Solid White
2Gray Shading Pattern
3Cross-Hatch Pattern
4User Defined Pattern
9True gray Level Fill
Area Fill ID
Selects pattern used to fill a rectangular area.
Note: This command is also used to set the user-defined pattern ID.
Cross-Hatch Fills are not supported.
Source Transparency Mode
Affects copying of white pixels from the source onto the destination
image.
Pattern Transparency Mode
Affects copying of white pixels from the pattern onto the destination
image.
This command is parsed and ignored.
This command is parsed and ignored.
Select Current Pattern
Selects pattern used when printing text and raster images.
Note: Cross-Hatch Patterns are not supported.
Page 1-18SATO D512 PCL Programming Manual
Unit 1: PCL Emulation
Table 1-13: User-Defined Pattern
Command / ParametersFunction / Result
ESC
*c#W[data]
# = number of data bytes
ESC
*p#R
0Rotate with print (Default)
1Fixed
ESC
*c#Q
0Delete all patterns (temporary and
permanent)
1Delete all temporary patterns
2Delete pattern (last ID specified)
4Make pattern of last ID # temporary
5Make pattern of last ID # permanent
User-Defined Pattern
Downloads binary pattern data.
Set Pattern Reference Point
Sets the pattern reference point to the current cursor position for userdefined patterns.
Note: Default pattern reference point is the upper left corner of the
logical page.
Caution: Pattern Control
Manages the use of user-defined patterns.
Note: Use the Area Fill ID command (
ESC
*c#G) to set the ID.
Table 1-14: Rectangular Area Fill Graphics
Command / ParametersFunction / Result
ESC
*c#H
# = Number of Decipoints (0 - 32767)
(1 Decipoint = 1/720 inch)
Default = 0, valid to 4 decimal places
ESC
*c#A
# = Number of PCL Units (0 - 32767)
Default = 0
ESC
*c#V
# = Number of Decipoints (0 - 32767)
(1 Decipoint = 1/720 inch)
Default = 0, valid to 4 decimal places
ESC
*c#B
# = Number of PCL Units (0 - 32767)
Default = 0
Horizontal Rectangle Size (in Decipoints)
Specifies the rectangle width in decipoints.
Horizontal Rectangle Size (in PCL Units)
Specifies the rectangle width in PCL units.
Note: The size of PCL Units is set by the Unit-of-Measure command.
Vertical Rectangle Size (in Decipoints)
Specifies the rectangle height in decipoints.
Vertical Rectangle Size (in PCL Units)
Specifies the rectangle height in PCL units.
Note: The size of PCL Units is set by the Unit-of-Measure command.
SATO D512 PCL Programming ManualPage 1-19
Unit 1: PCL Emulation
Table 1-14: Rectangular Area Fill Graphics (continued)
1Horizontal Line
2Vertical Line
3Diagonal Line
4Diagonal Line
5Square Grid
6Diagonal Grid
User-Defined Patterns
# = User-Defined Pattern ID
ESC
*c#P
0Black Fill (Default)
1White Fill
2Gray Fill
3Pre-Defined Cross-Hatch
Pattern Fill
4User-Defined Pattern
5Current Pattern Fill
9True gray Level Fill
Area Fill ID
Selects the pattern used to fill the rectangular area.
Note: This command is also used to set the user-defined pattern ID.
Cross-Hatch Patterns are not supported
Fill Rectangular Area
Fills a rectangular area defined by Horizontal and Vertical Rectangle
Sizes with the selected pattern.
Note: Cross-Hatch Patterns are not supported.
Page 1-20SATO D512 PCL Programming Manual
Unit 1: PCL Emulation
Table 1-15: Raster Graphics
Command / ParametersFunction / Result
ESC
*t#R
300300 dpi
ESC
*r#F
0Rotate with print
3Fixed (Default)
ESC
*r#S
# = Number of Input Pixels
ESC
*r#T
# = Number of Raster Lines
ESC
*r#A
0Left Graphics Margin at 0 (Default)
1Current Cursor Position
2At logical left page limit with scaling
On
3At current cursor position with
scaling On
ESC
*b#V[data]
# = Number of Data Bytes
ESC
*b#Y
# = Number of Raster Lines
ESC
*b#M
0Uncoded (Default)
1Run-Length Encoded
2 Tagged Image File Format (TIFF)
byte
3Delta Row
5Adaptive Compression
9Replacement Delta Row
999Zlib
1002Group 4
1003Group 3 one dimensional
1004Group 3 two dimensional K=2
1005Group 3 two dimensional K=4
1006TIFF word (16 bit)
1007TIFF double-word (32 bit)
1008Adaptive compression (includes TIFF
word and TIFF double-word)
ESC
*b#W[data]
# = Number of Data Bytes
Raster Resolution
Note: Only 300 dpi is supported. All other values are parsed
and ignored.
Raster Graphics Presentation
Sets the Raster Image Orientation in relation to the logical page.
Raster Width (Source)
Sets the width of the clip window for raster graphics.
Raster Height (Source)
Sets the height of the clip window for raster graphics.
Start Raster Graphics
Sets the left margin for raster graphics.
Transfer Raster Data by Plane
This command is used when the raster data is encoded by plane as
specified by the Simple Color command or the Configure Image Data
command. The command sends each plane in the row except the last.
Y Offset
Moves the cursor position down by the specified number of raster lines.
Set Raster Compression Mode
Identifies the compression mode the host uses to transfer RIG data. For
instance, this command can be run-length encoding or TIFF encoding.
Note: For further information, see “Raster Compression Mode” in this
section, and “Group 3 and Group 4 Raster Compression” in this section.
Transfer Raster Data by Row/Block
Transfers RIG data.
Note: After each command, the cursor position is moved to the
beginning of the next raster row.
SATO D512 PCL Programming ManualPage 1-21
Unit 1: PCL Emulation
Table 1-15: Raster Graphics (continued)
Command / ParametersFunction / Result
ESC
*rBEnd Raster Graphics (Version B)
Signals the end of the raster graphics transfer. If a Raster Height is
specified, the cursor is moved to the first raster row past the Raster
Height.
0Font
1Macro
2User-defined pattern
3Symbol set (for unbound scalable
fonts)
4Font extended
ESC
*s1MFree Space
ESC
&r#F
0Flush all complete pages
1Flush all pages
ESC
*s#X
-32767 to 32767
Default = 0
Set Status Readback Location Type
Sets the status location type to the specified value.
The 5 value for Cartridge may be specified, but since your printer does
not support font cards or cartridges, the command is ignored.
The 7 value for User-installable flash is only valid when flash memory is
installed.
The 200 value is only valid when a hard disk is installed.
Set Status Readback Location Unit
Sets the status location unit to the specified value.
The location unit is used along with the location type to identify a
location for the Inquire Status Readback Entity command.
Note: The unit value is interpreted differently, depending on the location
type specified.
Inquire Status Readback Entity
Returns the requested information set by Set Status Readback Location
Type and Set Status Readback Location Unit.
Returns the total available memory and the largest available block of
memory.
Flush All Pages
Holds print jobs in the print buffer until the current job finishes printing.
Echo
Returns # back to host computer.
Page 1-24SATO D512 PCL Programming Manual
Unit 1: PCL Emulation
Table 1-17: Picture Frame
Command / ParametersFunction / Result
ESC
*c#X
# of Decipoints: 0 to 32767
(1 Decipoint = 1/720 inch)
ESC
*c#Y
# of Decipoints: 0 to 32767
(1 Decipoint = 1/720 inch)
ESC
*c0T
0Set Anchor Point to Cursor Position
ESC
*c#K
Size in inches: 0 to 32767
ESC
*c#L
Size in inches: 0 to 32767
ESC
%#B
0Use Previous GL/2 Pen Position
1Use Current PCL Cursor Position
ESC
%#A
0Use Previous PCL Cursor Position
1Use Current GL/2 Pen Position
Picture Frame Horizontal Size (in Decipoints)
Specifies the horizontal dimension of the picture frame used when
printing a GL/2 plot.
Picture Frame Vertical Size (in Decipoints)
Specifies the vertical dimension of the picture frame used when printing
a GL/2 plot.
Set Picture Frame Anchor Point
Sets the position of the picture frame anchor point to the cursor position.
The picture frame anchor point defines the location of the upper left
corner of the picture frame.
GL/2 Horizontal Plot Size
Specifies the horizontal scaling factor used when importing an image
into the picture frame.
GL/2 Vertical Plot Size
Specifies the vertical scaling factor used when importing an image into
the picture frame.
Enter GL/2 Language
Exits PCL emulation and uses GL/2 commands to print.
Enter PCL Emulation
Exits GL/2 mode and uses PCL emulation commands to print.
Table 1-18: Miscellaneous Commands
Command / ParametersFunction / Result
ESC
&s#CEnd-Of-Line Text Wrap
This command is parsed and ignored.
ESC
Y Display Functions On
This command is parsed and ignored.
ESC
Z Display Functions Off
This command is parsed and ignored.
ESC
z Print Test Page
This command is parsed and ignored.
SATO D512 PCL Programming ManualPage 1-25
Unit 1: PCL Emulation
Table 1-18: Miscellaneous Commands (continued)
Command / ParametersFunction / Result
ESC
*o#M(b)Print Quality
This command is parsed and ignored.
ESC
&l#M(b)Paper Type
This command is parsed and ignored.
Page 1-26SATO D512 PCL Programming Manual
Unit 1: PCL Emulation
GL/2 COMMANDS
Note:GL/2 is not a stand-alone plotter emulation. It can only be entered from
Table 1-19: Configuration Group
within PCL emulation and cannot be used with software without a unique
printer driver written explicitly for GL/2.
Escape SequenceFunctionSupport
CO GL/2: Comment
DFGL/2: Default Values
IN GL/2: Initialize
IP GL/2: Input P1 and P2
IR GL/2: Input Relative P1 and P2
IW GL/2: Input WindowLimited
RO GL/2: Rotate Coordinate System
SCGL/2: ScaleLimited
Table 1-20: Vector Group
Escape SequenceFunctionSupport
AA GL/2: Arc AbsoluteNot supported
AR GL/2: Arc RelativeNot supported
AT GL/2: Absolute Arc Three PointNot supported
BR GL/2: Bezier RelativeNot supported
BZ GL/2: Bezier AbsoluteNot supported
CI GL/2: CircleLimited
PA GL/2: Plot Absolute
PCGL/2: Pen ColorNot supported
PD GL/2: Pen DownLimited
PE GL/2: Polyline EncodedNot supported
PRGL/2: Plot Relative
PU GL/2: Pen UpLimited
RT GL/2: Arc Relative Three PointNot supported
SATO D512 PCL Programming ManualPage 1-27
Unit 1: PCL Emulation
Table 1-21: Polygon Group
Escape SequenceFunctionSupport
EAGL/2: Edge Rectangle AbsoluteLimited
EPGL/2: Edge PolygonNot supported
ERGL/2: Edge Rectangle RelativeLimited
EW GL/2: Edge WedgeNot supported
FP GL/2: Fill PolygonNot supported
PM GL/2: Polygon ModeNot supported
RA GL/2: Fill Rectangle AbsoluteLimited
RR GL/2: Fill Rectangle RelativeLimited
WG GL/2: Fill WedgeNot supported
Table 1-22: Character Group
Escape SequenceFunctionSupport
ADGL/2: Alternate Font DefinitionNot supported
CF GL/2: Character Fill ModeNot supported
CP GL/2: Character PlotNot supported
DI GL/2: Absolute DirectionLimited—only right angles
supported (DI1,0, DI0, 1, DI-1,
0, and DI0,-1
DR GL/2: Relative DirectionNot supported
DT GL/2: Define Label Terminator
DV GL/2: Define Variable Text PathLimited—only left to right
(DV0) and right to left (DV2)
supported
ES GL/2: Extra Space
FI GL/2: Primary FontNot supported
FNGL/2: Secondary FontNot supported
LB GL/2: Label
LO GL/2: Label OriginLimited—only end points 1, 3,
and 7 supported
SAGL/2: Select Alternate FontNot supported
SBGL/2: Scalable or Bitmap FontsNot supported
SD GL/2: Define Standard Font
SI GL/2: Absolute Character SizeNot supported
SL GL/2: Character SlantNot supported
SR GL/2: Relative Character SizeNot supported
Page 1-28SATO D512 PCL Programming Manual
Unit 1: PCL Emulation
Table 1-22: Character Group (continued)
Escape SequenceFunctionSupport
SSGL/2: Select Standard Font
TDGL/2: Transparent DataNot supported
Table 1-23: Line and Fill Attributes Group
Escape SequenceFunctionSupport
AC GL/2: Anchor Corner
FT GL/2: Fill TypeNot supported
LA GL/2: Line AttributesNot supported
LT GL/2: Line TypeNot supported
PWGL/2: Pen WidthLimited
RFGL/2: Raster Fill DefinitionNot supported
SM GL/2: Symbol ModeLimited
SP GL/2: Select PenLimited
SV GL/2: Screened VectorsNot supported
TRGL/2: Transparency ModeNot supported
UL GL/2: User-Defined Line TypeNot supported
WU GL/2: Pen Width Unit SelectionLimited
Table 1-24: Miscellaneous Group
Command / ParameterCommand NameSupport
CRGL/2: Color RangeNot supported
LMGL/2: Language ModelNot supported
MCGL/2: Logical OperationNot supported
NPGL/2: Number of PensNot supported
PPGL/2: Pixel PlacementNot supported
TMGL/2: Threshold MatrixNot supported
SATO D512 PCL Programming ManualPage 1-29
Unit 1: PCL Emulation
RASTER IMAGE GRAPHICS
These commands utilize the raster area. Before sending data, set the presentation mode, the
resolution, the compression mode, the raster height and width, and start raster graphics. These
parameters are in effect until you overwrite them with a different command or there is a printer
reset. To ensure that the printed image appears in the expected area, set width and height
parameters.
ASTER COMPRESSION MODE
R
The Raster Compression Mode command determines how raster data is coded. It affects the
amount of code required to create an image, and the efficiency of image printing.
Syntax:
ESC
*b#M
Parameters:
0Uncoded (default)
1Run-Length Encoded
2Tagged Image File Format (TIFF) Byte
3Delta
5Adaptive Compression
9Replacement Delta Row
999Zlib
1002Group 4
1003Group 3 one dimensional
1004Group 3 two dimensional K=2
1005Group 3 two dimensional K=4
1006TIFF word (16 bit)
1007TIFF double-word (32 bit)
1008Adaptive Compression (includes TIFF word and TIFF double-
word)
Descriptions and examples of the different parameters appear on the
following pages. Each example draws the same square outline 64 bits
(8 bytes) wide by 64 scan lines long.
Page 1-30SATO D512 PCL Programming Manual
Unit 1: PCL Emulation
UNCODED DATA
Uncoded Data is not compressed. Only those bytes needed to form the
image are sent. Each bit represents a single dot. In the first byte, bit 7
corresponds to the first dot in the raster row, bit 5 to the third dot, and so forth.
Example:
ESC
*p300x300Y|Move the cursor to 1" x 1" (1 in. from
top margin and 1 in. from left edge
of logical page)
Run-Length Encoded Data is interpreted in pairs of bytes. The first byte:
•Acts as a counter, or control byte.
•Indicates how many times to repeat the data in the second byte.
•Can be from 0 (no repetition) to 255.
•The second byte is the data byte.
Example:
ESC
*p300x600Y|Move cursor to 1" x 2"
ESC
*b1M|Set compression to Run-Length
ESC
*r1A|Start raster graphics at current
ESC
*b2W '07FF'x|Run-Length: 8x'FF'x
ESC
*b6W '0080 0500 0001'x|1x'80'x, 6x'00'x, 1x'01'x
ESC
*b6W '0080 0500 0001'x|1x'80'x, 6x'00'x, 1x'01'x
…|...
ESC
*b6W '0080 0500 0001'x|1x'80'x, 6x'00'x, 1x'01'x
ESC
*b2W '07FF'x|8x'FF'x
ESC
*rB|End graphics
position
Page 1-32SATO D512 PCL Programming Manual
Unit 1: PCL Emulation
TAGGED IMAGE FILE FORMAT
TIFF “Packbits” contain a control byte (a signed number) that indicates
whether the raster data bytes are to be repeated (up to 127 times) or printed
as encoded data.
•For control values of 0 through 127, the next (Control+1) byte(s)
•For control values of -1 through -127 (FF’x - ‘81’x), the next byte is
Example:
ESC
*p300x900Y|Move cursor to 1" x 3"
ESC
*b2M|Set compression to TIFF
ESC
*r1A|Start Raster Graphics at current
ESC
*b2W 'F9FF'x| TIFF: 8x'FF'x
ESC
*b6W '0080 FB00 0001'x|1:'80'x, 6x'00'x, 1: '01'x or
ESC
*b9W '078000000000000001'x|8: '8000000000000001'x
…|…
ESC
*b6W '0080 FB00 0001'x|1:'80'x, 6x'00'x, 1: '01'x
ESC
*b2W 'F9FF'x|8x'FF'x
ESC
*rB|End graphics
uncoded.
repeated (Abs(Control)+1) times.
position
SATO D512 PCL Programming ManualPage 1-33
Unit 1: PCL Emulation
DELTA ROW
Delta Row is a compression mode that identifies and transmits only those
bytes different from the ones in a preceding row. The control byte consists of
two parts:
•High 3 bits: Number of bytes to replace +1 (1 to 8).
•Low 5 bits: Offset from last unmodified byte (0-30); if the offset is 31,
the next byte(s) is added to the offset until the next byte is not 255.
Example:
ESC
*p300x1200Y|Move cursor to 1" x 4"
ESC
*b3M|Set compression to Delta Row
ESC
*r1A|Start raster graphics at current
position
|Num Offset
ESC
*b9W 'E0FFFFFFFFFFFFFFFF'x|'111 00000'b=8 at 0:
'FFFFFFFFFFFFFFFF'x
ESC
*b9W 'E08000000000000001'x|8 at 0: '8000000000000001'x
ESC
*b0W|No bytes change
…
ESC
*b0W|No bytes change
ESC
*b9W 'E0FFFFFFFFFFFFFFFF'x|8 at 0: '8FFFFFFFFFFFFFF'x
ESC
*rB|End graphics
Page 1-34SATO D512 PCL Programming Manual
Unit 1: PCL Emulation
ADAPTIVE COMPRESSION
Adaptive compression allows the combined use of compression methods
0 through 3 (Uncoded, Run-Length Encoded, TIFF, and Delta Row). It also
allows the printing of empty rows (all zeros) or duplicate rows.
•The Transfer Raster Data command size includes all rows (scan
lines).
•Scan Mode and SizeH,L are three-byte primary control strings:
CountH and CountL.
Table 1-25: Adaptive Compression Control Strings
Scan ModeCountH,CountLData
0Data sizeH,LUncoded raster scan data
1Data sizeH,LSize of Run-length encoded data (high,low)
2Data sizeH,LSize of Tagged Image File Format (TIFF) data (high,low)
3Data SizeH,LSize of Delta Row data (high,low)
4NumberH,L of empty rowsNone
5NumberH,L of duplicate
rows
254Data SizeH,LTIFF word
255Data SizeH,LTIFF double-word
None
Example:
ESC
*p300x1500Y|Move cursor to 1" x 5"
ESC
*b5M|Set the compression to Adaptive
Compression
ESC
*b29W|Raster Data: 29 bytes follow
'03 0009'x 'E0FFFFFFFFFFFFFFFF'x |Delta Row: 8 at 0:
Zlib is a generic compression method. It refers to a standard for compression
as well as the library that implements the standard.
The zlib compression method uses the deflate algorithm. This same algorithm
is used by more widely known compression utilities such as PKZIP and GZIP.
Compressed data is a series of variably-sized blocks. An encoder determines
how to break the data into blocks and finds the best compression method to
use for each block.
An encoder works based on the following principles. The encoder creates a
dictionary containing different characters in a set of data. Short strings of bits
represent more commonly occurring characters, and long strings of bits
represent less frequently used characters. A probability tree determines
which characters are frequently used. Repeated patterns in a string of
characters are identified and stored, so the string doesn’t have to be stored
multiple times.
A three-bit zlib header is added to the beginning of a block to describe the
type of compression used and indicates whether the block is a final block.
Other information in the header includes checksums, compression algorithm
used, and the level of compression. In compression all checksums are set to
zero and in decompression the checksums are ignored.
The memory required for zlib compression and decompression is
independent of the size of the data to be compressed or decompressed.
The number 999 does not conflict with other compression types, so it is used
to represent zlib compression. See “Raster Compression Mode” in this
section for more information.
Page 1-36SATO D512 PCL Programming Manual
Unit 1: PCL Emulation
GROUP 3 AND GROUP 4 RASTER COMPRESSION
Since Group 4 images do not use line endings, the width of the image must
be specified using the Raster Width command (
The compressed image data is sent to the printer using the Transfer Raster
Data command (
ESC
*b#W). The maximum number of bytes that can be sent
using the Transfer Raster Data command is 32K bytes. Images larger than
32K bytes must be broken up and sent using multiple commands. It does not
matter where the image is broken, or how many Transfer Raster Data
commands are used. Once the image is started (with a Transfer Raster Data
command), no other commands are allowed until the entire image has been
sent.
The following example prints a Group 4 image file that is 256 bits wide and
9,645 bytes long:
ESC
*b1002M|Set Raster Compression to Group 4
ESC
*r256S|Define width of image in input bits
ESC
*r1A|Start Raster Graphics at current
ESC
*b9645W|9,645 bytes of a Group 4 image
…[Group 4 image data]…
ESC
*rB|End Raster Graphics
position
ESC
*r#S).
All lines of data must be the same length. If they are not, zeroes (0) must be
added to attain the same length.
Note:If the uncompressed image extends beyond the logical page dimensions or
beyond the raster width specified in the Raster Width command (
ESC
*r#S),
the image is clipped at print time.
SATO D512 PCL Programming ManualPage 1-37
Unit 1: PCL Emulation
MACROS
When creating a macro, first assign it an ID number. If this number is identical to an existing
macro ID in RAM, the old macro is deleted when you specify the Macro Control Start Definition.
Next, start the macro definition, send the contents of the macro, and stop the macro definition.
Note: Although a macro may be called or executed from within another macro (nesting), a macro
cannot be defined within another macro definition. Each macro must be defined separately.
Example:
This example creates a macro to print the Wigit Corp. logo, then calls the logo macro in the body
of a letter.
ESC
&f1Y|Set the macro ID to 1
ESC
&f0X|Start the macro definition
ESC
&a+72H|Relative move right 1/10 inch
(+72/720th)
ESC
(8U|Select Roman-8 symbol set
ESC
(s1p18v0s3b4101T|Select CG Times 18 point bold
W|Print W
ESC
&a-21.6H|Relative move left 0.03 inch
ESC
(s12v1S|Select (CG Times) 12 point (bold)
italic
igit|Print igit
ESC
&a+72H|Relative move right 1/10 inch
ESC
(s18v0S|Select 18 point and turn off italic
C|Print C
ESC
(s12v1S|Select 12 point italic
orp.|Print orp.
ESC
&a+72H|Relative move right 1/10 inch
ESC
&f1X|End of macro definition
ESC
&f10X|Make Macro ID 1 permanent
…
…
From:|Print the header From:
ESC
&f1y3X|Set the macro ID to 1 and call the
macro
…|Print the letter
Thank you for …|Print the closing
ESC
&f1y3X|Set the macro ID to 1 and call the
macro
…
Page 1-38SATO D512 PCL Programming Manual
1PRINTER JOB
LANGUAGE
•PJL Command Notation
•Kernel Commands
•Job Separation Commands
•Environment Commands and
Variables
•Status Readback Commands
•Status Message Format
SATO D512 PCL Programming ManualPage 2-1
Unit 2: Printer Job Language
PRINTER JOB LANGUAGE
Your printer supports complete Printer Job Language (PJL) commands, including certain
commands that cause the printer to enter PCL emulation.
To determine which commands your printer supports, see Section, “PCL Support.”
PJL COMMAND NOTATION
The syntax for each supported PJL command is listed in this chapter. The following character
codes are used throughout the chapter to illustrate the syntax of each PJL command.
Table 2-1: PJL Command Notation
Character CodeDescriptionHex CodeDecimal Code
<ESC>Escape Character0x1B27
<LF>Line Feed Character0x0A10
<CR>Carriage Return Character0x0D13
<FF>Form Feed Character0x0C12
<HT>Horizontal Tab0x099
<UEL>Universal Exit Language0x1B 25 2D 31
32 33 34 35 58
Note:
•Parameters enclosed in square brackets ([ ]) are optional and not
required for command execution.
•The PJL interpreter requires uppercase for the @PJL prefix for all PJL
commands except the Universal Exit Language (UEL) command. The
rest of the PJL command is not case sensitive. The UEL command is
case sensitive.
•All PJL commands except UEL must be terminated with a line feed
character (<LF>).
Page 2-2SATO D512 PCL Programming Manual
Unit 2: Printer Job Language
KERNEL COMMANDS
UNIVERSAL EXIT LANGUAGE Command
The Universal Exit Language (UEL) command terminates the current printer
language and allows dynamic switching into PJL.
Syntax:
<ESC>%-12345X
Notes:
The PJL commands must immediately follow the UEL command (that is, the
X in the UEL syntax must be immediately followed by the @PJL of the next
PJL command).
ENTER LANGUAGE Command
This command causes the printer to enter PCL emulation.
Syntax:
@PJL ENTER LANGUAGE = pcl[<CR>]<LF>
Note:You can use uppercase, lowercase, or mixed case. (@PJL must be uppercase;
all others can be mixed or lowercase.)
COMMENT Command
This command lets you add descriptive comments to your PJL job.
Syntax:
@PJL COMMENT words[<CR>]<LF>
Notes:
•When the printer receives this command, it is ignored.
•The
•The COMMENT command is terminated by the line feed character
SATO D512 PCL Programming ManualPage 2-3
words parameter can be any combination of printable characters,
spaces, and horizontal tabs.
(<LF>).
Unit 2: Printer Job Language
JOB SEPARATION COMMANDS
You printer supports the PJL JOB and EOJ commands.
JOB Command
The host computer can use the JOB command to separate print data into
various parts or jobs. Specifically, the JOB command signifies to the printer
the start of a print job. Use the EOJ command to signify the end of a job. In
addition, use the JOB/EOJ pair to accomplish the following:
•Provide a job name.
•Indicate which pages of the job should be printed.
•Monitor the job status as it prints.
Syntax:
@PJL JOB [NAME = "job name"] [START = first page]
[END = last page] [PASSWORD = number][<CR>]<LF>
Notes:
•The JOB command should only be used in conjunction with the EOJ
command.
•After receiving a JOB command, the printer does not process a UEL
command as a PJL job boundary until it receives the corresponding
EOJ. Instead, UELs occurring within a JOB/EOJ pair are processed
as printer language resets (for example, PCL
ESC
E).
Page 2-4SATO D512 PCL Programming Manual
Unit 2: Printer Job Language
Parameters:
NAME = "job name"
Use the NAME parameter to assign a character string name to a particular job.
The name may be any combination of printable characters, spaces or horizontal
tabs up to a maximum of 80 characters, spaces, or tabs. The
enclosed in double quotes, as indicated by the command syntax.
START = first page
Use the START parameter in conjunction with the END parameter to skip the
printing of a particular portion of the job. The emulator discards pages of a job
until the page specified by this parameter is reached. The
1 to 2,147,483,647. Omission of the START parameter causes the printer to start
printing with page 1 of the job.
END = last page
job name must be
first page range is from
Use the END parameter in conjunction with the START parameter to skip the
printing of a particular portion of the job. The emulator discards all pages of a
job after the
last page has been printed. The specification of last page is relative to
page 1 of the print job and its range is from 1 to 2,147,483,647. Omission of the
END parameter causes the printer to print all pages to the end of the job.
SATO D512 PCL Programming ManualPage 2-5
Unit 2: Printer Job Language
EOJ Command
The EOJ command signifies the end of a print job.
Syntax:
@PJL EOJ [NAME = "job name"][<CR>]<LF>
Note:
Only use the EOJ command in conjunction with the JOB command.
Parameter:
NAME = "job name"
Use the NAME parameter to assign a character string name to a particular job.
The name may be any combination of printable characters, spaces, or horizontal
tabs up to a maximum of 80 characters, spaces, or tabs. The NAME string may
be different from the NAME string specified in the JOB command. The
must be enclosed in double quotes.
job name
Page 2-6SATO D512 PCL Programming Manual
Unit 2: Printer Job Language
ENVIRONMENT COMMANDS AND VARIABLES
This section describes the printer environment variables and the PJL commands used to modify
or query the variables.
The following commands modify the environment variables, and are described in this section:
•DEFAULT
•SET
•INITIALIZE
•RESET
The following commands query the environment variables, and are described in “Status
Readback Commands” on page 2-12.
•INQUIRE
•DINQUIRE
•INFO
•ECHO
SATO D512 PCL Programming ManualPage 2-7
Unit 2: Printer Job Language
DEFAULT Command
This command modifies the default setting for the specified environment
variable and stores the setting in the printer NVRAM. The new setting is
activated with the occurrence of the next PJL reset condition.
The [command modifier:value] parameter specifies the type of PJL variables to be
modified. The variables supported are listed in “Table 2-2: PJL Variables” on
page 2-10.
variable=value
The supported variables and values are listed in “Table 2-2: PJL Variables” on
page 2-10.
Note:Variables may be modified by the DEFAULT command, except those marked
Read Only. Some variables may only be modified using the PJL SET
command. These variables cannot be modified using the DEFAULT
command. They are marked Set Only.
Page 2-8SATO D512 PCL Programming Manual
Unit 2: Printer Job Language
SET Command
This command modifies the current setting for the specified environment
variable. The new setting is active immediately, and remains active until the
next occurrence of a PJL reset condition.
Use the SET command to modify any currently defined environment variable
that cannot be set using the desired printer language. For example, use the
PJL SET command to set Page Protect, which cannot be set within a printer
language such as PCL emulation.
Syntax:
@PJL SET [command modifier:value] variable=value[<CR>]<LF>
where
[command modifier:value]
The [command modifier:value] parameter specifies the type of PJL variables to be
modified. The variables supported are listed in
“Table 2-2: PJL Variables” on page 2-10.
variable=value
The supported variables and values are listed in “Table 2-2: PJL Variables” on
page 2-10.
Note:Variables may be modified by the DEFAULT command, except those marked
Read Only. Some variables may only be modified using the PJL SET
command. These variables cannot be modified using the DEFAULT
command. They are marked Set Only.
INITIALIZE Command
This command restores both the current and default environment variables to
their factory default values and updates the printer NVRAM. This command
affects all of the variables listed in “Table 2-2: PJL Variables” on page 2-10,
except all read-only variables.
Syntax:
@PJL INITIALIZE[<CR>]<LF>
SATO D512 PCL Programming ManualPage 2-9
Unit 2: Printer Job Language
RESET Command
This command resets the current environment variables to the settings stored
in the printer NVRAM. Therefore, any variables modified by the PJL SET
command are returned to their default value after execution of the PJL
RESET command.
Syntax:
@PJL RESET[<CR>]<LF>
To determine which variables your printer supports, see “Table 1: PJL Variables” in this section.
LCUSTOMPAPERWIDTHUniversal Width3 to 36.01 in increments of 0.01 in.
LCUSTOMPAPERHEIGHTUniversal Height76 to 915 in increments of 1 mm
Print and Hold
Jobname
Measure
1 to 999
Note: If a value greater than 999 is specified by
a SET or DEFAULT command, the value is
changed to 999.
Note: If a value greater than 255 is specified by
a SET or DEFAULT command, the value is
changed to 255.
“jobname”
jobname is a text string truncated to 24
characters.
Note: A null (“ ”) string is an acceptable value
and indicates no Print and Hold Jobname is
specified.
Note: Some printers have a fixed value of
DONOTPRINT.
INCHES, MILLIMETERSINCHES
Note: Values are determined to be inches or
millimeters based on the
LCUSTOMPAPERUNITS setting.
3 to 36.01 in increments of 0.01 in.
1
60
NULL
(No jobname)
DONOTPRINT
216, 305 mm
8.5, 12 in.
(Model and country
specific)
4.2
LCUSTOMPAPERFEEDUniversal Feed
Direction
Page 2-10SATO D512 PCL Programming Manual
SHORTEDGE, LONGEDGESHORTEDGE
Unit 2: Printer Job Language
Table 2-2: PJL Variables (continued)
Va ri ab leFunctionSelectionsFactory Default
FONTNUMBERFont Number0–170
FONTSOURCEFont SourceI, S
PITCHDefault pitch
(fixed-pitch fonts)
PTSIZEDefault point size
(proportional
spaced fonts)
SYMSETSymbol set for the
default font
0.08 to 100 (in increments of 0.01)
Note: If an invalid pitch is requested, the printer
selects the closest pitch.
1 to 1008 (in increments of 0.25)
Note: If an invalid point size is requested, the
printer selects the closest point size.
If a symbol set is requested that is not resident in
the printer, the symbol set is not changed.
I
IInternal font source
SPermanent download fonts
10.00
12.00
PC8
SATO D512 PCL Programming ManualPage 2-11
Unit 2: Printer Job Language
STATUS READBACK COMMANDS
Applications can request configuration and status information from the printer using the Status
Readback commands. In addition, the printer can also be instructed to send unsolicited status
information back to the host computer when asynchronous events occur, such as a memory error
or a paper jam.
To determine which commands your printer supports, see “Table 4: Status Readback
Commands” in this section.
DINQUIRE Command
This command is used to query the default setting (NVRAM) of the specified
environment variable.
The [command modifier:value] parameter specifies the type of PJL variable to be
queried. The variables supported are listed in “Table 2-2: PJL Variables” on
page 2-10.
variable=
value
The supported variables are listed in “Table 2-2: PJL Variables” on page 2-10.
This printer returns a ? for inquiries of an unsupported variable, or inquiries of a
variable associated with an option that is not installed.
Page 2-12SATO D512 PCL Programming Manual
Unit 2: Printer Job Language
ECHO Command
The ECHO command instructs the printer to return the specified words after
the command is parsed. This command provides a method of capturing the
status information returned by a specific print job.
Syntax:
@PJL ECHO [words][<CR>]<LF>
Response Syntax:
@PJL ECHO [words]<CR><LF>
<FF>
words
parameter
words parameter must start with a printable character and can consist of a
The
combination of printable characters, spaces, and horizontal tabs.
Note:The ECHO command is terminated by the line feed character.
SATO D512 PCL Programming ManualPage 2-13
Unit 2: Printer Job Language
INFO Command
The INFO command is used to query status information from the printer.
Table 2-3 lists the categories of information that can be queried.
See “Status Message Format” on page 2-18 for additional information about
the messages returned by the INFO STATUS, USTATUS DEVICE, and
USTATUS TIMED commands.
Syntax:
@PJL INFO category[<CR>]<LF>
Response Syntax:
@PJL INFO category<CR><LF>
[one or more lines of printable characters, spaces, or tabs]<CR><LF>
<FF>
category
Table 2-3 lists the supported categories.
Table 2-3: INFO Category Parameter Values
Category ValuesDescription
IDReturns the model name or the model number stored in the printer NVRAM.
CONFIGReturns the printer configuration, including paper sources, paper sizes, and
installed options.
MEMORYReturns the printer available memory.
PAGECOUNTReturns the printer page count.
STATUSReturns the printer current status.
VARIABLESReturns the printer environment variables and values.
USTATUSReturns the printer unsolicited status variables and values.
INFO CONFIG Response Syntax (An Example):
@PJL INFO CONFIG<CR><LF>
USTATUS [4 ENUMERATED]<CR><LF>
DEVICE<CR><LF>
JOB<CR><LF>
PAGE<CR><LF>
TIMED<CR><LF>
MEMORY=2097152<CR><LF>
<FF>
Page 2-14SATO D512 PCL Programming Manual
Unit 2: Printer Job Language
INQUIRE Command
This command is used to query the current setting of the specified
environment variable.
The [command modifier:value] parameter specifies the type of PJL variables to be
queried. The variables supported are listed in
“Table 2-2: PJL Variables” on page 2-10.
variable=value
The supported variables are listed in “Table 2-2: PJL Variables” on
page 2-10.
This printer returns a ? for inquiries of an unsupported variable, or inquiries of a
variable associated with an option that is not installed.
SATO D512 PCL Programming ManualPage 2-15
Unit 2: Printer Job Language
USTATUS Command
This command is used to enable and disable unsolicited status from the
printer. Unsolicited status information is sent automatically when an
asynchronous event occurs. Table 2-4 lists the asynchronous information that
can be enabled and disabled.
Syntax:
@PJL USTATUS ustatus variable=value[<CR>]<LF>
Response Syntax:
@PJL USTATUS ustatus variable<CR><LF>
[one or more lines of printable characters, spaces, or tabs]<CR><LF>
<FF>
To determine which variables your printer supports, see “Table 2-4:
USTATUS Unsolicited Status Variables” on this page.
See “Status Message Format” on page 2-18 for additional information about
the messages returned by the INFO STATUS, USTATUS DEVICE, and
USTATUS TIMED commands.
ustatus variable=value
The following values are supported for the ustatusvariable=value parameter.
Table 2-4: USTATUS Unsolicited Status Variable Values
Ustatus VariableValu eDescription
DEVICEONEnables unsolicited status for device changes.
VERBOSEEnables unsolicited status for all device changes. Also
enables warnings from the PJL parser.
OFFDisables unsolicited status for device changes.
JOBONEnables unsolicited status for job changes. The printer
sends a status message when a job begins and ends.
OFFDisables unsolicited status for job changes.
PAGEONEnables unsolicited status for page changes. The printer
sends a status message when a printed sheet reaches the
standard output bin.
OFFDisables unsolicited status for page changes.
TIMED5 to 300 in
seconds
0Disables timed unsolicited status.
Enables timed unsolicited status. The printer automatically
sends status at a specified time interval.
Page 2-16SATO D512 PCL Programming Manual
Unit 2: Printer Job Language
USTATUSOFF Command
This command turns off unsolicited status. Unsolicited status may also be
turned off by using the USTATUS command on each variable.
Syntax:
@PJL USTATUSOFF[<CR>]<LF>
SATO D512 PCL Programming ManualPage 2-17
Unit 2: Printer Job Language
STATUS MESSAGE FORMAT
The format of the returned information from the INFO STATUS, USTATUS DEVICE, and
USTATUS TIMED commands is described in this section.
I
NFORMATION MESSAGES
Information messages are returned in this form:
CODE=status code
DISPLAY=display string (in double quotes)
ONLINE=online status
Table 2-5: PJL Information Messages
Printer StateStatus CodeDisplay StringOnline Status
Ready10001Ready TRUE
Ready10001RDYMSG TRUE
Not Ready10002Not ReadyFALSE
Page 2-18SATO D512 PCL Programming Manual
1PCL SUPPORT
SATO D512 PCL Programming ManualPage 3-1
Unit 3: PCL Emulation Support
PCL SUPPORT
Table 3-1 lists PCL emulation commands and identifies printers that support them.
For detailed information about PCL emulation commands and how to select them, see
“PCL Emulation” on page 1-2.
The section, “GL/2 Commands” on page 1-27 identifies printer support for the GL/2
commands.
Table 3-1: PCL Emulation Commands
Supported
Page numbers reference command descriptionsPrinter Model
Not Supported
Command
ESC
EPrinter Reset 1-9
ESC
YDisplay Functions-On 1-25
ESC
ZDisplay Functions-Off 1-25
ESC
zPrint Test Page1-25
ESC
&a#CHorizontal Cursor Position (in Columns) 1-13
ESC
&a#GDuplex Page Side Selection 1-12
ESC
&a#HHorizontal Cursor Position (in Decipoints) 1-13
ESC
&a#LSet Left Margin 1-11
ESC
&a#MSet Right Margin 1-11
ESC
&a#PPrint Direction 1-11
ESC
&a#RVertical Cursor Position (in Rows) 1-13
ESC
&a#VVertical Cursor Position (in Decipoints) 1-13
ESC
&c#TCharacter Text Path Direction 1-11
ESC
&d@Underline-Disable 1-15
ESC
&d#ANumber of Collated Copies 1-9
ESC
&d#DUnderline-Enable 1-15
ESC
&f#FSet Universal Height 1-10
ESC
&f#GSet Universal Width 1-10
ESC
&f#OSet Universal Feed Direction 1-10
ESC
&f#WSet Universal Custom Name 1-10
ESC
&f#SPush / Pop Cursor Position 1-13
ESC
&f#XMacro Control 1-17
ESC
&f#YSet Macro ID 1-17
ESC
&k#GSet Line Termination 1-13
ESC
&k#HSet Horizontal Motion Index 1-11
FunctionPageD512
Page 3-2SATO D512 PCL Programming Manual
Unit 3: PCL Emulation Support
Table 3-1: PCL Emulation Commands (continued)
Supported
Page numbers reference command descriptionsPrinter Model
Not Supported
Command
ESC
&k#SSelect Primary and Secondary Pitch 1-16
ESC
&k#WText Scale Mode 1-12
ESC
&l#APage Size 1-10
ESC
&l#CSet Vertical Motion Index 1-12
ESC
&l#DSet Line Spacing 1-12
ESC
&l#ESet Top Margin 1-11
ESC
&l#FSet Text Length 1-11
ESC
&l#GSet Output Bin 1-11
ESC
&l#HPaper Source 1-10
ESC
&l#LSkip Perforation 1-11
ESC
&l#OSelect Orientation 1-10
ESC
&l#M(b)Paper Type 1-26
ESC
&l#PSet Page Length 1-12
ESC
&l#SSimplex/Duplex Print 1-9
ESC
&l1TJob Separation 1-11
ESC
&l#ULong-Edge Offset Registration 1-9
ESC
&l#XNumber of Copies 1-9
ESC
&l#ZShort-Edge Offset Registration 1-9
ESC
&n#W [operation]
FunctionPageD512
Alphanumeric ID
[string id]
ESC
&p#CPalette Control
ESC
&p#IPalette Control ID
ESC
&p#SSelect Palette
ESC
&p#X[data]Transparent Print Data 1-15
ESC
&r#FFlush All Pages 1-21
ESC
&s#CEnd-Of-Line Text Wrap 1-25
ESC
&t#PText Parsing Method 1-16
ESC
&u#DUnit of Measure 1-10
ESC
(#Primary Font Symbol Set 1-14
ESC
(#XSelect Primary Download Font (by Font ID) 1-15
ESC
(3@Select Default Primary Font 1-15
ESC
(f#W[data]Define Symbol Set 1-16
ESC
(s#BPrimary Font Stroke Weight 1-15
ESC
(s#HPrimary Font Pitch 1-14
SATO D512 PCL Programming ManualPage 3-3
Unit 3: PCL Emulation Support
Table 3-1: PCL Emulation Commands (continued)
Supported
Page numbers reference command descriptionsPrinter Model
Not Supported
Command
ESC
(s#PPrimary Font Spacing 1-14
ESC
(s#SPrimary Font Style 1-14
ESC
(s#TPrimary Font Typeface Selection 1-15
ESC
(s#VPrimary Font Height (Point Size) 1-14
ESC
(s#W[data]Load Character 1-17
ESC
)#Secondary Font Symbol Set 1-14
ESC
)#XSelect Secondary Download Font (by Font ID) 1-15
ESC
)3@Select Default Secondary Font 1-15
ESC
)s#BSecondary Font Stroke Weight 1-15
ESC
)s#HSecondary Font Pitch 1-14
ESC
)s#PSecondary Font Spacing 1-14
ESC
)s#SSecondary Font Style 1-14
ESC
)s#TSecondary Font Typeface Selection 1-15
ESC
)s#VSecondary Font Height (Point Size) 1-14
ESC
)s#W[data]Load Font Header 1-17
ESC
*b#MSet Raster Compression Mode 1-21
ESC
*b#V[data]Transfer Raster Data (by Plane) 1-21
ESC
*b#W[data]Transfer Raster Data (by Row / Block) 1-22
ESC
*b#YY Offset 1-21
ESC
*c#AHorizontal Rectangle Size (in PCL Units) 1-19
ESC
*c#BVertical Rectangle Size (in PCL Units) 1-19
ESC
*c#DSet Font ID 1-17
ESC
*c#ESet Character Code 1-17
ESC
*c#FFont Control 1-17
ESC
*c#GArea Fill ID 1-18,
FunctionPageD512
1-20
ESC
*c#HHorizontal Rectangle Size (in Decipoints) 1-19
ESC
*c#KGL/2 Horizontal Plot Size (in Inches) 1-25
ESC
*c#LGL/2 Vertical Plot Size (in Inches) 1-25
ESC
*c#PFill Rectangular Area 1-20
ESC
*c#QPattern Control 1-19
ESC
*c#RSymbol Set ID Code 1-16
ESC
*c#SSymbol Set Control 1-16
ESC
*c0TSet Picture Frame Anchor Point 1-25
Page 3-4SATO D512 PCL Programming Manual
Unit 3: PCL Emulation Support
Table 3-1: PCL Emulation Commands (continued)
Supported
Page numbers reference command descriptionsPrinter Model
Not Supported
Command
ESC
*c#VVertical Rectangle Size (in Decipoints) 1-19
ESC
*c#W[data]User-Defined Pattern 1-19
ESC
*c#XPicture Frame Horizontal Size (in Decipoints) 1-25
ESC
*c#YPicture Frame Vertical Size (in Decipoints) 1-25
ESC
*l#OLogical Operation 1-18
ESC
*l#RPixel Placement 1-18
ESC
*l#W[data]Color Lookup Tables
ESC
*m#W[data]Download Dither Matrix
ESC
*o#M(b)Print Quality 1-26
ESC
*o#W[data]Driver Configuration Command
ESC
*p#PPush / Pop Palette
ESC
*p#RSet Pattern Reference Point 1-19
ESC
*p#XHorizontal Cursor Position (in PCL Units) 1-13
ESC
*p#YVertical Cursor Position (in PCL Units) 1-13
ESC
*r#AStart Raster Graphics 1-21
ESC
*r#FRaster Graphics Presentation Mode 1-21
ESC
*r#SRaster Width (Source) 1-21
ESC
*r#TRaster Height (Source) 1-21
ESC
*r#USimple Color
ESC
*rBEnd Raster Graphics (Version B) 1-22
ESC
*rCEnd Raster Graphics (Version C) 1-22
ESC
*s#IInquire Status Readback Entity 1-24
ESC
*s1MFree Space 1-24
ESC
*s#TSet Status Readback Location Type 1-24
ESC
*s#USet Status Readback Location Unit 1-24
ESC
*s#XEcho 1-24
ESC
*t#HRaster Width Destination 1-22
ESC
*t#IGamma Correction
ESC
*t#JRender Algorithm
ESC
*t#RRaster Resolution 1-21
ESC
*t#VRaster Height Destination 1-23
ESC
*g#WSet Raster Configuration 1-23
ESC
*v#AColor Component One
ESC
*v#BColor Component Two
FunctionPageD512
SATO D512 PCL Programming ManualPage 3-5
Unit 3: PCL Emulation Support
Table 3-1: PCL Emulation Commands (continued)
Supported
Page numbers reference command descriptionsPrinter Model
Not Supported
Command
ESC
*v#CColor Component Three
ESC
*v#IAssign Color Index
ESC
*v#NSource Transparency Mode 1-18
ESC
*v#OPattern Transparency Mode 1-18
ESC
*v#SForeground Color
ESC
*v#TSelect Current Pattern 1-18
ESC
*v#W[data]Configure Image Data
ESC
*i#W[data]Viewing Illuminant
ESC
9Clear Horizontal Margins 1-11
ESC
=Half Line-Feed 1-13
ESC
%#AEnter PCL Emulation 1-25
ESC
%#BEnter GL/2 Language1-25
ESC
%–12345XUniversal Exit Language (UEL) / Start of PJL 1-10
FunctionPageD512
Table 2 lists GL/2 commands and identifies the printers that support them.
Table 3-2: GL/2 Commands
Supported
Not Supported
Command
AAArc Absolute 1-27
ACAnchor Corner 1-29
ADDefine Alternate Font 1-28
ARArc Relative 1-27
ATArc Absolute Three Point 1-27
BRBezier Relative 1-27
BZBezier Absolute 1-27
CFCharacter Fill 1-28
CICircle 1-27
COComment 1-27
CPCharacter Plot 1-28
CRColor Range 1-29
DFDefault 1-27
Page numbers reference command descriptions.Printer Model
FunctionPageD512
DIAbsolute Direction 1-28
Page 3-6SATO D512 PCL Programming Manual
Unit 3: PCL Emulation Support
Table 3-2: GL/2 Commands (continued)
Supported
Not Supported
Command
DRRelative Direction 1-28
DTDefine Label Terminator 1-28
DVDefine Variable Text Path 1-28
EAEdge Rectangle Absolute 1-28
EPEdge Polygon 1-28
EREdge Rectangle Relative 1-28
ESExtra Space 1-28
EWEdge Wedge 1-28
FIPrimary Font 1-28
FNSecondary Font 1-28
FPFill Polygon, Odd/Even 1-28
FPFill Polygon, Non-Zero Winding 1-28
FTFill Type 1-29
FTFill Type - 22 1-29
FTFill Type - 9 1-29
Page numbers reference command descriptions.Printer Model
FunctionPageD512
INInitialize 1-27
IPInput P1 and P2 1-27
IRInput Relative P1 and P2 1-27
IWInput Window 1-27
LALine Attributes 1-29
LBLabel, Default Terminator = ‘03’x 1-28
LOLabel Origin 1-28
LOUses PCL Label Origin 1-28
LTLine Type 1-29
LMLabel Mode 1-29
MCLogical Operation 1-29
NPNumber of Pens 1-29
PAPlot Absolute 1-27
PCPen Color 1-27
PDPen Down 1-27
PEPolyline Encoded 1-27
PMPolygon Mode 1-28
PPPixel Placement 1-29
PRPlot Relative 1-27
SATO D512 PCL Programming ManualPage 3-7
Unit 3: PCL Emulation Support
Table 3-2: GL/2 Commands (continued)
Supported
Not Supported
Command
PUPen Up 1-27
PWPen Width 1-29
RAFill Rectangle Absolute 1-28
RFDefine Raster Fill 1-29
RORotate Coordinate System 1-27
RRFill Rectangle Relative 1-28
RTArc Relative Three Point 1-27
SASelect Alternate Font 1-28
SBScalable/Bitmapped Fonts 1-28
SCScale 1-27
SDDefine Standard Font 1-28
SIAbsolute Character Size 1-28
SLCharacter Slant 1-28
SMSymbol Mode 1-29
SPSelect Pen 1-29
Page numbers reference command descriptions.Printer Model
FunctionPageD512
SRRelative Character Size 1-28
SSSelect Standard Font 1-29
SVScreened Vectors 1-29
SVScreened Vectors - 9, level 1-29
TDTransparent Data 1-29
TMThreshold Matrix 1-29
TRTransparency Mode 1-29
ULUser Defined Line 1-29
WGFill Wedge 1-28
WUPen Width Units 1-29
Page 3-8SATO D512 PCL Programming Manual
1PJL SUPPORT
SATO D512 PCL Programming ManualPage 4-1
Unit 4: Printer Job Language Support
PRINTER JOB LANGUAGE SUPPORT
The following tables list PJL commands and identify printers that support them.
For detailed information about PJL commands, see Section 2, the Printer Job
Language section, in this manual. All commands may not have a full description.
Table 4-1: PJL Variables
Supported
Not Supported
Page numbers reference variable descriptions and are listed for supported
variables only.
Default values are listed for exceptions only.
Variable NamePageD512
AUTOCONT
AUTOSELECT
BINDING
BITSPERPIXEL
CLEARABLEWARNINGS
Printer Model
CONTEXTSWITCH
COPIES 2-10
CPLOCK
DENSITY
DISKLOCK
DUPLEX
ECONOMODE
FORMATTERNUMBER
FORMLINES 2-10
HOLD
HOLDKEY
HOLDTYPE
IMAGEADAPT
INTRAY1
INTRAY2
INTRAY3
INTRAY4
INTRAY5
INTRAY1SIZE
INTRAY2SIZE
Page 4-2SATO D512 PCL Programming Manual
Unit 4: Printer Job Language Support
Table 4-1: PJL Variables (continued)
Supported
Not Supported
Page numbers reference variable descriptions and are listed for supported
variables only.
Default values are listed for exceptions only.
Variable NamePageD512
INTRAY3SIZE
INTRAY4SIZE
INTRAY5SIZE
IOBUFFER
IOSIZE
JOBATTR
JOBNAME 2-10
JOBOFFSET
LANG
LOWTONER
Printer Model
MANUALFEED
MEDIASOURCE
MEDIATYPE
MPTRAY
ORIENTATION 2-10
OUTBIN
PAGEPROTECT
PA PE R
PARALLEL
PA SS WO R D
PERSONALITY
POWERSAVE
POWERSAVETIME
PRINTQUALITY
QTY
RENDERMODE
REPRINT
RESOLUTION 2-10
RESOURCESAVE
RESOURCESAVESIZE
RET
TIMEOUT
SATO D512 PCL Programming ManualPage 4-3
Unit 4: Printer Job Language Support
Table 4-1: PJL Variables (continued)
Supported
Not Supported
Page numbers reference variable descriptions and are listed for supported
variables only.
Default values are listed for exceptions only.
Variable NamePageD512
USERNAME
WIDEA4
Table 4-2: Common Variables for PCL Emulation
Supported
Not Supported
Page numbers reference variable descriptions.
Variable NamePageD512
FONTNUMBER
Printer Model
Printer Model
FONTSOURCE
PITCH
PTSIZE
SYMSET
Table 4-3: Common Variables for PostScript Emulation
Supported
Not Supported
Page numbers reference variable descriptions.
Variable NamePageD512
JAMRECOVERY
PRTPSERRS
ADOBEMBT
Printer Model
Page 4-4SATO D512 PCL Programming Manual
Unit 4: Printer Job Language Support
Table 4-4: Status Readback Commands
Supported
Not Supported
Page numbers reference command descriptions.
Command NamePageD512
Dinquire 2-12
Echo 2-13
Info 2-14
Inquire 2-15
Ustatus 2-16
Ustatusoff 2-17
Table 4-5: USTATUS Unsolicited Status Variables
Printer Model
Supported
Not Supported
Page numbers reference variable descriptions.
Variable NamePageD512
DEVICE 2-16
JOB 2-16
PAGE 2-16
TIMED 2-16
Printer Model
Table 4-6: Device Attendance Messages
Supported
Not Supported
Page numbers reference message descriptions.
MessagePageD512
RDYMSG
OPMSG
STMSG
Printer Model
SATO D512 PCL Programming ManualPage 4-5
Unit 4: Printer Job Language Support
Page 4-6SATO D512 PCL Programming Manual
1BARCODE COMMANDS
SATO D512 PCL Programming ManualPage 5-1
Unit 5: Bar Code Commands
BAR CODE COMMANDS
Table 5-1: PCL Emulation Escape Sequences
Command / ParametersFunction / Result
ESC
or
ESC
ESC
or
ESC
ESC
or
ESC
(s#P
)s#P
(s#H
)s#H
(s#V
)s#V
Determines the location of human-readable text printed with the bar
code.
0 Use default value
1 Do not print text
4 Print text under bar code
5 Print text above bar code
Example:
ESC
Select Code 3 of 9 with human-readable text under the barcode. Because
the v and h parameters are not specified, their values default to:
v 0.4 inch
h automatically sized Roman Pillar bold
Selects the font used for human-readable text. The numeric value of # is
of the form CBA, where:
A = typeface0–5
B = size0 Automatic font size (default)
C = style0 Default (bold)
Example:
ESC
Selects Code 3 of 9 with check digit with automatically sized Roman
Pillar Bold Italic text above the bar code. Because the v parameter is not
specified, it value defaults to:
v 0.7 inch
Selects the height of the bar in points (1/72 inch).
Except in symbologies where #V is a fixed value, the bar height can be
varied from a minimum of 3 points (0.04 inch, 1 mm) to a maximum of
960 points (13.33 inch, 33 cm).
Example:
ESC
Selects the Codabar symbology with a bar height of 0.5 inch. Because
the p and h parameters are not specified, their values default to:
p Do not print text
h Not applicable because of #p parameter value
(s4p24670T
Note: The valid range is 0 to 5,
regardless of the selection, the humanreadable is printed with Roman Pillar
Bold.
1 Bold
2 Bold Italic
3 Bold
4 Bold Italic
(5p504h24671T
(s36v24750T
Page 5-2SATO D512 PCL Programming Manual
Unit 5: Bar Code Commands
Table 5-2: PCL Emulation Parameter List
Command Function / Parameter (#v units are in 1/72”
ESC
(s#T
or
ESC
)s#T
Typ e face #Bar Code Symbology#v#p
24600UPC-A74.44N11Yes
24601UPC-A + 2-digit supplemental74.44N13Yes
24602UPC-A + 5-digit supplemental74.44N16Yes
24610UPC-E28.84N6Yes
24611UPC-E + 2-digit supplemental28.84N8Yes
24612UPC-E + 5-digit supplemental28.84N11Yes
24620EAN/JAN-850.44N7Yes
24621EAN/JAN-8 + 2-digit supplemental50.44N9Yes
24622EAN/JAN-8 + 5-digit supplemental50.44N12Yes
24630EAN/JAN-1374.44N12Yes
24631EAN/JAN-13 + 2-digit supplemental74.44N14Yes
24632EAN/JAN-13 + 5-digit supplemental74.44N17Yes
24640Interleaved 2 of 528.81NEvenNo
Select the bar code symbology.
Default Parameters
1
Characters
Encoded
2
Symbol
Length
3
3
3
3
3
3
3
3
3
3
3
3
Checksum
Character
24641Interleaved 2 of 5 + check digit28.81NOddYes
24650Industrial 2 of 528.81N---No
24651Industrial 2 of 5 + check digit28.81N---Yes
24660Matrix 2 of 528.81N---No
24661Matrix 2 of 5 + check digit28.81N---Yes
24670Code 3 of 928.81M---No
24671Code 3 of 9 + check digit28.81M---Yes
24672Code 3 of 9 space encoding28.81M---No
24673Code 3 of 9 space encode +check digit28.81M---Yes
24680Code 3 of 9 extended28.81M---No
24681Code 3 of 9 extended + check digit28.81M---Yes
24690Code 9328.81M---Yes
24691Code 93 extended28.81M---Yes
24700Code 128 autoswitch28.81M---Yes
1
For bar code symbologies, the default value of the #H text font parameter is CBA =
000 (automatically sized Roman Pillar bold).
2
Does not include checksum character.
3
Checksum character is always printed if human-readable text is specified.
* = Fixed value, cannot be changed
N = Numeric
M = Mixed
SATO D512 PCL Programming ManualPage 5-3
Unit 5: Bar Code Commands
Table 5-2: PCL Emulation Parameter List (continued)
Command Function / Parameter (#v units are in 1/72”
ESC
or
ESC
(s#T
)s#T
Select the bar code symbology.
Default Parameters
1
2
Typ e face #Bar Code Symbology#v#p
Characters
Encoded
Length
Symbol
24701Code 128 A28.81M---Yes
24702Code 128 B28.81M---Yes
24704Code 128 C28.81M---Yes
24710UCC 12828.85M---
24720EAN 12828.81M---Yes
24750Codabar28.81M---No
24751Codabar +MOD 16 check digit28.81M---Yes
24760MSI28.81N---No
24761MSI + mod10 + mod10 check digits28.81N---Yes
24762MSI + mod10 + mod10 check digits28.81N---Yes
24763MSI + mod11 + mod10 check digits28.81N---Yes
24770POSTNET 5-digit ZIP code9*1*N5Yes
24771POSTNET 9-digit ZIP code9*1*N9Yes
24772POSTNET 11-digit Delivery Point Code9*1*N11Yes
24880MaxiCode---1Y1’ squareYes
24850PDF417---1Y---Yes
1
For bar code symbologies, the default value of the #H text font parameter is CBA =
000 (automatically sized Roman Pillar bold).
2
Does not include checksum character.
3
Checksum character is always printed if human-readable text is specified.
* = Fixed value, cannot be changed
N = Numeric
M = Mixed
Checksum
Character
CURSORPOSITIONING
Cursor positioning is set as follows when printing with the Sato Bar Code Option:
•From the current cursor position, bar code printing begins at the bottom left corner of the
left bar.
•The cursor is located at the bottom right corner of the right bar when printing is complete.
•This cursor positioning applies both with and without accompanying human-readable text.
Page 5-4SATO D512 PCL Programming Manual
Unit 5: Bar Code Commands
TWO-DIMENSIONAL BAR CODES
MAXICODE PCL 5 COMMANDSTO SUPPORT MAXICODE BAR CODES
Sato provides two methods to print MaxiCode bar codes. The final method uses two Sato unique
commands
ESC
&x#W and
ESC
&y#W.
B
AR CODE DESCRIPTOR
ESC
&X#W[DESCRIPTORDATA]
This escape sequence is used to describe not only what bar code to print, but also all of the
parameter settings required to build the bar code. The first two bytes of this command always
designate the symbology. The remaining byte is then interpreted to specify the mode. # is the
number of bytes of descriptor data. The descriptor data for MaxiCode would be the binary string
00 02 01 (for mode 1), 00 02 02 (for mode 2), and so on.
T
RANSFER BAR CODE DATA ESC&Y#W[BARCODEDATA]
This new PCL 5 command is used to transfer a raw block of bar code data to be encoded. The
bar code data is encoded according to what was specified in the last valid Bar Code Descriptor
command received. If no valid Descriptor is sent, then this command is ignored and the data is
flushed. # is the number of bytes of bar code data.
B
AR CODE DESCRIPTORFOR MAXICODE
Below is the header definition of the bar code descriptor for MaxiCode:
Table 5-3: MaxiCode Descriptor Header Definition
BytesMSBLSB
0–1Symbology ID byte (00x)Symbology ID byte 2 (02x)
2–3ModeReserved
Symbology ID bytes 0 and 1: (Required = 00 02x)
These two bytes signify the symbology. For MaxiCode, these two bytes must
be 00x and 02x.
Mode: (Default = 02x)
This field designates what mode to use when interpreting the input data. Valid
modes are (in hex).
Table 5-4: MaxiCode Mode Values
BytesMSB
02xStructured carrier message with numeric postal code
03xStructured carrier message with alphanumeric postal code
04xStandard symbol with standard error correction
05xFull symbol with enhanced error correction
06xReader Program with standard error correction
SATO D512 PCL Programming ManualPage 5-5
Unit 5: Bar Code Commands
MaxiCode Notes
Depending on the mode, the input data sent with the Transfer Bar Code Data
command must follow the following rules:
Rule 1: For all modes the input data must start with a label-number field and
number-of-labels field. Both fields are one digit in length and are
terminated with either a comma or Group Separator (GS, ASCII 29,
hexadecimal 1D).
Rule 2: For modes 2 and 3 there are 3 extra fields that must follow the label
fields. These include the postal code, country code, and class of
service. Each field must be terminated with either a comma or GS.
Rule 3: A mode 2 postal code can be 0 to 9 digits.
Rule 4: A mode 3 postal code can be 0 to 6 alphanumeric characters (any
printable character in code set A as defined in AIM spec).
Rule 5: The country code must be 3 digits in length and thus padded with
leading zeros if necessary.
Rule 6: The class of service must be 3 digits in length and thus padded with
leading in zeros if necessary.
Rule 7: For modes 2 and 3 an optional ANSI Message Header (for example
[)>RS01GSyy) can be inserted prior to the postal code. (RS = record
separator, ASCII 30, hexadecimal 1D;yy is a two digit year). This
message is automatically moved to the secondary message. Neither
a group separator nor a comma should terminate this message.
An optional secondary message follow the class of service for modes 2
and 3. For modes 4, 5, and 6 the message follows the number-of-labels field.
Page 5-6SATO D512 PCL Programming Manual
Unit 5: Bar Code Commands
MAXICODE EXAMPLESUSING TRANSFER BAR CODE DATA COMMAND
Here are some MaxiCode examples of the ASCII data that would be sent with the Transfer Bar
Code Data Command:
Mode 2, separated with commas:
ESC
&y48W1,1,40361,840,001,This is the secondary message.
Mode 3, separated with commas:
ESC
&y48W1,1,ABC01,840,001,This is the secondary message.
Mode 3, separated with GS and commas plus optional ANSI Message
Header (yy=99):
Because two-dimensional bar codes are capable of encoding thousands of characters, humanreadable interpretation of the data may not be practical. Alternatively, descriptive text rather than
literal text may be printed with the symbol. If printed, any character size and font available may
be selected, and the text may be printed anywhere desired near the symbol. The text must not
interfere with the bar code symbol or the quiet zones.
The data sent when using this second technique of printing MaxiCode symbols will follow the
same rules that exist for data sent using the Transfer Bar Code Data Command to print
MaxiCode symbols, with the following change to rule 1. (See “Rule 1” on page 2-6.) The input
data must start with a label-number field, a number-of-labels field, and a mode field. All three of
these fields are one digit in length and are terminated with either a comma or Group Separator
(GS, ASCII 29).
Example of MaxiCode commands using typeface selection:
The #p parameter specifies the level of error correction to use: 0–8. In relation to the fields of the
Sato Bar Code Descriptor for PDF417, the following correspondences exist when using this
technique:
ECC LevelSpecified by #p parameter
Examples of PDF 417 commands:
ESC
(s0p24850TABCDEFG
Encodes the string “ABCDEFG” in a PDF417 symbol with error correction
level 0.
Page 5-8SATO D512 PCL Programming Manual
1PRINTER LANGUAGE
CHANGE COMMANDS
•Setting the printer to SBPL
•Setting the printer to PCL
SATO D512 PCL Programming ManualPage 6-1
Unit 6: PRINTER LANGUAGE CHANGE COMMANDS
ESC+RN
ESC+RNESC+R
ESC+R
PCL Language Set Command
SETTING THE PRINTER TO SBPL LANGUAGE
This chapter discusses setting the printer to the SBPL language, and setting the printer to PCL
language.
Command to set SBPL Language
The SBPL command sets the printer to SBPL mode and causes all
subsequent data to be processed as SBPL data. The change is retained
even if the printer is turned off.
Syntax:
@PJL ENTER LANGUAGE=SBPL<CR><LF>
Response:
None
SETTING THE PRINTER TO PCL LANGUAGE
Command to set PCL Language
The PCL command sets the printer to PCL mode. The change is retained
even if the printer is turned off.
Command Function:
To set the printer language to PCL.
Command Structure:
<ESC>A
Page 6-2SATO D512 PCL Programming Manual
Unit 6: PRINTER LANGUAGE CHANGE COMMANDS
<ESC>RN
<ESC>Z
SATO D512 PCL Programming ManualPage 6-3
Unit 6: PRINTER LANGUAGE CHANGE COMMANDS
This page intentionally left blank.
Page 6-4SATO D512 PCL Programming Manual
1SATO CONTACTS
2
3
4
SATO GROUP OF COMPANIES
International Headquarters
SATO INTERNATIONAL PTE. LTD.
438A Alexandra Road #05-01/04,
Alexandra Technopark, Singapore 119967
Phone: 65-6271-2122Fax: 65-6271-2151
Email: sales@sato-int.com
Website: www.satoworldwide.com
Asia Pacific & Oceania Region
SATO INTERNATIONAL ASIA PACIFIC PTE. LTD.
(Regional Headquarters)
438A Alexandra Road #05-01/04,
Alexandra Technopark, Singapore 119967
Phone: 65-6271-5300Fax: 65-6273-6011
Email: sales@sato-int.com
Website: www.satoworldwide.com
SATO ASIA PACIFIC PTE. LTD.
438A Alexandra Road #05-01/04,
Alexandra Technopark, Singapore 119967
Phone: 65-6271-5300Fax: 65-6273-6011
Email: sales@satoasiapacific.com
Website: www.satoworldwide.com, www.satoasiapacific.com
No.25, Jalan Pemberita U1/49, Temasya Industrial Park,
Section U1, 40150 Shah Alam, Selangor Darul Ehsan,
Malaysia
Phone: 60-3-7620-8901 Fax: 60-3-5569-4977
Email: sales@satosms.com.my