Download Print this page
TSC TTP-243 Series Programming Manual
Hide thumbs Also See for TTP-243 Series:

Advertisement

Quick Links

Barcode Printer
TSC BARCODE PRINTER Series
Thermal Transfer  Direct Thermal
Programming Manual
www.tscprinters.com

Advertisement

loading
Need help?

Need help?

Do you have a question about the TTP-243 Series and is the answer not in the manual?

Questions and answers

Summary of Contents for TSC TTP-243 Series

  • Page 1 Barcode Printer TSC BARCODE PRINTER Series Thermal Transfer  Direct Thermal Programming Manual www.tscprinters.com...
  • Page 2 All other trademarks are the property of their respective owners. Information in this document is subject to change without notice and does not represent a commitment on the part of TSC Auto ID Technology Co. No part of this manual may be reproduced or transmitted in any form or by any means, for any purpose other than the purchaser’s...
  • Page 3: Table Of Contents

    TABLE OF CONTENTS How to Read ............................... IX Document Conventions ............................X Object Position Calculation ..........................XI Printer Model List ............................. XIII Setup and System Commands ..........................1 SIZE ..................................1 GAP ..................................3 GAPDETECT ................................ 6 BLINEDETECT ..............................7 AUTODETECT ..............................
  • Page 4 INITIALPRINTER ..............................45 MENU ................................46 Label Formatting Commands ..........................49 BAR ................................... 49 BARCODE ................................51 TLC39 ................................62 BITMAP ................................64 BOX ................................... 67 CIRCLE ................................69 ELLIPSE ................................70 CODABLOCK F ............................71 MODE DMATRIX ................................73 ERASE ................................
  • Page 5 <ESC>!S................................127 <ESC>!F................................131 <ESC>!................................132 ~!@ ................................. 133 ~!A .................................. 134 ~!C .................................. 135 ~!D .................................. 136 ~!E .................................. 137 ~!F .................................. 138 ~!I ................................... 139 ~!T .................................. 140 <ESC> Y ................................141 <ESC> Z ................................142 Message Translation Protocols ......................... 143 ~#..................................
  • Page 6 CLOSE ................................168 WRITE ................................169 READ ................................170 SEEK ................................172 LOF( ) ................................174 LOC( ) ................................176 FREAD$( ) ................................ 178 PUT ................................. 180 GET ................................. 182 COPY ................................184 FOR…NEXT LOOP ............................186 WHILE…WEND ..............................188 DO…LOOP ...............................
  • Page 7 TRIM$( ) ................................232 LTRIM$( ) ................................ 234 RTRIM$( ) ................................ 236 TEXTPIXEL( ) ..............................238 BARCODEPIXEL( ) ............................240 VAL( ) ................................242 BEEP ................................244 NOW$( ) ................................245 NOW ................................246 FORMAT$( ) ..............................247 DATEADD() ..............................253 FSEARCH() ..............................
  • Page 8 SET FEED_LEN ..............................298 GETSENSOR() ..............................299 GETSETTING$() ............................... 304 SET USBHOST ..............................309 SET RS232_REWINDER ........................... 310 SET AUTORUN ..............................311 SET RESPONSE ..............................313 SET DAYLIGHT_SAVE............................316 SET REGISTRATION ............................318 SET APPLICATOR ............................. 320 PEEL ................................321 LED1, LED2, LED3 ............................
  • Page 9 BT PINCODE ..............................355 BT PAIRMODE ..............................356 BT MODE ................................ 357 Wi-Fi Module Setting Commands ........................359 WLAN SSID ..............................359 WLAN WPA ..............................360 WLAN WEP ..............................361 WLAN DHCP ..............................362 WLAN IP ................................363 WLAN PORT ..............................364 Internal Ethernet Setting Commands ........................
  • Page 10 SET PRINTQUALITY ............................393 SET STANDBYTIME ............................394 SET SLEEPTIME ............................... 395 GPIO Setting Commands ..........................396 SET GPO ................................396 SET GPI................................398 ................................401 I/O I (DB15F) C ................... 402 PPLICATOR NTERFACE IRCUIT IAGRAM I/O I (DB25F) C ...................
  • Page 11: How To Read

    How to Read The command name Description of this command The detail description Syntax of this command of each parameter The example and printout for reference Other commands for reference...
  • Page 12: Document Conventions

    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> ASCII 27, control code of status polling command returns/runs the printer status immediately. ASCII 126, control code of status polling command returns the printer status only when the printer is ready.
  • Page 13: Object Position Calculation

    Object Position Calculation DIRECTION 0 X=7mm Label origin (0,0) Y=3mm Paper feed direction DIRECTION 0 TEXT 56,24,"3",0,1,1,"ABC" PRINT 1 Note : 1. 203 DPI, 1mm=8 dots ; 300 DPI, 1mm=12 dots ; 600 DPI, 1mm=24 dots 2. Only integer portion will be used. Ex. 2 mm = 23.6 dots then 23 dots will be used.
  • Page 14 Label origin (0,0) DIRECTION 1 Y=3mm X=7mm Paper feed direction DIRECTION 1 TEXT 56,24,"3",0,1,1,"ABC" PRINT 1...
  • Page 15: Printer Model List

    Printer Model List Series Models Support Programming Version Maintainability TDP-643 Plus TDP-643 Plus TSPL V x.x TTP-243 series TTP-243, TTP-243E, TTP-342 TSPL V x.x TTP-244ME series TTP-243M, TTP-244ME, TTP-342M TSPL V x.x TDP-245 series TDP-245, TDP-245G TSPL2 V x.x TTP-245 series...
  • Page 16 TE200 series TE200, TE300 TSPL2 A x.x TX200 series TX200, TX300, TX600 TSPL2 A x.x TX210 series TX210, TX310, TX610 TSPL2 A x.x TDP-225 series TDP-225, TDP-324, TDP-225W, TDP- TSPL2 V x.x 324W TTP-225 series TTP-225, TTP-323 TSPL2 V x.x TTP-244CE TTP-244CE TSPL2...
  • Page 17 PEX-2340R, PEX-2360R, PEX-2640L , PEX-2640R Alpha-2R series Alpha-2R TSPL2 A x.x Alpha-3R series Alpha-3R TSPL2 V x.x Alpha-4L series Alpha-4L TSPL2 V x.x TDM series TDM-20, TDM-30 TSPL2 A x.x Alpha-30R series Alpha-30R TSPL2 V x.x Alpha-30L series Alpha-30L TSPL2 V x.x Alpha-40L series Alpha-40L...
  • Page 18: Setup And System Commands

    Setup and System Commands SIZE Description This command defines the label width and length. Syntax SIZE m[,n] English system (inch) SIZE m mm[,n mm] Metric system (mm) SIZE m dot[,n dot] Dot measurement This command has been supported since V6.27 EZ and later firmware. Parameter Description Label width (inch/ mm/ dot)
  • Page 19 ▪ English system (inch): SIZE 3.5,3.00 ▪ Metric system (mm): SIZE 100 mm,100 mm See Also GAP, BLINE...
  • Page 20: Gap

    Description Defines the gap distance between two labels. Syntax GAP m,n English system (inch) GAP m mm,n mm Metric system (mm) GAP m dot,n dot Dot measurement This command has been supported since V6.27 EZ and later firmware. Parameter Description The gap distance between two labels 0 ≤...
  • Page 21 600 DPI : 1mm = 24 dots ▪ For metric and dot systems, there must be a space between parameter and mm. ▪ When the sensor type is changed from "Black Mark" to "GAP", please send the "GAP" command to the printer first.
  • Page 22 Example Sample Code Result Normal gap Normal gap ▪ English system (inch): GAP 0.12,0 ▪ Metric system (mm): GAP 3 mm,0 mm ▪ Continuous label: GAP 0,0 Special gap Special gap ▪ English system (inch) GAP 0.30,0.10 ▪ Metric system (mm) GAP 7.62 mm,2.54 mm See Also SIZE, BLINE...
  • Page 23: Gapdetect

    GAPDETECT Description This command feeds the paper through the gap sensor in an effort to determine the paper and gap sizes, respectively. This command references the user’s approximate measurements. If the measurements conflict with the actual size, the GAPDETECT command will not work properly. This calibration method can be applied to the labels with pre-printed logos or texts.
  • Page 24: Blinedetect

    BLINEDETECT Description This command feeds the paper through the black mark sensor in an effort to determine the paper and black mark sizes, respectively. This command references the user’s approximate measurements. If the measurements conflict with the actual size, the BLINEDETECT command will not work properly. This calibration method can be applied to the labels with pre-printed logos or texts.
  • Page 25: Autodetect

    AUTODETECT Description This command feeds the paper through the gap/black mark sensor in an effort to determine the paper and gap/black mark sizes, respectively. This command references the user’s approximate measurements. If the measurements conflict with the actual size, the AUTODETECT command will not work properly. This calibration method can be applied to the labels with pre-printed logos or texts.
  • Page 26: Bline

    BLINE Description This command sets the height of the black line and the user-defined extra label feeding length each form feed takes. Syntax BLINE m,n English system (inch) BLINE m mm,n mm Metric system (mm) BLINE m dot,n dot Dot measurement This command has been supported since V6.27 EZ and later firmware.
  • Page 27 Sample Code ▪ English system (inch): BLINE 0.20,0.50 ▪ Metric system (mm): BLINE 5.08 mm,12.7 mm See Also SIZE, GAP...
  • Page 28: Offset

    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.
  • Page 29 ▪ English system (inch): OFFSET 0.5 ▪ Metric system (mm): OFFSET 12.7 mm See Also SIZE, GAP, SET PEEL, SET CUTTER...
  • Page 30: Speed

    SPEED Description This command defines the print speed. Syntax SPEED n Parameter Description Printing speed in inch per second Model / IPS 1 1.5 2 2.5 3 3.5 4 9 10 11 12 13 14 15 16 17 18 TDP-643 Plus/ TDP-643R Plus series TTP-243I/ TTP-243I Plus/ TTP- 243I Pro series...
  • Page 31 TTP-323 TTP-246M series TTP-246M Plus/ TTP-246M Pro series TTP-248M series TTP-2410M/TTP-2410M Pro series TTP-244ME/ TTP-244ME Plus/ TTP-244MI Pro series TTP-342M/ TTP-342M Plus/ TTP-342M Pro series TTP-344M series TTP-344M Plus/ TTP-344M Pro series TTP-346M/ TTP-346M Pro series TTP-644M/ TTP-246M Pro series TTP-268M series TTP-366M series TTP-286MT series...
  • Page 32 Sample code SPEED 10 See Also DENSITY...
  • Page 33: Density

    DENSITY Description This command sets the printing darkness. Syntax DENSITY n Parameter Description 0~15 0: specifies the lightest level 15: specifies the darkest level Note: Default DENSITY setting is 8. Example Sample code DENSITY 7...
  • Page 34: Direction And Mirror Image

    DIRECTION and Mirror Image Description This command defines the printout direction and mirror image. This will be stored in the printer memory. Syntax DIRECTION n[,m] Parameter Description 0 or 1. Please refer to the illustrations below 0: Print normal image 1: Print mirror image (Note: TDP-643 Plus , TTP-243, TTP-342, TTP-244ME, TTP-342M and TTP-248M series are not supported this mirror feature)
  • Page 35: Reference

    REFERENCE Description This command defines the reference point of the label. The reference (origin) point varies with the print direction, as shown: Syntax REFERENCE x, y Parameter Description Horizontal coordinate (in dots) Vertical coordinate (in dots) Note: 200 DPI: 1 mm = 8 dots 300 DPI: 1 mm = 12 dots 600 DPI : 1mm = 24 dots Example...
  • Page 36 See Also DIRECTION...
  • Page 37: Shift

    SHIFT Description This command moves the label’s horizontal and vertical position. A positive value moves the label further from the printing direction; a negative value moves the label towards the printing direction. Syntax SHIFT [x,] y Parameter Description Optional. The maximum value is 1 inch. For 200 dpi printers, the range is –203 to 203; for 300 dpi printers, the range is –300 to 300.
  • Page 38 See Also OFFSET, REFERENCE...
  • Page 39: Country

    COUNTRY Description This command orients the keyboard for use in different countries via defining special characters on the KP-200 series portable LCD keyboard (option). Syntax COUNTRY n Parameter Description 001: USA 002: Canadian-French 003: Spanish (Latin America) 031: Dutch 032: Belgian 033: French (France) 034: Spanish (Spain) 036: Hungarian...
  • Page 40 Sample Code COUNTRY 001 See Also CODEPAGE, ~!I...
  • Page 41: Codepage

    CODEPAGE Description This command defines the code page of international character set. Syntax CODEPAGE n Parameter Description Name or number of code page, which can be divided into 7-bit code page and 8- bit code page. 7-bit code page 8-bit code page Windows code page ISO code page Name...
  • Page 42 Example Sample Code Result (Download the COUR.TTF into printer) DOWNLOAD "TEST.BAS" str1$ = " " J = 0 y = 50 CODEPAGE 1252 SIZE 4,3 GAP 0,0 DIRECTION 1 TEXT 10,10,"COUR.TTF",0,12,12,"CODEPAGE 1252" FOR I=32 TO 255 str1$=str1$+CHR$(I) + " " J=J+1 IF J=16 THEN GOSUB drawTEXT NEXT...
  • Page 43: Cls

    Description This command clears the image buffer. Syntax Parameter Description None Note: This command must be placed after SIZE command. Example Sample code See Also SIZE, GAP, BLINE...
  • Page 44: Feed

    FEED Description This command feeds label with the specified length. The length is specified by dot. Syntax FEED n Parameter Description unit: dot 1 ≤ n ≤ 9999 Note: 200 DPI: 1 mm = 8 dots 300 DPI: 1 mm = 12 dots 600 DPI : 1mm = 24 dots Example Sample code...
  • Page 45: Backfeed & Backup

    BACKFEED & BACKUP Description This command feeds the label in reverse. The length is specified by dot. Syntax BACKUP n TSPL printers only BACKFEED n TSPL2 printers only Note: Please refer to printer model list for checking TSPL or TSPL2. Parameter Description unit: dot...
  • Page 46: Formfeed

    FORMFEED Description This command feeds label to the beginning of next label. Syntax FORMFEED Parameter Description None Note: This command must be placed after SIZE command. Example Sample code Result SIZE 4,2.5 GAP 2 mm,0 DIRECTION 1 Paper feed direction FORMFEED TEXT 25,25, "3",0,1,1, "FORMFEED COMMAND TEST"...
  • Page 47: Home

    HOME Description This command will feed label until the internal sensor has determined the origin. Size and gap of the label should be defined before using this command. Syntax HOME Parameter Description None For TSPL programming printer: Back label to origin position For TSPL2 programming printer: Feed label to origin position Note: Please refer to printer model list for checking TSPL or TSPL2.
  • Page 48: Print

    PRINT Description This command prints the label format currently stored in the image buffer. Syntax PRINT m[,n] Parameter Description Specifies how many sets of labels will be printed. 1 ≤ m ≤ 999999999 Specifies how many copies should be printed for each particular label set. 1 ≤...
  • Page 49 See Also SET COUNTER, INPUT, DOWNLOAD...
  • Page 50: Sound

    SOUND Description This command controls the sound frequency of the beeper. There are 10 levels of sounds. The timing control can be set by the "interval" parameter. Syntax SOUND level,interval Parameter Description level Sound level: 0~9 interval Sound interval: 1~4095 Example Sample code ...
  • Page 51: Cut

    Description This command activates the cutter to immediately cut the labels without back feeding the label. Syntax Parameter Description None Example Sample code SIZE 3,3 GAP 0,0 BOX 0,0,866,866,5 TEXT 100,100, "5",0,1,1, "FEED & CUT" TEXT 100,200, "5",0,1,1, "300 DPI" PRINT 1,1 FEED 260 See Also...
  • Page 52: Limitfeed

    LIMITFEED Description If the gap sensor is not set to a suitable sensitivity while feeding labels, the printer will not be able to locate the correct position of the gap. This command stops label feeding and makes the red LED flash if the printer does not locate gap after feeding the length of one label plus one preset value.
  • Page 53: Selftest

    SELFTEST Description At this command, the printer will print out the printer information. Syntax SELFTEST [page] Parameter Description page omitted: Print a self-test page with whole printer information. PATTERN: Print a pattern to check the status of print head heat line. ETHERNET: Print a self-test page with Ethernet settings.
  • Page 54 Sample code Result SELFTEST SELFTEST PATTERN SELFTEST ETHERNET SELFTEST WLAN...
  • Page 55 Sample code Result SELFTEST RS232 SELFTEST SYSTEM SELFTEST PRINTER SELFTEST Z...
  • Page 56: Eoj

    Description Let the printer wait until process of commands (before EOJ) be finished then go on the next command. Syntax Note: This command has been supported since V6.39 EZ and later firmware. Example Sample Code SIZE 4,0.2 GAP 0,0 DIRECTION 1 TEXT 10,10,"3",0,1,1,"Two labels are printed without stop."...
  • Page 57 Paper feed direction without stop...
  • Page 58: Delay

    DELAY Description Let the printer wait specific period of time then go on next command. Syntax DELAY ms Parameter Description The specific period of time. Unit is millisecond. 1000 ms = 1 second. Note: This command has been supported since V6.34 EZ and later firmware. Example Sample Code SIZE 4,0.7...
  • Page 60: Display

    DISPLAY Description This command can show the image, which is in printer’s image buffer, on LCD panel. Syntax DISPLAY IMAGE/OFF/CLS/..Parameter Description IMAGE Show the image in printer’s image buffer on LCD panel. (since V6.39 EZ) Disable this function. (since V6.39 EZ) Show the background color and clear the items in printer’s image buffer on LCD panel (since A1.90 EZ) forecolor,backcolor...
  • Page 61 radius Frame radius bmpfile BMP file name font Font name rotate Rotation (0, 90, 180, and 270 valid) x-multi Horizontal multiplication y-multi Vertical multiplication align Text justification (1:left, 2:center, 3:right) content Content of text string Note: This command only can be performed on the printer with LCD display. Example Sample code Result...
  • Page 62: Initialprinter

    INITIALPRINTER Description This command can restore printer settings to defaults. Syntax INITIALPRINTER Parameter Description None Example Sample code INITIALPRINTER...
  • Page 63: Menu

    MENU Description This command can design user’s own menu with a database resident on the printer. Syntax MENU title$, list$, selected Parameter Description title$ The title string is shown on LCD screen. List$ List of items, separated by CRLF. Selected It must be a variable to get the result of selection.
  • Page 64 DOWNLOAD F,"Print Mode" NONE TEAR OFF PEEL OFF CUT OFF DOWNLOAD F,"Country" DOWNLOAD F,"DEMO.BAS" DPI = VAL(GETSETTING$("SYSTEM","INFORMATION","DPI")) :MAINLOOP OPEN "TSPL",0 LIST$ = FREAD$(0, LOF("TSPL")) CLOSE 0 MENU "TSPL", LIST$, OPTION$ IF LEN(OPTION$) = 0 THEN END IF OPTION$ = "Speed" THEN SETTING$ = GETSETTING$("CONFIG","TSPL","SPEED") IF OPTION$ = "Density"...
  • Page 65 IF OPTION$ = "Offset" THEN INPUT "Offset", SETTING$ ENDIF IF LEN(SETTING$) <> 0 THEN IF OPTION$ = "Speed" THEN SPEED VAL(SETTING$) IF OPTION$ = "Density" THEN DENSITY VAL(SETTING$) IF OPTION$ = "Print Mode" THEN GOSUB SET_PRINT_MODE IF OPTION$ = "Offset" THEN OFFSET VAL(SETTING$) / IF OPTION$ = "Country"...
  • Page 66: Label Formatting Commands

    Label Formatting Commands Description This command draws a bar on the label format. Syntax BAR x,y,width,height Parameter Description The upper left corner x-coordinate (in dots) The upper left corner y-coordinate (in dots) width Bar width (in dots) height Bar height (in dots) Note: ...
  • Page 67 See Also...
  • Page 68: Barcode

    BARCODE Description This command prints 1D barcodes. The available barcodes are listed below: Narrow : Width Code Type Description Max. data length Code 128, switching code subset automatically. 128M Code 128, switching code subset manually. EAN128 EAN128, switching code subset automatically. EAN128M EAN128M, switching code subset manually.
  • Page 69 Code 11. TELEPEN Telepen. *Since V6.89EZ. TELEPENN Telepen number. *Since V6.89EZ. PLANET Planet. *Since V6.89EZ. CODE49 Code 49. *Since V6.89EZ. Deutsche Post Identcode. *Since V6.91EZ. Deutsche Post Leitcode. *Since V6.91EZ. LOGMARS A special use of Code 39. *Since V6.88EZ.
  • Page 70 Syntax BARCODE X,Y, "code type",height,human readable,rotation,narrow,wide,[alignment,] "content " Parameter Description Specify the x-coordinate bar code on the label Specify the y-coordinate bar code on the label code type Code 128, switching code subset A, B, C automatically 128M Code 128, switching code subset A, B, C manually Control code FNC3 FNC3...
  • Page 71 Note: Please refer to printer model list for detail. Code 93 EAN13 EAN 13 EAN13+2 EAN 13 with 2 digits add-on EAN13+5 EAN 13 with 5 digits add-on EAN8 EAN 8 EAN8+2 EAN 8 with 2 digits add-on EAN8+5 EAN 8 with 5 digits add-on CODA Codabar POST...
  • Page 72 human readable 0: not readable 1: human readable aligns to left 2: human readable aligns to center 3: human readable aligns to right rotation : No rotation : Rotate 90 degrees clockwise 180 : Rotate 180 degrees clockwise 270 : Rotate 270 degrees clockwise narrow Width of narrow element (in dots) wide...
  • Page 73 MSIC PLESSY ITF14 EAN14 alignment Specify the alignment of barcode 0 : default (Left) 1 : Left 2 : Center 3 : Right content Content of barcode Please note that the maximum number of digits of bar code content. Character sets Max.
  • Page 74 UPCA+2 0123456789 UPA+5 0123456789 UPCE 0123456789 UPCE+2 0123456789 UPE+5 0123456789 0123456789 MSIC 0123456789 PLESSEY 0123456789 CPOST 0123456789 ITF14 0123456789 EAN14 0123456789 0123456789- TELEPEN ASCII 0 to 127 TELEPENN 0123456789 PLANET 0123456789 CODE49 ASCII 0 to 127 0123456789 0123456789 0123456789[Space]ABCDEFGHIJKLMNOPQRSTUVWXYZ LOGMARS -.$/+% Note: Since V5.10EZ, \[R] means carriage return character 0x0D and \[L] means line feed character 0x0A.
  • Page 75 Character set for CODE 128 Value 128A 128B 128C Value 128A 128B 128C Value 128A 128B 128C space space " " & & ‘ ‘ FNC 3 FNC 3 FNC 2 FNC 2 Shift B Shift A Code C Code C <...
  • Page 76 Example Sample Code Result SIZE 4,1 GAP 0,0 DIRECTION 1 TEXT 10,10, "2",0,1,1, "Human readable alignment" BARCODE 10,50, "128",100,1,0,2,2,"left" BARCODE 310,50, "128",100,2,0,2,2,"center" BARCODE 610,50, "128",100,3,0,2,2,"right" PRINT 1 SIZE 4,1 GAP 0,0 DIRECTION 1 TEXT 10,10, "2",0,1,1, "Code 128, switch code subset automatically.
  • Page 77 Sample Code Result and EFGH characters encoded as CODE A subset. SIZE 4,1 GAP 0,0 DIRECTION 1 TEXT 10,10, "2",0,1,1, "TELEPEN" BARCODE 10,50, "TELEPEN",100,1,0,2,6, "abcd1234ABCD" PRINT 1 SIZE 4,4 GAP 0,0 DIRECTION 1 TEXT 400,26, "2",0,1,1,2, "TELEPEN Number" BARCODE 400,50, "TELEPENN",60,2,0,2,6,2, "1234567890" TEXT 400,136, "2",0,1,1,2, "Code 11"...
  • Page 78 Example for GS1 Code128 Ex1: GS1 format for GTIN and Serial Number Data Description FNC1 AI for GTIN 12345678901234 GTIN AI for Serial number 12345 Serial number DIRECTION 1 BARCODE 150,50, "128M",100,1,0,2,2,"!105!10201123456789012312112345" PRINT 1 Ex2: GS1 format for GTIN, Serial Number and Batch number Data Description FNC1...
  • Page 79: Tlc39

    TLC39 Description This command draws TLC39, TCIF Linked Bar Code 3 of 9, barcode. Syntax TLC39 x,y,rotation,[height,]narrow,]wide,]cellwidth,]cellheight,] "ECI number,Serial number & additional data" Parameter Description Specify the x-coordinate Specify the y-coordinate rotation : No rotation : Rotate 90 degrees clockwise 180 : Rotate 180 degrees clockwise 270 : Rotate 270 degrees clockwise height...
  • Page 80 TLC39 10,50,0, "123456,SN00000001,00601,01501" TLC39 310,50,0,80,3,6,3,4, "123456,SN00000001,00601,01501" PRINT 1 Result...
  • Page 81: Bitmap

    BITMAP Description This command draws bitmap images (as opposed to BMP graphic files). Syntax BITMAP X,Y,width,height,mode,bitmap data… Parameter Description Specify the x-coordinate Specify the y-coordinate width Image width (in bytes) height Image height (in dots) mode Graphic modes listed below: 0: OVERWRITE 1: OR 2: XOR...
  • Page 82 – axis 1-byte 2-byte Y- axis Binary Hexadecimal Binary Hexadecimal 00000000 00000000 00000000 00000000 00000000 00000000 00000111 11111111 00000011 11111111 00010001 11111111 00011000 11111111 00011100 01111111 00011110 00111111 00011111 00011111 00011111 10001111 00011111 11000111 00011111 11100011 00011111 11110111 00011111 11111111 00011111 11111111...
  • Page 83 Sample Code (ASCII) Hexadecimal Result SIZE 4,2 53 49 5A 45 20 34 2C 32 0D 0A 47 41 50 20 30 2C 30 0D 0A 43 4C 53 GAP 0,0 0D 0A 42 49 54 4D 41 50 20 32 30 30 2C 32 30 30 2C 32 2C 31 36 2C 30 2C 00 00 00 00 00 00 07 FF 03 FF...
  • Page 84: Box

    Description This command draws rectangles on the label. Syntax BOX x,y,x_end,y_end,line thickness[,radius] Parameter Description Specify x-coordinate of upper left corner (in dots) Specify y-coordinate of upper left corner (in dots) x_end Specify x-coordinate of lower right corner (in dots) y_end Specify y-coordinate of lower right corner (in dots) line thickness Line thickness (in dots)
  • Page 85 PRINT 1 See Also...
  • Page 86: Circle

    CIRCLE Description This command draws a circle on the label. Syntax CIRCLE X_start,Y_start,diameter,thickness Parameter Description X_start Specify x-coordinate of upper left corner (in dots) Y_start Specify y-coordinate of upper left corner (in dots) diameter Specify the diameter of the circle (in dots) thickness Thickness of the circle (in dots) Example...
  • Page 87: Ellipse

    ELLIPSE Description This command draws an ellipse on the label. Syntax ELLIPSE x,y,width,height,thickness Parameter Description Specify x-coordinate of upper left corner (in dots) Specify y-coordinate of upper left corner (in dots) width Specify the width of the ellipse (in dots) height Specify the height of the ellipse (in dots) thickness...
  • Page 88: Codablock Fmode

    CODABLOCK F mode Description This command draws CODABLOCK F mode barcode. Syntax CODABLOCK x,y,rotation,[row height,]module width,] "content" Parameter Description Specify the x-coordinate Specify the y-coordinate rotation : No rotation : Rotate 90 degrees clockwise 180 : Rotate 180 degrees clockwise 270 : Rotate 270 degrees clockwise row height The height of individual row equals to row height x module width (Default is 8)
  • Page 89 PRINT 1 Result...
  • Page 90: Dmatrix

    DMATRIX Description This command defines a DataMatrix 2D bar code. Currently, only ECC200 error correction is supported. Syntax DMATRIX x,y,width,height,[c#,x#,r#,a#,row,col,] "content" Parameter Description Horizontal start position (in dots) Vertical start position (in dots) width The expected width of barcode area (in dots) height The expected height of barcode area (in dots) Escape sequence control character (decimal digit)
  • Page 91 Symbol size of col: 10 to 144 content Content of DataMatrix 2D bar code Note: - This command has been supported since V6.89 EZ and later firmware. The parameter "a#" has been supported since V8.01 EZ and later firmware. - For standard symbol sizes for DataMatrix 2D barcode, please refer to below list. Square Rectangle 10 x 10...
  • Page 92 Example Sample code Result SIZE 4,3 GAP 0,0 DIRECTION 1 DMATRIX 10,110,400,400, « DMATRIX EXAMPLE 1 » DMATRIX 310,110,400,400,x6, « DMATRIX EXAMPLE 2 » DMATRIX 10,310,400,400,x8,18,18, « DMATRIX EXAMPLE 3 » PRINT 1,1 Sample code for FNC SIZE 4,1 GAP 0,0 DIRECTION 1 DMATRIX 100,50,100,100,c126,x6,18,18, «...
  • Page 93 Example for GS1 DataMatrix Ex1: GS1 format for GTIN and Serial Number Data Description FNC1 AI for GTIN 12345678901234 GTIN AI for Serial number 12345 Serial number DIRECTION 1 DMATRIX 150,50,100,100,c126,x6,18,18, "~101123456789012312112345" PRINT 1 Ex2: GS1 format for GTIN, Serial Number and Batch number Data Description FNC1...
  • Page 94: Erase

    ERASE Description This command clears a specified region in the image buffer. Syntax ERASE x,y,x_width,y_height Parameter Description The x-coordinate of the starting point (in dots) The y-coordinate of the starting point (in dots) x_width The region width in x-axis direction (in dots) y_height The region height in y-axis direction (in dots) Example...
  • Page 95: Maxicode

    MAXICODE Description This command defines a 2D Maxicode. Syntax MAXICODE x,y,mode,[class,country,post,Lm,] "content" MAXICODE x,y,mode,class,country,postal code, "content" For mode 2 or 3, If country is 840, the postal code is in 99999,9999 format. For other countries, the code is up to 6 alphanumeric characters.
  • Page 96 Example Sample code Result SIZE 4,2 GAP 0,0 DIRECTION 1 REM *****Mode 2 For USA***** MAXICODE 110,100,2,300,840,06810,7317, "DEMO 2 FOR USA MAXICODE" TEXT 100,50, "3",0,1,1, "Mode 2 For USA" PRINT 1,1 REM *****Mode 3 For Canada***** MAXICODE 110,100,3,300,863, "107317","DEMO 3 FOR CANADA MAXICODE" TEXT 100,50, "3",0,1,1, "Mode 3 For CANADA"...
  • Page 97: Pdf417

    PDF417 Description This command defines a PDF417 2D bar code. Syntax PDF417 x,y,width,height,rotate,[option], "content" Parameter Description X-coordinate of starting point (in dot) Y-coordinate of starting point (in dot) width Expected width (in dots) height Expected height (in dots) rotate Rotation counterclockwise : No rotation : Rotate 90 degrees 180 : Rotate 180 degrees...
  • Page 98 Truncation 0: Not truncated 1: Truncated Expression length, 1m2048 (without " for content) content Content of PDF417 2D bar code Note: If parameter Lm is used, double quotes (") are unnecessary for content.
  • Page 99 Example Sample code Result SIZE 4,1 GAP 0,0 DIRECTION 1 REM *****WITHOUR OPTIONS***** PDF417 50,50,400,200,0, "Without Options" PRINT 1,1 SIZE 4,1.5 GAP 0,0 DIRECTION 1 REM *****OPTION:E3***** PDF417 50,50,400,200,0,E3, "Error correction level:3" PRINT 1,1 REM *****OPTION:E4***** PDF417 50,50,400,200,0,E4, "Error correction level:4" PRINT 1,1 SIZE 4,1.5 GAP 0,0...
  • Page 100 Sample code Result PDF417 50,50,600,600,0,E4,W4,H4, "Error correction level:4 module width 4 dots bar height 4 dots" PRINT 1,1 SIZE 4,1.5 GAP 0,0 DIRECTION 1 REM *****OPTION:E4 W4 H4 R40 C4 T1***** PDF417 50,50,800,800,0,E4,W4,H4,R40,C4,T1, "Error correction level:4 Module Width 4 dots Bar Height 4 dots Maximum Number of Rows:5 Rows Maximum number of columns:90 Cols...
  • Page 101 Sample code Result Module Width 4 dots: W4 Bar Height 4 dots: H4 Maximum Number of Rows: 60 Rows: R60 Maximum number of columns: 4 Cols: C4 Truncation:1: T0 Expression length:297: L297 PRINT 1,1...
  • Page 102: Aztec

    AZTEC Description This command defines a AZTEC 2D bar code. Syntax AZTEC x,y,rotate,[size,]ecp,]flg,]menu,]multi,]rev,] "content" Since V6.60EZ AZTEC x,y,rotate,size,ecp,flg,menu,multi,rev,bytes,content Since V6.91EZ Parameter Description Horizontal start position (in dots) Vertical start position (in dots) rotate Rotation : No rotation : Rotate 90 degrees 180 : Rotate 180 degrees 270 : Rotate 270 degrees size...
  • Page 103 Example Sample Code Result SIZE 4,2 GAP 0,0 AZTEC 10,10,0,"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" AZTEC 210,10,0,4,"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" AZTEC 410,10,0,4,1,"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" AZTEC 610,10,0,4,1,0,"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" AZTEC 10,310,0,4,1,0,0,"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" AZTEC 210,310,0,4,1,0,0,1,"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" AZTEC 410,310,0,4,1,0,0,1,1,"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" AZTEC 610,310,0,4,1,0,0,1,1,10,1234567890 PRINT 1...
  • Page 104: Mpdf417

    MPDF417 Description This command defines a Micro PDF 417 bar code. Syntax MPDF417 x,y,rotate,[Wn,][Hn,][Cn,] "content" Parameter Description Horizontal start position (in dots) Vertical start position (in dots) rotate Rotation : No rotation : Rotate 90 degrees 180 : Rotate 180 degrees 270 : Rotate 270 degrees Optional.
  • Page 105 Example Sample Code SIZE 4,1 GAP 0,0 MPDF417 10,10,0, « ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 « MPDF417 110,10,0,W2, « ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 « MPDF417 210,10,0,W2,H3, « ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 « MPDF417 310,10,0,W2,H3,C3, « ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 « PRINT 1 Result...
  • Page 106: Rmqr

    RMQR Description This command defines a rmQR code. Syntax RMQR x,y,ecc,size,Type,rotate,"content" Parameter Description Horizontal start position (in dots) Vertical start position (in dots) Error correction recovery level M~37%; H~65% size Element module size Type Barcode size. 0 = Automatic; 1-38 type 1: R7x43 8: R9x77 15: R11x99...
  • Page 107 Example Sample Code SIZE 4,2 GAP 0,0 DIRECTION 1 RMQR 100,200,H,9,0,0,"This is a rmQR" PRINT 1 SIZE 4,2 GAP 0,0 DIRECTION 1 RMQR 800,100,M,15,0,0,"ABC123456789123456789123456789" PRINT 1 SIZE 4,3 GAP 0,0 DIRECTION 1 RMQR 400,400,H,9,0,0,"123456789123456789123456789" RMQR 400,400,H,9,0,90,"123456789123456789123456789" RMQR 400,400,H,9,0,180,"123456789123456789123456789" RMQR 400,400,H,9,0,270,"123456789123456789123456789" PRINT 1...
  • Page 108: Putbmp

    PUTBMP Description This command prints BMP format images. The grayscale printing is for direct thermal mode only. Support 1-bit (monochrome) and 8-bit (256-color) BMP graphic only. Syntax PUTBMP x,y, "filename" [, bpp][, contract] Parameter Description The x-coordinate of the BMP format image The y-coordinate of the BMP format image filename The downloaded BMP filename...
  • Page 109 contrast = 80" PUTBMP 590,10, "SAMPLE.BMP",8,80 BLOCK 590,180,240,100,"2",0,1,1,"bpp = 8 contrast = 80" PRINT 1 Sample Code SIZE 2,2 GAP 0,0 PUTBMP 10,10, "SAMPLE.GRF" PRINT 1 See Also DOWNLOAD, BITMAP, PUTPCX...
  • Page 110: Putpcx

    PUTPCX Description This command prints PCX format images. TSPL language supports 2-color PCX format graphics. TSPL2 language supports 256-color PCX format graphics. Note: Please refer to printer model list for checking TSPL or TSPL2 Syntax PUTPCX x,y, "filename" Parameter Description The X-coordinate of the PCX format image The Y-coordinate of the PCX format image filename...
  • Page 111 See Also DOWNLOAD, BITMAP, PUTPCX...
  • Page 112: Putpng

    PUTPNG Description This command prints PNG format images. (since A2.12) Syntax PUTPNG x,y, "filename" Parameter Description The X-coordinate of the PNG format image The Y-coordinate of the PNG format image filename The downloaded PNG file name (Case sensitive) Example Sample Code (Downloading PNG file into printer) SPEED 2 DENSITY 3 SIZE 4,1...
  • Page 113: Qrcode

    QRCODE Description This command prints QR code. Syntax QRCODE x,y,ECC Level,cell width,mode,rotation,[justification,]model,]mask,]area],]length]"content" Parameter Description The upper left corner x-coordinate of the QR code The upper left corner y-coordinate of the QR code ECC level Error correction recovery level : 7% : 15% : 25% : 30%...
  • Page 114 (Where A: Alphanumeric data) QRCODE 100,10,M,7,M,0,M1,S2, "N123456" (Where N: Numeric data) QRCODE 100,10,Q,7,M,0,M1,S3, "N123456!ATHE FIRMWARE HAS BEEN UPDATED" (Where N: Numeric data ; !:Transfer char ; A: Alphanumeric data) QRCODE 100,10,H,7,M,0,M1,S3, "B0012Product name" (where B: Binary data ; 0012: 12 bytes ) QRCODE 100,10,M,7,M,0,M1,S3, "K"...
  • Page 115 Example Sample code Result Auto mode example General data string SIZE 4,2.5 GAP 0,0 DIRECTION 1 QRCODE 10,10,H,4,A,0, "ABCabc123" QRCODE 160,160,H,4,A,0, "123ABCabc" QRCODE 310,310,M,4,A,0,M2, "印表機 ABCabc123" PRINT 1,1 Data string including <Enter> character (0Dh, 0Ah) SIZE 4,2.5 GAP 0,0 DIRECTION 1 QRCODE 10,10,H,4,A,0, «...
  • Page 116 Data string concatenation (Must be used with DOWNLOAD ... EOP command) DOWNLOAD "DEMO.BAS" SIZE 4,2.5 GAP 0,0 DIRECTION 1 QRCODE 10,10,H,4,A,0, "ABCabc123" +STR$(1234) QRCODE 160,160,H,4,A,0, "123ABCabc" +"1234" QRCODE 310,310,H,4,A,0, "印表機 ABCabc123"+"1234"+"abcd" PRINT 1,1 DEMO Data string including double quote (") character, please use \["] instead of SIZE 4,2.5 GAP 0,0...
  • Page 117 PRINT 1,1 Data string including <Enter> character, <Enter> is an 8-bit byte data SIZE 4,2.5 GAP 0,0 DIRECTION 1 QRCODE 10,10,H,4,M,0,"AABC!B0007<Enter> abc<Enter> !N123" QRCODE 160,160,H,4,M,0,"N123!B0002<Enter> !AABC!B0005<Enter> abc" 印表機!B0002<Enter> QRCODE 310,310,H,4,M,0, "K !AABC!B0010<Enter> abc<Enter> 123" PRINT 1,1 Data string concatenation (Must be used with DOWNLOAD ... EOP command) DOWNLOAD "A.BAS"...
  • Page 118 Data string including double quote (") character, please use \["] instead of SIZE 4,2.5 GAP 0,0 DIRECTION 1 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 印表 機!B0010\["]ABCabc123" PRINT 1,1 Smart phone data string DOWNLOAD "A.BAS" SIZE 3,3 GAP 0,0 DIRECTION 1 QRCODE 10,10,H,7,M,0,M2,S7,"Aabcd"...
  • Page 119 Data string for parameter [justification] & [area] SIZE 4,2.5 GAP 0,0 DIRECTION 1 BAR 60,120,200,1 BAR 160,20,1,200 QRCODE 160,120,H,10,A,0,X100,J5,"123456789" PRINT 1,1 For other [justification] results (J1~J9)
  • Page 120 Data string for parameter [length] QRCODE 50,462,H,5,M,0,M2,S5,L21,B00161234567890ABCDEF PRINT 1...
  • Page 121: Rss

    Description This command is used to draw a RSS bar code on the label format. Syntax RSS x,y, "sym",rotate,pixMult,sepHt, "content" RSS x,y, "RSSEXP",rotate,pixMult,sepHt,segWidth, "content" RSS x,y, "UCC128CCA",rotate,pixMult,sepHt,linHeight, "content" RSS x,y, "UCC128CCC",rotate,pixMult,sepHt,linHeight, "content" Parameter Description X-coordinate Y-coordinate Symbology type: RSS14 RSS14 RSS14T RSS14 Truncated RSS14S...
  • Page 122 RSSEXP 33 × pixMult. EAN8 60 × pixMult. EAN13 74 × pixMult. UPCA 74 × pixMult. UPCE 74 × pixMult. sepHt Separator row height (1 and 2 valid) pixMult times sepHt is the real separator row height. It is calculated by printer. segWidth Segment width of RSS expanded (even 2 to 22 valid) linHeight...
  • Page 123 Example Sample code Result SIZE 100 mm,100 mm GAP 0,0 DIRECTION 1 RSS 300,300, "RSS14",0,2,2, "1234567890|ABCDEFG" RSS 300,300,"RSS14T",90,2,2,"1234567890|ABCDEFG" RSS 300,300,"RSS14S",180,2,2,"1234567890|ABCDEFG" RSS 300,300, "RSS14SO",270,2,2, "1234567890|ABCDEFG" PRINT 1,1 SIZE 100 mm,100 mm GAP 0,0 DIRECTION 1 RSS 300,300, "RSSLIM",0,2,2, "1234567890|ABCDEFG" RSS 300,300, "RSSEXP",90,2,2,22, "1234567890|ABCDEFG" RSS 300,300, "UPCA",180,2,2, "1234567890|ABCDEFG"...
  • Page 124 48000310123191000" PRINT 1 Example of UPCE mode SIZE 4,1 GAP 0,0 DIRECTION 1 REM UPCE Rule 1: 00abc0000hij = abhijc, where c = 0-2 RSS 10,10,"UPCE",0,2,2,"001200000456|ABCDEFG" RSS 210,10,"UPCE",0,2,2,"001210000456|ABCDEFG" RSS 410,10,"UPCE",0,2,2,"001220000456|ABCDEFG" PRINT 1 SIZE 4,1 GAP 0,0 DIRECTION 1 REM UPCE Rule 2: 00abc00000ij = abcij3 RSS 10,10,"UPCE",0,2,2,"001230000045|ABCDEFG"...
  • Page 125 REM UPCE Rule 4: 00abcde0000j = abcdej where j = 5-9 RSS 10,10,"UPCE",0,2,2,"001234500005|ABCDEFG" RSS 160,10,"UPCE",0,2,2,"001234500006|ABCDEFG" RSS 310,10,"UPCE",0,2,2,"001234500007|ABCDEFG" RSS 460,10,"UPCE",0,2,2,"001234500008|ABCDEFG" RSS 610,10,"UPCE",0,2,2,"001234500009|ABCDEFG" PRINT 1 Example of barcode height of EAN8 EAN13 UPCA and UPCE. SIZE 4,2 GAP 0,0 DIRECTION 1 RSS 10,10,"EAN8",0,1,1,"1234567|ABCDEFG" RSS 210,10, "EAN8",0,2,1,"1234567|ABCDEFG"...
  • Page 126 RSS 10,10,"UPCA",0,1,1,"12345678901|ABCDEFG" RSS 210,10,"UPCA",0,2,1,"12345678901|ABCDEFG" RSS 410,10,"UPCA",0,3,1,"12345678901|ABCDEFG" PRINT 1 SIZE 4,2 GAP 0,0 DIRECTION 1 RSS 10,10,"UPCE",0,1,1,"001200000456|ABCDEFG" RSS 210,10,"UPCE",0,2,1,"001210000456|ABCDEFG" RSS 410,10,"UPCE",0,3,1,"001220000456|ABCDEFG" PRINT 1 Example of RSS GS1 DIRECTION 1 CODEPAGE 850 TEXT 62,240,"0",0,9,9,0,"(21)1234567891234(11)001225" RSS 62,170,"RSSEXP",0,2,1,22,"211234567891234#11001225" PRINT 1...
  • Page 127: Reverse

    REVERSE Description This command reverses 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 dots) y_start The y-coordinate of the starting point (in dots) x_width X-axis region width (in dots) y_height Y-axis region height (in dots) Note: ...
  • Page 128: Diagonal

    DIAGONAL Description This command is used to draw a diagonal. Syntax DIAGONAL x1, y1, x2, y2, thickness Parameter Description The x1-coordinate of the starting point (in dots) The y1-coordinate of the starting point (in dots) The x2-coordinate of the ending point (in dots) The y2-coordinate of the ending point (in dots) thickness Thickness of diagonal...
  • Page 129: Text

    TEXT Description This command prints text on label. Syntax TEXT x,y, « font « ,rotation,x-multiplication,y-multiplication,[alignment,] « content « Parameter Description The x-coordinate of the text The y-coordinate of the text font Font name Monotye CG Triumvirate Bold Condensed, font width and height is stretchable 8 x 12 fixed pitch dot font 12 x 20 fixed pitch dot font...
  • Page 130 For "ROMAN.TTF" true type font, this parameter is ignored. For font "0", this parameter is used to specify the width (point) of true type font. 1 point=1/72 inch. y-multiplication Vertical multiplication, up to 10x Available factors: 1~10 For true type font, this parameter is used to specify the height (point) of true type font. 1 point=1/72 inch.
  • Page 131 Example Sample Code Result SIZE 4,3 GAP 0,0 DIRECTION 1 TEXT 10,10,"0",0,12,12,"TSPL 2" TEXT 10,40,"0",0,8,8,"align left" BAR 0,70,800,4 TEXT 10,110,"0",0,12,12,"FONT 0" TEXT 10,160,"1",0,1,1,"FONT 1" TEXT 10,210,"2",0,1,1,"FONT 2" TEXT 10,260,"3",0,1,1,0,"FONT 3" TEXT 10,310,"4",0,1,1,0,"FONT 4" TEXT 10,360,"5",0,1,1,0,"FONT 5" TEXT 10,410,"6",0,1,1,1,"FONT 6" TEXT 10,460,"7",0,1,1,1,"FONT 7" TEXT 10,510,"8",0,1,1,1,"FONT 8"...
  • Page 132 Sample Code Result TEXT 800,410,"H8.FNT",0,1,1,3,"FONT H8" TEXT 800,460,"GS.FNT",0,1,1,3,"ABCDEF" PRINT 1 SIZE 4,2 GAP 0,0 DIRECTION 1 BAR 60,120,200,1 BAR 160,20,1,200 TEXT 160,120,"0",0,12,12,1,"TEXT alignment" PRINT 1,1 SIZE 4,2 GAP 0,0 DIRECTION 1 BAR 60,120,200,1 BAR 160,20,1,200 TEXT 160,120,"0",0,12,12,2,"TEXT alignment" PRINT 1,1 SIZE 4,2 GAP 0,0 DIRECTION 1...
  • Page 133: Block

    BLOCK Description This command prints paragraph on label. Syntax BLOCK x,y,width,height, « font »,rotation,x-multiplication,y-multiplication,[space,]align,]fit,] »content » Parameter Description The x-coordinate of the text The y-coordinate of the text width The width of block for the paragraph in dots 2Uheight The height of block for the paragraph in dots font Font name Monotye CG Triumvirate Bold Condensed, font width and...
  • Page 134 F.FNT ZPL2 font F G.FNT ZPL2 font G H8.FNT ZPL2 font H8 GS.FNT ZPL2 font GS rotation The rotation angle of text : No rotation : degrees, in clockwise direction 180 : degrees, in clockwise direction 270 : degrees, in clockwise direction x-multiplication Horizontal multiplication, up to 10x Available factors: 1~10...
  • Page 135 Note:  The internal font (font #1~#5) pitch between TSPL and TSPL2 is different.  Font "0" and "ROMAN.TTF" internal True Type Fonts are available in TSPL2 language printers, but not TSPL language printers.  If there is any double quote (") within the text, please change it to \["]. ...
  • Page 136 BLOCK 20,20,500,170,"0",0,10,10,0,0,1,DATA$ BOX 20,20,500+20,170+20,2 PRINT 1 SIZE 4,1.5 GAP 0,0 DIRECTION 1 BLOCK 20,20,500,170,"0",0,10,10,0,0,0,DATA$ BOX 20,20,500+20,170+20,2 PRINT 1...
  • Page 137: Status Polling And Immediate Commands

    Status Polling and Immediate Commands These commands support RS-232, USB and Ethernet. <ESC>!? Description This command obtains the printer status at any time, even in the event of printer error. An inquiry request is solicited by sending an <ESC> (ASCII 27, escape character) as the beginning control character to the printer. A one byte character is returned, flagging the printer status.
  • Page 138: Esc>!C

    <ESC>!C Description This command restarts the printer and omits to run AUTO.BAS. The beginning of the command is an ESCAPE character (ASCII 27). Syntax <ESC>!C Note:  When printer receives this command, printer will restart itself no matter AUTO.BAS exists or not. ...
  • Page 139: Esc>!D

    <ESC>!D Description This command is used to disable immediate command, ex. <ESC>!R <RSC>!? <ESC>!C and so on, which is starting by <ESC>!. The beginning of the command is an ESCAPE character (ASCII 27). Syntax <ESC>!D Note: This command has been supported since V6.61 EZ and later firmware. See Also...
  • Page 140: Esc>!O

    <ESC>!O Description This command is using to cancel the PAUSE status of printer. The beginning of the command is an ESCAPE character (ASCII 27). Syntax <ESC>!O Note: This command has been supported since V6.93 EZ and later firmware. See Also <ESC>!P...
  • Page 141: Esc>!P

    <ESC>!P Description This command is using to PAUSE the printer. The beginning of the command is an ESCAPE character (ASCII 27). Syntax <ESC>!P Note: This command has been supported since V6.93 EZ and later firmware. See Also <ESC>!O...
  • Page 142: Esc>!Q

    <ESC>!Q Description This command restarts the printer and omits to run AUTO.BAS. The beginning of the command is an ESCAPE character (ASCII 27). Syntax <ESC>!Q Note:  If there is no AUTO.BAS inside the printer, the printer will not restart itself. ...
  • Page 143: Esc>!R

    <ESC>!R Description This command resets the printer. The beginning of the command is an ESCAPE character (ASCII 27). The files downloaded in memory will be deleted. This command cannot be sent in dump mode. Syntax <ESC>!R See Also <ESC>!?
  • Page 144: Esc>!S

    <ESC>!S Description This command obtains the printer status at any time, even in the event of printer error. An inquiry request is solicited by sending an <ESC> (ASCII 27, escape character) as the beginning control character to the printer. 8 bytes will be returned, flagging the printer status.
  • Page 145 Receive buffer full (RS-232) Unhealthy Dots Status Byte #3: error Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 ASCII Char Meaning Normal Print head overheat Stepping motor overheat Print head error (since V7.01 EZ) Cutter jam Insufficient memory Status Byte #4: error...
  • Page 146 Example Test <ESC>!S by CommTool via RS-232 port. The values return from printer in Hex. The values return from printer in Character. Hex Data 1B 21 53 means <ESC>!S. Click to send Hex 1b 21 53 to query printer status. Result Item Meaning...
  • Page 147 See Also <ESC>!?
  • Page 148: Esc>!F

    <ESC>!F Description This command is using to feed a label. This function is the same as to press the FEED button. The beginning of the command is an ESCAPE character (ASCII 27). Syntax <ESC>!F Note: This command has been supported since V7.00 EZ and later firmware.
  • Page 149: Esc

    <ESC>!. Description This command can cancel all printing files. The beginning of the command is an ESCAPE character (ASCII 27). Syntax <ESC>!. Note: This command has been supported since V7.00 EZ and later firmware.
  • Page 150 Description This command inquires the mileage of the printer. The integer part of mileage is returned (the decimal part of mileage is not return) to the PC in ASCII characters. The ending character of mileage is 0x0D. Syntax Example...
  • Page 151 Description This command inquires the free memory of the printer. The number of bytes of free memory is returned in decimal digits, with 0x0d as ending code of PC. Syntax Example See Also FILES...
  • Page 152 Description This command inquires the presence of Real Time Clock. One byte is return from the printer, indicating whether or not the RTC is installed. This command is only for the firmware before V6.xx. Syntax Return value Description RTC is not installed. RTC is installed.
  • Page 153 Description This command enters the printer into DUMP mode. In DUMP mode, the printer outputs code directly without interpretation. Syntax Example...
  • Page 154 Description This command is used to enable immediate command, ex. <ESC>!R <RSC>!? <ESC>!C and so on, which is starting by <ESC>!. Syntax Note: This command has been supported since V6.61 EZ and later firmware. Example See also <ESC>!D...
  • Page 155 Description This command inquires all about files resident in the printer memory, and fonts installed in the memory module. The filename are returned in ASCII characters. Each file name ends with 0x0D. The ending character is 0x1A. Entering this command multiple times will cycle through the files resident on memory. Syntax Example See Also...
  • Page 156 Description The command inquires the code page and country setting of the printer. Syntax 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 157 Description This command inquires the model name and number of the printer. This information is returned in ASCII characters. Syntax ~ !T Example ~ !T...
  • Page 158: Esc> Y

    <ESC> Y Description This command is used to enable line mode (from EZPL to CPCL) for EZC printer. Syntax <ESC> Y Example <ESC> Y See Also <ESC> Z...
  • Page 159: Esc> Z

    <ESC> Z Description This command is used to disable line mode (from CPCL to EZPL) for EZC printer. Syntax <ESC> Z Example <ESC> Z See Also <ESC> Y...
  • Page 160: 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 161: Commands For Windows Driver

    Commands for Windows Driver Description This command stores bitmap image data in the memory. Behind the nnn is the bitmap data. Syntax !Bnnn Parameter Description The number of bytes of image data sent from PC to printer, expressed in 3 decimal digits.
  • Page 162 Description This command prints bitmap data at the specified position (in y-direction). Syntax !Jnnnn Parameter Description Print image at the specified position in y-direction. The position is expressed in 4 decimal digits. Example !J0100 See Also FEED...
  • Page 163 Description This command prints a specified number of labels. Syntax !Nnnn Parameter Description Specifies the number of copies to be printed. Example !N001...
  • Page 164: File Management Commands

    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 into two categories: program files and data files (including text data files, PCX graphic files and bitmap font files) The detailed descriptions regarding the download syntax for different files are as follows: Maximum numbers of file saved in DRAM: 50 files for TSPL/TSPL2 language printers...
  • Page 165 Alternatively, hold the PAUSE key and power on the switch. After sensor calibration, the "AUTO.BAS" will not be executed. Printer is now ready for use.
  • Page 166 Syntax Download a program file: DOWNLOAD [n,] "FILENAME.BAS" Parameter Description Specify memory used to save downloaded files. N is ignored: Download files to DRAM only. If you would like to save the files from DRAM to Flash memory before turning off power, issue the MOVE command to printer.
  • Page 167 Note:  For text data files, CR (carriage return) 0x0D and LF (Line Feed) 0x0A is the separator of data.  If memory is not specified, all files will be downloaded to DRAM.  No Battery is used to back up files in DRAM. Which will be lost in the event printer power is lost. ...
  • Page 168: Eop

    Description End of program. To declare the start and end of BASIC language commands used in a program, DOWNLOAD "FILENAME.BAS" must be added in the first line of the program, and "EOP" statement at the last line of program. Syntax Example Sample code (The example program listed below will download to printer SDRAM.) DOWNLOAD "DEMO.BAS"...
  • Page 169: Files

    FILES Description This command prints out the total memory size, available memory size and files lists (or lists the files through RS- 232) in the printer memory (both FLASH memory and DRAM). Syntax FILES Example Sample code Result FILES See Also ~!F, KILL...
  • Page 170: 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 Description Specify the memory location that files will be deleted. N is ignored: Kill files saved in DRAM.
  • Page 171 Example Users can use printer SELFTEST utility to list printer configurations and files saved in the printer memory, or use the FILES command to print the downloaded file list in printer. Follow the steps below to delete files in the printer memory via parallel port connection.
  • Page 172: Move

    MOVE Description This command moves downloaded files from DRAM to FLASH memory. Syntax MOVE See Also DOWNLOAD, EOP...
  • Page 173: Run

    Description This command executes a program resident in the printer memory. It is available for TSPL2 language printers only. Syntax RUN "FILENAME.BAS" Note: * This command can be replaced to filename that without typing ".BAS". * TDP-643 Plus, TTP-243, TTP-342, TTP-244ME, TTP-342M and TTP-248M series are not supported this feature Example Sample code Result...
  • Page 174 DEMO See Also DOWNLOAD, EOP...
  • Page 175: Basic Commands And Functions

    BASIC Commands and Functions ABS( ) Description This function returns the absolute value of an integer, floating point or variable. Syntax ABS(VARIABLE) Example Sample code Result DOWNLOAD "TEST.BAS" SIZE 4,4 GAP 0,0 DIRECTION 1 SET TEAR ON 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$(ABSI)
  • Page 176: Asc( )

    ASC( ) Description This function returns the ASCII code of the character. Syntax ASC(« A ») Example Sample code Result DOWNLOAD "TEST.BAS" SIZE 4,4 GAP 0,0 DIRECTION 1 SET TEAR ON CODE1=ASC("A") TEXT 100,100, "3",0,1,1,STR$(CODE1) PRINT 1 RUN "TEST.BAS" See Also DOWNLOAD, EOP, STR$()
  • Page 177: Chr$( )

    CHR$( ) Description This function returns the character with the specified ASCII code. Syntax CHR$(n) Parameter Description The ASCII code Example Sample code Result DOWNLOAD "TEST.BAS" SIZE 4,4 GAP 0,0 DIRECTION 1 SET TEAR ON A=75 WORD$=CHR$(A) TEXT 100,100, "3",0,1,1,WORD$ PRINT 1 RUN "TEST.BAS"...
  • Page 178: Xor$( )

    XOR$( ) Description This command can encode the original data to a new data by logic XOR. Syntax XOR$(data$,password$) Parameter Description data$ The original data needs to be encoded by password$. Password$ This parameter will be used to create the new data. Note: This command has been supported since V6.38 EZ and later firmware.
  • Page 179: End

    Description This command states the end of program. Syntax Example Sample code Result DOWNLOAD "DEMO.BAS" SIZE 4,2 GAP 0,0 DIRECTION 1 TEXT 200,60, "4",0,1,1, "END COMMAND TEST" X=300 Y=200 X1=500 Y1=400 GOSUB DR_LINE PRINT 1 :DR_LINE FOR I=1 TO 100 STEP 10 BOX X+I,Y+I,X1-I,Y1-I,5 NEXT RETURN...
  • Page 180 See Also DOWNLOAD, EOP, GOSUB...
  • Page 181: Eof( )

    EOF( ) Description This function is used to detect an opened download file to see whether it has reached the end of file. Syntax EOF (File Handle) Parameter Description File handle Either 0 or 1 Return value Description None-zero End of file Not end of file Example Sample code...
  • Page 182 IF EOF(0)=0 THEN GOTO A PRINT 1 DEMO See Also DOWNLOAD, EOP, OPEN, READ, SEEK...
  • Page 183: Open

    OPEN Description This command opens a downloaded file and establishes the file handle. Up to two file handles are supported, thus only up to two files can be opened simultaneously. The file to be opened should be downloaded prior to using this command. When opening a file, the firmware will search automatically to see if the file exists in the on board flash memory or extended memory card.
  • Page 184 SEEK 0,0 READ 0,data3$ CLOSE 0 SIZE 4,1 GAP 0,0 TEXT 10,10,"3",0,1,1,data1$ TEXT 10,60,"3",0,1,1,data2$ TEXT 10,110,"3",0,1,1,data3$ PRINT 1 TEST See Also DOWNLOAD, EOP, READ, WRITE, SEEK, CLOSE...
  • Page 185: Close

    CLOSE Description Close the file handle which is open by command OPEN. Syntax CLOSE file handle Parameter Description file handle Either 0 or 1 Example See the example in command OPEN.
  • Page 186: Write

    WRITE Description This command writes data to a downloaded data file. Two files can be open simultaneously, by virtue of printer support for two file handles. Syntax WRITE file handle,variables Parameter Description file handle 0 or 1 variables string, integer or float point variable See Also READ, DOWNLOAD, EOP, OPEN, EOF, LOF, SEEK, FREAD$()
  • Page 187: Read

    READ Description This command reads data from downloaded data file. Syntax READ file handle,variables Parameter Description file handle 0 or 1 variables string, integer or float point variable Example Sample code Result DOWNLOAD "DATA1",20,COMPUTER 2000 DOWNLOAD "DATA2",16,Mouse DOWNLOAD "DEMO.BAS" SIZE 3,1 GAP 0,0 DIRECTION 1 Y=100...
  • Page 188 Y=Y+100 PRINT 1 Y=100 IF I<=1 THEN IF EOF(I)=1 THEN I=I+1 GOTO Start ELSE GOTO Start ENDIF ELSE ENDIF DEMO See Also DOWNLOAD, EOP, OPEN, EOF, LOF, SEEK, FREAD$()
  • Page 189: Seek

    SEEK Description This command shifts the specified file pointer to a certain position. Syntax SEEK file handle,offset Parameter Description file handle 0 or 1 offset the offset characters which are shifted to a new position Example Sample code Result DOWNLOAD "DATA",12,1234567890 DOWNLOAD "TEST.BAS"...
  • Page 190 TEST See Also DOWNLOAD, EOP, OPEN, READ, EOF, LOF, FREAD$()
  • Page 191: Lof( )

    LOF( ) Description This function returns the size of the specified file. Syntax LOF("FILENAME") Parameter Description FILENAME The file downloaded in the printer memory. Example Sample code Result DOWNLOAD "DATA1",10,1234567890 DOWNLOAD "DATA2",15,ABCDEFGHIJKLMNO DOWNLOAD "LofTest.BAS" SIZE 4,1.5 GAP 0,0 DIRECTION 1 OPEN "DATA1",0 OPEN "DATA2",1 TEXT 10,20,"4",0,1,1,"LOF() FUNCTION TEST"...
  • Page 192 See Also DOWNLOAD, EOP, OPEN, READ, EOF, SEEK, FREAD$()
  • Page 193: Loc( )

    LOC( ) Description This function returns the current read/write position within an open file. Syntax LOC(file handle) Parameter Description file handle 0 or 1 Note: This command has been supported since V6.86 EZ and later firmware. Example Sample code Result DOWNLOAD "DATA.DAT",30,12345678 12345678 12345678...
  • Page 195: Fread$( )

    FREAD$( ) Description This function reads a specified number of bytes of data from a file. Syntax FREAD$ (file handle,byte) Parameter Description file handle 0 or 1 byte Number of bytes to be read Example Sample code Result DOWNLOAD "DATA1",10,1234567890 DOWNLOAD "DATA2",15,ABCDEFGHIJKLMNO DOWNLOAD "OPEN2.BAS"...
  • Page 196 See Also DOWNLOAD, EOP, OPEN, READ, EOF, LOF(), SEEK...
  • Page 197: Put

    Description One byte is appended into file. Syntax PUT file handle,var1$[, var2$][,var3$][, …] PUT file handle,var1[, var2][,var3][, …] PUT file handle,var1$[, var2$][,var3][, …] Parameter Description file handle 0 or 1 var$ Data is a character Data is ASCII value Note: This command has been supported since V6.91 EZ and later firmware.
  • Page 198 TEXT 10, 10,"3",0,1,1,"Original data in DATA1: "+str1$ TEXT 10, 60,"3",0,1,1,"New data in Data1: "+str2$ PRINT 1 TEST See Also DOWNLOAD, EOP, OPEN, READ, EOF, LOF(), SEEK, GET...
  • Page 199: Get

    Description Get one byte from file. Syntax GET file handle,var1$[,var2$][,var3$][, …] GET file handle,var1[,var2][,var3][, …] GET file handle,var1$[,var2$][,var3][, …] Parameter Description file handle 0 or 1 var$ Get a character Get ASCII value Note: This command has been supported since V6.91 EZ and later firmware. Example Sample code Result...
  • Page 200 GAP 0,0 TEXT 10,10,"3",0,1,1,"The first 3 characters in DATA1: "+ a$+b$+" ("+STR$(c)+")" TEXT 10,60,"3",0,1,1,"The first 5 characters in DATA1: "+e$ PRINT 1 TEST See Also DOWNLOAD, EOP, OPEN, READ, EOF, LOF(), SEEK, PUT...
  • Page 201: Copy

    COPY Description Copy the existed file from CARD/ USB drive to FLASH. Syntax COPY [memory ID of source,] "filename of source",[memory ID of new file,] "new filename" Parameter Description memory ID of source Optional. Memory device Omitted DRAM FLASH CARD USB drive source filename The file in CARD which you want to copy to on board FLASH.
  • Page 202 GAP 0,0 BOX 10,10,800,100,2 BLOCK 15,15,790,90,"0",0,8,8,20,2,data$ PRINT 1 TEST See Also DOWNLOAD, EOP, OPEN, FREAD$(), EOF, LOF(), SEEK, CLOSE...
  • Page 203: For

    FOR…NEXT LOOP Description Loop is used to execute one or more lines of program repetitively. A loop counter value specifies the number of executions. Nested loops are allowed (up to 39 nested loops) in this printer. Jumping out in the middle of the FOR…NEXT loop is prohibited.
  • Page 204 NEXT FOR I=1 TO 5 STEP 0.5 IF I-INT(I)=0 THEN Y=10+60*(I-1) ELSE Y=Y+30 TEXT 400,Y,"3",0,1,1,STR$(I) NEXT PRINT 1 TEST See Also DOWNLOAD, EOP...
  • Page 205: While I<100

    WHILE…WEND Description Executes a series of statements as long as a given condition is True. Nested loops are allowed (up to 39 nested loops) in this printer. Syntax WHILE condition [statement] WEND Parameter Description condition Available relational operator: <, >, =, <=, >=, <> *Relational operator <>, not equal, was supported since V5.10 EZ.
  • Page 206 data$ ="" SIZE 4,0.3 GAP 0,0 DIRECTION 1 INPUT "Data: ",data$ WHILE data$ <> "Quit" TEXT 10,10, "3",0,1,1, "Data: "+data$ PRINT 1 INPUT "Data: ",data$ WEND TEXT 10,10, "3",0,1,1, "Quit BAS" PRINT 1 TEST 12345 67890 quit Quit...
  • Page 207 DO…LOOP Description Repeats a block of statement while a condition is True. Syntax [statement] [EXITDO] [statement] LOOP DO WHILE condition [statement] [EXITDO] [statement] LOOP DO UNTIL condition [statement] [EXITDO] [statement] LOOP [statement] [EXITDO] [statement] LOOP WHILE condition [statement] [EXITDO] [statement] LOOP UNTIL condition...
  • Page 208 Parameter Description condition Available relational operator: <, >, =, <=, >=, <> *Relational operator <>, not equal, was supported since V5.10 EZ. Statement One or more statements executed while condition is True. EXITDO Exit loop Note: This command has been supported since V5.10 EZ and later firmware. Example Sample Code Result...
  • Page 209 Sample Code Result DO WHILE I<=100 TOTAL=TOTAL+I I=I+1 LOOP SIZE 4,0.5 GAP 0,0 TEXT 10,10,"3",0,1,1,"1+2+3+ ... +100 ="+STR$(TOTAL) PRINT 1 TEST DOWNLOAD "TEST.BAS" TOTAL=0 DO UNTIL I>100 TOTAL=TOTAL+I I=I+1 LOOP SIZE 4,0.5 GAP 0,0 TEXT 10,10,"3",0,1,1,"1+2+3+ ...+ 100 ="+STR$(TOTAL) PRINT 1 TEST DOWNLOAD "TEST.BAS"...
  • Page 210 Sample Code Result TOTAL=0 TOTAL=TOTAL+I I=I+1 LOOP WHILE I<101 SIZE 4,0.5 GAP 0,0 TEXT 10,10,"3",0,1,1, "1+2+3+ ... +100 ="+STR$(TOTAL) PRINT 1 TEST DOWNLOAD "TEST.BAS" TOTAL = 0 TOTAL = TOTAL + I I=I+1 LOOP UNTIL I>100 SIZE 4,0.5 GAP 0,0 TEXT 10,10,"3",0,1,1, "1+2+3+ ...
  • Page 211 IF…THEN…ELSE…ENDIF LOOP Description Use IF…THEN block to execute one or more statements conditionally. Either a single-line syntax or multiple-line "block" syntax can be used. Note: TDP-643 Plus, TTP-243, TTP-342, TTP-244ME and TTP-342M series are not supported multiple-line form. Syntax IF condition THEN statement Note the single-line form of IF …THEN does not use an ENDIF statement.
  • Page 212 ENDIF *The syntax of IF…THEN…ELSE requires that the command be typed in one single line in less than 255 characters. Parameter Description condition Available relational operator: <, >, =, <=, >=, <> *Relational operator <>, not equal, was supported since V5.10 EZ. Statement Only one statement is available in Example...
  • Page 213 ENDIF IF I-INT(I/7)*7=0 THEN G=G+I ELSEIF I-INT(I/17)*17=0 THEN H=H+I ELSEIF I-INT(I/27)*27=0 THEN J=J+I ELSEIF I-INT(I/37)*37=0 THEN K=K+I ELSE L=L+I ENDIF NEXT TEXT 100,110,"3",0,1,1,"(1) 1+2+3+...+100="+STR$(A) TEXT 100,160,"3",0,1,1,"(2) 1+3+5+...+99="+STR$(B) TEXT 100,210,"3",0,1,1,"(3) 2+4+6+...+100="+STR$(C) TEXT 100,260,"3",0,1,1,"(4) 3+6+9+...+99="+STR$(D) TEXT 100,310,"3",0,1,1,"(5) 5+10+15+...+100="+STR$(E) TEXT 100,360,"3",0,1,1, „ (1)-(5)= „+STR$(F) TEXT 100,410,"3",0,1,1,"(6) 7+14+21+...+98="+STR$(G) TEXT 100,460,"3",0,1,1,"(7) 17+34+51+...+85="...
  • Page 214 TEXT 100,10,"3",0,1,1,STR$(A) + "IS LAGER THEN 100" PRINT 1 TEST Note: If the result of the expression is nonzero, the statement following THEN will be executed. If the result of the expression is zero, and the statement following the ELSE is present, it will be executed.
  • Page 215: Gosub

    GOSUB…RETURN Description This command will branch to a subroutine, executing statements until "RETURN" is reached. Syntax GOSUB LABEL statement :LABEL statement RETURN Parameter Description LABEL Beginning of the subroutine. The maximum length of the label is 8 characters. Example Sample code Result DOWNLOAD "GOSUB1.BAS"...
  • Page 216 RETURN GOSUB1 See Also DOWNLOAD, EOP, END, GOTO...
  • Page 217: Goto

    GOTO Description This command is used to branch to a specified label. The label cannot exceed 8 characters in length. Syntax GOTO LABEL :LABEL Parameter Description LABEL Beginning of the point. The maximum length of the label is 8 characters. Example Sample code Result...
  • Page 218 TEXT 10,100, "3",0,1,1,B$ PRINT 1 GOTO1 See Also DOWNLOAD, EOP, END, GOSUB…RETURN...
  • Page 219: Inp$( )

    INP$( ) Description One byte is received from communication port. Syntax INP$(n) Parameter Description 1 : com1 port in printer Example Sample code Result DOWNLOAD "TEST.BAS" T$="" FOR I=1 TO 5 T$=T$+INP$(1) NEXT SIZE 4,0.5 GAP 0,0 TEXT 10,10, "3",0,1,1, "The received data is: "+T$ PRINT 1 TEST 12345...
  • Page 220: Inp( )

    INP( ) Description One byte (ASCII value) is received from communication port. Syntax INP(n) Parameter Description 1 : com1 port in printer Note: This command has been supported since V6.91 EZ and later firmware. Example Sample code Result DOWNLOAD "TEST.BAS" sci=0 str$=""...
  • Page 221 See Also INP$()
  • Page 222: Lob( )

    LOB( ) Description This function returns the size of data in receiving buffer. Syntax LOB () Note: This command has been supported since V6.78 EZ and later firmware Example Sample Code DOWNLOAD "TEST.BAS" DATA$="" WHILE LOB()<>0 DATA$=DATA$+INP$(1) WEND SIZE 4,0.5 GAP 0,0 BOX 10,10,800,100,2 BLOCK 15,15,790,90, "0",0,8,8,DATA$...
  • Page 223 203 dpi: 300 dpi: See Also INP$(), WHILE … WEND...
  • Page 224: Input

    INPUT Description This command receives data through specific port. This command is used with portable keyboard KP-200. Syntax INPUT ["Prompt string", number of digits], variables The comma also can be replaced by semicolon, such as: INPUT ["Prompt string"; number of digits]; variables Parameter Description Prompt string...
  • Page 225 TEST 123456 123456789012 See Also DOWNLOAD, EOP, END, GOTO...
  • Page 226: Preinput

    PREINPUT Description This command can define the start character for command INPUT. Syntax PREINPUT var$ PREINPUT CHR$(n) Parameter Description var$ The specific character or string in front of data. n = 1 ~ 255 Note: This command has been supported since V6.81 EZ and later firmware. Example PREINPUT "<"...
  • Page 227: Postinput

    POSTINPUT Description This command can define the end character for command INPUT. Syntax POSTINPUT var$ POSTINPUT CHR$(n) Parameter Description var$ The specific character or string in end of data. n = 1 ~ 255 Note: This command has been supported since V6.81 EZ and later firmware. Example POSTINPUT ">"...
  • Page 228: Set Filter On/Off

    SET FILTER ON/OFF Description This command is using to enable/disable commands PREINPUT and POSTINPUT. Syntax SET FILTER ON/OFF Parameter Description Enable PREINPUT and POSTINPUT Disable PREINPUT and POSTINPUT Note: This command has been supported since V6.81 EZ and later firmware. Example Sample Code Result...
  • Page 229 <=1234=><=5678=><=9012=> See also PREINPUT, POSTINPUT, INPUT...
  • Page 230: Rem

    Description Comment. Prefix is "REM", which will be ignored by the printer. Syntax Example Sample code Result REM ******************************** REM This is a demonstration program* REM ******************************** DOWNLOAD "REMARK.BAS" SIZE 4,3 GAP 0,0 DIRECTION 1 TEXT 50,50, "3",0,1,1, "REMARK DEMO PROGRAM" REM TEXT 50,100, "3",0,1,1, "REMARK DEMO PROGRAM"...
  • Page 231: Out

    Description This command returns data through the specific port. Syntax OUT [port] "prompt",variable OUT [port] "prompt";variable Parameter Description port Optional. Specified the port for returning data/string. Default is returning the data/string from the port which is sending data to printer. COM: Returning data/string from COM port.
  • Page 233: Outr

    OUTR Description This command sends data through RS-232 port only. Syntax OUTR "prompt",variable OUTR "prompt";variable Parameter Description prompt Prompt string. Variable The output message. The "prompt" and "variable" are separated by <0x0D><0x0A>. The "variable" comes behinds "prompt" directly. Note: This command has been supported since V6.68 EZ and later firmware. Example Sample Code OUTR "COM: ","...
  • Page 235: Getkey( )

    GETKEY( ) Description This command is used to get the status of the PAUSE and FEED keys. This command waits until either key is pressed, whereupon 0 is returned if PAUSE key is pressed and 1 is returned if FEED key is pressed. Syntax GETKEY() PAUSE...
  • Page 236 See Also DOWNLOAD, EOP, END, GOTO...
  • Page 237: Int( )

    INT( ) Description This function truncates a floating point number. Syntax INT (n) Parameter Description Positive or negative integer, floating point number or mathematical expression Example Sample code Result DOWNLOAD "DEMO.BAS" SIZE 4,1 GAP 0,0 DIRECTION 1 INPUT "Number: ",Num REM **** To round up or down**** N=INT(Num+0.5) IF N>Num THEN...
  • Page 238 See Also DOWNLOAD, EOP, END, ABS(), ASC(), STR$()
  • Page 239: Left$( )

    LEFT$( ) Description This function returns the specified number of characters down from the initial character of a string. Syntax LEFT$ (X$, n) Parameter Description The string to be processed The number of characters to be returned Example Sample code Result DOWNLOAD "TEST.BAS"...
  • Page 240: Len( )

    LEN( ) Description This function returns the length of a string. Syntax LEN (string) Parameter Description string The string whose length is to be measured. Example Sample Code Result DOWNLOAD "DEMO.BAS" SIZE 4,1 GAP 0,0 DIRECTION 1 A$="ABCDEFGHIJKLMNOPQRSTUVWXYZ" B=LEN(A$) TEXT 10,10, "3",0,1,1,A$ TEXT 10,50, "3",0,1,1,"STRING LENGTH="...
  • Page 241: Mid$( )

    MID$( ) Description This function retrieves the specified number of characters down from the mth character of a string. Syntax MID$(string,m,n) Parameter Description string The string to be processed The beginning of m characters in the string 1 <= m <= string length The number of characters to return Example Sample code...
  • Page 242: Right$( )

    RIGHT$( ) Description This function returns a specified number of characters up from the end of a string. Syntax RIGHT$ (X$,n) Parameter Description The string to be processed The number of characters to be returned from the right side (end) of the string Example Sample code...
  • Page 243: Str$( )

    STR$( ) Description This function converts a specified value or expression into corresponding string of characters. Syntax STR$ (n) Parameter Description An integer, floating point number or mathematical expression Example Sample code Result DOWNLOAD "DEMO.BAS" SIZE 4,1 GAP 0,0 DIRECTION 1 A$="ABCDEFGHIJKLMNOPQRSTUVWXYZ"...
  • Page 244 DOWNLOAD, EOP, END, LEFT$(), LEN(), RIGHT$(), MID$(), VAL()
  • Page 245: Strcomp( )

    STRCOMP( ) Description Returns -1, 0, or 1, based on the result of a string comparison. Syntax STRCOMP(str1$,str2$[,comp]) Parameter Description str1$ Required. Any valid string expression. Str2$ Required. Any valid string expression. Comp Optional. Specifies the type of string comparison. 0: Binary comparison.
  • Page 246 TEXT 100,10,"3",0,1,1,STR$(result1)+": \["]" +STR1$+"\["] sorts ahead of \["]" +STR2$+" \["]" TEXT 100,60,"3",0,1,1," " +STR$(result2)+": \["]"+STR1$+"\["] is equal to \["]"+STR2$+"\["]" TEXT 100,110,"3",0,1,1," "+STR$(result3)+": \["]"+STR2$+"\["] sorts after \["]"+STR1$+"\["]" PRINT 1 TEST Result See Also INSTR()
  • Page 247: Instr( )

    INSTR( ) Description Returns an integer specifying the start position of the first occurrence of one string within another. Syntax INSTR ([start,]str1$,str2$) Parameter Description start Optional. Numeric expression that sets the starting position for each search. If omitted, search begins at the first character position. The stat index is 1 –...
  • Page 248 TEXT 10,10, "3",0,1,1,str1$ TEXT 10,60, "3",0,1,1,str2$ PRINT 1 DEMO Result See Also STRCOMP()
  • Page 249: Trim$( )

    TRIM$( ) Description Removes both leading and trailing blank spaces or specific characters from a string. Syntax TRIM$ (str$[,list$]) Parameter Description str$ The string that will be trimmed. List$ Optional. The specific characters in list$ will be removed. Note: This command has been supported since V6.59 EZ and later firmware. Example Sample Code DOWNLOAD "DEMO.BAS"...
  • Page 250 DEMO Result See Also LTRIM$(), RTRIM$()
  • Page 251: Ltrim$( )

    LTRIM$( ) Description Removes leading blank space from a string. Syntax LTRIM$ (str$[,list$]) Parameter Description str$ The string that will be trimmed. List$ Optional. The specific characters in list$ will be removed. Note: This command has been supported since V6.59 EZ and later firmware. Example Sample Code DOWNLOAD "DEMO.BAS"...
  • Page 252 DEMO Result See Also TRIM$(), RTRIM$()
  • Page 253: Rtrim$( )

    RTRIM$( ) Description Removes trailing blank space from a string. Syntax RTRIM$ (str$ [, list$]) Parameter Description str$ The string that will be trimmed. List$ Optional. The specific characters in list$ will be removed. Note: This command has been supported since V6.59 EZ and later firmware. Example Sample Code DOWNLOAD "DEMO.BAS"...
  • Page 254 Result See Also TRIM$(), LTRIM$()
  • Page 255: Textpixel( )

    TEXTPIXEL( ) Description Returns the width of the text string in dot. Syntax TEXTPIXEL (cont$,font$,size) Parameter Description cont$ The content of text string. Font $ The font type. Please refer to the parameter font in command TEXT. Size The font size. Please refer to the parameter x-multiplication in command TEXT.
  • Page 256 TEST See Also TEXT, BARCODEPIXEL()
  • Page 257: Barcodepixel( )

    BARCODEPIXEL( ) Description Returns the width of barcode in dot. Syntax BARCODEPIXEL (cont$, sym$, narrow, wide) Parameter Description cont$ The content of barcode. Sym $ Barcode type. Please refer to the parameter code type in command BARCODE. Narrow The width of narrow bar. Please refer to the parameter narrow in command BARCODE.
  • Page 258 REVERSE 8,8,codewidth+8,132 BARCODE 10,160,sym$,100,1,0,narrow,wide,cont$ PRINT 1 TEST See Also BARCODE, TEXTPIXEL()
  • Page 259: Val( )

    VAL( ) Description This function converts numeric characters into corresponding integer or floating point number. Syntax VAL ("numeric character") Parameter Description numeric character " 0~9","." Example Sample code Result DOWNLOAD "DEMO.BAS" SIZE 4,1 GAP 0,0 DIRECTION 1 A$="ABCDEFGHIJKLMNOPQRSTUVWXYZ" F$="100" G$="500" H=VAL(F$)+VAL(G$) I$=STR$(H) TEXT 10,10, "3",0,1,1,A$...
  • Page 260 DOWNLOAD, EOP, END, LEFT$(), LEN(), RIGHT$(), MID$(), STR$()
  • Page 261: Beep

    BEEP Description This command issues a beep sound on portable keyboard. Printer sends the string 0x07 to KP-200 portable keyboard. Syntax BEEP Example Sample code DOWNLOAD "DEMO.BAS" SIZE 4,4 GAP 0,0 DIRECTION 1 BEEP INPUT "Text1 =",TEXT1$ TEXT 100,100, "3",0,1,1,TEXT1$ PRINT 1...
  • Page 262: Now$( )

    NOW$( ) Description Returns the current date and time according to the setting of your printer. The returned value always uses with commands FORMAT$(). Syntax NOW$( ) Note: This command has been supported since V6.81 EZ and later firmware. Example Sample code Result SIZE 4,1...
  • Page 263: Now

    Description Returns the total days since A.D. 1900. This global variable always uses with commands FORMAT$() and DATEADD(). Syntax Note: This command has been supported since V6.87 EZ and later firmware. Example Sample Code SIZE 4,1 GAP 0,0 DIRECTION 1 TEXT 10,10, "3",0,1,1, "Total days since a.d.
  • Page 264: Format$( )

    FORMAT$( ) Description Returns the current date, time, number and number value according to the setting of your printer. Syntax FORMAT$(expression[,style$]) Parameter Description expression Required. Any valid expression. Style$ Optional. A valid named or user-defined format string expression. Predefined Description date/time formats General Date Shows date and time.
  • Page 265 Display the month as a number with a leading zero (01 – 12). If mm immediately follows h or hh, the minute rather than the month is displayed. Display the month as an abbreviation (Jan – Dec). mmmm Display the month as a full month name (January – December). Display the quarter of the year as a number (1 –...
  • Page 266 True/False Any nonzero numeric value is True. Zero is False. On/Off Any nonzero numeric value is On. Zero is Off. User-defined number formats Description (since A1.97) Digit placeholder. Displays a digit or a zero. Digit placeholder. Displays a digit or nothing. Decimal placeholder.
  • Page 267 Example Sample Code Result SIZE 800 dot,1900 dot GAP 0,0 DIRECTION 1 TEXT 15,10, "3",0,1,1, "General Date: "+FORMAT$(NOW,"General Date") TEXT 15,60, "3",0,1,1, "Long Date: "+FORMAT$(NOW,"Long Date") TEXT 15,110, "3",0,1,1, "Medium Date: "+FORMAT$(NOW,"Medium Date") TEXT 15,160, "3",0,1,1, "Short Date: "+FORMAT$(NOW,"Short Date") TEXT 15,210, "3",0,1,1, "Long Time: "+FORMAT$(NOW,"Long Time") TEXT 15,260, "3",0,1,1, "Medium Time: "+FORMAT$(NOW,"Medium Time") TEXT 15,310, "3",0,1,1, "Short Time: "+FORMAT$(NOW,"Short Time")
  • Page 268 TEXT 15,1610, "3",0,1,1, "am/pm: " +FORMAT$(NOW,"am/pm") TEXT 15,1660, "3",0,1,1, "A/P: " +FORMAT$(NOW,"A/P") TEXT 15,1710, "3",0,1,1, "a/p: " +FORMAT$(NOW,"a/p") TEXT 15,1760, "3",0,1,1, "AMPM: " +FORMAT$(NOW,"AMPM") TEXT 15,1810, "3",0,1,1, "\:" +FORMAT$(NOW,"To\da\y i\s ddddd") TEXT 15,1860, "3",0,1,1, "string: " +FORMAT$(NOW,"To\da\y i\s ddddd") PRINT 1...
  • Page 269 Sample Code (Since A1.97) Result SIZE 800 dot,850 dot GAP 0,0 DIRECTION 1 TEXT 15,10, "3",0,1,1, "General Number: "+FORMAT$(1234.5,"General Number") TEXT 15,60, "3",0,1,1, "Currency: "+FORMAT$(1234.5,"Currency") TEXT 15,110, "3",0,1,1, "Fixed: "+FORMAT$(1234.5,"Fixed") TEXT 15,160, "3",0,1,1, "Standard: "+FORMAT$(1234.5,"Standard") TEXT 15,210, "3",0,1,1, "Percent: "+FORMAT$(1234.5,"Percent") TEXT 15,260, "3",0,1,1, "Scientific: "+FORMAT$(1234.5,"Scientific") TEXT 15,310, "3",0,1,1, "Yes/No: "+FORMAT$(1234.5,"Yes/No") TEXT 15,360, "3",0,1,1, "Yes/No: "+FORMAT$(0,"Yes/No")
  • Page 270: Dateadd()

    DATEADD() Description Returns a date after which a specified time/date interval has been added. The returned value always uses with commands FORMAT$(). Syntax DATEADD(interval$,number,date) Parameter Description interval$, The time/date interval for adding. It can be one of following values. Interval$ The interval unit of parameter interval$ "yyyy"...
  • Page 271 Example Sample Code 1 SIZE 4,2 GAP 0,0 DIRECTION 1 TEXT 10,10, "3",0,1,1, "Current RTC info: " +NOW$() TEXT 10,60, "3",0,1,1, "-1 year: " +FORMAT$(DATEADD("yyyy",-1, " 11/26/2012 10:08:00"), "yyyy/mm/dd hh:nn:ss") TEXT 10,110, "3",0,1,1, "+9 months: " +FORMAT$(DATEADD("m",9,NOW), "Short Date") TEXT 10,160, "3",0,1,1, "-8 hours: " +FORMAT$(DATEADD("h",-8,NOW), "Short Time") TEXT 10,210, "3",0,1,1, "+5 mins: "...
  • Page 272 Result 2...
  • Page 273: Fsearch()

    FSEARCH() Description This function returns the position of a string. Syntax FSEARCH(file handle, STR$) Parameter Description file handle 0 or 1 STR$ Required. Any valid string expression. Note: This command has been supported since A1.88 EZ and later firmware. Example Sample Code Result DOWNLOAD "DATA1",10,1234567890...
  • Page 275: Touchpress()

    TOUCHPRESS() Description This command is used to detect the status of touch screen. Returns 1 if the touch screen for the specified region is pressed, otherwise returns 0. Syntax TOUCHPRESS (left, top, right, bottom) Parameter Description left Left side position of region (pixel) Top side position of region (pixel) right Right side position of region (pixel)
  • Page 276 Example Sample Code DOWNLOAD "DEMO.BAS" :START IF TOUCHPRESS(0,90,272,120) <> 0 THEN GOTO A GOTO START ENDIF SIZE 4,1 GAP 0,0 DIRECTION 1 TEXT 30,30,"3",0,1,1,"TOUCH TEST!!" PRINT 1,1 DEMO...
  • Page 277: Recordset$ ( )

    RECORDSET$ ( ) Description This function returns a value from a table. Table is represented in a grid format, tabular form in rows and columns. Please refer to following table format on example. Syntax RECORDSET$(TABLE$, ROW, COLUMN [, DELIMITER]) Parameter Description TABLE$ Table name...
  • Page 278 TEXT 100,200,"3",0,1,1,"Mary Age = " + RECORDSET$("TEST.CSV", 2, 2,ASC(",")) TEXT 100,250,"3",0,1,1,"John Height = " + RECORDSET$("TEST.CSV",1,"Height", ASC(",")) TEXT 100,300,"3",0,1,1,"Mary Height = " + RECORDSET$("TEST.CSV",2,"Height", ASC(",")) PRINT 1 TEST...
  • Page 279 Sample Code 2: (since VA1.97) Result Table format (TEST.CSV) DOWNLOAD "TEST.CSV",123,6 Number,String Number of rows "1234","ABCD" Name of column Number String "12,34","AB,CD" Row 1 1234 ABCD "12 Row 2 12,34 AB,CD 34","AB Row 3 CD" "12""34","AB""CD" Row 4 12 "34 AB"CD """1234","""ABCD"...
  • Page 280: Labelratio

    LABELRATIO Description This command returns label print ratio. Syntax LABELRATIO Note: This command has been supported since V8.00 EZ and later firmware. Example Sample Code Result Width:4.25*203=864 LABELRATIO High:8*203=1624 864*1624=1403136...
  • Page 281: Replace$()

    REPLACE$() Description This command returns a string in which a specified substring has been replaced with another substring. Syntax REPLACE$ ("str1$"," sub1$"," sub2$") Parameter Description str1$ Required. The string that will be searched for replacing. Sub1$ Required. The specified substring that will be replaced. Sub2$ Required.
  • Page 282: Device Reconfiguration Commands

    Device Reconfiguration Commands SET COUNTER Description Counters can be a real counter or a variable. This setting sets the counter number in the program and its increments. There are three different types of counters: digit (0~9~0), lower case letter (a~z~a) or upper case letter (A~Z~A).
  • Page 283 Example Sample Code Result SET COUNTER @0 +1 SET COUNTER @1 +0 SET COUNTER @2 -1 SET COUNTER @3 1 @0= « 0001 » @1= « 0101 » @2= « 000A » @3= « 1 » SIZE 4,0.5 GAP 0,0 DIRECTION 1 TEXT 600,10, »3 »,0,1,1,3, «...
  • Page 284: Set Cutter

    SET CUTTER Description This setting activates or deactivates the cutter and defines how many printed labels is to be cut at one time. This setting will be saved in printer memory after turning off the power. Syntax SET CUTTER OFF/BATCH/pieces Parameter Description Disable cutter function.
  • Page 285 SET CUTTER 1 The cutter cuts every label. TEXT 50,50, "3",0,1,1, "SET CUTTER 1" PRINT 3,2 TEXT 50,50, "3",0,1,1, "SET CUTTER 2" The cutter cuts every 2 labels. PRINT 3,2 See Also OFFSET, PRINT, SET PARTIAL_CUTTER...
  • Page 286: Set Partial_Cutter

    SET PARTIAL_CUTTER Description This setting activates or deactivates the cutter and defines how many printed labels is to be cut at one time. This setting will be saved in printer memory after turning off the power. This function prevents label back feeding after a cut.
  • Page 287 SET PARTIAL_CUTTER 1 TEXT 50,50, "3",0,1,1, "SET PARTIAL_CUTTER 1" PRINT 3,2 REM ***This program cuts 2 label*** SET PARTIAL_CUTTER 2 TEXT 50,50, "3",0,1,1, "SET PARTIAL_CUTTER 2" PRINT 3,2 See Also OFFSET, PRINT, SET CUTTER...
  • Page 288: Set Back

    SET BACK Description This setting is used after SET CUTTER function. This function prevents label backfeeding after a cut. Syntax SET BACK OFF/ON Parameter Description Disable back function. Enable back function. Note: TDP-643 Plus, TTP-243, TTP-342, TTP-244ME, TTP-342M and TTP-248M series are not supported this feature Example Sample code REM **SET BACK FUNCTION OFF EXAMPLE PROGRAM**...
  • Page 289 See Also OFFSET, PRINT, SET CUTTER...
  • Page 290: Set Keyn

    SET KEYn Description This setting is used to enable/disable the KEYn function. Before setting KEYn function, please disable the default function of KEYn first. The setting will remain resident in the printer even when the printer is power off. Syntax SET KEYn ON/OFF/DEFAULT/MENU/PAUSE/PRINT m/FEED/BACKFEED/FORMFEED/CUT/INPUT "string"...
  • Page 291 TX200/210 series (with LCD), TC210 series (with LCD), MX240P series, MX241 series, FEED MENU RIGHT LEFT DOWN MH series, ML240P series, ML241 series, MB240T/241T series, PEX series, MH261 series, Alpha-30L/40L series, TTP-246M series MENU PAUSE FEED (UP) (DOWN) (SELECT) TTP-248M series MENU PAUSE FEED...
  • Page 292 Example Sample code DOWNLOAD "DEMO.BAS" SIZE 3,1 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET KEY1 OFF SET KEY2 OFF SET KEY3 OFF KEY1=0 KEY2=0 KEY3=0 :START IF KEY1=1 THEN TEXT 100,10, "3",0,1,1, "KEY1 (MENU key) is pressed!! " PRINT 1,1 ELSEIF KEY2=1 THEN TEXT 100,10, "3",0,1,1, "KEY2 (PAUSE key) is pressed!! "...
  • Page 293 ENDIF GOTO START DEMO See Also OFFEST, PRINT...
  • Page 294: Set Ledn

    SET LEDn Description This setting is used to control LED on/off function. Syntax SET LED1 ON/OFF SET LED2 ON/OFF SET LED3 ON/OFF LED no. Default Function LDE1 Power on/off LED2 Printer on-line/off-line LED3 Error/normal Parameter Description Enable LEDn function Disable LEDn function The default function of LED1, LED2 and LED3 id as listed below: Model LED1...
  • Page 295 Note: Please refer to printer model list for checking series printers. Example Sample code DOWNLOAD "DEMO4.BAS" SET LED1 OFF SET LED2 OFF SET LED3 OFF FOR I=1 TO 100 LED1=0 LED2=0 LED3=0 IF I-INT(I/2)*2=0 THEN LED1=1 ELSEIF I-INT(I/3)*3=0 THEN LED2=1 ELSE LED3=1 ENDIF...
  • Page 296: Set Peel

    SET PEEL Description 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 297: Set Rewind

    SET REWIND Description This setting is used to enable/disable the internal rewind function for MX240/TTP-2610MT series & external rewind module (via RS-232 port). The default setting for this function is off. When this function is set on, the printer rewind spindle will rewind the printed labels. This setting will be saved in printer memory when turning off the power.
  • Page 298 See Also OFFEST, PRINT...
  • Page 299: Set Tear & Set Striper

    SET TEAR & SET STRIPER Description This command is used to enable/disable feeding of labels 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 (TSPL2 language printers only) SET STRIPER ON/OFF (TSPL language printers only) Note: Please refer to printer model list for checking TSPL or TSPL2.
  • Page 300 See Also SET PEEL, SET CUTTER...
  • Page 301: Set Gap

    SET GAP REVERSE Black Mark Sensor Printer model Gap Sensor Range SET GAP OBVERSE Range SET GAP AUTO TTP-243 series, TTP-244ME series, TDP-643 0~15 ON/OFF Plus series, TTP-342 series, TTP-342M series TTP-243 Plus series, TTP-244 series, TTP- 0~255 ON/OFF 244ME Plus series, TDP-643R Plus series, TTP-...
  • Page 302 TTP-246M Plus, TTP-2410M series, TTP-344M Plus series, TTP-346M series, TTP-384M series, TTP-644M series, ME240 series TTP-2410M Pro series, TDM-20, TDM-30 TTP-248M series, M23 series 0~255 0~255 TA200 series, MB240 series, MH240 series 0~15 Alpha-4L series 0~15 Note: * When in "SET HEAD OFF" mode, the function "SET GAP AUTO" doesn’t work even the printer head is opened and closed, but it can work when power on the printer.
  • Page 303: Set Bline

    SET BLINE Description This setting is using to reverse/obverse the sensor function. Syntax SET BLINE REVERSE/OBVERSE Parameter Description REVERSE Reverse the sensor function. Redefine the reflective area is black line and non-reflective part is paper. (Normally, reflective part is paper and non- reflective part is black line.) OBVERSE Disable the "SET BLINE REVERSE"...
  • Page 304: Set Bline Printside & Set Bline Backside

    SET BLINE PRINTSIDE & SET BLINE BACKSIDE Description This setting is using to set the top or bottom black mark sensor as the main transmitter. Syntax SET BLINE PRINTSIDE SET BLINE BACKSIDE Parameter Description PRINTSIDE The light of the sensor will face toward the print side of the label. BACKSIDE The light of the sensor will face toward the back side of the label.
  • Page 305: Set Head

    SET HEAD Description This setting is used to enable/disable head open sensor. If the head open sensor is turned off, an open printer head will not return an error message. This setting will be saved in printer memory. This command is only available for TSPL2 printers.
  • Page 306: Set Ribbon

    SET RIBBON Description This setting is used to enable/disable ribbon sensor detection. (Thermal Transfer Printing/Thermal Direct Printing) Printer will detect the presence of a ribbon to determine using either direct thermal or thermal transfer printing upon printer startup. This setting will NOT be saved in printer memory. Syntax SET RIBBON ON/OFF/INSIDE/OUTSIDE Parameter...
  • Page 307 SET RIBBON INSIDE SIZE 4,1 GAP 0,0 TEXT 10,10, « 3 » ,0,1,1, « TTP-384M is using ink-in ribbon. " PRINT 1 REM *****For using ink-out ribbon in TTP-384M. SET RIBBON OUTSIDE SIZE 4,1 GAP 0,0 TEXT 10,10, « 3 » ,0,1,1, « TTP-384M is using ink-out ribbon. « PRINT 1...
  • Page 308: Set Encoder

    SET ENCODER Description This setting is used to enable/disable ribbon encoder sensor detection. Syntax SET ENCODER ON/OFF Parameter Description Enable ribbon encoder sensor. Disable ribbon encoder sensor. Example SET ENCODER ON SET ENCODER OFF...
  • Page 309: Set Ribbonend

    SET RIBBONEND Description This setting is used to enable/disable ribbon-end sensor detection. Syntax SET RIBBONEND ON/OFF Parameter Description Enable ribbon-end sensor. Disable ribbon-end sensor. Note: This command has been supported since V6.91 EZ and later firmware. Example SET RIBBONEND ON SET RIBBONEND OFF...
  • Page 310: Set Com1

    SET COM1 Description This setting defines communication parameters for printer serial port. Syntax SET COM1 baud,parity,data,stop Parameter Description baud Baud rate, available baud rates are as listed : 24: 2400 bps 48: 4800 bps 96: 9600 bps 19: 19200 bps 38: 38400 bps 57: 57600 bps 115: 115200 bps...
  • Page 311 C:\> Note: <ENTER> stands for PC keyboard "ENTER" key. <CTRL><Z> means to hold PC keyboard "CTRL" key then press the PC keyboard <Z> key.
  • Page 312: Set Printkey

    SET PRINTKEY Description This command will print one label and feed label gap to tear bar position for tearing away. 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.
  • Page 313 Syntax Receive "PRINT m,n" Print Out SET PRINTKEY ON 1.) PRINT 1,2 Label 1, Label 1 SET PRINTKEY AUTO 2.) Press FEED key Label 2, Label 2 Syntax Receive "PRINT -1,n" Print Out 1.) PRINT -1,2 Label 1, Label 1 SET PRINTKEY ON SET PRINTKEY AUTO 2.) Press FEED key...
  • Page 314: Set Reprint

    SET REPRINT Description This command will disable/enable a reprinting attempt subsequent to a "no paper", "no ribbon" or "carriage open" error. Syntax SET REPRINT OFF/ON Parameter Description Disable this function Enable this function Note: This command is only available for TSPL2 printers. Please refer to printer model list for checking TSPL2 printers.
  • Page 315: Set Feed_Len

    SET FEED_LEN Description This command can set the feeding length when FEED key is pressed. This setting will be memorized by printer. The initialized value is the label length. Syntax SET FEED_LEN n Parameter Description The feeding length in dot. Note: This command has been supported since V5.10 EZ and later firmware.
  • Page 316: Getsensor()

    GETSENSOR() Description This command is used to get the sensor status/AD value. We can use it to check the sensor function. Syntax GETSENSOR(sensor$[,intension]) Parameter Description sensor$ Sensor type. Gap sensor BLINE Black mark sensor RIBBON Ribbon-end sensor PEEL Peeler sensor HEAD UP Thermal print head open sensor HEAD TEMP...
  • Page 317 HEAD UP The return value will be either 0 or 1 0: print head module is close 1: print head module is open HEAD TEMP Return the temperature of thermal print head HEAD VOLT Return the voltage of thermal print head Note: This command has been supported since V6.75 EZ and later firmware.
  • Page 318 Example (Use CommTool to get sensor status via RS-232.) Sample code Sample code OUT GETSENSOR("GAP",0) OUT GETSENSOR("BLINE",0) OUT GETSENSOR("GAP",1) OUT GETSENSOR("BLINE",1) OUT GETSENSOR("GAP",2) OUT GETSENSOR("BLINE",2) OUT GETSENSOR("GAP",3) OUT GETSENSOR("BLINE",3) OUT GETSENSOR("GAP",4) OUT GETSENSOR("GAP",5) OUT GETSENSOR("GAP",6) OUT GETSENSOR("GAP",7) OUT GETSENSOR("GAP",8) Result Result *If the returned valued is changed in different sensor *If the returned valued is changed in different sensor...
  • Page 319 Sample code Sample code OUT GETSENSOR("RIBBON",0) OUT GETSENSOR("PEEL") OUT GETSENSOR("RIBBON",1) OUT GETSENSOR("RIBBON",2) OUT GETSENSOR("RIBBON",3) Result Result *If the returned valued is changed in different sensor *0: Paper is not on the sensor. 1: Paper is on the sensor. intension, we can say the sensor is functional. Sample code OUT GETSENSOR("BATTERY VOLT") OUT GETSENSOR("BATTERY CAP")
  • Page 320 later firmware.
  • Page 321: Getsetting$()

    GETSETTING$() Description This command is used to get printer settings. Syntax GETSETTING$ (app$,sec$,key$[,default$]) Parameter Description app$ sec$ key$ Return printer resolution MODEL Return printer model name SERIAL Return Printer serial number VERSION Return Printer firmware version INFORMATION CHECKSUM Return Printer firmware checksum Return Printer print mode (DRAFT, PRINTQUALITY STANDARD or OPTIMUM;...
  • Page 322 PHYICAL Return the Flash Phy space CAPACITY Return the total capacity of CARD AVAILABLE Return the available capacity of CARD CARD INSTALLED Return the status of card. 1: installed; 0: none installed. PHYICAL Return the Card Phy space PHYICAL Return the USB Phy space MAC ADDRESS Return MAC address IP ADDRESS...
  • Page 323 AUTO THRESHOLD Return auto Threshold LABEL CAPACITY Return label capacity RIBBON CAPACITY Return ribbon capacity PRINT MODE Return pos-print action. DENSITY Return print density PAPER SIZE Return paper size GAP SIZE Return gap size BLINE SIZE Return black mark size DIRECTION Return printing direction MIRROR...
  • Page 324 Example Sample code (Use CommTool to get printer settings via RS-232.) OUT "DPI = ";GETSETTING$("SYSTEM","INFORMATION","DPI") OUT " MODEL =";GETSETTING$("SYSTEM ", " INFORMATION ", " MODEL") OUT "SERIAL = ";GETSETTING$("SYSTEM","INFORMATION","SERIAL") OUT "VERSION = ";GETSETTING$("SYSTEM", "INFORMATION", "VERSION") OUT "CHECKSUM = ";GETSETTING$("SYSTEM","INFORMATION","CHECKSUM") OUT "MILAGE = ";GETSETTING$("SYSTEM", "RECORD", "MILAGE") OUT "CUT COUNTER = ";GETSETTING$("SYSTEM","RECORD","CUT COUNTER") OUT "DRAM CAPACITY = ";GETSETTING$("FILE", "DRAM", "CAPACITY") OUT "DRAM AVAILABLE = ";GETSETTING$("FILE","DRAM","AVAILABLE")
  • Page 325 OUT "LIMIT FEED = ";GETSETTING$("CONFIG","TSPL","LIMIT FEED") OUT "OFFSET = ";GETSETTING$("CONFIG","TSPL","OFFSET") OUT "REFERENCE X = ";GETSETTING$("CONFIG", "TSPL", "REFERENCE X") OUT "REFERENCE Y = ";GETSETTING$("CONFIG","TSPL","REFERENCE Y") OUT "SHIFT X = ";GETSETTING$("CONFIG", "TSPL", "SHIFT X") OUT "SHIFT Y = ";GETSETTING$("CONFIG","TSPL","SHIFT Y") OUT "SPEED = ";GETSETTING$("CONFIG", "TSPL", "SPEED") OUT "COUNTRY CODE = ";GETSETTING$("CONFIG","TSPL","COUNTRY CODE") OUT "CODEPAGE = ";GETSETTING$("CONFIG","TSPL","CODEPAGE") Result...
  • Page 326: Set Usbhost

    SET USBHOST Description This command can set the USB host for the usage of USB keyboard or scanner. Syntax SET USBHOST KEYBOARD/SCANNER Parameter Description KEYBOARD USB keyboard (Enable the prompt shown on LCD) SCANNER USB scanner (Disable the prompt shown on LCD) Note: ...
  • Page 327: Set Rs232_Rewinder

    SET RS232_REWINDER Description This command is used to set the CTS (PIN8) control signal to High or Low status via RS-232 port for external rewind module application. Syntax SET RS232_REWINDER "RASING"/ "FALLING"/ "OFF" Parameter Description "RASING" Set high level signal status while printer is printing "FALLING"...
  • Page 328: Set Autorun

    SET AUTORUN Description This command redefines the BAS file which can be run automatically while switching on the printer. Default is AUTO.BAS. Syntax SET AUTORUN "filename" Parameter Description filename The file will be defined to AUTO-RUN file. Default is AUTO.BAS. Note: This command has been supported since V6.86 EZ and later firmware.
  • Page 330: Set Response

    SET RESPONSE Description This command can response issue automatically. Syntax SET RESPONSE ["Job ID",] ON/OFF/BATCH Parameter Description ["Job ID"] Optional. Set job ID. Default is Null Enable this function Disable this function. Default is OFF BATCH Response at the end of printing job Note: This command has been supported since V7.09 EZ and later firmware Response Syntax...
  • Page 331 0D Out of ribbon, out of paper and head opened 10 Pause 20 Printing 80 Other error #####: 00001 ~ 99999...
  • Page 332 Example Sample Code SET RESPONSE ON SIZE 4,2 GAP 0,0 PRINT 3 {00,00001}{00,00002}{00,00003} SET RESPONSE "ID1",ON SIZE 4,2 GAP 0,0 PRINT 3,2 {00,00001,ID1}{00,00002,ID1}{00,00003,ID1}{00,00004,ID1}{00,00005,ID1}{00,00006,ID1} SET RESPONSE "CCCC",BATCH SIZE 4,2 GAP 0,0 PRINT 3,2 {00,00006,CCCC}...
  • Page 333: Set Daylight_Save

    SET DAYLIGHT_SAVE Description This command is used to set daylight saving time. Syntax SET DAYLIGHT_SAVE ON/OFF SET DAYLIGHT_SAVE "Start", "End" Parameter Description Enable function Disable function (Default) "Start" The time will be increased 1 hour from "Start time" "End" The time will be reduced 1 hour (return) from "End time" Month "JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"...
  • Page 334 Example Sample Code SET DAYLIGHT_SAVE ON SET DAYLIGHT_SAVE OFF SET DAYLIGHT_SAVE "MAR 1 4:00","NOV 1 5:00" SET DAYLIGHT_SAVE "MAR FIRST SUN 2:00", "NOV LAST SUN 3:00"...
  • Page 335: Set Registration

    SET REGISTRATION Description This command is used to set the mode of label positioning for the label roll with multiple sizes labels. Syntax SET REGISTRATION mode Parameter Description mode BYSIZE: Original registration (Default) ACTUAL: For handle label rolls that have different label sizes on the same roll. Note: This command has been supported since A2.12 EZD and later firmware.
  • Page 336 job with 2 labels: SET REGISTRATION ACTUAL SIZE 4,6.12 GAP 0.12,0 TEXT 40,40,"0",0,10,10,"1 Label 4x1" TEXT 40,267,"0",0,10,10,"2 Label 4x5" PRINT 1...
  • Page 337: Set Applicator

    SET APPLICATOR Description Used for print & apply application, the label is moved forward to be removed by applicator, and applied to an item. Only printer with GPIO interface supported this mode. Syntax SET APPLICATOR ON/OFF Return Value Description Enable the applicator function Disable the applicator function Note: This command has been supported since A2.15 EZD and later firmware.
  • Page 338: Peel

    PEEL Description This command obtains the status of the peel-off sensor. This attribute is read only. Syntax PEEL Return Value Description Paper is not on top of peel sensor Paper is on top of peel sensor Example Sample code DOWNLOAD "DEMO.BAS" SIZE 4,1 GAP 0,0 SET PEEL OFF...
  • Page 339 GOTO B ELSE TEXT 10,10, "3",0,1,1, "The label is removed from the PEEL sensor!! " PRINT 1,1 GOTO START ENDIF DEMO...
  • Page 340: Led1, Led2, Led3

    LED1, LED2, LED3 Description This command is used to control LED on/off. This attribute is write-only. Specify 1 to light on LED and 0 to turn off LED. Before using this command, be sure to cancel the default LED functions. Please refer to the SET LED command.
  • Page 341 Example Sample code DOWNLOAD "DEMO.BAS" SIZE 3,3 GAP 0.12,0 SPEED 4 DENSITY 8 DIRECTION 1 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF SET LED1 OFF SET LED2 OFF SET LED3 OFF LED1=0 LED2=1 LED3=0 DEMO...
  • Page 342: Key1, Key2, Key3

    KEY1, KEY2, KEY3 Description This command reads the status of KEY1, KEY2 and KEY3. Model KEY0 KEY1 KEY2 KEY3 KEY4 KEY5 KEY6 TDP-643 Plus/ 643R Plus PAUSE TTP-243/243 Plus/243 Pro series, TTP-244ME/244 ME PAUSE FEED Plus/244M Pro series, TTP-244/ 244 Plus series TDP-245/247 series, TTP- 245/247 series, TTP-245C series, TDP-225 series, TTP-225...
  • Page 343 1: pressed KEY3 (FEED) 0: released 1: pressed...
  • Page 344 Example Sample code DOWNLOAD "DEMO.BAS" SIZE 3,1 GAP 0,0 SPEED 4 DENSITY 8 DIRECTION 1 REFERENCE 0,0 SET LED1 OFF SET KEY1 OFF LED1=0 :START IF KEY1=1 THEN LED1=1 TEXT 100,10, "3",0,1,1, "KEY FUNCTION TEST" PRINT 1,1 ELSE LED1=0 ENDIF GOTO START DEMO...
  • Page 345: Set Sensor_Ref

    SET SENSOR_REF Description This command can set the threshold detection of sensor. Syntax SET SENSOR_REF AUTO/MANUAL Parameter Description AUTO When feeding paper, the paper positioning threshold is automatically fine- tuned according to the paper picker (high/low peak); Default MANUAL When feeding paper, the paper positioning threshold is NOT automatically fine-tuned according to the paper picker (high/low peak), the paper positioning threshold is fixed.
  • Page 346: Printer Global Variables

    Printer Global Variables @LABEL Description This variable counts how many pieces of labels have been printed. This attribute cannot be initialized if the printer is reset, but will be retained if the printer power is turned off. Syntax Write attribute: @LABEL=n or @LABEL= "n" Read attribute: A=LABEL or A$=STR$(LABEL) Parameter Description...
  • Page 347 DOWNLOAD "DEMO.BAS" SIZE 4,2.5 GAP 0,0 DIRECTION 1 TEXT 10,50, "3",0,1,1,@LABEL TEXT 10,100, "3",0,1,1, "@LABEL="+STR$(LABEL) TEXT 10,150, "3",0,1,1, "*****Statement 1*****" IF LABEL>1000 THEN TEXT 10,200, "3",0,1,1, "LABEL>1000" ELSE TEXT 10,200, "3",0,1,1, "LABEL<1000" ENDIF TEXT 10,250, "3",0,1,1, "*****Statement 1*****" A=LABEL IF A>1000 THEN TEXT 10,300, "3",0,1,1, "A>1000"...
  • Page 348: Year

    YEAR Description This variable reads/writes the year data via the Real Time Clock (RTC). Four-digit year formats are supported by RTC. Syntax Write attribute: YEAR = 02 Read attribute: A = YEAR Range: 00~50 = 2000~2050; 51~99 = 1951~1999 Example Sample code DOWNLOAD "SetYear.BAS"...
  • Page 349 TEXT 10,90, "3",0,1,1, "YEAR3="+STR$(YEAR) PRINT 1 DEMO See Also ~!C, MONTH, DATE, DAY, HOUR, MINUTE, SECOND...
  • Page 350: Month

    MONTH Description This variable reads/writes the month data via the Real Time Clock (RTC). Two-digit (01~12) month formats are supported by RTC. Syntax Write attribute: MONTH = 01 Read attribute: A = MONTH Range: 01~12 Example Sample code DOWNLOAD "SetMonth.BAS" REM *****Set Month Parameter to RTC***** MONTH=01 SetMonth...
  • Page 351 PRINT 1 DEMO See Also ~!C, MONTH, DATE, DAY, HOUR, MINUTE, SECOND...
  • Page 352: Date

    DATE Description This variable reads/writes the date data via the Real Time Clock (RTC). Two-digit (01~31) date formats are supported by RTC. Syntax Write attribute: DATE = 12 Read attribute: A = DATE Range: 01~31 Example Sample code DOWNLOAD "SetDate.BAS" REM *****Set Date Parameter to RTC***** DATE=10 SetDate...
  • Page 353 TEXT 10,90, "3",0,1,1, "DATE3="+STR$(DATE) PRINT 1 DEMO See Also ~!C, MONTH, DATE, DAY, HOUR, MINUTE, SECOND...
  • Page 354: Week

    WEEK Description This variable reads the day of the week data via the Real Time Clock (RTC), which is represented by one single digit (1~7). Syntax Read attribute: A = WEEK Range: 1(Sunday)~7(Saturday) Example Sample code Result DOWNLOAD "DEMO.BAS" SIZE 4,1 GAP 0,0 DIRECTION 1 REM *****Read Week parameter form RTC*****...
  • Page 355: Hour

    HOUR Description This variable reads/writes the hour data via the Real Time Clock (RTC). The 24-hour-day system (00~23) is supported by RTC. Syntax Write attribute: HOUR = 12 Read attribute: A = HOUR Range: 00~23 Example Sample code DOWNLOAD "SetHour.BAS" REM *****Set Hour Parameter to RTC***** HOUR=10 SetHour...
  • Page 356 PRINT 1 DEMO See Also ~!C, MONTH, DATE, DAY, HOUR, MINUTE, SECOND...
  • Page 357: Minute

    MINUTE Description This variable reads/writes the minute data via the Real Time Clock (RTC). Two-digits (00~59) minute format is supported by RTC. Syntax Write attribute: MINUTE = 12 Read attribute: A = MINUTE Range: 00~59 Example Sample code DOWNLOAD "SetMinute.BAS" REM *****Set Minute Parameter to RTC***** MINUTE=27 SetMinute...
  • Page 358 TEXT 10,90, "3",0,1,1, "MINUTE3="+STR$(MINUTE) PRINT 1 DEMO See Also ~!C, MONTH, DATE, DAY, HOUR, MINUTE, SECOND...
  • Page 359: Second

    SECOND Description This variable reads/writes the second data via the Real Time Clock (RTC). Two-digits (00~59) second format is supported by RTC. Syntax Write attribute: SECOND = 12 Read attribute: A = SECOND Range: 00~59 Example Sample code DOWNLOAD "SetSecond.BAS" REM *****Set Second Parameter to RTC***** SECOND=59 SetSecond...
  • Page 360 PRINT 1 DEMO See Also ~!C, MONTH, DATE, DAY, HOUR, MINUTE, SECOND...
  • Page 361: Year

    @YEAR Description This variable reads/writes the year data via the Real Time Clock (RTC). Two-digit year formats are supported by RTC. @YEAR global variable can be accessed directly without using BASIC language functions. Syntax Write attribute: @YEAR = "01" Read attribute: @YEAR Range: 00~99 Note: This command is only available for TSPL2 printers.
  • Page 362: Month

    @MONTH Description This variable reads/writes the month data via the Real Time Clock (RTC). Two-digits (01~12) month formats are supported by RTC. @MONTH global variable can be accessed directly without using BASIC language functions. Syntax Write attribute: @MONTH = "01" Read attribute: @MONTH Range: 01~12 Note: This command is only available for TSPL2 printers.
  • Page 363: Date

    @DATE Description This variable reads/writes the date data via the Real Time Clock (RTC). Two-digits (01~31) date formats are supported by RTC. @DATE global variable can be accessed directly without using BASIC language functions. Syntax Write attribute: @DATE = "12" Read attribute: @DATE Range: 01~31 Note: This command is only available for TSPL2 printers.
  • Page 364: Day

    @DAY Description This variable reads the day of the week data via the Real Time Clock (RTC), which is represented by one single digit (1~7). @DAY global variable can be accessed directly without using BASIC language functions. Syntax Read attribute: @DAY Range: 1(Sunday)~7(Saturday) Note: This command is only available for TSPL2 printers.
  • Page 365: Hour

    @HOUR Description This variable reads/writes the hour data via the Real Time Clock (RTC). The 24-hour-day system (00~23) is supported by RTC. @HOUR global variable can be accessed directly without using BASIC language functions. Syntax Write attribute: @HOUR = "12" Read attribute: @HOUR Range: 00~23 Note: This command is only available for TSPL2 printers.
  • Page 366: Minute

    @MINUTE Description This variable reads/writes the minute data via the Real Time Clock (RTC). The two-digits (00~59) minute format is supported by RTC. @MINUTE global variable can be accessed directly without using BASIC language functions. Syntax Write attribute: @MINUTE = "12" Read attribute: @MINUTE Range: 00~59 Note: This command is only available for TSPL2 printers.
  • Page 367: Second

    @SECOND Description This variable reads/writes the second data via the Real Time Clock (RTC). The Two-digit (00~59) second format is supported by RTC. @SECOND global variable can be accessed directly without using BASIC language functions. Syntax Write attribute: @SECOND = "12" Read attribute: @SECOND Range: 00~59 Note: This command is only available for TSPL2 printers.
  • Page 368: Model

    _MODEL$ Description This variable can be read only. It includes the information of printer’s model name. Syntax _MODEL$ Example Sample code Result SIZE 4,1 GAP 0,0 DIRECTION 1 TEXT 10,10, "3",0,1,1, "Model: " + _MODEL$ TEXT 10,60, "3",0,1,1, "Serial No.: " + _SERIAL$ TEXT 10,110, "3",0,1,1, "F/W Version: "...
  • Page 369: Serial

    _SERIAL$ Description This variable can be read only. It includes the information of printer’s serial number. *The printer’s serial number must be programmed into printer at factory. Syntax _SERIAL$ Example Sample code Result SIZE 4,1 GAP 0,0 DIRECTION 1 TEXT 10,10, "3",0,1,1, "Model: " + _MODEL$ TEXT 10,60, "3",0,1,1, "Serial No.: "...
  • Page 370: Version

    _VERSION$ Description This variable can be read only. It includes the information of printer’s firmware version. Syntax _VERSION$ Example Sample code Result SIZE 4,1 GAP 0,0 DIRECTION 1 TEXT 10,10, "3",0,1,1, "Model: " + _MODEL$ TEXT 10,60, "3",0,1,1, "Serial No.: " + _SERIAL$ TEXT 10,110, "3",0,1,1, "F/W Version: "...
  • Page 371: Bluetooth Module Setting Commands

    Bluetooth Module Setting Commands BT NAME Description This command is used to set Bluetooth module name. (Max. 15 byte) Syntax BT NAME "name" Note: You can use command SELFTEST BT to check the updated name. Example Sample code Result BT NAME "TSC001" SELFTEST BT...
  • Page 372: Bt Pincode

    BT PINCODE Description This command is used to set Bluetooth module PIN code. (Max. 15 byte) Syntax BT PINCODE "pincode" Note: You can use command SELFTEST BT to check the updated PIN code. Example Sample code Result BT PINCODE "1234" SELFTEST BT...
  • Page 373: Bt Pairmode

    BT PAIRMODE Description This command is used to set Bluetooth pair mode. (since A2.12) Note: This function supports Mfi BM78 Bluetooth module only. Syntax BT PAIRMODE "mode" Parameter Description mode LEGACY: Legacy pairing mode (need to key-in pairing code) SSP_JUSTWORK: Just work pairing mode (default) SSP_USERCONFIRM: User configuration pairing mode (will ask if it be agreed to pair) Example Sample code...
  • Page 374: Bt Mode

    BT MODE Description This command is used to set Bluetooth mode. Note: This function supports Mfi Bluetooth module and Wi-Fi module. Syntax BT MODE mode (or "mode") Parameter Description mode (for Mfi Bluetooth module) Classic BT3.0 (Default) BT4.0 Dual DUAL "mode"...
  • Page 375 Sample code (For Wi-Fi module) BT MODE "BT4.0" WLAN MODULE SAVECFG DELAY 35000 <Reboot printer>...
  • Page 376: Wi-Fi Module Setting Commands

    Wi-Fi Module Setting Commands WLAN SSID Description This command is used to set the SSID of your wireless network into Wi-Fi module. Restart the printer is necessary. Syntax WLAN SSID "ssid" Parameter Description ssid It is the SSID of your wireless network. Note: SSID is case-sensitive.
  • Page 377: Wlan Wpa

    WLAN WPA Description This command is used to set WPA security mode. This command only can be set but not be checked. Restart the printer is necessary. Syntax WLAN WPA WLAN WPA "key" Parameter Description Disable WPA security mode. The network security key. 8 to 63 characters. Key = Passphrase or Pre-Shared Key (Passphrase is a string containing between 8 and 63 characters) (Pre-Shared Key is a 32-byte key, formatted as hexadecimal number)
  • Page 378: Wlan Wep

    WLAN WEP Description This command is used to set WEP security mode. This command only can be set but not be checked. Restart the printer is necessary. Syntax WLAN WEP WLAN WEP n, "key" Parameter Description Disable WEP security mode. The index of key.
  • Page 379: Wlan Dhcp

    WLAN DHCP Description This command is used to set the printer to get the IP address from DHCP server. Restart the printer is necessary. Syntax WLAN DHCP Example Sample code Result WLAN SSID "TEST-AP" WLAN WPA "123456789" WLAN DHCP WLAN PORT 9100 SELFTEST WLAN See Also WLAN IP...
  • Page 380: Wlan Ip

    WLAN IP Description This command is used to set the specific static IP address to printer. Restart the printer is necessary. Syntax WLAN IP "ip", "mask", "gateway" Parameter Description IP address. Mask Subnet mask. Gateway Default gateway. Example Sample code Result WLAN SSID "TEST-AP"...
  • Page 381: Wlan Port

    WLAN PORT Description This command is used to specify the PORT number of Wi-Fi module. Restart the printer is necessary. Syntax WLAN PORT number Parameter Description number Base raw port number. Default is 9100. Example Sample code Result WLAN SSID "TEST-AP" WLAN WPA "123456789"...
  • Page 382: Internal Ethernet Setting Commands

    Internal Ethernet Setting Commands NET DHCP Description This command is used to set the printer to get the IP address from DHCP server. Printer will restart itself while setting this command. Syntax NET DHCP Example Sample code Result NET DHCP SELFTEST ETHERNET See Also NET IP...
  • Page 383: Net Ip

    NET IP Description This command is used to set the specific IP address to printer. Printer will restart itself while setting this command. Syntax NET IP "ip","mask","gateway" Parameter Description IP address mask Subnet mask gateway Default gateway Example Sample code Result NET IP "192.168.10.40","255.255.255.0","192.168.10.252"...
  • Page 384: Net Port

    NET PORT Description This command is used to specify the PORT number of Ethernet. Printer will restart itself while setting this command. Syntax NET PORT number Parameter Description number Base raw port number. Default is 9100. Example Sample code Result NET PORT 9100 SELFTEST ETHERNET...
  • Page 385: Net Name

    NET NAME Description This command is used to set the printer server name. Syntax NET NAME "printerserver" Parameter Description printerserver The specific name of printer server. Example Sample code Result NET NAME "TEST" SELFTEST ETHERNET...
  • Page 386: Net Dns

    NET DNS Description This command is used to set the printer to DNS. It supports Static IP only. (since A2.09) Syntax NET DNS "primary dns","secondary dns" Parameter Description primary dns Primary DNS IP address secondary dns Secondary DNS IP address Example Sample code NET DNS "10.0.1.102","10.0.5.11"...
  • Page 387: Rfid Setting Commands

    RFID Setting Commands Incorporate RFID commands into new or existing printer programs. IMPORTANT: With all examples make sure the label length matches the physical length of the installed media. RFID ON/OFF Description This command is used to enable/disable the RFID encoder module. Syntax RFID ON/OFF Parameter...
  • Page 388: Rfid Error

    RFID ERROR Description If an error persists after the specified number of labels are tried, perform this error handling action. Syntax RFID ERROR OFF/STOP/OVERSTRIKE Parameter Description No specific action is taken when a tag fails to be programmed. STOP Place printer in Pause mode. The label is discarded and reprinting of the label (if desired) must be initiated from the host.
  • Page 389: Rfid Retry

    RFID RETRY Description This command is used to set the number of label retries that the RFID encoder will attempt before declaring a fault. Syntax RFID RETRY # Parameter Description Number of retries (1 – 10) Example RFID RETRY 2...
  • Page 390: Rfid Retryerror On/Off

    RFID RETRYERROR ON/OFF Description This command is used to set if errors are declared when the Label Retry count is exceeded. Syntax RFID RETRYERROR ON/OFF Parameter Description Enable the RFID retry error function Disable the RFID retry error function Example RFID RETRYERROR OFF...
  • Page 391: Rfid Position

    RFID POSITION Description This command is used to set the how far the RFID tag encoding position of the currently installed tag should be offset from Top of Form. Normally, this value is set automatically by the RFID calibration process and should not be changed.
  • Page 392: Rfid Power

    RFID POWER Description This command is used to set the for optimal tag encoding. Sets the read/write power level to be used in the RFID encoder. Normally, this value is set automatically by the RFID calibration process and should not be changed. Syntax RFID POWER read,write Parameter...
  • Page 393: Rfid Countreset

    RFID COUNTRESET Description This command is used to clear the total/failed tag statistics counters. Syntax RFID COUNTERSET Parameter Description Example RFID COUNTERSET...
  • Page 394: Rfid Read/Write

    RFID READ/WRITE Description This command allows you to write or read to an RFID tag. Syntax RFID a,b,format,offset,size,memory bank,data Parameter Description WRITE = write to the tag READ = read the tag WRITE lock 0 = write without lock. only password 1 to FFFFFFFF in hex = write and lock the data block to prevent it from...
  • Page 395 - 4 bytes kill code area - 2 bytes PC code area (Gen 2 tags only) data WRITE = content of data string READ = [prompt of data] Note: RFID WRITE supported "string" or basic variable (e.g. VAR$) [ ] = Optional parameter...
  • Page 396 Example Example 1 This programming example writes a data into an RFID tag and reads the written data with a prompt. RFID WRITE,0,H,0,12,EPC,"123456789012" RFID READ,0,H,0,12,EPC,"Read Data: " PRINT 1 Example 2 This programming example writes a data with lock password into an RFID tag and reads the written data with a prompt.
  • Page 397 For this locked RFID tag, it cannot be overwritten data without using RFID READ unlock password command. If you re-send the RFID WRITE command, the printer LCD will be shown as below, If you need to overwrite this locked tag, please use RFID READ unlock command as following programming example, to unlock password for the RFID tag so it can be overwritten later.
  • Page 399 Example 3 When using WRITE, if the "size" is larger than the "data", it will be padded with 0 in front of the data to read. When using READ, if the "size" is larger than the WRITE "data", it will be padded with 0 in back of the data to read.
  • Page 400 Example 5 (EPC & USR & ACS with Lock) RFID WRITE,12345678,H,0,12,EPC,"123456789012" RFID WRITE,12345678,H,0,12,USR,"987654321012" RFID WRITE,12345678,H,0,8,ACS,"12345678" RFID READ,12345678,H,0,8,ACS,"ACS : " RFID READ,12345678,H,0,12,EPC,"EPC : " RFID READ,12345678,H,0,12,USR,"USR : " PRINT 1 Example 6 (EPC & USR & ACS & KIL with Lock) RFID WRITE,12345678,H,0,12,EPC,"123456789012"...
  • Page 401: Rflock

    RFLOCK Description Perform different types of RFID lock operations on available RFID data fields. Syntax RFLOCK,Type,EPC,USR,ACS,KIL, ["Format,Passcode"] Parameter Description Type LOCK, UNLOCK, PERMALOCK, PERMAUNLOCK Field Electronic Product Code memory bank User memory bank Access Password Kill Password Format A, H Passcode The value of the passcode for the lock operations.
  • Page 402 RFID RFLOCK,UNLOCK,EPC,,,,H,"12345678" PRINT 1 Sample code 3 Write the password as 12345678 to permanently lock the EPC memory bank. RFID RFLOCK,PERMALOCK,EPC,,,,H,"12345678" PRINT 1 Sample code 4 Write the password as 12345678 to permanently unlock the EPC memory bank. RFID RFLOCK,PERMAUNLOCK,EPC,,,,H,"12345678" PRINT 1 Sample code 5 Write the password as 12345678 to lock the USR memory bank.
  • Page 403 RFID RFLOCK,LOCK,EPC,USR,,,H,"12345678" PRINT 1 Sample code 8 Write the password as 12345678 to lock the EPC, USR, and ACS memory bank. RFID RFLOCK,LOCK,EPC,USR,ACS,,H,"12345678" PRINT 1...
  • Page 404: Nfc Setting Commands

    NFC Setting Commands NFC FEATURE Description This command is used to return information if the printer supports the optional NFC feature, and if it is currently installed. Syntax NFC FEATURE Parameter Description None Return Information not available NFC is not supported not present The feature is unavailable.
  • Page 405: Nfc Status

    NFC STATUS Description This command is used to return current status of the NFC reader or status of last operation completed. Syntax NFC STATUS Parameter Description None Return Information Idle The reader is inactive or hasn’t been used in progress The operation is pending timed out The operation has timed out...
  • Page 406: Nfc Timeout

    NFC TIMEOUT Description This command is used to set the timeout for the current read/write operation (in seconds) 0 to 3600, setting to 0 disables the timeout feature. Syntax NFC TIMEOUT m Parameter Description 0 to 3600 Note: ▪ The default value is 10 seconds when printer initializes. ▪...
  • Page 407: Nfc Read

    NFC READ Description This command is used to return content stored in the last NFC read event. (Max. of 2048 characters) Syntax NFC READ Parameter Description None Example Sample code NFC READ...
  • Page 408: Nfc Write

    NFC WRITE Description This command is used to set the content to be transmitted by the NFC system. (Max. of 2048 characters) Syntax NFC WRITE "content" Parameter Description content Content of text string Example Sample code NFC WRITE "Test"...
  • Page 409: Nfc Mode

    NFC MODE Description This command is used to set the NFC reader mode. This commend can start or stop a read or write operation. (Max. of 2048 characters) Syntax NFC MODE OFF/READ/WRITE Parameter Description Disable READ Read tag mode WRITE Write tag mode Note: The default value is "OFF".
  • Page 410: Alpha-2R/Tdm Series Setting Commands

    Alpha-2R/TDM Series Setting Commands SET PRINTQUALITY Description This command is used to set the print mode (print quality) for Alpha-2R and TDM series printer. (Supported device: Alpha-2R and TDM series only) Syntax SET PRINTQUALITY DRAFT/STANDARD/OPTIMUM Parameter Description DRAFT High print speed with lower density STANDARD Standard print speed and quality OPTIMUM...
  • Page 411: Set Standbytime

    SET STANDBYTIME Description This command is used to set the standby time for Alpha-2R and TDM series printer. (Supported device: Alpha-2R and TDM series only) Syntax SET STANDBYTIME OFF/XXXXX Parameter Description Disable XXXXX 0 ~ 65534 (second) Note: The default value is "SET STANDBYTIME 120". Example Sample code SET STANDBYTIME OFF...
  • Page 412: Set Sleeptime

    SET SLEEPTIME Description This command is used to set the sleeping time for Alpha-2R and TDM series printer. (Supported device: Alpha-2R and TDM series only) Syntax SET SLEEPTIME OFF/XXXXX Parameter Description Disable XXXXX 0 ~ 65534 (minute) Note: The default value is "SET SLEEPTIME 30". Example Sample code SET SLEEPTIME OFF...
  • Page 413: Gpio Setting Commands

    GPIO Setting Commands SET GPO Description Use this command to send out the GPIO signals by the printer. Syntax SET GPOn signal state, delay0, pulse0, delay1, pulse1, function condition Parameter Description n = 1 ~ 7 Seven dedicated outputs are available for the desired function conditions. Signal state Goes the high level signal when the following function HIGH...
  • Page 414 control…) FAULT RIBBON Ribbon error is occurred. FAULT PAPER Paper empty or paper jam is occurred. FAULT CARRIAGE Carriage is open. FAULT MEMORY Out of memory is occurred. FAULT CUTTER Cutter error is occurred. FAULT OVERHEAT Stepping motor or print head is over heat. PAUSE Pause status is occurred.
  • Page 415: Set Gpi

    SET GPI Description Use this command to receive the GPIO signals from external controlling devices. Syntax SET GPIn signal, pulse, function Parameter Description n = 1 ~ 4 Four dedicated inputs are available for the desired control functions. Signal state When a high level signal received, will activate the HIGH following printer control functions.
  • Page 416 INPUT n n is text or command. The n will be triggered to printer. REBOOT Reboot the printer Example Sample code SET GPI1 HIGH,0,PAUSE SET GPI2 LOW,0,PAUSE ON SET GPI3 POS,100,PAUSE OFF SET GPI4 NEG,100,CUT SET GPI1 NEG,100,INPUT "TEST.BAS"+CHR$(13)+CHR$(10) SET GPI1 NEG,100,REBOOT GPIO Waveform GPI Level Signal : Continuous action.
  • Page 417 GPI Pulse Signal : A pulse is an action. (Host to printer.) GPO Level Signal : Continuous condition. (Printer to host.) GPO Pulse Signal : A pulse is a condition. (Printer to host.)
  • Page 418: Gpm

    Description This command is used to get status of GPI, set status of GPO. (since A2.15.111) Syntax GPm = n Parameter Description I, GPI signal O, GPO signal 0, represents low lever of signal 1, represents high lever of signal Example Sample code IF GPI2 = 1 THEN...
  • Page 419: Applicator I/O Interface (Db15F) Circuit Diagram

    Applicator I/O Interface (DB15F) Circuit Diagram...
  • Page 420 GPIO Interface Pin Configuration (DB15F) CONFIGURATION GPI_1 GPI_2 GPI_3 GPI_4 GPO_1 GPO_2 GPO_3 GPO_4 GPO_5 GPO_6 GPO_7 Below table’s emulation will only be applied when users are using GPIO-DB15 with the Applicator Port function turned on Mode 1/2/3/4. Please follow the procedures to trun on the function: Menu > Interface > GPIO > Applicator Port (Defualt: Off) > Mode 1/2/3/4. CONFIGURATION SIGNAL NAME SIGNAL TYPE...
  • Page 421 GPI_2 FORMFEED Input GPI_3 PAUSE Input GPI_4 REPRINT Input (+) 24V Power GROUND Power Ground GPO_1 LOWRIBBON Output GPO_2 FAULT Output GPO_3 PRINT END Output GPO_4 FAULT PAPER Output GPO_5 FAULT RIBBON Output GPO_6 DATA READY Output GPO_7 Dummy Output...
  • Page 422 GPO pin no. 1~7 application example: Since we connect GPO pin no. 1~7 with seven individual LED, the output signal from GPO will light the individual LED on or off. *NPN output specification. Collector-emitter voltage 35 V Emitter-collector voltage Collector current Max.
  • Page 423: Applicator I/O Interface (Db25F) Circuit Diagram

    Applicator I/O Interface (DB25F) Circuit Diagram...
  • Page 425 GPIO Interface Pin Configuration (DB25F) CONFIGURATION FGND GPO_1 GPO_3 GPO_5 GPO_7 GPI_1 GPI_3 GPI_5 GPI_7 OUT_COM +24V OUT_COM GPO_2 GPO_4 GPO_6 GPO_8 GPI_2 GPI_4 GPI_6...
  • Page 426 GPI_8 IN_COM...
  • Page 427 Below table’s emulation will only be applied when users are using GPIO-DB25 with the External Signal function turned on Type 1/2/3/4. Please follow the procedures to trun on the function: Menu > Interface > GPIO > External Signal (Defualt: Off) > Type1/2/3/4. CONFIGURATION SIGNAL NAME SIGNAL TYPE...
  • Page 428 GPI_4 Formfeed Input GPI_6 Reverse Input GPI_8 Reverse Input IN_COM IN_COM Input GND(SIGNAL GROND)
  • Page 429: Update History

    Add BASIC function RTRIM$() Ernest 2010/01/10 Add BASIC function STRCOMP() Ernest 2010/01/10 Add BASIC function INSTR() Ernest 2011/01/25 Modify TSC address Camille 2011/03/04 Revise, TTP-248M doesn’t support mirror function Ernest 2011/03/04 Add sensor range of TTP-225/ TDP-225 in command SET GAP Ernest 2011/12/09 Add some command spec in RSS barcode.
  • Page 430 2012/11/27 Add TEXTPIXEL() command. Ernest 2012/11/27 Add BARCODEPIXEL() command. Ernest 2012/11/27 Add GETSENSOR() command. Ernest 2012/11/27 Add GETSETTING() command. Ernest 2012/11/28 Revise SET CUTTER command. Ernest 2012/11/28 Revise OPEN command. Ernest 2012/11/28 Revise FOR … NEXT LOOP command. Ernest 2012/11/28 Add CLOSE command.
  • Page 431 2014/10/14 Modify GPO function (Add PRINT) Camille 2014/11/28 Modify printer model list Camille 2014/11/28 Add SET REWIND section Camille 2015/3/11 Modify printer model list Camille 2015/4/10 Modify SPEED section Camille 2015/5/11 Modify <ESC>!S command section (Add Print head error) Camille 2015/5/15 Revise OFFSET command section Camille...
  • Page 432 2018/12/20 Add the parameter "BT" for SELFTEST section Camille 2018/12/20 Add the Bluetooth module setting commands Camille 2019/1/9 Add applicator I/O interface (DB15F) circuit diagram information Camille 2019/3/12 Add REPLACE$() command Camille 2019/3/26 Add ML/ MB series models on SET KEYn section Camille 2019/3/26 Modify printer model list...
  • Page 433 - Update COPY command 2024/3/18 Update the <ESC>!S section (Status Byte #2: warning table/Unhealthy Dots) Camille 2024/5/8 Update the RFLOCK command Camille 2024/6/26 Update the RFID POSITION command Camille 2024/7/1 Update the RFID POWER section Camille - Update the Printer Model List - Update the SET KEYn section - Update the SET LEDn section - Add the GPm command...
  • Page 434 www.tscprinters.com...

This manual is also suitable for:

Ttp-244me seriesTdp-245 seriesTtp-245 seriesTtp-246m seriesTtp-248m seriesTtp-243 plus series ... Show all