Tharo Systems Apollo Operating instructions

Apollo
Programming Guide
May 2000
Copyright © Tharo Systems, Inc.
Tharo Systems, Inc
2866 Nationwide Parkway
P.O. Box 798
Brunswick, Ohio 44212-0798
Phone: (330)273-4408
Fax: (330)225-0099
http://www.tharo.com
cab-Produkttechnik GmbH
Postfach 19 04 D-76007 Karlsruhe
Haid-und-Neu-Straße 7 D-76131 Karlsruhe
Telefon:0721 / 66 26-00
Telefax: 0721 / 66 26-259
http://www.cabgmbh.com

=====================================================================================
Copyright and Trademark Notices
© 2000 by Tharo Systems, Inc.
It is illegal to photocopy this manual or any portion of its content for any means or
purpose without the publisher's permission. Fines of up to $10,000 may be
imposed for violation.
Speedo™ and Swiss™ are registered trademarks ofBitstream® Inc.,
U.S. Patent No. 5,099,435.
All brand or product names are trademarks or registered trademarks of their respective
companies.

=====================================================================================
This page intentionally left blank

=====================================================================================
Table of Contents
_________________________________________________________________
Command Overview............................................................................................ 1
Command / Data Types................................................................................. 1
Command Syntax........................................................................................... 1
Command List................................................................................................ 2
Immediate Commands............................................................................. 2
ESC Sequence Commands.................................................................... 3
Label Format Commands........................................................................ 4
Special Content Fields............................................................................. 5
Print Orientation / Home Position for Commands...................................... 8
__________________________________________________________________
Immediate Commands....................................................................................... 9
Comment Line ................................................................................................ 9
Start ASCII Dump........................................................................................... 9
Direct Cut........................................................................................................ 9
Download Data...............................................................................................10
Erase Data......................................................................................................12
Formfeed.........................................................................................................12
Change Language/Country...........................................................................13
Set Measuring Unit.........................................................................................14
Pause Printer..................................................................................................14
Query Printer...................................................................................................15
Reset Printer...................................................................................................15
Set Date/Time.................................................................................................16
Run Printer Self-Test......................................................................................16
Firmware Version...........................................................................................16
Set Peripheral Signal Bits.............................................................................17
Slashed Zero Selection.................................................................................18
__________________________________________________________________
ESC Sequence / Network Commands.............................................................19
__________________________________________________________________
Label Format Commands..................................................................................21
Amount of Labels............................................................................................21
Bar Code Field Definition..............................................................................23
Code 39......................................................................................................28
UPC-A........................................................................................................29
UPC-E........................................................................................................30

=====================================================================================
Table of Contents
Bar Code Field Definition (cont.)
2 of 5 Interleaved.......................................................................................30
Code 128...................................................................................................32
EAN-13/JAN-13.........................................................................................34
EAN-8/JAN-8.............................................................................................35
HIBC............................................................................................................36
Codabar.....................................................................................................37
MSI Plessey...............................................................................................38
Add-On 2....................................................................................................39
Add-On 5....................................................................................................40
Code 93......................................................................................................41
Postnet........................................................................................................42
UCC128/EAN128.....................................................................................43
FIM ..............................................................................................................45
Maxicode....................................................................................................46
DataMatrix..................................................................................................48
Plessey.......................................................................................................51
UPC-E0......................................................................................................51
PDF417......................................................................................................52
Cutter Parameters..........................................................................................53
Global Object Offset.......................................................................................54
Define Files.....................................................................................................55
Font Number...................................................................................................56
Graphic Field Definition.................................................................................57
Circle...........................................................................................................58
Line .............................................................................................................59
Rectangle ...................................................................................................61
Fill................................................................................................................62
Shade.........................................................................................................63
Outline.........................................................................................................64
Heat, Speed, Method of Printing ..................................................................65
Image Field Definition....................................................................................66
Job Start..........................................................................................................67
Memory Card Access....................................................................................68
Set Print Options ............................................................................................71
Set Peel-Off Mode..........................................................................................72
Replace Field Contents.................................................................................73
Set Label Size ................................................................................................74
Text Field Definition.......................................................................................75
Internal Fonts..............................................................................................78
Examples....................................................................................................81
Synchronous Peripheral Signal Settings.....................................................84

=====================================================================================
Table of Contents
_________________________________________________________________
Special Content Fields ......................................................................................85
Field Calculations and Comparisons...........................................................92
__________________________________________________________________
Appendix A -Tables and Lists...........................................................................94
UCC/EAN Application Identifiers..................................................................94
[U: ] Command-Common Control Codes..................................................96
__________________________________________________________________
Appendix B -Coding Examples........................................................................97
Text File Label Coding Example ..................................................................97
QBASIC Program Label Coding Example..................................................100
ESC Command Demonstration....................................................................101
Memory Card-QBASIC Programs and Text Files -Summary.................103
Memory Card-Front Panel Access.............................................................105
Memory Card-Format, Display Info/Directory............................................106
Memory Card-Store Font.............................................................................107
Memory Card-Store Image..........................................................................108
Memory Card-Database File......................................................................109
Memory Card-Serial File.............................................................................110
Memory Card-Store Label...........................................................................111
Memory Card-Store Label 2 .......................................................................112
Memory Card-Load Label Formats and Print...........................................113
Memory Card-Print from Database............................................................114
Memory Card-Load Label Formats and Print...........................................115
Memory Card-Operator Prompt..................................................................116
Memory Card-Load Label Format and Print.............................................118
Memory Card-Replace Existing Data........................................................119
Memory Card-Incrementing Number from Operator Prompt...................120
Memory Card-Incrementing Serial Number from Serial File ...................121
RS485 Network Card.....................................................................................122
__________________________________________________________________
Index......................................................................................................................125

=====================================================================================
This page intentionally left blank

=====================================================================================
Command Overview 1
Command / Data Types
There are three basic types of commands used on the Apollo printer, and one special type of
data. Each of the following are described in separate sections of this manual:
?Immediate Commands are a single lower case letter. They perform a variety of printer
functions. When the printer receives an Immediate command, it will immediately perform
the command function, regardless of any other operation taking place. The effects of this
command remain in place until the printer is reset.
?ESC Sequence Commands are a specialized group of commands frequently used for
program control of network attached printers, when hands-on access to the control panel
is not available.
?Label Format Commands are specified as a single upper case letter. They define the
label and information to be printed on it, and are in effect for only one label job.
?Special Content Fields are used within Label Format commands. They consist of
specific predefined words coded in brackets, [ ], that provide for various data insertion
and data manipulation functions.
Command Syntax
?No special characters are needed to create a label format. Any text editor may be used
to enter commands.
?There is no strict format within a command.
?Where<CR> is shown, it may be a CR, a LF, or a CR/LF.
?For readability, parameters may be aligned with SPACES, TABS or additional ZEROES
in numeric parameters.
?Parameters are separated with a commaor semicolon.
?Comment lines can be included by coding a semicolon (;) in the first position.
?Optional parameters are shown in command definitionswithin brackets [ ]. Special
content fields are an exception -their optional fields are shown in { }.

=====================================================================================
2Command Overview
Command List
Immediate Commands Description Page
; comment Comment line 9
aStart ASCII dump 9
cDirect cut 9
dtype;name Downloads data 10
e type;name Erase data 12
fFormfeed 12
l name Change language/country 13
munit Set measuring unit 14
p status Pause printer 14
q f Query free memory 15
q i;name Query image availability 15
q m Query memory type 15
qp Query peripheral types 15
q s;name Query scaleable font availability 15
rReset printer 15
s datetime Set date/time 16
tRun printer self-test 16
vRequest firmware version 16
x d;ao Set peripheral (x) bits directly 17
x e;ao Set peripheral (x) error value 17
x m;mask Set peripheral (x) mask bits 17
x s;ao Set peripheral (x) standby value 17
z option Slashed zero selection 18

=====================================================================================
Command Overview 3
Command List
ESC Sequence / Network Commands Description
Page
ESC ESC Replaces ESC in binary data 20
ESC ! ESC ! Hard reset 19
ESC ? Request for free memory. 19
ESC * Activate all network printers 19
ESC A -ESC Z Activates individual network printer 19
ESC c Cancel Job 19
ESC p0 Ends printer pause state 19
ESC p1 Sets printer to pause state 19
ESC s Printer status request 20
ESC t Total Cancel 20

=====================================================================================
4Command Overview
Command List
Label Format Commands Description Page
; comment Comment line 9
A[NO] n Amount of labels (end job/print) 21
B[:name;] x, y, r, type, . . ,size,data Barcode field definition 22
Ccnt[,disp1[,disp2]] Set cutter parameters 52
CeSet cutter to end-of-job 52
Dx,y Global Object Offset 53
EDBF;name Defines the database file 54
ELOG;name Defines the log file 54
ETMP;name Defines the serial file 54
Fnumber;nameFont number 55
G[:name;] x, y, r; type:options, . . . Graphic field definition 56
Hspeed [,heat][,method][,ribbon] Heat, speed, and printing method 64
I[:name;]x,y,r[,mx,my];imagename Image field definition 65
J[comment] Job start 66
M c Memory card-contents list 67
Mdtype;name Memory card-delete file from card 67
M f;name Memory card-format card 68
M l type;name Memory card-load file from card 68
M s type;name Memory card-store data on card 68
O[M,][R,][T,][N,][p] Set print options 69
P[disp] Set peel-off mode 70
Rname:newcontent Replace field contents 71
S[type:]yo,xo,length,dy,wide. . . Set label size 72
T[:name;] x,y,r, font,size . . ;data Text field definition 73
Xy[;ao] Synchronous peripheral signal set 82

=====================================================================================
Command Overview 5
Command List
Special ContentFields Description Page
[?:{H},{Default},{F},{D},{Lx},{Mx},{R}]Operator Prompt Line 84
[C:fill{,base}]Set zero fill character 84
[DATE] Print date 85
[DAY02] Print 2-digit day (01-31) 85
[DBF:keyfield,keyvalue,entryfield]Database Field 83
[DOFY] Print numeric day (1-366) 85
[H12] Print hour in 12-hr form (1-12) 86
[H24] Print hour in 24-hr form (1-24) 86
[H012] Print hour in 12-hr form (01-12) 86
[H024] Print hour in 24-hr form (01-24) 86
[I] Make field invisible 87
[MIN] Print minutes (00-60) 86
[MONTH02] Print 2-digit month (01-12) 85
[mon] Print 3-character month name 86
[month] Print complete month name 86
[name] Insert contents of field 87
[name,m{,n}]Insert substring from field 88
[ODATE:+ddd{,+mm}{,+yy}]Print date with offset 85
[OWEEK:+ww]Print week with offset 88
[RTMP] or [RTMP:x] Read from serial file 88
[S:name]Numeric script style 83
[SEC] Print seconds (00-60) 86
[SER:start{incr,{freq}}]Insert serial number field 83
[TIME] Print time (hhmmss) 86
[U:x]Insert Unicode character 87
[WDAY] Print numeric day of week (1-7) 85
[WEEK] Print numeric week (1-52) 85
[wday] Print complete weekday name 86
[wday2] Print 2-character weekday name 86

=====================================================================================
Command Overview 7
Command List
Special Content Fields Description Page
[wday3] Print 3-character weekday name 86
[WLOG] Write to log file 88
[WTMP] Write to serial file 88
[XM] Print am or pm indication 86
[YY] Print 2-digit year (00-99) 85
[YYYY] Print 4-digit year (ie.1998) 85

=====================================================================================
8Command Overview
Command List
Special Content Fields/ Description Page
Field Calculations and Comparisons
[+:oper1,oper2. . ,operx]Add 87
[-:oper1,oper2]Subtract 87
[*:oper1,oper2. . ,operx]Multiply 87
[/ :oper1,oper2]Divide 87
[%: oper1,oper2]Modulo 87
[<: oper1,oper2]Less than 87
[>: oper1,oper2]Greater than 87
[=: oper1,oper2]Equal 87
[&:oper1,oper2]Logical And 87
[|:oper1,oper2]Logical Or 87
[D:m,n]Set number of digits to print 88
[J:ml]Justification 88
[P:name,mn{o}]Print result in price format 88
[R:x]Rounding 88

=====================================================================================
Command Overview 9
Print Orientation / Home Position for Commands
It is important to understand print orientation and home position before attempting to use
label format commands. Orientation refers to where the top of the label is found for layout
purposes. Home Position refers to the top-left corner of the label. The figure below shows
the Apollo printer and the Home positions that are possible.
As shown below, the initial Home position is on the leading right edge of the label, the first
edge that exits the printer. As viewed from the front of the printer, this would appear to make
the label orientation upside-down. This is the default position.
As an alternative, the orientation can be “rotated” using the "O", Print Options command,
with the "R", Rotate parameter. After executing this command, the new Home position is on
the trailing edge of the label, the last edge that exits the printer. With this orientation, as
viewed from the front of the printer, the label would appear to be right side up. When the O
command with R parameter is used, it remains in effect only for the current label command
set.
For easier understanding throughout this manual, many examples use the O command with
R parameter to present them with a top to bottom approach, as if viewed from in front of the
printer. The important thing to remember is that all parameters specified are in reference to
the top-left, or Home position of the label. Whether that Home position is on the leading or
trailing edge of the label, does not matter.

=====================================================================================
10 Immediate Commands
;-Comment Line
The ; identifies a comment line. A comment may be placed anywhere within the command
set, on a line by itself. The printer ignores comment lines.
Command Format / Usage:
; comments <CR> Marks this line as a comment
a-Start ASCII Dump
The acommand places the printer in ASCII dump mode. After the command is sent to the
printer, the printer’s LCD panel will display “ASCII Dump Mode.” Any commands or label
formats sent to the printer after this point are printed as the printer receives them, without
interpretation. Pressing the on-line (ONL) button on the printer’s front panel resets the printer
to its normal mode of operation. This mode can also be entered by holding down the form
feed key while powering on the printer.
Command Format / Usage:
a <CR> Set ASCII dump mode on.
c-Direct Cut
The ccommand initiates an immediate cycle of the printer’s cutter. If necessary, the printer
will perform a formfeed to find a label edge, prior to making the cut.
Command Format / Usage:
c <CR> Cuts label immediately.

=====================================================================================
Immediate Commands 11
d-Download Data
The d command accomplishes downloading of data files to the Apollo. Most often, it may be
used to download graphics or additional fonts. The option [SAVE] will download and
simultaneously create a copy on the PCMCIA memory card. There are two methods shown
below for including the data with the command. Method 1 is the most reliable, but may
require editing of the data before download. Method 2 will use whatever data is presented,
but may occasionally misinterpret imbedded ESC-sequences in the data as a command. If
at all possible, use of method 1 is recommended.
Command Formats:
d type; name[SAVE] [B:?value] <CR> ESC.data ESC.(method 1)
d type; name[SAVE] [B:?value] <CR> ESC:data ESC”end-of-data” (method 2)
Where:
d= Download data command.
type = The type of data that will follow, using standard file name extensions:
GIF -Graphic Interchange Format
PCX -Paintbrush format
TIF -TIFF Format© Aldus Corp
IMG -GEM Image format
BMP -Windows bitmap format
SPD -Speedo™ font format
TTF -TrueType font format
MAC -MacPaint format
DBF -dBASE Database
TMP -ASCII Serial file
name = The name to be associated with the downloaded data for later referencing
by other commands.
[SAVE] The option for downloading to the PCMCIA memory card. (See Memory
Card Section for further instructions and examples)
B: ± value =Controls the brightness of dithering on color graphics. Valid up to ± 20. i.e.
B:-10 makes the picture 10 steps darker.

=====================================================================================
12 Immediate Commands
d-Download Data
ESC.data ESC. =Method 1 for delineating data. Data is in binary format, enclosed with
ESC. (escape dot, which is an ASCII character 27, followed by ASCII
character 46) at the start and end. For this method to work, any single
ESC characters found in the data must be replaced by double escapes,
ESCESC, prior to download. Other ESC commands for the Apollo will
continue to work during this transmission. (See Appendix B for example of
graphic download program with filter statements to replace ESC with
ESCESC automatically).
Example: d PCX;logoname <CR> ESC. binary data ESC.
ESC:data ESC”end-of-data” = Method 2 for delineating data. Data is in binary format,
preceded by ESC: (escape colon, which is ASCII character 27, followed by
ASCII character 58) and followed by ESC”end-of-data”(escape "end-of-
data", which is ASCII character 27, followed by ASCII text string “end-of-
data"). There may be ESC sequences present in the data, but there must
not be any ESC”end-of-data” imbedded in the data stream, as this marks
the end of the data stream. Note: This method will not work on a RS485
network.
Example: d PCX;logoname<CR> ESC:data ESC"end-of-data"

=====================================================================================
Immediate Commands 13
e-Erase Data
The e command will erase various types of data, for example fonts and graphics, from the
printer’s memory. The ecommand does not erase data from the PCMCIA memory card.
See the M -Memory Card Access to delete files from the memory card.
Command Format:
e type; name <CR>
Where:
e= Erase data command.
type =The type of data being removed, equivalent to standard file name
extensions: GIF, PCX, TIF, IMG, BMP, SPD, TTF, MAC, FNT.
name= The name attached to the font or graphic when it was sent to the printer. A
“*” may be used as the name to delete all files of the same type.
Example:
e PCX;*<CR> Erases all PCX graphics currently in the
printer’s memory
f-Formfeed
The f command feeds one label until the top-of-form is under the printhead. This command
has the same effect as pressing the “FF” form-feed button on the front panel.
Command Format / Usage:
f<CR> Causes an immediate formfeed.

=====================================================================================
14 Immediate Commands
l-Change Language/Country
The lcommand changes the language and country settings. Country affects the date
formats and currency. Using the l command does not affect the language displayed on the
LCD panel of the printer. To change the language of the printer’s front panel prompts, you
must select the ‘Country’ option in the printer’s setup.
Command Format:
l name <CR>
Where:
l= Change language/countrycommand.
name = The DOS short keyboard code for the countryfrom the following:
BE -Belgium, French
CZ -Czech Republic
DK -Denmark
FR -France
GR -Germany
UK -Great Britain
IT -Italy
SP -Spain
SU -Suomi (Finland)
SF -Switzerland, French
SG -Switzerland, German
US -United States
Example:
l SP <CR> Changes printer language/countryto Spain. If the date is Tuesday February
11, 1997 and the Language is set to Spain, then Martes Febrero 11, 1997 will print on the
label. See the Special Content Fields Section for more on printing dates.
Table of contents
Other Tharo Systems Printer manuals

Tharo Systems
Tharo Systems Gemini User manual

Tharo Systems
Tharo Systems H-400 Series User manual

Tharo Systems
Tharo Systems T-4210 Operating instructions

Tharo Systems
Tharo Systems H-427 Quick start guide

Tharo Systems
Tharo Systems Gemini 2 User manual

Tharo Systems
Tharo Systems H-426 User manual

Tharo Systems
Tharo Systems V-Series User manual