TSC TTP-243 Series Owner's manual

TSPL/TSPL2 Programming Language
PROGRAMMING
MANUAL
TSC BAR CODE PRINTER SERIES

Update History
Date
Content
Editor
2007/7/13
Revise some typos
Phil
2007/12/25
Revise FREAD$() example
Camille
2008/4/10
Add update history list
Camille
2009/1/17
Add GAPDETECT command.
Ken
2009/5/18
Add CIRCLE command
Phil
2009/6/24
Add RSS command
Phil
2010/7/6
Revise bar command section
Camille
2010/10/25
Revise some sections
Camille
2011/01/06
Add CODE 11 barcode
Ernest
2011/01/06
Add AZTEC barcode
Ernest
2011/01/06
Revise sensor intension table in SET GAP
Ernest
2011/01/10
Add BLINEDETECT command
Ernest
2011/01/10
Add AUTODETECT command
Ernest
2011/01/10
Add BASIC function FORMAT$()
Ernest
2011/01/10
Add BASIC function NOW$()
Ernest
2011/01/10
Add BASIC function TRIM$()
Ernest
2011/01/10
Add BASIC function LTRIM$()
Ernest
2011/01/10
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.
Ernest

TSC AUTO ID Technology Co., Ltd. I Copyright 2009 All Rights Reserved.
TABLE OF CONTENTS
Document Conventions ...................................................................................................IV
Object Position Calculation ...............................................................................................V
Printer Models List .........................................................................................................VII
Setup and System Commands........................................................................................... 1
SIZE ........................................................................................................................................................... 1
GAP........................................................................................................................................................... 3
GAPDETECT............................................................................................................................................... 5
BLINEDETECT ............................................................................................................................................ 6
AUTODETECT ............................................................................................................................................ 7
BLINE ........................................................................................................................................................ 8
OFFSET.................................................................................................................................................... 10
SPEED ..................................................................................................................................................... 11
DENSITY .................................................................................................................................................. 13
DIRECTION AND MIRROR IMAGE ................................................................................................................. 14
REFERENCE ............................................................................................................................................. 16
SHIFT....................................................................................................................................................... 17
COUNTRY................................................................................................................................................ 19
CODEPAGE .............................................................................................................................................. 20
CLS .......................................................................................................................................................... 22
FEED........................................................................................................................................................ 23
BACKFEED &BACKUP.............................................................................................................................. 24
FORMFEED.............................................................................................................................................. 26
HOME ..................................................................................................................................................... 27
PRINT ...................................................................................................................................................... 29
SOUND.................................................................................................................................................... 30
CUT ......................................................................................................................................................... 31
LIMITFEED............................................................................................................................................... 32
SELFTEST................................................................................................................................................. 33
Label Formatting Commands .......................................................................................... 34
BAR ......................................................................................................................................................... 34
BARCODE ................................................................................................................................................ 35
BITMAP................................................................................................................................................... 40
BOX ......................................................................................................................................................... 42
CIRCLE..................................................................................................................................................... 43
DMATRIX................................................................................................................................................. 44
ERASE...................................................................................................................................................... 45
MAXICODE.............................................................................................................................................. 46
PDF417 ................................................................................................................................................... 48
AZTEC...................................................................................................................................................... 53
PUTBMP ................................................................................................................................................. 55
PUTPCX................................................................................................................................................... 57
QRCODE.................................................................................................................................................. 59
RSS.......................................................................................................................................................... 64
REVERSE.................................................................................................................................................. 68
TEXT........................................................................................................................................................ 69
Status Polling Commands (RS-232).................................................................................. 71
<ESC>!?................................................................................................................................................... 71
<ESC>!R .................................................................................................................................................. 72
~!@......................................................................................................................................................... 73
~!A .......................................................................................................................................................... 74

TSC AUTO ID Technology Co., Ltd. II Copyright 2009 All Rights Reserved.
~!C .......................................................................................................................................................... 75
~!D .......................................................................................................................................................... 76
~!F........................................................................................................................................................... 77
~!I ........................................................................................................................................................... 78
~!T .......................................................................................................................................................... 79
Message Translation Protocols........................................................................................ 81
~#............................................................................................................................................................ 81
Commands for Windows Driver ...................................................................................... 82
!B ............................................................................................................................................................ 82
!J ............................................................................................................................................................. 83
!N............................................................................................................................................................ 84
File Management Commands ......................................................................................... 85
DOWNLOAD............................................................................................................................................ 85
EOP ......................................................................................................................................................... 90
FILES ....................................................................................................................................................... 91
KILL ......................................................................................................................................................... 92
MOVE...................................................................................................................................................... 94
RUN ........................................................................................................................................................ 95
BASIC Commands and Functions..................................................................................... 97
ABS( ) ...................................................................................................................................................... 97
ASC( ) ...................................................................................................................................................... 98
CHR$( ).................................................................................................................................................... 99
END....................................................................................................................................................... 100
EOF( ) .................................................................................................................................................... 101
OPEN .................................................................................................................................................... 103
WRITE ................................................................................................................................................... 106
READ..................................................................................................................................................... 107
SEEK...................................................................................................................................................... 109
LOF( )..................................................................................................................................................... 110
FREAD$( ).............................................................................................................................................. 111
FOR…NEXT LOOP .................................................................................................................................. 112
IF…THEN…ELSE…ENDIF LOOP............................................................................................................. 114
GOSUB…RETURN .................................................................................................................................. 118
GOTO .................................................................................................................................................... 119
INP$( )................................................................................................................................................... 121
INPUT ................................................................................................................................................... 122
REM ...................................................................................................................................................... 123
OUT ...................................................................................................................................................... 124
GETKEY( ) .............................................................................................................................................. 125
INT( ) ..................................................................................................................................................... 127
LEFT$( ) ................................................................................................................................................. 128
LEN( ) .................................................................................................................................................... 129
MID$( ).................................................................................................................................................. 130
RIGHT$( ) .............................................................................................................................................. 131
STR$( )................................................................................................................................................... 132
STRCOMP ().......................................................................................................................................... 133
INSTR () ................................................................................................................................................ 134
TRIM$( ) ................................................................................................................................................ 135
LTRIM$( )............................................................................................................................................... 136
RTRIM$( ) .............................................................................................................................................. 137
VAL( )..................................................................................................................................................... 138
BEEP...................................................................................................................................................... 139

TSC AUTO ID Technology Co., Ltd. III Copyright 2009 All Rights Reserved.
NOW$( )................................................................................................................................................ 140
FORMAT$( )........................................................................................................................................... 141
Device Reconfiguration Commands............................................................................... 144
SET COUNTER ....................................................................................................................................... 144
SET CUTTER .......................................................................................................................................... 145
SET PARTIAL_CUTTER ........................................................................................................................... 147
SET BACK............................................................................................................................................... 149
SET KEY1, SET KEY2, SET KEY3 ............................................................................................................... 151
SET LED1, SET LED2, SET LED3............................................................................................................... 153
SET PEEL................................................................................................................................................ 155
SET TEAR &SET STRIPER ....................................................................................................................... 156
SET GAP ................................................................................................................................................ 158
SET HEAD .............................................................................................................................................. 161
SET RIBBON........................................................................................................................................... 162
SET COM1 ............................................................................................................................................. 163
SET PRINTKEY........................................................................................................................................ 164
SET REPRINT ......................................................................................................................................... 166
PEEL ...................................................................................................................................................... 167
LED1, LED2, LED3 .................................................................................................................................. 169
KEY1, KEY2, KEY3 .................................................................................................................................. 171
Printer Global Variables ................................................................................................ 173
@LABEL ................................................................................................................................................ 173
YEAR ..................................................................................................................................................... 175
MONTH................................................................................................................................................. 176
DATE ..................................................................................................................................................... 177
WEEK .................................................................................................................................................... 178
HOUR.................................................................................................................................................... 179
MINUTE ................................................................................................................................................ 180
SECOND ................................................................................................................................................ 181
@YEAR.................................................................................................................................................. 182
@MONTH ............................................................................................................................................. 184
@DATE.................................................................................................................................................. 186
@DAY.................................................................................................................................................... 188
@HOUR ................................................................................................................................................ 190
@MINUTE............................................................................................................................................. 192
@SECOND............................................................................................................................................. 194

TSC AUTO ID Technology Co., Ltd. IV Copyright 2009 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> ESCAPE (ASCII 27), control code of status
polling command returns 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.
NULL (ASCII 0) supported in the expression, except the
2D bar code commands.
Note: 203 DPI: 1 mm = 8 dots Arial font in bold and italic type is used for note.

TSC AUTO ID Technology Co., Ltd. V Copyright 2009 All Rights Reserved.
Paper feed direction
DIRECTION 0
Label origin (0,0)
X
Y
X=7mm
Y=3mm
Object Position Calculation
203 DPI, 1mm=8 dots
300 DPI, 1mm=12 dots
DIRECTION 0
TEXT 56,24,”3”,0,1,1,”ABC”

TSC AUTO ID Technology Co., Ltd. VI Copyright 2009 All Rights Reserved.
DIRECTION 1
TEXT 56,24,”3”,0,1,1,”ABC”
Paper feed direction
DIRECTION 1
Label origin (0,0)
X
Y
X=7mm
Y=3mm

TSC AUTO ID Technology Co., Ltd. VII Copyright 2009 All Rights Reserved.
Printer Models List
Series
Models
TTP-243 series
1. TTP-243
2. TTP-243E
TTP-243 Plus series
3. TTP-243 Plus
4. TTP-243E Plus
TTP-244ME series
5. TTP-243M
6. TTP-244ME
7. TTP-244ME Plus
TTP-244 series
8. TTP-244
9. TTP-244 Plus
TTP-244CE series
10. TTP-244CE
TTP-245 series
11. TTP-245
12. TTP-245G
13. TTP-245 Plus
TTP-247
14. TTP-247
TTP-225
15. TTP-225
TTP-245C series
16. TTP-245C
TDP-245 series
17. TDP-245
10. TDP-245G
11. TDP-245 Plus
TDP-225
18. TDP-225
TTP-246M series
19. TTP-246M
20. TTP-246G
21. TTP-246M Plus
TTP-248M series
22. TTP-248M
TTP-2410M series
23. TTP-2410M
TDP-643 Plus
24. TDP-643 Plus
TDP-643R Plus
25. TDP-643R Plus
TTP-342 series
26. TTP-342
27. TTP-342 Plus
TTP-342M series
28. TTP-342M
29. TTP-342M Plus
TTP-343 series
30. TTP-343
31. TTP-343 Plus
TTP-345
32. TTP-345
TTP-343C series
33. TTP-343C
TTP-344M series
34. TTP-344M
35. TTP-344M Plus
TTP-346M series
36. TTP-346M
TTP-384M series
37. TTP-384M
TTP-644M series
38. TTP-644M
M23 series
39. M23

TSC AUTO ID Technology Co., Ltd. VIII Copyright 2009 All Rights Reserved.

TSC AUTO ID Technology Co., Ltd. 1 Copyright 2009 All Rights Reserved.
Setup and System Commands
SIZE
Description
This command defines the label width and length.
Syntax
English system (inch)
SIZE m,n
Metric system (mm)
SIZE m mm,n mm
Dot measurement
SIZE m dot,n dot
This command is only supported in v6.27 and later firmware.
Parameter Description
m Label width (inch or mm)
n Label length (inch or mm)
Note :
200 DPI : 1 mm = 8 dots
300 DPI : 1mm = 12 dots
For metric and dot systems, there must be a space between parameter and
“mm” or “dot”.
Max. width
72mm
104mm
106mm
108mm
219.5mm
TTP-243 series
X
TTP-243 Plus series
X
TTP-244ME series
X
TTP-244ME Plus series
X
TTP-244 series
X
TTP-244CE series
X
TTP-245 series
X
TTP-245C series
X
TDP-245 series
X
TTP-246M series
X
TTP-248M series
X
TTP-2410M series
X
TDP-643 Plus series
X
TDP-643R Plus series
X
TTP-342 series
X
TTP-342 Plus series
X
TTP-342M series
X
TTP-342M Plus series
X

TSC AUTO ID Technology Co., Ltd. 2 Copyright 2009 All Rights Reserved.
TTP-343 series
X
TTP-343C series
X
TTP-344M series
X
TTP-346M series
X
TTP-384M series
X
TTP-644M series
X
TTP-247
X
TTP-345
X
M23 series
X
Example
(1) English system (inch)
SIZE 3.5, 3.00
(2) Metric system (mm)
SIZE 100 mm, 100 mm
See Also
GAP, BLINE

TSC AUTO ID Technology Co., Ltd. 3 Copyright 2009 All Rights Reserved.
GAP
Description
This command sets the distance between two labels.
Syntax
English system (inch)
GAP m,n
Metric system (mm)
GAP m mm,n mm
Parameter Description
m The gap distance between two labels
0 ≤m ≤1 (inch), 0 ≤m ≤25.4 (mm)
n The offset distance of the gap n ≤label length (inch or mm)
0,0 Continuous label.
Note: For metric system, 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.
Ex: In DOS mode,
C:\>copy con lpt1 <Enter>
GAP 2 mm,0 <Enter>
<Ctrl>+<Z> <Enter>
Example
Normal gap
English system (inch)
GAP 0.12,0
Metric system (mm)
GAP 3 mm,0
Continuous label
GAP 0,0

TSC AUTO ID Technology Co., Ltd. 4 Copyright 2009 All Rights Reserved.
Special gap
English system (inch)
GAP 0.30, 0.10
Metric system (mm)
GAP 7.62 mm, 2.54 mm
See Also
SIZE, BLINE

TSC AUTO ID Technology Co., Ltd. 5 Copyright 2009 All Rights Reserved.
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.
Syntax
GAPDETECT [x, y]
Parameter Description
x Paper length (in dots)
y Gap length (in dots)
Note: If the x, y parameters are ignored then the printer will calibrate and
determine the paper length and gap size automatically.
See Also
GAP, SIZE, BLINEDETECT, AUTODETECT

TSC AUTO ID Technology Co., Ltd. 6 Copyright 2009 All Rights Reserved.
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.
Syntax
BLINEDETECT [x, y]
Parameter Description
x Paper length (in dots)
y Gap length (in dots)
Note: If the x, y parameters are ignored then the printer will calibrate and
determine the paper length and gap size automatically.
See Also
GAP, SIZE, GAPDETECT, AUTODETECT

TSC AUTO ID Technology Co., Ltd. 7 Copyright 2009 All Rights Reserved.
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.
Syntax
AUTODETECT [x, y]
Parameter Description
x Paper length (in dots)
y Gap length (in dots)
Note:
(1). If the x, y parameters are ignored then the printer will calibrate and
determine the paper length and gap/black mark size automatically.
(2). When using this command, the printer will detect the label by the proper
sensor type so please don’t set the command GAP or BLINE in your
program.
(3). It is supported in firmware V6.86EZ or later.
See Also
GAP, SIZE, GAPDETECT, BLINEDETECT

TSC AUTO ID Technology Co., Ltd. 8 Copyright 2009 All Rights Reserved.
BLINE
Description
This command sets the height of the black line and the user-defined extra label feeding
length each form feed takes.
Syntax
English system (inch)
BLINE m,n
Metric system (mm)
BLINE m mm,n mm
Parameter Description
m The height of black line either in inch or mm.
0 ≤m ≤1 (inch), 0 ≤m ≤25.4 (mm)
n The extra label feeding length. 0 ≤n ≤label length
0,0 Continuous label.
Note: For metric system, there must be a space between parameter and “mm”. When
the sensor type is changed from “GAP” to “Black Mark”, please send the
“BLINE” command to the printer first.
Ex : In DOS mode,
C :\>copy con lpt1 <Enter>
BLINE 2 mm,0 <Enter>
<Ctrl>+<Z> <Enter>
Example
English system (inch)
BLINE 0.20,0.50
Metric system (mm)
BLINE 5.08 mm,12.7 mm

TSC AUTO ID Technology Co., Ltd. 9 Copyright 2009 All Rights Reserved.
See Also
SIZE, GAP

TSC AUTO ID Technology Co., Ltd. 10 Copyright 2009 All Rights Reserved.
OFFSET
Description
This command defines the selective, extra label feeding length each form feed takes, which,
especially in peel-off mode and cutter mode, is used to adjust label stop position, so as for
label to register at proper places for the intended purposes. The printer back tracks the extra
feeding length before the next run of printing.
Syntax
English system (inch)
OFFSET m
Metric system (mm)
OFFSET m mm
Parameter Description
m The offset distance (inch or mm). -1 ≤m ≤ 1(inch)
CAUTION: Impropriety offset value may cause paper jam.
Example
English system (inch)
OFFSET 0.5
Metric system (mm)
OFFSET 12.7 mm
See Also
SIZE, GAP, SET PEEL, SET CUTTER
Other manuals for TTP-243 Series
2
This manual suits for next models
26
Table of contents
Other TSC Label Maker manuals

TSC
TSC CPX4D Series User manual

TSC
TSC CPX4D Series Operating and maintenance manual

TSC
TSC TDP-225 User manual

TSC
TSC ALPHA 4L User manual

TSC
TSC TX200 Series User manual

TSC
TSC Alpha-3R User manual

TSC
TSC TTP-248M User manual

TSC
TSC ME240 series User manual

TSC
TSC CPX4P Series User manual

TSC
TSC PEX1000 Series User manual