Printer Protocol Interpreter STGL™ Programmer’s Reference Manual for STGL, a SATO® SGL® Printer Protocol Interpreter Thermal Series Printers
Printer Protocol Interpreter STGL Programmer’s Reference Manual for STGL, a SATO SGL Printer Protocol Interpreter Thermal Series Printers
Trademark Acknowledgments SATO is a registered trademark of SATO America, Inc. SL4M, T4M, SL5000r, T5000r, and SL/T5R Energy Star are trademarks of Printronix, Inc. Printronix and PSA are registered trademarks of Printronix, Inc. COPYRIGHT 2005, 2012 PRINTRONIX, INC. All rights reserved.
Table of Contents 1 Introduction ......................................................... 11 About This Manual............................................................................... 11 Bi-Directional Communication ............................................................. 11 SL5000r/T5000r Printers ............................................................... 11 SL4M/T4M Printers ....................................................................... 12 Return Status Port ....................
Table of Contents Speed Cmd (CS) (SL5000r/T5000r) ....................................... 20 Status Reply Time (SL4M/T4M) ............................................. 20 Translate &%..&% (SL5000r/T5000r) ..................................... 20 UPC Descenders (SL5000r/T5000r)....................................... 21 Ver BaseRefPoint ................................................................... 21 Vert. DPI Adjust ......................................................................
Table of Contents FWccVddd – Vertical Line ...................................................... 31 FXaaabcccdddeee – Data Matrix ........................................... 31 Gabbbccc(data) – Custom Graphics ...................................... 31 GMaaaaa – BMP File ............................................................. 31 GPaaaaa – PCX File .............................................................. 31 Haaaa – Horizontal Position ...................................................
Table of Contents X21 – Font Type ..................................................................... 37 X22 – Font Type ..................................................................... 37 X23 – Font Type ..................................................................... 37 X24 – Font Type ..................................................................... 37 XBa – Font Type..................................................................... 37 XLa – Font Type .................................
Table of Contents CCa – Memory Area Select .................................................... 42 GCaaa – Recall BMP Graphic ................................................ 42 Glabbbcccdddee...e – Store Custom Graphics ...................... 43 GRccc – Recall Custom Graphics .......................................... 43 GTaaa,bbbbb,nn...n – Store BMP Graphics ........................... 43 K1abbn..n – Recalls 16Wx16H User-Defined Characters ...... 43 K2abbn..n – Recalls 24Wx24H User-Defined Characters ..
Table of Contents 3 Printer Configuration ........................................... 47 Configuration Setting Compatibility...................................................... 47 PotentioMeters .............................................................................. 47 DIP Switches ................................................................................. 48 LCD Panel, Normal Mode ............................................................. 50 LCD Panel, Advanced Mode .....................
1 Introduction About This Manual This manual explains the differences between Printer Protocol Interpreter SATO® Graphic Language (STGL) Utility and the SATO printer language. If you have a SL5000r/T5000r printer use this manual with your SL5000r™/T5000r™ User’s Manual for complete printer-protocol operation. If you have a SL4M™/T4M™ printer use this manual with your SL4M/T4M User’s Manual.
Chapter 1 Bi-Directional Communication SL4M/T4M Printers NOTE: Bi-directional communication is available through the serial, parallel, USB, and Ethernet interfaces. NOTE: If the Windows driver is used in combination with STGL, do not use bi-directional communication, use the Standard communication protocol setting. To enable bi-directional communication the following conditions must be met: • • STGL emulation must be active. Select the interface for Ret. Status Port under the PRINTER SETUP menu.
SL4M/T4M Printers STGL SETUP Menu (SL5000r/T5000r) STGL SETUP Active Yes* No Protocol C Code Standard* Non-Standard User-Defined PCC: 1 126* 0 to 255 Translate &%..&% Yes* No PitchOffsCmd (PO) Process* Ignore Printer Model CL-Series* CL-Ser Legacy Reference DPI 203* 305 M8450 1xDotExp. M8450 2xDotExp. M8450 3xDotExp. Hor. BaseRefPoint Ver.
Chapter 1 STGL SETUP MENU (SL4M/T4M) STGL SETUP MENU (SL4M/T4M) STGL SETUP Active Hor. BaseRefPoint Yes* No 0 dots* -9999 to 9999 PCC: 1 PCC: 1 125* 0 to 255 94* 0 to 255 Euro Character Ignore CR/LF 213* 0 to 255 No* Yes C128 Mode Switch Standard* Status 2 Status 3 Status 4 Status 5 Mem Select (CC1) Card* Memory 0 dots* -9999 to 9999 PCC: 1 64* 0 to 255 Character Pitch Proportional* Fixed Comm. Protocol Manual* Automatic Ver BaseRefPoint Stat.
STGL SETUP Submenus STGL SETUP Submenus Active Indicates if the STGL parser should process all incoming data, or that all data should be passed to the bottom emulation. • • Yes (default). STGL is active, process SATO commands. No. STGL is inactive, used to print pure text. BCC Check (SL4M/T4M) This setting defines how the emulation handles the BCC error detected in the data stream. This setting is available when the selected protocol is status 5. • • Disabled (default).
Chapter 1 STGL SETUP MENU (SL4M/T4M) Comm. Protocol (SL5000r/T5000r) NOTE: This printer supports bi-direction communication through Serial, Parallel, USB, and Ethernet interfaces. This setting defines the protocol used for serial communication. • Standard (default). The standard communication protocol is used as configured in the Data Protocol menu (under the SERIAL PORT main menu). • • • Status 3. SATO communication status 3 protocol. Status 4. SATO communication status 4 protocol. Status 2.
STGL SETUP Submenus DlProtCodCmd(LD) (SL5000r/T5000r) Ignores downloading of user-defined Protocol Control Codes. Euro Character This selection allows the user to specify the hexadecimal code for the character which is replaced with the Euro Character. Default is 213 (0xD5). • • 213 (default) 0 – 255. Character to replace with Euro Character. History Buffer (SL4M/T4M) This setting defines whether the history buffer is to be stored to non-volatile RAM.
Chapter 1 STGL SETUP MENU (SL4M/T4M) Item No Check (SL4M/T4M) This setting defines how the emulation handles the Item No error detected in the data stream. This setting will only be available when the selected protocol is status 5. • • Disabled (default). Item No error handling is performed. • Resume. On an Item No error the printer will go offline and indicate the error on the front panel. When the user puts the printer back online, the item/job that has the Item No error will automatically resume.
STGL SETUP Submenus PitchOffsCmd(PO) (SL5000r/T5000r) Ignore Pitch Offset Command. Selects the PaperFeed shift setting. Protocol C Code Protocol Control Codes are the special control characters that prepare the printer to receive instructions. For example, the character tells the printer that a command code will follow and the character asks for the printer status. • Standard (default). Use the predefined Standard (non-printable) Protocol Control Codes. • Non Standard.
Chapter 1 STGL SETUP MENU (SL4M/T4M) Reference DPI (SL5000r/T5000r) When parameters are defined as number of dots, these values translate to the actual printhead resolution as necessary. Graphics and downloaded bitmaps will not be scaled since this usually does not result in an image that is acceptable to users. • 203 (default). Incoming parameters are assumed to be in 300 DPI. On a 300 DPI printer, they will be scaled. • 305. Incoming parameters are assumed to be in 305 DPI.
STGL SETUP Submenus UPC Descenders (SL5000r/T5000r) Allows the user to force UPC/EAN barcodes to print with or without descenders. • • • No Change (default). Use default behaviour, matching Sato. Always. Force UPC/EAN to print with Descenders. Never. Force UPC/EAN to print without Descenders. Ver BaseRefPoint This setting changes the Vertical base reference point for all subsequent label jobs. Its effect is identical to the A3 Base Reference point command. • • 0 dots (default) 9999 to 9999 Vert.
Chapter 22 1 STGL SETUP MENU (SL4M/T4M)
2 Supported Commands General Commands Support Command Command Description SL5000r/ T5000r SLxx/ Txx Reference A Start Code Full Full page 27 A1aaaabbbb Media Size Full Full page 28 AZ Form Feed Full Full page 27 AOa Auto Online Not Supported Full page 27 AR Normal Print Length Full Full page 27 A3H-aaaa-Vbbbb Base Reference Point Full Full page 29 Babbcccd Bar Codes Partial Full page 29 BDabbcccd Bar Codes Partial Full page 29 BKaabbcddeeefffnn...
Chapter 2 General Commands Support Command Description Command SL5000r/ T5000r SLxx/ Txx Reference Dabbcccd Bar Codes Full Full page 30 DCxx...
Support Command Command Description SL5000r/ T5000r SLxx/ Txx Reference LAa Display Language Not Supported Full page 32 LHa Zero Slash Not Supported Full page 32 M Font Type Full Full page 32 OA Font Type Full Full page 32 OB Font Type Full Full page 32 OL Online Printer Status Change Not Supported Full page 32 Paa Character Pitch Full Full page 33 PR Fixed Font Spacing Full Full page 33 PS Proportional Font Spacing Full Full page 33 Qaaaaaa Print Quality
Chapter 2 General Commands Support Command Description Command SL5000r/ T5000r SLxx/ Txx Reference XM Font Type Full Full page 36 XS Font Type Full Full page 36 XU Font Type Full Full page 36 X20 Font Type Not Supported Full page 37 X21 Font Type Not Supported Full page 37 X22 Font Type Not Supported Full page 37 X23 Font Type Not Supported Full page 37 X24 Font Type Not Supported Full page 37 XBa Font Type Full Full page 37 XLa Font Type Full Full pa
Supported General Commands Support Command Command Description SL5000r/ T5000r SLxx/ Txx Reference 2D31 QR Code Mode1 Full Full page 39 2D32 Micro QR Code Full Full page 39 2D50 DataMatrix Full Full page 39 Supported General Commands A – Start Code Begins all print jobs. A Z – Form Feed Feeds a blank tag or label. AOa – Auto Online Sets the printer online automatically. If a = 0, the option is disabled. If a = 1, the option is enabled.
Chapter 2 General Commands A1aaaabbbb – Media Size This command can be used to set the media size. It moves the default origin towards the left, and causes the page-bitmap to clip at the specified length. Without this command, the width is equal to the maximum width, and the length is the maximum length. The maximum length on SATO printers is by default 7 inches (AR cmd), can be expanded to 49.2 inches with the EX0 command.
Supported General Commands A3H-aaaa-Vbbbb – Base Reference Point Establishes a new base reference point position in dots for the current label. The base reference command repositions the page-bitmap inside the page created with the Media Size command by ading a horizontal and vertical offset to every positioning command. This offset is relative to the current Media Origin. Babbcccd – Bar Codes Prints a 1:3 ratio bar code. BDabbcccd – Bar Codes Prints a 2:5 ratio bar code. BKaabbcddeeefffnn...
Chapter 2 General Commands BTabbccddee – Bar Codes Variable ratio. BXaabbccddeeefffghh – Data Matrix Data Format. Specifies the format of the Data Matrix 2-D symbology. BVa,b,c,ddddddddd,eee,f f f,gg..g – Maxicode Prints 2-D Maxicode symbols per AIM I.S.S. specifications. BWaabbb – Bar Codes Expansion Works together with the BT command to specifiy an expansion factor and the bar code height. C – Repeat Label Prints a duplicate of the last label printed.
Supported General Commands EUaaabbn~n – EAN/UCC Composite Symbol Prints barcodes using EU command. EX0 – Expanded Print Length Expands the print length to 9999 dots. See “A1aaaabbbb – Media Size” on page 28. Faaaabccccddee – Sequential Numbering Allows the printing of sequencing fields (text, bar codes) where all incrementing is done within the printer. FC – Print Circle Prints a circle. Patterns are not supported FT – Print Triangle Prints a triangle. Patterns are not supported.
Chapter 2 General Commands Haaaa – Horizontal Position From the base reference point, the number of dots horizontally. IDaa – Store Job ID Stores the Job ID number. IP0nn – EPC Code Write Designation Writes to the RFID tag without moving the paper unless there is printable data on the same label. SL5000r/T5000r commands follow the syntax for Sato printers. SL4M/T4M commands follows the syntax for newer printers. IP1 – EPC Code Read Designation The UHF RFID read command.
Supported General Commands Paa – Character Pitch Designates the number of dots between characters (all except raster fonts). PR – Fixed Font Spacing Returns the rpinter to fixed character spacing mode. PS – Proportional Font Spacing Places the printer in the proportional character spacing mode. Qaaaaaa – Print Quality Specifies the total number of labels to print. RDabb,ccc,ddd,nn...n – Font Type (SL5000r/T5000r) Specifies the internal AGFA raster fonts.
Chapter 2 General Commands Table 2.
Supported General Commands The following table lists the available character sets: Table 3. Character Sets ID Description 0 CP-858 1 Latin1 ISO8859/1 Latin1 2 Latin2 ISO8859/2 Latin2 3 Latin5 ISO8859/9 Latin5 4 CP-737 DOSGreek 5 CP-855 DOSCyrillic 6 CP-864 DOS Arabic (Not supported) 7 CP-874 Thai (Not supported) 8 CP-850 Multilingual RFaabbbbn...
Chapter 2 General Commands RMaaaa,bbbb – Mirror Image Prints mirror image of data. RZ – Message Print Register Defines RFID error handling. S – Font Type Specifies the 8W x 15H dot matrix font. Tabcc(data) – Store Custom Designed Characters Creates and stores custom characters or images in the printer’s memory. TMx – EPC Trade Mark Print Specifies printing of an EPC trademark logo on a tag label. NOTE: SL5000r/T5000r only prints Logo #0. U – Font Type Specifies the 5W x 9H dot matrix font.
Supported General Commands X20 – Font Type Specifies the 5W x 9L dot matrix font. X21 – Font Type Specifies the 17W x 17H dot matrix font. X22 – Font Type Specifies the 24W x 24L dot matrix font. X23 – Font Type Specifies the 48W x 48L dot matrix font. X24 – Font Type Specifies the 48W x 48L dot matrix font. XBa – Font Type Specifies the 48W x 48H dot matrix font. XLa – Font Type Specifies the 48W x 48H dot matrix font. Z – Stop Code Ends all print jobs. %a – Rotate Fixed Base Reference Point.
Chapter 2 General Commands (aaaa,bbbb – Reverse Image Reverse image from black to white and vice versa. & – Store Form Overlay Stores a specified label image in the printer’s volatile form overlay memory. / – Recall Form Overlay Recalls the label image from the printer’s formoverlay memory for printing. 0 (zero) – Replace Data (Partial Edit) Provides the ability to replace a specified area of the previous label with new data. *a – Clear Print Job(s) and Memory Clears individual memory and buffers.
Supported Calendar Option Commands 2D31 – QR Code Mode1 Command for QR Code Mode1 symbology. 2D32 – Micro QR Code Command for Micro QR Code symbology. 2D50 – DataMatrix Command for DataMatrix symbology. Calendar Option Commands The commands to set and use the real time clock (RTC) as defined in the SATO manual are fully supported by STGL if the RTC is installed. Clock and calendar commands are not functional if RTC is not installed.
Chapter 2 Expanded Memory Option Commands Expanded Memory Option Commands NOTE: For SL5000r/T5000r printers, information writes to Flash Memory. For SL4M/T4M printers, information writes to the internal flash or Expanded Memory Cartridge (EMC). Support Command Command Description Reference SL5000r/ T5000r SL4M/T4M BJ(aa..abb..b Start TrueType Font Storage Full Full page 41 BJDcccccddddee...
Supported Expanded Memory Option Commands Support Command Command Description Reference SL5000r/ T5000r SL4M/T4M YS,aaa/Nbb,cc Store Format/Field Full Full page 43 &R,aa Recall Form Overlay Full Full page 43 &S,aa,bbbb,cccc Store Form Overlay Full Full page 44 *a,bbb Clear Card Memory Full Full page 44 Supported Expanded Memory Option Commands BJ(aa..abb..b – Start TrueType Font Storage Prepares the Expanded Memory to accept TrueType font data.
Chapter 2 Expanded Memory Option Commands Examples ppi4_t03.bmp (in flash) TrueType bitmapped font at location 03. ppi4_012.pcx (in flash) PCX image at location 12. For SL5000r/T5000r printers, the command to print the expanded memory status (BJS) is ignored. However, the user can view the flash contents by using the “Print File List” feature from the “Printer Control” menu. This shows the STGL files present in the flash file system using the names listed above. BJDcccccddddee...
Supported Expanded Memory Option Commands Glabbbcccdddee...e – Store Custom Graphics Stores a graphic mage in the memory card to be called later for printing on a label. See “Expanded Memory Functions” on page 41. GRccc – Recall Custom Graphics Recalls for printing the graphic image stored by the GI command. See “Expanded Memory Functions” on page 41. GTaaa,bbbbb,nn...n – Store BMP Graphics Stores BMP files in Expanded Memory. See “Expanded Memory Functions” on page 41. K1abbn..
Chapter 2 Printer Configuration Commands &S,aa,bbbb,cccc – Store Form Overlay Stores a label image in Expanded Memory. See “Expanded Memory Functions” on page 41. *a,bbb – Clear Card Memory Clears individual memory and buffer areas. See “Expanded Memory Functions” on page 41.
Supported Legacy Commands PCaa,bbPCF,a,.....z – Printer Setting Sets the default printer configuration in Flash ROM. The host commands to modify configuration settings will modify the current configuration values as if the user changed them manually on the front panel. They will however not be saved to NOVRAM as the SATO printer does. It will be the user’s responsibility to save the approprite configuration as well as the power-up configuration. PHa – Print Type Selects the thermal printing method.
Chapter 2 Downloadable Fonts Downloadable Fonts The Sato printer allows downloading and storing of TrueType fonts as Bitmap. By default, since Printronix printers have internal flash installed, STGL supports downloading of bitmapped TrueType fonts to flash. Sato’s memory card manager utility (MC manager) must be used to convert files in TrueType font format (.ttf extension) to the proprietary bitmap formats that SATO printers use to download the fonts. ID for the fonts is not assigned via the command.
3 Printer Configuration SATO printers have four ways of configuring the operational parameters printer settings: • • • • dip switches potentiometers LCD menu settings commands in the data stream. The host commands to modify configuration settings will modify the current configuration values as if the user changed them manually on the front panel. NOTE: Unlike the SATO printers, the modified configuration settings will not be saved to NOVRAM.
Chapter 3 Configuration Setting Compatibility • SATO setting: PITCH Potentiometer to adjust home position of the label (+/-3.75 mm). Affects stop position of the label feed, print position, and dispense position.
DIP Switches • SATO setting: DSW3-3 Label Sensor Selection. Enables or disables the Label Sensor. Printronix setting: SL5000r/T5000r: CALIBRATE CONTROL X Gap/Mark Sensor SL4M/T4M: SENSOR SETUP X Gap/Mark Sensor • SATO setting: DSW3-4 Back-Feed Selection. When Back-Feed is enabled, the printer positions the last printed label for dispensing and retracts it before priting the next label.
Chapter 3 Configuration Setting Compatibility LCD Panel, Normal Mode • SATO setting: PRINT DARKNESS Used to adjust the amount of heat (i.e. power) applied to the head for printing. Printronix setting: SL5000r/T5000r: MEDIA CONTROL X Print Intensity SL4M/T4M: MEDIA SETUP X Print Intensity • SATO setting: PRINT SPEED Sets the print speed in inch/second.
LCD Panel, Card Mode • SATO setting: IGNORE CR/LF This selection tells the printer to strip out all carriage return/line feed pairs (CRLF) from the data stream, including graphics and 2D bar codes. It is used primarily to maintain compatibility with earlier models of SATO printers. Printronix setting: STGL SETUP X Ignore CR/LF • SATO setting: CHARACTER PITCH This selection allows you to set the default character pitch to either fixed character spacing or proportional character spacing.
Chapter 52 3 Configuration Setting Compatibility • SATO setting: REPRINT W/FEED This selection specifies whether or not the printer will print the last printed label stored in memory when the FEED key is pressed in the Normal Online mode. Printronix setting: SL5000r/T5000r: Supported through GPIO SL4M/T4M: Not supported • SATO setting: FORWARD/BACKFEED DISTANCE This display only appears when Backfeed is enabled (DSW3-4 = OFF) 0 - 255 mm.
LCD Panel, Counter Mode LCD Panel, Counter Mode • SATO setting: SELECT COUNTER HD:Head Counter (should be reset when printhead is replaced).
Chapter 54 3 Configuration Setting Compatibility
A ASCII Codes Char Dec Hex Char Dec Hex Char Dec Hex Char Dec Hex NUL 0 00 EM 25 19 2 50 32 K 75 4B SOH 1 01 SUB 26 1A 3 51 33 L 76 4C STX 2 02 ESC 27 1B 4 52 34 M 77 4D EXT 3 03 FS 28 1C 5 53 35 N 78 4E EOT 4 04 GS 29 1D 6 54 36 O 79 4F ENQ 5 05 RS 30 1E 7 55 37 P 80 50 ACK 6 06 US 31 1F 8 56 38 Q 81 51 BEL 7 07 32 20 9 57 39 R 82 52 BS 8 08 ! 33 21 : 58 3A S 83 53 HT 9 09 + 34 22
Appendix A Char Dec Hex Char Dec Hex Char Dec Hex Char Dec Hex d 100 64 k 107 6B r 114 72 y 121 79 e 101 65 l 108 6C s 115 73 z 122 7A f 102 66 m 109 6D t 116 74 { 123 7B g 103 67 n 110 6E u 117 75 | 124 7C h 104 68 o 111 6F v 118 76 } 125 7D i 105 69 p 112 70 w 119 77 ~ 126 7E j 106 6A q 113 71 x 120 78 127 7F 56
B Contact Information Printronix Customer Support Center IMPORTANT Please have the following information available prior to calling the Printronix Customer Support Center: • • • • Model number Serial number (located on the back of the printer) Installed options (i.e., interface and host type if applicable to the problem) Configuration printout: Thermal Printer See “Printing A Configuration” in the Quick Setup Guide.
Appendix B Corporate Offices Corporate Offices Printronix, Inc. 15345 Barranca Parkway Irvine, CA 92618 U.S.A. Phone: (714) 368-2300 Fax: (714) 368-2600 Printronix Inc. c/o Printronix Nederland BV Bijsterhuizen 11-38 6546 AS Nijmegen The Netherlands Phone: (31) 24 6489489 Fax: (31) 24 6489499 Printronix Schweiz GmbH 42 Changi South Street 1 Changi South Industrial Estate Singapore 486763 Phone: (65) 6542 0110 Fax: (65) 6546 1588 Printronix Commercial (Shanghai) Co. Ltd 22F, Eton Building East No.
*178601-001* 178601-001J