SATO CX208/212 manual Printing with the Parallel Port, Printing with the RS232 Port

Page 7

CX208/212 Programming Guide

2.If you are using the printer’s RS232 interface, it is necessary to set the COM port on the PC such that the CTS and DSR signals will be ignored. Send your OPEN “COM” statement in the following way:

OPEN “COM1:9600,E,8,1,CS,DS” AS #1

This sets the RS232 communication parameters of the host PC’s COM1 port for 9600 baud, Even parity, 8 Data bits, 1 Stop bit and directing the port to ignore the CTS and DSR control signals.

3.You may want to minimize keystrokes and program size by assigning the <ESC> character to a string variable since this character is used quite often.

The following two examples in BASIC show a typical example using these hints. Both of these examples use the Standard Protocol codes.

Printing with the Parallel Port

5

REM Parallel Example

Identifies the program as a parallel port

 

 

print label. The “REM” prevents this data

 

 

from being sent to the printer and

 

 

displays it only on the screen.

10

E$=CHR$(27)

Sets the “E$” string as an <ESC>

 

 

character

20

WIDTH “LPT1:”,255

Sets the width of the output to 255

 

 

characters

30

LPRINT E$;"A";

Sends an “<ESC>A” command code to

 

 

the LPT1 parallel port

40

LPRINT E$;"H400";E$;"V100";E$;"WL1SATO";

Sends the data “SATO” to be to be

 

 

placed 400 dots horizontally and 100

 

 

dots vertically on the label and printed in

 

 

the “WL” font.

50

LPRINT E$;"Q1";

Instructs the printer to print one label.

60

LPRINT E$; “Z”;

Tells the printer that the last command

 

 

has been sent. The printer can now

 

 

create and print the job.

Printing with the RS232 Port

5

REM RS232 Example

Identifies the program as a RS232 port

 

 

print label. The “REM” prevents this data

 

 

from being sent to the printer and

 

 

displays it only on the screen.

10

E$=CHR$(27)

Sets the “E$” string as an <ESC>

 

 

character.

20

OPEN “COM1:9600,N,8,1,CS,DS” AS #1

Opens the COM1 port for output and

 

 

sets the parameters as 9600 baud, No

 

 

parity, 8 Data bits, 1 Stop bit and

 

 

instructs the port to ignore the CTS and

 

 

DSR control signals.

30

PRINT #1,CHR$ (2);

Sends an <STX> (ASCII Code a

 

 

decimal “2”) to the printer instructing it to

 

 

prepare to receive a message.

SATO CX208/212 Printers

PN 9001092 Rev. A

Page 3

Image 7
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 Bar Codes, Expansion Command Structure ESCBWaabbbPrinter Output Special Notes 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 Printer Input Command Structure Store Command ESCTabccCharacters, Custom-Designed ESCK1H903FWhen 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 EscpsClear Print Jobs & Memory Command StructureSpecial Note Continuous Forms Printing Command Structure NoneCopy Image Area Command Structure ESCWDHaaaaVbbbbXccccYddddExample ESCWDH0100V0050X0600Y0400 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 EscjLines and Boxes Command Structure Line ESCFWaabccccESCFWaabbVccccHdddd 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 Reverse Image Command Structure ESCaaaa,bbbbESC100,50 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 Sequential Numbering Command Structure ESCFaaaabcccc,dd,eeESCF001-001,04,03 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,bbExpanded Memory Function Fonts, TrueType Recall Command Structure ESCBJT,aa,bb,cc,dd,ee,ffff,gg..gExample ESCBJT,11,02,02,01,00,0004,SATO 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 Command Structure Command Function Printer Input Two-Dimensional Bar CodesBK0304400000021 Values 00Hthru 1FHcan be specified as print data Configuration Commands Auto-Calibrate Command Structure ESCCFaCommand Structure ESCCEa Backfeed EnableCalibrate Sensor ESCLD,,,%,#,&,*,~,0,0 Custom Protocol Command Codes DownloadCommand Structure ESCLD,a,b,c,d,e,f,g,h,i Command Function Printer Input Printer OutputResulting 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,dSet Sensor Type Command Structure ESCCIaESC AZCI2 ESC CL1 Enable OptionsMode