SATO CX208/212 manual Selecting Protocol Control Codes, Using Basic

Page 6

CX208/212 Programming Guide

<ESC> {Command} {Parameter} {Data}

Some commands can contain both Parameter and Data elements, such as “print a Code 39 symbol containing the data.”

SELECTING PROTOCOL CONTROL CODES

Protocol codes are the special control characters that prepare the printer to receive instructions. For example, the <ESC> character tells the printer that a command code will follow.

The Protocol Control Code set set is made up of six special characters. The Standard Protocol Control codes are non-printable characters. They can be changed to printable characters using the Protocol Control code download command. This may be useful on host computers using protocol converters or in an application where non-printable ASCII characters cannot be sent from the host. This manual uses the Standard Protocol Control codes for all of the examples.

The Protocol Control codes must be downloaded from the host using the <ESC>LD command. Once they are downloaded, the printer will not respond to standard protocol codes. The current protocol codes active in a printer can be determined by printing a Test Label (see CX208/212 User’s Guide, Page 9).

CONTROL

HEX VALUE

DESCRIPTION

CHARACTER

 

 

 

 

 

 

 

 

STX

02

Start of Data

 

 

 

ETX

03

End of Data

 

 

 

ESC

1B

Command code to follow

 

 

 

ENQ

05

Not Used on CX200

 

 

 

CAN

18

Not Used on CX200

 

 

 

Off-Line

40

Take printer Off-Line

 

 

 

 

 

 

USING BASIC

It may be useful to test your printer using a BASIC program on a PC. You may also write your actual production programs in BASIC. Whatever the reason, if you will be working in BASIC, some of the following hints may help you get started:

1.Set the WIDTH of the output device to 255 characters to avoid automatically sending <CR> and <LF> characters after every line. The command string should be continuous and uninterrupted by <CR> and/or <LF> commands. The examples given in this manual are printed on separate lines because they will not fit on one line and do not contain any <CR> and/or <LF> characters. If these characters are needed, they are explicitly noted by the inclusion of <CR> and <LF> notations.

SATO CX208/212 Printers

PN 9001092 Rev. A

Page 2

Image 6
Contents CX208/212 Page Table of Contents Sato CX208/212 Printers PN 9001092 Rev. a Introduction Sato Programming LanguageUsing Basic Selecting Protocol Control CodesPrinting with the Parallel Port Printing with the RS232 PortPrint Area CX208/212 Programming GuidePage Rotated Fields Command Default Settings Printer ConfigurationLabel Sensing ESCAESCCP1ESCCI2ESCCAESCZ Command Code page Reference Bar Codes MSIA01597 Input to PrinterPrinter Output CX208/212 Programming Guide Special Notes Command Structure ESCBWaabbb Bar Codes, ExpansionPrinter Output Special Notes Command Structure ESCBTabbccddee Bar Codes, Variable RatioThis command must be immediately followed by the Escbw Command Structure ESCA3H-aaaaVbbbb Base Reference PointPrinter configuration until a new Base Reference Point ESCK1H903F Command Structure Store Command ESCTabccCharacters, Custom-Designed Printer InputWhen printing the custom character using the Esck Recall Character Expansion This command will expand the following fonts Command Structure Escpr Character, Fixed SpacingCommand Structure ESCPaa Character PitchThis command is affected by the Escl Character Expansion Command Structure Escps Character, Proportional SpacingCommand Structure Clear Print Jobs & MemorySpecial Note Command Structure None Continuous Forms PrintingCommand Structure ESCWDHaaaaVbbbbXccccYdddd Copy Image AreaExample ESCWDH0100V0050X0600Y0400 Horizontal 0001 Aaaa Cutter Command Command Structure ESC~aaaa or ESCNULaaaaFonts U, S, M, OA, OB, XU, XS & XM EscoaCharacters may be enlarged through the use of the Character Fonts WB, WL, XB & XL ESCWB1123456Characters may be enlarged through the use of the Escl Form Feed Command Structure ESC Form Overlay, RecallForm Overlay, Store Command Structure ESCGabbbcccdata Graphics, CustomCustom graphic cannot be enlarged by the Escl Character Command Structure ESCGPaaaaa,data Graphics, PCXCommand Structure Escj Journal PrintCommand Structure Line ESCFWaabcccc Lines and BoxesESCFWaabbVccccHdddd CX208/212 Programming Guide Field ranges are Line Feed Command Structure ESCA1aaaabbbb Media SizeOff-Line/Pause Command Structure ESCBPn...n PostnetCommand Structure ESC#Ea Print DarknessPrint Length, Expanded MaximumPrint length, or until the printer is repowered Print Position ESCQ2ESCZAH0025100 0150ESCL0303ESCMSATOPrint position of a field is affected by both the Rotate Command Structure ESCQaaaaaa Print QuantityCommand Structure ESCCSa Print SpeedRepeat Label EsccCommand Structure ESC0 ESCzero Replace Data Partial EditFewer characters than the old data, then the characters not Command Structure ESCaaaa,bbbb Reverse ImageESC100,50 CX208 CX212 Command Structure ESC%a Rotate, Fixed Base Reference PointSame data stream ESCAQ1ESCZNR Rotate, Moving Base Reference PointThis command is provided for compatibility with other Sato Command Structure ESCFaaaabcccc,dd,ee Sequential NumberingESCF001-001,04,03 Value specified for Print Quantity should be equal to Start/Stop Label Expanded Memory Option Commands Command Structure ESC*a,bb Expanded Memory Function Clear Expanded MemoryCommand Structure ESCBJT,aa,bb,cc,dd,ee,ffff,gg..g Expanded Memory Function Fonts, TrueType RecallExample ESCBJT,11,02,02,01,00,0004,SATO Expanded Memory Function Fonts, TrueType Store Command Structure Command Function Printer Input ESCGRaaa Expanded Memory Function Graphics, Custom RecallCommand Structure ESCGIabbbcccddddata Expanded Memory Function Graphics, Custom StoreESCGIHaaabbb002DATA Escz Command Structure ESCPYaaa Expanded Memory Function Graphics, PCX RecallExpanded Memory Function Graphics, PCX Store ESCPI001,32000,dataESCZCC2ESCA Expanded Memory Function InitializeESCZACC1 Expanded Memory Function Area SelectBJS Expanded Memory Function StatusTwo-Dimensional Symbols Two-Dimensional Bar Codes Maxicode Example ESCBV1,2,3,123456789,222,333,MESSAGEESCPlease refer to UPS Publication Guide to Bar Coding with UPS Two-Dimensional Bar Codes Command Structure Command Function Printer InputBK0304400000021 Values 00Hthru 1FHcan be specified as print data Configuration Commands Command Structure ESCCFa Auto-CalibrateBackfeed Enable Command Structure ESCCEaCalibrate Sensor Command Function Printer Input Printer Output Custom Protocol Command Codes DownloadCommand Structure ESCLD,a,b,c,d,e,f,g,h,i ESCLD,,,%,#,&,*,~,0,0Resulting Command Code Command Structure ESCCBabb Label Tear-OffPrint Darkness Range Adjustment Print Test Label ESC AzctSet Print Mode Command Structure ESCCPaCommand Structure ESCCRaaaaa,b,c,d Set RS232 ParametersCommand Structure ESCCIa Set Sensor TypeESC AZCI2 Enable Options ESC CL1Mode