Transcription of TSPL/TSPL2 Programming Language TSC BAR CODE …
1 TSPL/TSPL2 Programming Language Programming MANUAL TSC BAR CODE PRINTER SERIES TSC AUTO ID Technology Co., Ltd. I Copyright 2014 All Rights Reserved. TA B L E OF CONTENTS How to Read .. VI Document VII Object Position Calculation .. VIII Printer Model List .. X Setup and System Commands .. 1 SIZE .. 1 GAP .. 2 GAPDETECT .. 4 BLINEDETECT .. 5 AUTODETECT .. 6 BLINE .. 7 OFFSET .. 8 SPEED .. 9 DENSITY .. 11 DIRECTION AND MIRROR IMAGE .. 12 REFERENCE .. 13 SHIFT .. 14 COUNTRY .. 16 CO D E PA GE .. 17 CLS .. 19 FEED .. 20 BACKFEED & BACKUP .. 21 FORMFEED.
2 22 HOME .. 23 PRINT .. 24 SOUND .. 25 CUT .. 26 LIMITFEED .. 27 SELFTEST .. 28 EOJ .. 30 D E L AY .. 31 DISPLAY .. 32 INITIALPRINTER .. 34 Label Formatting Commands .. 35 BAR .. 35 BARCODE .. 36 TLC39 .. 42 BITMAP .. 43 BOX .. 45 CIRCLE .. 46 ELLIPSE .. 47 CODABLOCK F MODE .. 48 DMATRIX .. 49 ERASE .. 51 MAXICODE .. 52 PDF417 .. 54 AZTEC .. 57 MPDF417 .. 58 PUTBMP .. 59 PUTPCX .. 61 QRCODE .. 63 RSS .. 68 REVERSE .. 72 TSC AUTO ID Technology Co., Ltd. II Copyright 2014 All Rights Reserved. DIAGONAL .. 73 TEXT .. 74 BLOCK.
3 77 Status Polling and Immediate Commands .. 80 <ESC>!? .. 80 <ESC>!C .. 81 <ESC>!D .. 82 <ESC>!O .. 83 <ESC>!P .. 84 <ESC>!Q .. 85 <ESC>!R .. 86 <ESC>!S .. 87 <ESC>!F .. 89 <ESC>!.. 90 ~!@ .. 91 ~!A .. 92 ~!C .. 93 ~!D .. 94 ~!E .. 95 ~!F .. 96 ~!I .. 97 ~!T .. 98 <ESC> 99 <ESC> Z .. 100 Message Translation Protocols .. 101 ~# .. 101 Commands for Windows Driver .. 102 !B .. 102 !J .. 103 !N .. 104 File Management Commands .. 105 DOWNLOAD .. 105 EOP .. 108 FILES .. 109 KILL .. 110 MOVE .. 112 RUN .. 113 BASIC Commands and Functions .. 114 ABS( ) .. 114 ASC( ).
4 115 CHR$( ) .. 116 XOR$( ) .. 117 END .. 118 EOF( ) .. 119 OPEN .. 120 CLOSE .. 122 WRITE .. 123 READ .. 124 SEEK .. 125 LOF( ) .. 126 LOC( ) .. 127 FREAD$( ) .. 128 PUT .. 129 GET .. 130 131 TSC AUTO ID Technology Co., Ltd. III Copyright 2014 All Rights Reserved. LOOP .. 132 .. 133 .. 134 LOOP .. 137 140 GOTO .. 141 INP$( ) .. 142 INP( ) .. 143 LOB( ) .. 144 INPUT .. 145 PREINPUT .. 146 POSTINPUT .. 147 SET FILTER ON/OFF .. 148 REM .. 149 OUT .. 150 OUTR .. 151 GETKEY( ) .. 152 INT( ) .. 153 LEFT$( ).
5 154 LEN( ) .. 155 MID$( ) .. 156 RIGHT$( ) .. 157 STR$( ) .. 158 STRCOMP( ) .. 159 INSTR ( ) .. 160 TRIM$( ) .. 161 LTR I M $ ( ) .. 162 RTRIM$( ) .. 163 TEXTPIXEL( ) .. 164 BARCODEPIXEL( ) .. 165 VAL( ) .. 166 BEEP .. 167 NOW$( ) .. 168 169 FORMAT$( ) .. 170 DATEADD() .. 172 FSEARCH() .. 174 TOUCHPRESS() .. 175 RECORDSET$ ( ) .. 176 LABELRATIO .. 177 Device Reconfiguration Commands .. 178 SET COUNTER .. 178 SET CUTTER .. 179 SET PARTIAL_CUTTER .. 180 SET BACK .. 181 SET KEYN .. 182 SET LEDN .. 184 SET PEEL .. 186 SET REWIND .. 187 SET TEAR & SET STRIPER .. 188 SET GAP.
6 189 SET BLINE .. 191 SET HEAD .. 192 SET RIBBON .. 193 SET ENCODER .. 194 SET RIBBONEND .. 195 TSC AUTO ID Technology Co., Ltd. IV Copyright 2014 All Rights Reserved. SET COM1 .. 196 SET PRINTKEY .. 197 SET REPRINT .. 199 SET FEED_LEN .. 200 GETSENSOR() .. 201 GETSETTING$() .. 203 SET USBHOST .. 206 SET RS232_REWINDER .. 207 SET AUTORUN .. 208 SET 209 SET RESPONSE .. 210 SET DAYLIGHT_SAVE .. 212 PEEL .. 213 LED1, LED2, LED3 .. 214 KEY1, KEY2, KEY3 .. 216 Printer Global Variables .. 218 @LABEL .. 218 YEAR .. 219 MONTH .. 220 D AT E .. 221 WEEK.
7 222 HOUR .. 223 MINUTE .. 224 SECOND .. 225 @YEAR .. 226 @MONTH .. 227 @ DAT E .. 228 @ DAY .. 229 @HOUR .. 230 @MINUTE .. 231 @SECOND .. 232 _MODEL$ .. 233 _SERIAL$ .. 234 _VERSION$ .. 235 External Wi-Fi Module Setting Commands .. 236 WLAN OFF .. 236 WLAN SSID .. 237 WLAN W PA .. 238 WLAN WEP .. 239 WLAN DHCP .. 240 WLAN IP .. 241 WLAN PORT .. 242 WLAN MODE .. 243 Internal Ethernet Setting Commands .. 244 NET DHCP .. 244 NET IP .. 245 NET PORT .. 246 NET NAME .. 247 NFC Setting Commands .. 248 NFC F E AT U R E .. 248 NFC S TAT U S .. 249 NFC TIMEOUT .. 250 NFC READ.
8 251 NFC WRITE .. 252 NFC MODE .. 253 TSC AUTO ID Technology Co., Ltd. V Copyright 2014 All Rights Reserved. Alpha-2R Setting Commands .. 254 SET PRINTQUALITY .. 254 SET ST ANDBYTIME .. 255 GETSETTING$() .. 256 GPIO Setting Commands .. 257 SET GPO .. 257 SET GPI .. 259 Update History .. 1 TSC AUTO ID Technology Co., Ltd. VI Copyright 2014 All Rights Reserved. How to Read The command name Description of this command Syntax of this command The detail description of each parameter The example and printout for reference TSC AUTO ID Technology Co.
9 , Ltd. VII Copyright 2014 All Rights Reserved. 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. Space ASCII 32, characters will be ignored in the command line. " ASCII 34, beginning and ending of expression. CR, LF ASCII 13, ASCII 10, denotes end of command line.
10 NULL ASCII 0, supported in the expression. Note: 203 DPI: 1 mm = 8 dots The font in bold and italic type is used for note. TSC AUTO ID Technology Co., Ltd. VIII Copyright 2014 All Rights Reserved. Paper feed direction DIRECTION 0 Label origin (0,0) X Y X=7mm Y=3mm Object Position Calculation Note : 1. 203 DPI, 1mm=8 dots ; 300 DPI, 1mm= dots 2. Only integer portion will be used. Ex. 2 mm = dots then 23 dots will be used. DIRECTION 0 CLS TEXT 56,24,"3",0,1,1,"ABC" PRINT 1 TSC AUTO ID Technology Co., Ltd. IX Copyright 2014 All Rights Reserved.