SATO CX208/212 manual Introduction, Sato Programming Language

Page 5

CX208/212 PROGRAMMING GUIDE

INTRODUCTION

This section presents the commands that are used with the SATO CX208/212 printers to produce labels with logos, bar codes and alphanumeric data. The commands listed include all revisions of firmware up to and including P2.15.

The following information is presented in this section:

The SATO Programming Language

Selecting Protocol Control Codes

Using Basic

The Print Area

Printer Configuration

Command Codes

THE SATO PROGRAMMING LANGUAGE

A programming language for a printer is a familiar concept to most programmers. It is a group of commands that are designed to use the internal intelligence of the printer. The commands, which are referred to as SATO Command Codes, contain non-printable ASCII characters (such as <STX>, <ETX>, <ESC>) and printable characters. These commands must be assembled into an organized block of code to be sent as one data stream to the printer, which in turn interprets the command codes and generates the desired label output. The programmer is free to use any programming language available to send the desired data to the printer.

The command codes used are based upon “Escape” (1B hexadecimal) sequences. Typically there are four types of command sequences:

<ESC>{Command}

These commands generally tell the printer to perform a specific action, like “clear the memory.”

<ESC>{Command} {Data}

Commands with this format tell the printer to perform a specific action which is dependent upon the following data, like “print X labels”, where the value for X is contained in the data.

<ESC>{Command} {Parameter}

These commands set the operational parameters of the printer, like “set the print speed to 3.”

SATO CX208/212 Printers

PN 9001092 Rev. A

Page 1

Image 5
Contents CX208/212 Page Table of Contents Sato CX208/212 Printers PN 9001092 Rev. a Sato Programming Language IntroductionSelecting Protocol Control Codes Using BasicPrinting with the RS232 Port Printing with the Parallel PortCX208/212 Programming Guide Print AreaPage Rotated Fields Printer Configuration Command Default SettingsLabel Sensing ESCAESCCP1ESCCI2ESCCAESCZ Command Code page Reference MSI Bar CodesInput to Printer A01597Printer Output CX208/212 Programming Guide Special Notes Printer Output Special Notes Command Structure ESCBWaabbbBar Codes, Expansion Bar Codes, Variable Ratio Command Structure ESCBTabbccddeeThis command must be immediately followed by the Escbw Base Reference Point Command Structure ESCA3H-aaaaVbbbbPrinter configuration until a new Base Reference Point Characters, Custom-Designed Command Structure Store Command ESCTabccESCK1H903F Printer InputWhen printing the custom character using the Esck Recall Character Expansion This command will expand the following fonts Character, Fixed Spacing Command Structure EscprCharacter Pitch Command Structure ESCPaaThis command is affected by the Escl Character Expansion Character, Proportional Spacing Command Structure EscpsSpecial Note Command StructureClear Print Jobs & Memory Continuous Forms Printing Command Structure NoneExample ESCWDH0100V0050X0600Y0400 Command Structure ESCWDHaaaaVbbbbXccccYddddCopy Image Area Horizontal 0001 Aaaa Command Structure ESC~aaaa or ESCNULaaaa Cutter CommandEscoa Fonts U, S, M, OA, OB, XU, XS & XMCharacters may be enlarged through the use of the Character ESCWB1123456 Fonts WB, WL, XB & XLCharacters may be enlarged through the use of the Escl Form Feed Form Overlay, Recall Command Structure ESCForm Overlay, Store Graphics, Custom Command Structure ESCGabbbcccdataCustom graphic cannot be enlarged by the Escl Character Graphics, PCX Command Structure ESCGPaaaaa,dataJournal Print Command Structure EscjESCFWaabbVccccHdddd Command Structure Line ESCFWaabccccLines and Boxes CX208/212 Programming Guide Field ranges are Line Feed Media Size Command Structure ESCA1aaaabbbbOff-Line/Pause Postnet Command Structure ESCBPn...nPrint Darkness Command Structure ESC#EaMaximum Print Length, ExpandedPrint length, or until the printer is repowered ESCQ2ESCZAH0025100 0150ESCL0303ESCMSATO Print PositionPrint position of a field is affected by both the Rotate Print Quantity Command Structure ESCQaaaaaaPrint Speed Command Structure ESCCSaEscc Repeat LabelReplace Data Partial Edit Command Structure ESC0 ESCzeroFewer characters than the old data, then the characters not ESC100,50 Command Structure ESCaaaa,bbbbReverse Image CX208 CX212 Rotate, Fixed Base Reference Point Command Structure ESC%aSame data stream Rotate, Moving Base Reference Point ESCAQ1ESCZNRThis command is provided for compatibility with other Sato ESCF001-001,04,03 Command Structure ESCFaaaabcccc,dd,eeSequential Numbering Value specified for Print Quantity should be equal to Start/Stop Label Expanded Memory Option Commands Expanded Memory Function Clear Expanded Memory Command Structure ESC*a,bbExample ESCBJT,11,02,02,01,00,0004,SATO Command Structure ESCBJT,aa,bb,cc,dd,ee,ffff,gg..gExpanded Memory Function Fonts, TrueType Recall Expanded Memory Function Fonts, TrueType Store Expanded Memory Function Graphics, Custom Recall Command Structure Command Function Printer Input ESCGRaaaExpanded Memory Function Graphics, Custom Store Command Structure ESCGIabbbcccddddataESCGIHaaabbb002DATA Escz Expanded Memory Function Graphics, PCX Recall Command Structure ESCPYaaaESCPI001,32000,data Expanded Memory Function Graphics, PCX StoreExpanded Memory Function Initialize ESCZCC2ESCAExpanded Memory Function Area Select ESCZACC1Expanded Memory Function Status BJSTwo-Dimensional Symbols Example ESCBV1,2,3,123456789,222,333,MESSAGEESC Two-Dimensional Bar Codes MaxicodePlease refer to UPS Publication Guide to Bar Coding with UPS BK0304400000021 Two-Dimensional Bar CodesCommand Structure Command Function Printer Input Values 00Hthru 1FHcan be specified as print data Configuration Commands Auto-Calibrate Command Structure ESCCFaCommand Structure ESCCEa Backfeed EnableCalibrate Sensor Command Structure ESCLD,a,b,c,d,e,f,g,h,i Custom Protocol Command Codes DownloadCommand Function Printer Input Printer Output ESCLD,,,%,#,&,*,~,0,0Resulting Command Code Label Tear-Off Command Structure ESCCBabbPrint Darkness Range Adjustment ESC Azct Print Test LabelCommand Structure ESCCPa Set Print ModeSet RS232 Parameters Command Structure ESCCRaaaaa,b,c,dESC AZCI2 Command Structure ESCCIaSet Sensor Type ESC CL1 Enable OptionsMode