Wasp WPL305, WPL606, WPL2 Programming Manual

WPL2
MANUAL
Wasp Technologies
PRINTER SERIES
PROGRAMMING
Revise History
Date Description Remark
2003/09/19
2004/5/21
1. BASIC functions are added to WPL2
2. Supported code page update QR code is supported
TABLE OF CONTENTS
DOCUMENT CONVENTIONS
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....................................................................................................................................... 13
BACKFEED ........................................................................................................................... 14
FORMFEED........................................................................................................................... 15
HOME..................................................................................................................................... 16
PRINT ..................................................................................................................................... 17
CUT ......................................................................................................................................... 18
LABEL FORMATTING COMMANDS..............................................................................19
CLS..........................................................................................................................................19
BAR ......................................................................................................................................... 20
ERASE ....................................................................................................................................21
REVERSE............................................................................................................................... 22
BOX......................................................................................................................................... 23
BITMAP..................................................................................................................................24
PUTBMP................................................................................................................................. 25
PUTPCX ................................................................................................................................. 26
BARCODE..............................................................................................................................27
DMATRIX ..............................................................................................................................31
MAXICODE........................................................................................................................... 32
PDF417....................................................................................................................................34
QRCODE ................................................................................................................................35
TEXT....................................................................................................................................... 39
STATUS POLLING COMMANDS (RS-232) .....................................................................40
<ESC>!?.................................................................................................................................. 40
<ESC>!R .................................................................................................................................41
~!T ............................................................................
~!I............................................................................................................................................. 42
~!F............................................................................................................................................ 43
MESSAGE TRANSLATION PROTOCOLS .....................................................................44
~# ............................................................................................................................................. 44
BEEP ....................................................................................................................................... 45
COMMANDS FOR WINDOWS DRIVER .........................................................................46
!B..............................................................................................................................................46
.................................................................. I
ERROR! BOOKMARK NOT DEFINED.
!J ..............................................................................................................................................47
FILE MANAGEMENT COMMANDS................................................................................48
DOWNLOAD ......................................................................................................................... 48
EOP ......................................................................................................................................... 51
FILES......................................................................................................................................52
KILL........................................................................................................................................53
RUN......................................................................................................................................... 55
BASIC COMMANDS AND FUNCTIONS.......................................................................... 56
ABS( ) ...................................................................................................................................... 56
ASC( )...................................................................................................................................... 57
CHR$( ) ...................................................................................................................................58
END ......................................................................................................................................... 59
EOF( )...................................................................................................................................... 60
OPEN ...................................................................................................................................... 62
READ ......................................................................................................................................64
SEEK....................................................................................................................................... 66
LOF( )...................................................................................................................................... 67
FREAD$( ) .............................................................................................................................. 68
FOR…NEXT ..........................................................................................................................69
GOSUB…RETURN............................................................................................................... 73
GOTO......................................................................................................................................75
INP$( ) .....................................................................................................................................76
INPUT ..................................................................................................................................... 77
REM ........................................................................................................................................78
OUT......................................................................................................................................... 79
GETKEY( ).............................................................................................................................80
INT( ).......................................................................................................................................81
LEFT$( ) ................................................................................................................................. 82
LEN( )...................................................................................................................................... 83
MID$( ).................................................................................................................................... 84
RIGHT$( )...............................................................................................................................85
STR$( ) .................................................................................................................................... 86
VAL( ) ..................................................................................................................................... 87
DEVICE RECONFIGURATION COMMANDS ............................................................... 88
SET COUNTER .....................................................................................................................88
SET CUTTER ........................................................................................................................ 89
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
MINUTE ............................................................................................................................... 104
SECOND............................................................................................................................... 105
@YEAR ................................................................................................................................106
@MONTH ............................................................................................................................ 107
@DATE................................................................................................................................. 108
@DAY ................................................................................................................................... 109
@HOUR................................................................................................................................ 110
@MINUTE ........................................................................................................................... 111
@SECOND ........................................................................................................................... 112
Document Conventions
This manual uses the following typographic conventions.
Convention
Description
[expression list] Items inside square brackets are optional, expression
maximum length 2*1024 bytes;
<ESC> 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.
Space , Tab (ASCII 32),(ASCII 9) characters will be ignored in the
command line
(ASCII 34), beginning and ending of expression
CR,LF (ASCII 13),(ASCII 10) or (ASCII 10) is placed at the
end of command line.
NULL (ASCII 0) is not supported in the expression,
except the 2D bar code commands.
¥nnn (ASCII 92), nnn is a number. Available range is
from 000 to 255 to express the character in decimal.
FF , EOF (ASCII 12),(ASCII 26) can be used at the end of
command line only.
Note: 200 DPI: 1 mm = 8 dots Arial font in bold and italic type is used for note.
Wasp Technologies. I Copyright 2001 All Rights Reserved.
Setup and System Commands
SIZE
Description
Syntax
Example
This command defines the label width and length.
(1) English system (inch)
SIZE m, n
(2) Metric system (mm)
SIZE m mm, n mm
Parameter Description
m Label width (inch or mm) n Label length (inch or mm)
Note:
200 DPI: 1 mm = 8 dots 300 DPI: 1mm = 12 dots For metric system, there must be a space between parameter and “mm”.
Max.
width WPL606 WPL305
(1) English system (inch)
SIZE 3.5, 3.00
(2) Metric system (mm)
SIZE 100 mm, 100 mm
102mm 104mm 106mm 108mm
x x
See Also
Wasp Technologies. 1 Copyright 2001 All Rights Reserved.
GAP, BLINE
Wasp Technologies. 2 Copyright 2001 All Rights Reserved.
GAP
Description
Define the gap distance between two labels
Syntax
(1) English system (inch)
(2) Metric system (mm)
Parameter Description
m The gap distance between two labels
n The offset distance of the gap
Note: For metric system, there must be a space between parameter and mm.
Example
Normal gap
(1) English system (inch)
(2) Metric system (mm)
GAP m, n
GAP m mm, n mm
0 ≤ m ≤ 1 (inch), 0 ≤ m ≤ 25.4 (mm)
n ≤ label length (inch or mm)
GAP 0.12,0
GAP 3 mm,0
Wasp Technologies. 3 Copyright 2001 All Rights Reserved.
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. 4 Copyright 2001 All Rights Reserved.
BLINE
Description
This command is used to set the height of the black line and the user-defined extra label feeding length each form feed takes.
Syntax
(1) English system (inch)
BLINE m, n
(2) Metric system (mm)
BLINE m mm, n mm
Parameter
m The height of black line either in inch or mm.
0.1 ≤ m ≤ 1 (inch), 2.54 ≤ m ≤ 25.4 (mm) n The extra label feeding length. 0 ≤ n ≤ label length
Note: For metric system, there must be a space between parameter and mm.
Example
(1) English system (inch)
BLINE 0.20,0.50
(2) Metric system (mm)
BLINE 5.08 mm,12.7 mm
Description
See Also
SIZE, GAP
Wasp Technologies. 5 Copyright 2001 All Rights Reserved.
OFFSET
Description
This command defines the selective, extra label feeding length each form feed takes, which, especially in peel-off mode and cutter mode, is used to adjust label stop position, so as for label to register at proper places for the intended purposes. The printer backtracks the extra feeding length before the next run of printing.
Syntax
(1) English system (inch)
OFFSET m
(2) Metric system (mm)
OFFSET m mm
Parameter Description
m The offset distance (inch or mm)
-1≤ m ≤1(inch)
CAUTION: Impropriety offset value may cause paper jam.
Example
(1) English system (inch)
OFFSET 0.5
(2) Metric system (mm)
OFFSET 12.7 mm
See Also
SIZE, GAP, SET PEEL, SET CUTTER
Wasp Technologies. 6 Copyright 2001 All Rights Reserved.
SPEED
Description
This command defines the print speed.
Syntax
SPEED n
Parameter Description
n printing speed in inch per second
N 1 1.5 2 3 4 5 6 8 10 12 WPL606 WPL305
Example
SPEED 10
See Also
DENSITY
x x x x x x x x x
Wasp Technologies. 7 Copyright 2001 All Rights Reserved.
DENSITY
Description
This command designates the level of darkness of printing.
Syntax
Example
See Also
DENSITY n
Parameter Description
n 0, specifies the lightest level 15, specifies the darkest level
DENSITY 7
DENSITY
Wasp Technologies. 8 Copyright 2001 All Rights Reserved.
DIRECTION
Description
Syntax
This command defines the printout direction.
DIRECTION n
Parameter Description
n 0 or 1. Please refer to the illustrations below:
Example
DIRECTION 0
See Also
REFERENCE
Wasp Technologies. 9 Copyright 2001 All Rights Reserved.
REFERENCE
Description
This command defines the reference point of the label. The reference (origin) point varies with the print direction, as shown:
Syntax
Example
See Also
REFERENCE x, y
Parameter Description x Horizontal coordinate, with “dot” as the unit. y Vertical coordinate, with “dot” as the unit.
Note: 200 DPI: 1 mm = 8 dots
300 DPI: 1 mm = 12 dots
REFERENCE 10,10
DIRECTION
Wasp Technologies. 10 Copyright 2001 All Rights Reserved.
COUNTRY
Description
This command defines what special character to have on the WPK-200 portable LCD keyboard (option) to orient the keyboard for use in different countries.
Syntax
COUNTRY n
Parameter Description
n 001: USA 002: Canadian-French 003: Spanish (Latin America) 031: Dutch 032: Belgian 033: French (France) 034: Spanish (Spain) 036: Hungarian 038: Yugoslavian
039: Italian 041: Switzerland 042: Slovak 044: United Kingdom 045: Danish 046: Swedish 047: Norwegian 048: Polish 049: German 055: Brazil 061: English (International) 351: Portuguese 358: Finnish
Example
COUNTRY 001
See Also
CODEPAGE
Wasp Technologies. 11 Copyright 2001 All Rights Reserved.
CODEPAGE
Description
This command defines the code page of international character set.
Syntax
CODEPAGE n
Parameter Description
n name or number of code page, which can be divided
into 7-bit code page and 8-bit code page further. 7-bit code page name USA: USA BRI: British GER: German FRE: French DAN: Danish ITA: Italian SPA: Spanish SWE: Swedish SWI: Swiss
8-bit code page number 437: United States 850: Multilingual 852: Slavic 860: Portuguese 863: Canadian/French 865: Nordic
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. 12 Copyright 2001 All Rights Reserved.
FEED
Description
This command feeds label with the specified length. The length is specified by dot.
Syntax
FEED n
Parameter Description
n unit: dot 1 ≤ n ≤ 9999
Example
FEED 40
Note: 200 DPI: 1 mm = 8 dots
300 DPI: 1 mm = 12 dots
See Also
BACKFEED, SIZE, GAP, BLINE
Wasp Technologies. 13 Copyright 2001 All Rights Reserved.
BACKFEED
Description
To back feed label with the specified length The length is specified by dot.
Syntax
BACKFEED n
Parameter Description
n unit: dot 1 ≤ n ≤ 9999
Example
BACKFEED 40
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. 14 Copyright 2001 All Rights Reserved.
FORMFEED
Description
This command feeds label to the beginning of next label.
Syntax
FORMFEED
Parameter Description
None N/A
Example
FORMFEED
See Also
FEED, SIZE, GAP, BLINE
Wasp Technologies. 15 Copyright 2001 All Rights Reserved.
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.
Syntax
HOME
Parameter Description
None N/A
Example
HOME
Wasp Technologies. 16 Copyright 2001 All Rights Reserved.
PRINT
Description
Syntax
Example
See Also
This command prints the label format stored in the image buffer.
PRINT m [,n]
Parameter Description
m 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.
n Specifies how many copies should be printed for
each set of label.
1 ≤ n ≤ 999999999
SIZE 60 mm, 20 mm SET COUNTER @1 1 @1=”0001” CLS TEXT 10,10,”3”,0,1,1,@1 PRINT 3,2
SET COUNTER, INPUT, DOWNLOAD
Wasp Technologies. 17 Copyright 2001 All Rights Reserved.
CUT
Description
At this command, the printer will activate the cutter to cut the labels immediately without back feeding the label.
Syntax
CUT
Parameter Description
None N/A
See Also
SET CUTTER
Wasp Technologies. 18 Copyright 2001 All Rights Reserved.
Label Formatting Commands
CLS
Description
This command clears the image buffer.
Syntax
CLS
Parameter Description
None N/A
Note: This command must be placed after SIZE command.
Example
CLS
See Also
SIZE, GAP, BLINE
Wasp Technologies. 19 Copyright 2001 All Rights Reserved.
BAR
Description
This command is used to draw a line or a bar on the label format.
Syntax
Note: 200 DPI: 1 mm = 8 dots 300 DPI: 1 mm = 12 dots
BAR x, y, width, height
Parameter
x The upper left corner x-coordinate in dot y The upper left corner y-coordinate in dot width The width of bar in dot height The height of bar in dot
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.
Description
Example
See Also
BAR 100, 100, 300, 200
BOX
Wasp Technologies. 20 Copyright 2001 All Rights Reserved.
ERASE
Description
Syntax
Example
See Also
This command is used to clear a specified region in image buffer.
ERASE X_start, Y_start, X_width, Y_height
Parameter Description
X_start The x-coordinate of the starting point in dot Y_start The y-coordinate of the starting point in dot X_width The region width in x-axis direction in dot Y_height The region height in y-axis direction in dot
ERASE 100,100,200,200
CLS
Wasp Technologies. 21 Copyright 2001 All Rights Reserved.
REVERSE
Description
This command is used to reverse a region in image buffer.
Syntax
REVERSE X_start, Y_start, X_width, Y_height
Parameter Description
X_start The x-coordinate of the starting point in dot Y_start The y-coordinate of the starting point in dot X_width The region width in x-axis direction in dot Y_height The region height in y-axis direction in dot
Note: 200 DPI: 1 mm = 8 dots 300 DPI: 1 mm = 12 dots
Recommended max. height of reversed black area is 12mm at 4” width. 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.
Example
REVERSE 100,100,200,200
Wasp Technologies. 22 Copyright 2001 All Rights Reserved.
BOX
Description
This command is used to draw rectangles on the label.
Syntax
BOX X_start, Y_start, X_end, Y_end, line thickness
Parameter Description
X_start Specify x-coordinate of upper left corner in dot Y_start Specify y-coordinate of upper left corner in dot X_end Specify x-coordinate of lower right corner in dot Y_end Specify y-coordinate of lower right corner in dot line thickness Line thickness of the box in dot
Note: 200 DPI: 1 mm = 8 dots 300 DPI: 1 mm = 12 dots
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
BOX 100,100,200,200,5
See Also
BAR
Wasp Technologies. 23 Copyright 2001 All Rights Reserved.
BITMAP
Description
This command is used to draw bitmap images (Not BMP graphic file).
Syntax
BITMAP X, Y, width, height, mode, bitmap data…
Parameter Description
X Specify the x-coordinate of the bitmap image Y Specify the y-coordinate of the bitmap image width The width of the image in bytes height The height of the image in dot mode Graphic mode is listed below: 0 OVERWRITE 1 OR 2 XOR bitmap data The bitmap data
Example
BITMAP 100,100,10,1,2,1111111111
See Also
PUTBMP, PUTPCX
Wasp Technologies. 24 Copyright 2001 All Rights Reserved.
Loading...
+ 90 hidden pages