Wasp WPL305 Programming Manual

Wasp WPL305 Programming Manual

Bar code printer series
Hide thumbs Also See for WPL305:

Advertisement

WPL2
Wasp Technologies
BAR CODE PRINTER SERIES
PROGRAMMING
MANUAL

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the WPL305 and is the answer not in the manual?

Questions and answers

Summary of Contents for Wasp WPL305

  • Page 1 WPL2 Wasp Technologies BAR CODE PRINTER SERIES PROGRAMMING MANUAL...
  • Page 2: Revise History

    Revise History Date Description Remark 2003/09/19 1. BASIC functions are added to WPL2 2. Supported code page update 2004/5/21 QR code is supported...
  • Page 3: Table Of Contents

    TABLE OF CONTENTS DOCUMENT CONVENTIONS ... I SETUP AND SYSTEM COMMANDS ... 1 SIZE ... 1 GAP ... 3 BLINE ... 5 OFFSET ... 6 SPEED... 7 DENSITY... 8 DIRECTION ... 9 REFERENCE ... 10 COUNTRY ... 11 CODEPAGE ... 12 FEED...
  • Page 4 SET PEEL ... 91 SET TEAR... 92 SET GAP... 93 SET RIBBON ... 95 SET COM1 ... 96 SET PRINTKEY... 97 PRINTER GLOBAL VARIABLES ... 97 @LABEL ... 98 YEAR ... 99 MONTH ... 100 DATE ... 101 HOUR... 103...
  • Page 5 SECOND... 105 @YEAR ... 106 @MONTH ... 107 @DATE... 108 @DAY ... 109 @HOUR... 110 @MINUTE ... 111 @SECOND ... 112...
  • Page 6: Document Conventions

    2*1024 bytes; ESCAPE (ASCII 27), control code of status polling command, which returns the printer status immediately, no matter the printer is ready or not. (ASCII 126), control code of status polling command, which returns the printer status only when the printer is ready.
  • Page 7: Setup And System Commands

    300 DPI: 1mm = 12 dots For metric system, there must be a space between parameter and “mm”. Max. 102mm width WPL606 WPL305 Example (1) English system (inch) SIZE 3.5, 3.00 (2) Metric system (mm) SIZE 100 mm, 100 mm See Also Wasp Technologies.
  • Page 8 GAP, BLINE Copyright 2001 All Rights Reserved. Wasp Technologies.
  • Page 9: Gap

    (1) English system (inch) GAP 0.12,0 (2) Metric system (mm) GAP 3 mm,0 Wasp Technologies. Description The gap distance between two labels 0 ≤ m ≤ 1 (inch), 0 ≤ m ≤ 25.4 (mm) The offset distance of the gap n ≤...
  • Page 10 Special gap (1) English system (inch) GAP 0.30, 0.10 (2) Metric system (mm) GAP 7.62 mm, 2.54 mm See Also SIZE, BLINE Wasp Technologies. Copyright 2001 All Rights Reserved.
  • Page 11: Bline

    (2) Metric system (mm) BLINE 5.08 mm,12.7 mm See Also SIZE, GAP Wasp Technologies. Description The height of black line either in inch or mm. 0.1 ≤ m ≤ 1 (inch), 2.54 ≤ m ≤ 25.4 (mm) The extra label feeding length. 0 ≤ n ≤ label length...
  • Page 12: Offset

    The printer backtracks the extra feeding length before the next run of printing. Syntax...
  • Page 13: Speed

    SPEED Description This command defines the print speed. Syntax SPEED n Parameter WPL606 WPL305 Example SPEED 10 See Also DENSITY Wasp Technologies. Description printing speed in inch per second Copyright 2001 All Rights Reserved.
  • Page 14: Density

    DENSITY Description This command designates the level of darkness of printing. Syntax DENSITY n Parameter Example DENSITY 7 See Also DENSITY Wasp Technologies. Description 0, specifies the lightest level 15, specifies the darkest level Copyright 2001 All Rights Reserved.
  • Page 15: Direction

    DIRECTION Description This command defines the printout direction. Syntax DIRECTION n Parameter Example DIRECTION 0 See Also REFERENCE Wasp Technologies. Description 0 or 1. Please refer to the illustrations below: Copyright 2001 All Rights Reserved.
  • Page 16: Reference

    200 DPI: 1 mm = 8 dots 300 DPI: 1 mm = 12 dots Example REFERENCE 10,10 See Also DIRECTION Wasp Technologies. Description Horizontal coordinate, with “dot” as the unit. Vertical coordinate, with “dot” as the unit. Copyright 2001 All Rights Reserved.
  • Page 17: Country

    LCD keyboard (option) to orient the keyboard for use in different countries. Syntax COUNTRY n Parameter Example COUNTRY 001 See Also CODEPAGE Wasp Technologies. Description 001: USA 002: Canadian-French 003: Spanish (Latin America) 031: Dutch 032: Belgian 033: French (France)
  • Page 18: Codepage

    Note: Whether to use 7-bit or 8-bit code page is determined by the communication parameter of DATA LENGTH Example CODEPAGE 437 See Also COUNTRY, SET COM1 Wasp Technologies. Description name or number of code page, which can be divided into 7-bit code page and 8-bit code page further. Copyright 2001 All Rights Reserved.
  • Page 19: Feed

    Parameter Example FEED 40 Note: 200 DPI: 1 mm = 8 dots 300 DPI: 1 mm = 12 dots See Also BACKFEED, SIZE, GAP, BLINE Wasp Technologies. Description unit: dot 1 ≤ n ≤ 9999 Copyright 2001 All Rights Reserved.
  • Page 20: Backfeed

    CAUTION: Impropriety back feed value may cause paper jam or wrinkle. Note: 200 DPI: 1 mm = 8 dots 300 DPI: 1 mm = 12 dots See Also FEED, SIZE, GAP, BLINE Wasp Technologies. Description unit: dot 1 ≤ n ≤ 9999 Copyright 2001 All Rights Reserved.
  • Page 21: Formfeed

    FORMFEED Description This command feeds label to the beginning of next label. Syntax FORMFEED Parameter None Example FORMFEED See Also FEED, SIZE, GAP, BLINE Wasp Technologies. Description Copyright 2001 All Rights Reserved.
  • Page 22: Home

    HOME Description It is not expected the first label will be printed on the right position when the printer power is turned on. This command will feed label to the beginning of next label. The size of the label should be setup in advance.
  • Page 23: Print

    Wasp Technologies. Description Specifies how many sets of labels will be printed. 1 ≤ m ≤ 999999999 If m=-1, printer will print the last label content for n copies. Specifies how many copies should be printed for each set of label.
  • Page 24: Cut

    Description At this command, the printer will activate the cutter to cut the labels immediately without back feeding the label. Syntax Parameter None See Also SET CUTTER Wasp Technologies. Description Copyright 2001 All Rights Reserved.
  • Page 25: Label Formatting Commands

    Label Formatting Commands Description This command clears the image buffer. Syntax Parameter None Note: This command must be placed after SIZE command. Example See Also SIZE, GAP, BLINE Wasp Technologies. Description Copyright 2001 All Rights Reserved.
  • Page 26: Bar

    Recommended max. bar height is 12mm at 4” width. Bar height over than 12 mm may damage the power supply and affect the print quality. Max. print ratio is different for each printer model. Desktop and industrial printer print ratio is limited to 20% and 30% respectively.
  • Page 27: Erase

    X_width Y_height Example ERASE 100,100,200,200 See Also Wasp Technologies. Description The x-coordinate of the starting point in dot The y-coordinate of the starting point in dot The region width in x-axis direction in dot The region height in y-axis direction in dot...
  • Page 28: Reverse

    Height of reversed area that is larger than 12 mm may damage the power supply and affect the print quality. Max. print ratio is different for each printer model. Desktop and industrial printer print ratio is limited to 20% and 30% respectively.
  • Page 29: Box

    Recommended max. thickness of box is 12mm at 4” width. Thickness of box that is larger than 12 mm may damage the power supply and affect the print quality. Max. print ratio is different for each printer model. Desktop and industrial printer print ratio is limited to 20% and 30% respectively. Example...
  • Page 30: Bitmap

    Example BITMAP 100,100,10,1,2,1111111111 See Also PUTBMP, PUTPCX Wasp Technologies. Description Specify the x-coordinate of the bitmap image Specify the y-coordinate of the bitmap image The width of the image in bytes The height of the image in dot...
  • Page 31: Putbmp

    Syntax PUTBMP X, Y, ”filename” Parameter filename Note: Recommend two-color format (black and white). Maximum 256-color. This command is available for the following printer models. WPL606, WPL305 Example PUTBMP 100,100,”LOGO.BMP” Wasp Technologies. Description The x-coordinate of the BMP format image The y-coordinate of the BMP format image The downloaded BMP filename.
  • Page 32: Putpcx

    This command is used to print PCX format image. Syntax PUTPCX X, Y, ”filename” Parameter filename Note: Recommend two-color format (black and white). Maximum 256-color. 256-color supported models: WPL606, WPL305 Example PUTPCX 100,100,”LOGO.PCX” See Also BITMAP, PUTPCX Wasp Technologies. Description...
  • Page 33: Barcode

    EAN 8 with 5 digits add-on Codabar Postnet UPC-A UPC-A with 2 digits add-on UPC-A with 5 digits add-on UPC-E UPC-E with 2 digits add-on UPC-E with 5 digits add-on PLESSEY China POST ITF14 EAN14 Wasp Technologies. Copyright 2001 All Rights Reserved.
  • Page 34 EAN8+2 EAN8+5 CODA POST UPCA UPCA+2 Wasp Technologies. Description Specify the x-coordinate of the bar code on label Specify the y-coordinate of the bar code on label Code 128, switching code subset A, B, C automatically Code 128, switching code subset A, B, C manually.
  • Page 35 CODA POST UPCA UPCA+2 UPCA+5 UPCE UPCE+2 UPCE+5 CPOST Wasp Technologies. UPC-A with 5 digits add-on UPC-E China post code MSI code PLESSEY code ITF 14 code EAN 14 code bar code height expressed by dot 0: human not readable...
  • Page 36 (The above example of code 128M encoded with CODE B start character. The next character will be the code 128 function character FNC3 which is then followed by the ABCD characters and EFGH characters encoded as CODE A subset.) Wasp Technologies. the maximum number of digits of bar code content Maximum bar code length Copyright 2001 All Rights Reserved.
  • Page 37: Dmatrix

    Parameter width height Example DMATRIX 10,10,400,400,”DMATRIX” DMATRIX 10,10,400,400,L7,DMATRIX Wasp Technologies. Description Horizontal start position in dot Vertical start position in dot The expected width of barcode area in dot The expected height of barcode area in dot Module size in dot Expression length (without double quote), 1≤m≤2048...
  • Page 38: Maxicode

    For other countries, the code is up to 6 alphanumeric characters. For mode 4,5,6 MAXICODE x, y, mode, [Lm], "message" * AIM special format is supported, see page 23 in the spec. Note: Mode 6 is not supported in WPL303, WPL305 Printers firmware. Parameter mode class...
  • Page 39 SIZE 4.00,3.00 GAP 0.10,0 DENSITY 10 REM SET MAXIMODE 5 MAXICODE 24,24,5,"THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MA" BOX 424,16,700,60,2 DIRECTION 0 PRINT 1 Copyright 2001 All Rights Reserved. Wasp Technologies.
  • Page 40: Pdf417

    270: expression [option] Example PDF417 100,200,200,300,0,E1,”abcdef” PDF417 100,200,200,300,0,E1,L6,abcdef Wasp Technologies. X-coordinate of the starting point in dot Y-coordinate of the starting point in dot The expected width of barcode in dot The expected height of barcode in dot Rotation counterclockwise.
  • Page 41: Qrcode

    Annex 1 Shift Coded Representation for detail.). Data characters per symbol (for maximum symbol size): 1). Numeric data: 2). Alphanumeric data: Wasp Technologies. Description The upper left corner x-coordinate of the QR code The upper left corner y-coordinate of the QR code...
  • Page 42 SIZE 4,2.5 GAP 0.12,0 QRCODE 10,10,H,4,A,0,"ABCabc123" QRCODE 160,160,H,4,A,0,"123ABCabc" QRCODE 310,310,H,4,A,0," PRINT 1,1 b. Data string including <Enter> character (0Dh, 0Ah) SIZE 4,2.5 Wasp Technologies. 486 characters 2,953 characters 299 characters 1,817 characters ; 0012: 12 bytes ) 印 表 機 ABCabc123"...
  • Page 43 QRCODE 10,10,H,4,M,0,"AABC!B0003abc!N123" QRCODE 160,160,H,4,M,0,"N123!AABC!B0003abc" QRCODE 310,310,H,4,M,0,"K PRINT 1,1 b. Data string including <Enter> character, <Enter> is an 8-bit byte data SIZE 4,2.5 CAP 0.12,0 Wasp Technologies. 印 表 機 < Enter> ABCabc123"+"1234"+"abcd" 印 表 機 ¥ ["]ABCabc123" 印 表 機...
  • Page 44 Data string including double quote (“) character, please use ¥["] instead of SIZE 4,2.5 CAP 0.12,0 QRCODE 10,10,H,4,M,0,"AABC!B0005¥["]abc¥["]!N123" QRCODE 160,160,H,4,M,0,"N123!B0001¥["]!AABC!B0004¥["]abc" QRCODE 310,310,H,4,M,0,"B0001¥["]!K PRINT 1,1 Wasp Technologies. 印 表 機 ! B0002<Enter> ! AABC!B0014abc123"+"1234"+"abcd" 印 表 機 ! B0010¥["]ABCabc123" 印 表 機...
  • Page 45: Text

    Rotation X-multiplication: Y-multiplication: Example TEXT 100,100,”3”,0,1,1,”DEMO FOR TEXT” TEXT 100,400,”ROMAN.TTF”,0,1,20,”True Type Font Test Print” Wasp Technologies. Description The x-coordinate of the text The y-coordinate of the text Font name 8 x 12 fixed pitch dot font 12 x 20 fixed pitch dot font...
  • Page 46: Status Polling Commands (Rs-232)

    <ESC> (ASCII 27, escape character) as the beginning control character to the printer. It can be sent any time, even in the event of printer error. One byte character is returned, of which one bit is used to flag the printer’s current readiness status.
  • Page 47: Esc>!R

    <ESC>!R Description This command is used to reset the printer. It can be sent at any time as long as the printer is powered on and not in the dump mode. The beginning of the command is an ESCAPE character (ASCII 27). The files downloaded in memory will be deleted.
  • Page 48 Description The command is used to inquire the code page and country setting of the printer. The returned information is given in the following format code page, country code ex: 8 bit: 437, 001 7 bit: USA, 001 Regarding the code pages and country codes supported by the printer, please refer to the CODEPAGE and COUNTRY command respectively.
  • Page 49 Description This command is used to inquire about files resident in the printer memory and fonts installed in the memory module. The filename is returned in ASCII characters. Each file name ends with 0x0D 0x0A. The ending character is 0x1A.
  • Page 50: Message Translation Protocols

    Message Translation Protocols Description The beginning identifier (~#) of the prompt message is sent from the printer to the KP-200 portable keyboard. The ending identifier is ~&. @0 following the ending identifier ~& is used to instruct keyboard to display the prompt in the first line of LCD display.
  • Page 51: Beep

    BEEP Description This command is used to issue a beep sound on portable keyboard. Printer sends 0x07 to KP-200 portable keyboard. Syntax BEEP Parameter None Example DOWNLOAD “DEMO.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 6 DIRECTION 0 REFERENCE 0,0...
  • Page 52: Commands For Windows Driver

    This command is used to store bitmap image data in the memory. Behind the nnn is the bitmap data. Syntax !Bnnn Parameter Example !B100 See Also BITMAP Wasp Technologies. Description The number of bytes of image data sent from PC to printer,expressed in 3 decimal digits. Copyright 2001 All Rights Reserved.
  • Page 53 This command is used to print the bitmap data at the specified position (in y-direction). Syntax !Jnnnn Parameter nnnn Example !J0100 See Also FEED Wasp Technologies. Description Print image at the specified position in y-direction. The position is expressed in 4 decimal digits. Copyright 2001 All Rights Reserved.
  • Page 54: File Management Commands

    DOWNLOAD Description “DOWNLOAD” is a header of the file that is to be saved in the printer's memory. The downloaded files can be divided to two categories: program file and data file (including text data file, PCX graphic files and bitmap font file)
  • Page 55 FILENAME: The name of data file that will remain resident in the printer memory. It is case sensitive. DATA SIZE: The actual size (numbers of byte) of the data file without header. Note: (1). For text data file, CR (carriage return) 0x0D and LF (Line Feed) 0x0A is the separator of data.
  • Page 56 DOWNLOAD “DATA”,20,COMPUTER<ENTER> 2001<ENTER> 21<ENTER> Note: <ENTER> stands for keyboard “ENTER” key. In the above example, please press “ENTER” key instead of typing <ENTER> in the above example. See Also EOP, RUN, PUTBMP, PUTPCX, INPUT Wasp Technologies. Copyright 2001 All Rights Reserved.
  • Page 57: Eop

    “EOP” statement at the last line of program. Syntax Example DOWNLOAD “DEMO.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 6 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF TEXT 100,100,”3”,0,1,1,”DEMO PROGRAM” PRINT 1 See Also DOWNLOAD, EOP, INPUT Wasp Technologies. Copyright 2001 All Rights Reserved.
  • Page 58: Files

    DRAM). The total memory size and available memory size are listed as well. Syntax FILES Example Follow the steps below to list the files that are saved in printer memory in DOS environment through serial port connection C:¥>MODE COM2 96,N,8,1<ENTER> C:¥>COPY CON COM2<ENTER> FILES<ENTER>...
  • Page 59: Kill

    KILL Description This command deletes a file in the printer memory. The wild card (*) will delete all files resident in specified DRAM or FLASH memory. Syntax KILL [n],”FILENAME” Parameter Note: If optional parameter n is not specified, firmware will delete the file in DRAM.
  • Page 60 See Also ~!F, FILES Copyright 2001 All Rights Reserved. Wasp Technologies.
  • Page 61: Run

    Description This command is used to execute a program that resident in printer memory Syntax RUN “FILENAME.BAS” Example C:¥>COPY CON LPT1<ENTER> RUN “DEMO.BAS”<ENTER> <CTRL><Z><ENTER> C:¥> Note: <ENTER> stands for keyboard “ENTER” key. In the above example, please press “ENTER” key instead of typing <ENTER>...
  • Page 62: Basic Commands And Functions

    SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF A=ABS(-100) B=ABS(-50.98) C=-99.99 TEXT 100,100,”3”,0,1,1,STR$(A) TEXT 100,150,”3”,0,1,1,STR$(B) TEXT 100,200,”3”,0,1,1,STR$(ABS(C)) PRINT 1 See Also DOWNLOAD, EOP Wasp Technologies. Copyright 2001 All Rights Reserved.
  • Page 63: Asc( )

    ASC (“A”) Example DOWNLOAD “TEST.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF CODE1=ASC(“A”) TEXT 100,100,”3”,0,1,1,STR$(CODE1) PRINT 1 See Also DOWNLOAD, EOP, STR$() Wasp Technologies. Copyright 2001 All Rights Reserved.
  • Page 64: Chr$( )

    SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF A=65 WORD$=CHR$(A) TEXT 100,100,”3”,0,1,1,WORD$ PRINT 1 See Also DOWNLOAD, EOP, STR$(), ASC$() Wasp Technologies. Description The ASCII code Copyright 2001 All Rights Reserved.
  • Page 65: End

    TEXT 10,600,"5",0,1,1,"GOSUB & RETURN COMMAND TEST" X=300 Y=300 GOSUB DASH GOSUB DR_LINE PRINT 1 :DR_LINE BOX X,Y,X+200,Y+200,5 RETURN :DASH SET PEEL OFF DENSITY 13 FOR I=21 TO 50 TEXT 10,I,100,”3”,0,1,1,”==============================” NEXT RETURN See Also DOWNLOAD, EOP Wasp Technologies. Copyright 2001 All Rights Reserved.
  • Page 66: Eof( )

    BOX 98,48,502,514,2 A$="ITEMS:"+ITEM$ B$="PRICE:"+STR$(PRICE) C$="QTY:"+STR$(QTY) TEXT 128,114,"2",0,1,1,A$ TEXT 130,198,"2",0,1,1,B$ TEXT 132,268,"2",0,1,1,C$ BARCODE 132,365,"39",96,1,0,2,4,"PRICE-2000" PRINT 1 I=EOF(0) IF I=0 THEN GOTO A PRINT 1 Wasp Technologies. Description Either 0 or 1. Description Not end of file Copyright 2001 All Rights Reserved.
  • Page 67 See Also DOWNLOAD, EOP, OPEN, READ, SEEK Copyright 2001 All Rights Reserved. Wasp Technologies.
  • Page 68: Open

    DOWNLOAD DATA”,20,Computer<CR> 20000<CR> 15<CR> Saving the above contents of data under the file name of “DATA”. Follow the steps below to download data to the printer <under MS-DOS mode>: C:¥>MODE COM2:96,N,8,1 ↵ C:¥>COPY DATA /B COM2 ↵ The above example sets the following: baud rate at 9600 bps, no parity, 8 bits data, 1 top bit.
  • Page 69 1 stop bit. Saving the following command of program under the file name of “EXECUTE”: DEMO C:¥>COPY EXECUTE COM1↵ The above example instructs the printer to open the file “DATA” with a file handle of 1 and read items from the file. See Also DOWNLOAD, EOP, READ, EOF, LOF, SEEK, FREAD$() Copyright 2001 All Rights Reserved.
  • Page 70: Read

    TEXT 132,268,"2",0,1,1,C$ BARCODE 132,365,"39",96,1,0,2,4,"PRICE-2000" PRINT 1 I=EOF(0) IF I=0 THEN GOTO A SEEK 1,0 READ 1,ITEM$,PRICE,QTY TEXT 10,10,"4",0,1,1,"OPEN, READ, EOF() COMMAND TEST" BOX 98,48,502,514,2 Wasp Technologies. Description 0 or 1 string, integer or float point variable Copyright 2001 All Rights Reserved.
  • Page 71 IF I=0 THEN GOTO B OPEN "DATA2",0 Z$="" Z$=FREAD$(0,6) TEXT 10,20,"4",0,1,1,"FREAD$() FUNCTION TEST" TEXT 10,70,"4",0,1,1,"ITEM3$= "+Z$ J=LOF("DATA2") TEXT 10,140,"3",0,1,1,"THE FILE SIZE OF DATA2 IS: "+STR$(J)+" Bytes" PRINT 1 See Also DOWNLOAD, EOP, OPEN, EOF, LOF, SEEK, FREAD$() Copyright 2001 All Rights Reserved. Wasp Technologies.
  • Page 72: Seek

    B$="PRICE:"+STR$(PRICE) C$="QTY:"+STR$(QTY) TEXT 128,114,"2",0,1,1,A$ TEXT 130,198,"2",0,1,1,B$ TEXT 132,268,"2",0,1,1,C$ BARCODE 132,365,"39",96,1,0,2,4,"PRICE-2000" PRINT 1 See Also DOWNLOAD, EOP, OPEN, READ, EOF, LOF, FREAD$() Wasp Technologies. Description 0 or 1 the offset characters which are shifted to the Copyright 2001 All Rights Reserved.
  • Page 73: Lof( )

    TEXT 10,20,"4",0,1,1,"FREAD$() FUNCTION TEST" TEXT 10,70,"4",0,1,1,"ITEM3$= "+Z$ J=LOF("DATA2") TEXT 10,140,"3",0,1,1,"THE FILE SIZE OF DATA2 IS: "+STR$(J)+" Bytes" PRINT 1 See Also DOWNLOAD, EOP, OPEN, READ, EOF, SEEK, FREAD$() Wasp Technologies. Description The file downloaded in the printer memory. Copyright 2001 All Rights Reserved.
  • Page 74: Fread$( )

    TEXT 10,70,"4",0,1,1,"ITEM3$= "+Z$ J=LOF("DATA2") TEXT 10,140,"3",0,1,1,"THE FILE SIZE OF DATA2 IS: "+STR$(J)+" Bytes" PRINT 1 See Also DOWNLOAD, EOP, OPEN, READ, EOF, LOF(), SEEK Wasp Technologies. Description Either 0 or 1 Number of bytes to be read Copyright 2001 All Rights Reserved.
  • Page 75: For

    Nested loop is allowed (up to 10 nested loops) in this printer. Jumping out in the middle of the FOR…NEXT loop is prohibited because it is not a good programming skill..
  • Page 76 TEXT 10,100,"3",0,1,1,C$ NEXT FOR I=1 TO 5 STEP 0.5 H$=H$+STR$(I)+" " TEXT 10,150,"3",0,1,1,H$ NEXT PRINT 1 See Also DOWNLOAD, EOP Copyright 2001 All Rights Reserved. Wasp Technologies.
  • Page 77 The syntax of IF…THEN…ELSE requires that the command be typed in one single line in less than 255 characters. Parameter condition statement Only one statement is available in Example DOWNLOAD “IFTHEN.BAS” SIZE 4,4 GAP 0,0 Wasp Technologies. Description Available relational operator: <, >, =, <=, >= Copyright 2001 All Rights Reserved.
  • Page 78 The total numbers of IF …THEN …ELSE statement in a program can not exceed than 40. The total numbers of IF …THEN …ELSE, FOR…NEXT, WHILE…WEND, and DO …LOOP in a program can not exceed than 40 loops. See Also DOWNLOAD, EOP Wasp Technologies. Copyright 2001 All Rights Reserved.
  • Page 79: Gosub

    TEXT 10,600,"5",0,1,1,"GOSUB & RETURN COMMAND TEST" X=300 Y=300 GOSUB DASH GOSUB DR_LINE PRINT 1 :DR_LINE BOX X,Y,X+200,Y+200,5 RETURN :DASH Wasp Technologies. Description Beginning of the subroutine. The maximum length of the label is 8 characters. Copyright 2001 All Rights Reserved.
  • Page 80 SET PEEL OFF DENSITY 13 FOR I=21 TO 50 TEXT 10,I,100,”3”,0,1,1,”==============================” NEXT RETURN See Also DOWNLOAD, EOP, END, GOTO Copyright 2001 All Rights Reserved. Wasp Technologies.
  • Page 81: Goto

    TOTAL=0 :START IF A<100 THEN GOTO SUM ELSE GOTO PRTOUT :SUM A=A+1 TOTAL=TOTAL+A GOTO START :PRTOUT B$="THE SUMMATION OF 1..100 IS "+STR$(TOTAL) TEXT 10,100,"3",0,1,1,B$ PRINT 1 See Also DOWNLOAD, EOP, END, GOSUB…RETURN Wasp Technologies. Description Copyright 2001 All Rights Reserved.
  • Page 82: Inp$( )

    DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF PRICE$=”123456” T$=INP$(1) TEXT 100,100,”4”,0,1,1,T$ PRINT1 See Also DOWNLOAD, EOP, END, INPUT, GOSUB…RETURN, GOTO Wasp Technologies. Description 1: com1 port in printer Copyright 2001 All Rights Reserved.
  • Page 83: Input

    BARCODE 20,100,"39",48, 1, 0, 2, 5, A$ PRINT 1 GOTO START See Also DOWNLOAD, EOP, END, GOTO Wasp Technologies. Description The prompt string is shown on keyboard LCD screen. The variable to receive input data. Copyright 2001 All Rights Reserved.
  • Page 84: Rem

    Description Comment. Prefix is “REM” that will be ignored by the printer. Syntax Example REM ******************************** REM This is a demonstration program* REM ******************************** DOWNLOAD “REMARK.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF TEXT 50,50,”3”,0,1,1,”REMARK DEMO PROGRAM”...
  • Page 85: Out

    Description This command is used to send data through printer serial port. Syntax OUT “prompt”, variable Parameter prompt Variable Example DOWNLOAD “DEMO.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF PRICE$=”123456”...
  • Page 86: Getkey( )

    IF A=0 THEN GOTO PAUSEB IF A=1 THEN GOTO FEEDB :PAUSEB TEXT 50,10,"4",0,1,1,"PAUSE key is pressed !" PRINT 1 GOTO START :FEEDB TEXT 50,10,"4",0,1,1,"FEED key is pressed !" PRINT 1 See Also DOWNLOAD, EOP, END, GOTO Wasp Technologies. Copyright 2001 All Rights Reserved.
  • Page 87: Int( )

    A=INT(99.99) B=INT(-199.89) C=INT(80) TEXT 50,100,”3”,0,1,1,”INT(99.99)”+STR$(A) TEXT 50,150,”3”,0,1,1,”INT(-199.89)”+STR$(B) TEXT 50,200,”3”,0,1,1,”INT(80)”+STR$(C) PRINT 1 See Also DOWNLOAD, EOP, END, ABS(), ASC(), STR$() Wasp Technologies. Description n can be positive or negative integer, floating point number or mathematical expression. Copyright 2001 All Rights Reserved.
  • Page 88: Left$( )

    A$="BARCODE PRINTER DEMO PRINTING" C$=LEFT$(A$,10) TEXT 10,10,"3",0,1,1,A$ TEXT 10,100,"3",0,1,1,"10 LEFT CHARS "+C$ PRINT 1 See Also DOWNLOAD, EOP, END, RIGHT$(), MID$(), LEN(), STR$() Wasp Technologies. Description The string to be processed The number of characters to be returned Copyright 2001 All Rights Reserved.
  • Page 89: Len( )

    A$="TAIWAN SEMICONDUCTOR CO., LTD" B=LEN(A$) TEXT 10,10,"3",0,1,1,A$ TEXT 10,50,"3",0,1,1,"STRING LENGTH="+STR$(B) PRINT 1 See Also DOWNLOAD, EOP, END, LEFT$(), LEN(), RIGHT$(), MID$(), STR$(), VAL() Wasp Technologies. Description The string whose length is to be measured. . Copyright 2001 All Rights Reserved.
  • Page 90: Mid$( )

    TEXT 10,10,"3",0,1,1,A$ TEXT 10,200,"3",0,1,1,"10 MIDDLE CHARS "+E$ PRINT 1 See Also DOWNLOAD, EOP, END, LEFT$(), LEN(), RIGHT$(), STR$(), VAL() Wasp Technologies. Description The string to be processed. The beginning of mth characters in the string. 1 <= m <= string length The number of characters to return.
  • Page 91: Right$( )

    TEXT 10,10,"3",0,1,1,A$ TEXT 10,150,"3",0,1,1,"10 RIGHT CHARS "+D$ PRINT 1 See Also DOWNLOAD, EOP, END, LEFT$(), LEN(), MID$(), STR$(), VAL() Wasp Technologies. Description The string to be processed The number of characters to be returned from the Copyright 2001 All Rights Reserved.
  • Page 92: Str$( )

    A$="TAIWAN SEMICONDUCTOR CO., LTD" F$="100" G$="500" H=VAL(F$)+VAL(G$) I$=STR$(H) TEXT 10,10,"3",0,1,1,A$ TEXT 10,250,"3",0,1,1,"STR$() FUNCTION TEST "+I$ PRINT 1 See Also DOWNLOAD, EOP, END, LEFT$(), LEN(), RIGHT$(), MID$(), VAL() Wasp Technologies. Description An integer, floating point number or mathematical Copyright 2001 All Rights Reserved.
  • Page 93: Val( )

    SET DEBUG LABEL A$="TAIWAN SEMICONDUCTOR CO., LTD" F$="100" G$="500" H=VAL(F$)+VAL(G$) I$=STR$(H) TEXT 10,10,"3",0,1,1,A$ TEXT 10,250,"3",0,1,1,"VAL FUNCTION TEST= "+I$ PRINT 1 See Also DOWNLOAD, EOP, END, LEFT$(), LEN(), RIGHT$(), MID$(), STR$() Wasp Technologies. Description “0~9”, “.” Copyright 2001 All Rights Reserved.
  • Page 94: Device Reconfiguration Commands

    @2=”AB000001” TEXT 50,50,”3”,0,1,1,@1 BARCODE 50,500,”39”,48,1,0,2,4,@2 PRINT 100 See Also PRINT, TEXT, BARCODE Wasp Technologies. Description n: counter number. There are 50 counters available (0~49) in the printer. The increment of the counter, can be positive or negative. -999999999<= step <=999999999 If the counter is used as a fixed variable, please set the increment to 0.
  • Page 95: Set Cutter

    SET CUTTER Description This setting is used to activate/deactivate the cutter and define how many printed labels to be cut at one time. This setting will be saved in printer memory when turning off the power. Syntax SET CUTTER OFF/BATCH/pieces Parameter...
  • Page 96 REM This program cuts each printed label SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 6 DIRECTION 0 REFERENCE 0,0 SET CUTTER 1 SET PEEL OFF TEXT 50,50,”3”,0,1,1,”SET CUTTER PIECE” BARCODE 50,500,”39”,48,1,0,2,4,”DEMO16” PRINT 3,2 See Also OFFSET, PRINT Copyright 2001 All Rights Reserved. Wasp Technologies.
  • Page 97: Set Peel

    This setting is used to enable/disable the self-peeling function. The default setting for this function is off. When this function is set on, the printer stops after each label printing, and does not print the next label until the peeled label is taken away.
  • Page 98: Set Tear

    SET TEAR Description This command is used to enable/disable feeding label to gap/black mark position for tearing off. This setting will be saved in printer memory when turning off the power. Syntax SET TEAR ON/OFF Parameter Example REM SELF-PEELING FUNCTION ON...
  • Page 99: Set Gap

    <CTRL> stands for keyboard “Ctrl” key. Press the FEED key to test. Does printer stop at the same position on each label without the error light blinking? If not, please adjust the setting to a larger number again.
  • Page 100 See Also SIZE, GAP, BLINE Copyright 2001 All Rights Reserved. Wasp Technologies.
  • Page 101: Set Ribbon

    This setting is used to enable/disable ribbon sensor detection. (Thermal Transfer Printing/Thermal Direct Printing) Printer will detect if there is ribbon or without ribbon installed in ribbon mechanism at the instance of turning on printer power to determine direct thermal or thermal transfer printing.
  • Page 102: Set Com1

    Baud rate, available baud rates are as listed : parity data stop Example The parallel port is used to setup the printer serial port in this example by MS-DOS mode. C:¥>COPY CON LPT1<ENTER> SET COM1 19,N,8,1<ENTER> <CTRL><Z><ENTER> C:¥> Note: <ENTER> stands for keyboard “ENTER” key. In the above example, please press “ENTER”...
  • Page 103: Set Printkey

    Press FEED button to print the next label or batch of labels. If label content includes serial text or barcode, it will change the serial number accordingly. This setting will be saved in printer memory. Syntax SET PRINTEKY n...
  • Page 104: Label

    @LABEL Description This variable (read only) is used to count how many pieces of labels have been printed. It can’t be initialized if the printer is reset. It will be memorized if the printer power is turned off. Syntax @LABEL...
  • Page 105: Year

    IF DATE<10 THEN DATE$="0"+STR$(DATE) ELSE DATE$=STR$(DATE) IF HOUR<10 THEN HOUR$="0"+STR$(HOUR) ELSE HOUR$=STR$(HOUR) IF MINUTE<10 THEN MINUTE$="0"+STR$(MINUTE) ELSE MINUTE$=STR$(MINUTE) WEEK$=STR$(WEEK) A$=YEAR$+"/"+MONTH$+"/"+DATE$+"/"+WEEK$+" "+HOUR$+":"+MINUTE$ TEXT 10,10,"5",0,1,1,A$ PRINT 1 See Also ~!C, MONTH, DATE, DAY, HOUR, MINUTE, SECOND Wasp Technologies. Copyright 2001 All Rights Reserved.
  • Page 106: Month

    IF DATE<10 THEN DATE$="0"+STR$(DATE) ELSE DATE$=STR$(DATE) IF HOUR<10 THEN HOUR$="0"+STR$(HOUR) ELSE HOUR$=STR$(HOUR) IF MINUTE<10 THEN MINUTE$="0"+STR$(MINUTE) ELSE MINUTE$=STR$(MINUTE) WEEK$=STR$(WEEK) A$=YEAR$+"/"+MONTH$+"/"+DATE$+"/"+WEEK$+" "+HOUR$+":"+MINUTE$ TEXT 10,10,"5",0,1,1,A$ PRINT 1 See Also ~!C, MONTH, DATE, DAY, HOUR, MINUTE, SECOND Wasp Technologies. Copyright 2001 All Rights Reserved.
  • Page 107: Date

    IF DATE<10 THEN DATE$="0"+STR$(DATE) ELSE DATE$=STR$(DATE) IF HOUR<10 THEN HOUR$="0"+STR$(HOUR) ELSE HOUR$=STR$(HOUR) IF MINUTE<10 THEN MINUTE$="0"+STR$(MINUTE) ELSE MINUTE$=STR$(MINUTE) WEEK$=STR$(WEEK) A$=YEAR$+"/"+MONTH$+"/"+DATE$+"/"+WEEK$+" "+HOUR$+":"+MINUTE$ TEXT 10,10,"5",0,1,1,A$ PRINT 1 See Also ~!C, MONTH, DATE, DAY, HOUR, MINUTE, SECOND Wasp Technologies. Copyright 2001 All Rights Reserved.
  • Page 108 IF DATE<10 THEN DATE$="0"+STR$(DATE) ELSE DATE$=STR$(DATE) IF HOUR<10 THEN HOUR$="0"+STR$(HOUR) ELSE HOUR$=STR$(HOUR) IF MINUTE<10 THEN MINUTE$="0"+STR$(MINUTE) ELSE MINUTE$=STR$(MINUTE) WEEK$=STR$(WEEK) A$=YEAR$+"/"+MONTH$+"/"+DATE$+"/"+WEEK$+" "+HOUR$+":"+MINUTE$ TEXT 10,10,"5",0,1,1,A$ PRINT 1 See Also ~!C, MONTH, DATE, DAY, HOUR, MINUTE, SECOND Wasp Technologies. Copyright 2001 All Rights Reserved.
  • Page 109: Hour

    IF DATE<10 THEN DATE$="0"+STR$(DATE) ELSE DATE$=STR$(DATE) IF HOUR<10 THEN HOUR$="0"+STR$(HOUR) ELSE HOUR$=STR$(HOUR) IF MINUTE<10 THEN MINUTE$="0"+STR$(MINUTE) ELSE MINUTE$=STR$(MINUTE) WEEK$=STR$(WEEK) A$=YEAR$+"/"+MONTH$+"/"+DATE$+"/"+WEEK$+" "+HOUR$+":"+MINUTE$ TEXT 10,10,"5",0,1,1,A$ PRINT 1 See Also ~!C, MONTH, DATE, DAY, HOUR, MINUTE, SECOND Wasp Technologies. Copyright 2001 All Rights Reserved.
  • Page 110: Minute

    IF DATE<10 THEN DATE$="0"+STR$(DATE) ELSE DATE$=STR$(DATE) IF HOUR<10 THEN HOUR$="0"+STR$(HOUR) ELSE HOUR$=STR$(HOUR) IF MINUTE<10 THEN MINUTE$="0"+STR$(MINUTE) ELSE MINUTE$=STR$(MINUTE) WEEK$=STR$(WEEK) A$=YEAR$+"/"+MONTH$+"/"+DATE$+"/"+WEEK$+" "+HOUR$+":"+MINUTE$ TEXT 10,10,"5",0,1,1,A$ PRINT 1 See Also ~!C, MONTH, DATE, DAY, HOUR, MINUTE, SECOND Wasp Technologies. Copyright 2001 All Rights Reserved.
  • Page 111: Second

    IF HOUR<10 THEN HOUR$="0"+STR$(HOUR) ELSE HOUR$=STR$(HOUR) IF MINUTE<10 THEN MINUTE$="0"+STR$(MINUTE) ELSE MINUTE$=STR$(MINUTE) IF SECOND<10 THEN SECOND$="0"+STR$(SECOND) ELSE SECOND$=STR$(SECOND) WEEK$=STR$(WEEK) A$=YEAR$+"/"+MONTH$+"/"+DATE$+"/"+WEEK$+" "+HOUR$+":"+MINUTE$+":"+SECOND$ TEXT 10,10,"5",0,1,1,A$ PRINT 1 See Also ~!C, MONTH, DATE, DAY, HOUR, MINUTE, SECOND Wasp Technologies. Copyright 2001 All Rights Reserved.
  • Page 112: Year

    Range: 2000~9999 Example SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 6 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF TEXT 10,10,"3",0,1,1,@YEAR PRINT 1 See Also ~!C, @MONTH, @DATE, @DAY, @HOUR, @MINUTE, @SECOND Wasp Technologies. Copyright 2001 All Rights Reserved.
  • Page 113: Month

    Range: 01~12 Example SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 6 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF TEXT 10,10,"3",0,1,1,@MONTH PRINT 1 See Also ~!C, @YEAR, @DATE, @DAY, @HOUR, @MINUTE, @SECOND Wasp Technologies. Copyright 2001 All Rights Reserved.
  • Page 114: Date

    Range: 01~31 Example SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 6 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF TEXT 10,10,"3",0,1,1,@DATE PRINT 1 See Also ~!C, @YEAR, @MONTH, @DAY, @HOUR, @MINUTE, @SECOND Wasp Technologies. Copyright 2001 All Rights Reserved.
  • Page 115: Day

    0(Sunday)~6(Saturday) Example SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 6 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF TEXT 10,10,"3",0,1,1,@DAY PRINT 1 See Also ~!C, @YEAR, @MONTH, @DATE, @HOUR, @MINUTE, @SECOND Wasp Technologies. Copyright 2001 All Rights Reserved.
  • Page 116: Hour

    Range: 00~23 Example SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 6 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF TEXT 10,10,"3",0,1,1,@HOUR PRINT 1 See Also ~!C, @YEAR, @MONTH, @DATE, @DAY, @MINUTE, @SECOND Wasp Technologies. Copyright 2001 All Rights Reserved.
  • Page 117: Minute

    Range: 00~59 Example SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 6 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF TEXT 10,10,"3",0,1,1,@MINUTE PRINT 1 See Also ~!C, @YEAR, @MONTH, @DATE, @DAY, @HOUR, @SECOND Wasp Technologies. Copyright 2001 All Rights Reserved.
  • Page 118: Second

    Range: 00~59 Example SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 6 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF TEXT 10,10,"3",0,1,1,@SECOND PRINT 1 See Also ~!C, @YEAR, @MONTH, @DATE, @DAY, @HOUR, @MINUTE Wasp Technologies. Copyright 2001 All Rights Reserved.
  • Page 119 Copyright 2001 All Rights Reserved. Wasp Technologies.
  • Page 120 Last update: May. 21, 2004...

This manual is also suitable for:

Wpl606Wpl2

Table of Contents