DTPL Programmer’s Manual
Information in this manual is subject to change without notice and does not represent a commitment on the part of Datamax-O’Neil Corporation. 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 personal use, without the expressed written permission of Datamax-O’Neil Corporation.
Contents Introduction 1.0 1.1 1.2 1.3 1.4 Manual Overview ............................................................................................................. 1 Ticket Orientation............................................................................................................. 1 Inverted Characters ......................................................................................................... 1 Bar Codes..........................................................................
ii
Introduction 1.0 Manual Overview This manual is designed for users who wish to create their own label production software. Operators without programming experience may prefer to use a label-creation software package. This manual explains in detail the Datamax-O’Neil Ticket Programming Language (DTPL), how to write programs that will enable Datamax-O’Neil Ticket printers to create ticket formats (designs), and allow the user to control the operation of the printer.
1.3 Bar Codes The following highlights some key points on printing barcodes: All available barcodes (Code 39, Interleaved 2of5, EAN13, EAN8, UPC, USS-Codabar, and Code 128, can be printed via command codes. Barcodes can be printed in either ladder or picket fence orientations. Ladder bar codes can be printed top to bottom (RR) or bottom to top (RL). Picket fence bar codes can be printed left to right (NR) or right to left (RU).
DTPL Command Sequences 2.0 Introduction The printer can accept a wide variety of commands to control the printing of data. A command sequence performs a unique function and many different sequences can be sent for each string to be printed. A command is distinguished from text by the < > characters. Any data sent between these markers is interpreted as command data. The field data (to be printed on the ticket) is sent with no markers. Every command sequence must be bracketed with the < > characters, (ex.
Font Size Command Graphics Command byte1,byte2,byte3,byte4,byte5,b yte6,byte7 or byte1,byte2...byte# Height/Width Command Multiplies the normal character height by x=Width and y=Height Printing Length Command Changes the normal printing length to a user defined unit length. Each unit equals .0098” or 2 dots Permanent Printing Length Command Changes the normal printing length to a user defined unit length. Each unit equals .
DTPL Status Commands 3.0 Introduction The status-enabled function must be set to activate these commands. Command ASCII Status Format or Description This command should be used when the host can not handle non-ASCII characters. All status information, including the xon/xoff, will have 30h added to them to convert them to an ASCII value. Clear Permanent Status Commands Delayed Status Request This command clears all permanent status commands from the Flash memory.
Command No Status Format or Description Disables the transmission of all status information, except for x-on/off information. Parking Ticket Command or Reverses the ticket to the print position after the last ticket in a group has been printed. Partial ASCII Status or All status information, except for a valid xon/xoff, will have 30h added to them to convert them to an ASCII value.
DTPL File Commands 4.0 Introduction The printer supports three modes of file storage: Resident: Files are stored in EPROM memory by the printer. Permanent: Files are stored in Flash memory by the user. Temporary: Files are stored in RAM. All files downloaded to the printer are initially stored as permanent files.
DTPL Programmer’s Manual 8
DTPL Print Commands 5.0 Introduction The following table lists the printer’s various print commands. Command Print / Cut Ticket
Format Description The printer will cut the ticket after printing if it has a cutter. Print / No Cut Ticket The printer will not cut the ticket after printing even if it has a cutter. Print Ticket And Eject The printer will eject the ticket after the ticket is cut.
DTPL Programmer’s Manual 10
DTPL Special Commands 6.0 Introduction The following commands are to be transmitted independently (without the < or > characters). Command Normal Print / Cut Command Print / No Cut Format Description 0CH (FF) Prints and cuts the ticket. 1DH Causes the printer to print a ticket without cutting. Load Downloadable Logo ESC(BYTE1 BYTE#)(BYTES)...ESC Allows the user to store up to 128K bytes of logos in the Printer's memory.
DTPL Programmer’s Manual 12
DTPL Downloading Commands 7.0 Downloading Commands Logos can originate in one of two manners. They can be permanently stored in the printer's memory before leaving the factory ( command) or the customer can download them directly ( command). If the printer is in permanent file mode then all logos downloaded by the user will be automatically stored in Flash. They will still be available even after the printer is turned off.
The above routine should be repeated for each line of logo data. For the remaining lines, a CR should be used in place of the row/column command if the data is to start at the beginning of the next line. If you use carriage returns, the logo can be expanded simply by using the command. Each carriage return will move the next line down 8 dots. If you use row/column commands to position each line of logo data, you can't expand the logo.
DTPL TEXT LOGO (MACRO) SUPPLEMENT The printer can store a string of DTPL commands (a macro) in memory as if they were a downloaded logo image. These commands could then be used later on to print a ticket by using a print logo command. However, instead of printing a logo image it will print a ticket according to the DTPL commands previously sent. This is a handy feature when most of the tickets have the same format and only a few lines are different.
DTPL Programmer’s Manual 16
Barcodes 8.0 Barcodes UPC UPC (version A) is a numeric only code which contains a left hand border character, 6 left hand characters, a center character, 6 right hand characters and a right border character. The letter U is used to select UPC bar code.
A typical ladder orientation bar code with interpretation and a default width of 4 would be sent as follows. ":123456:" An expanded (doubled) version of the above bar code would be as follows: ":123456:" A 3:1 ratio of the above expanded (doubled) version would be as follows: ":123456:" EAN13 EAN13 is a numeric only bar code.
USS-CODABAR USS-CODABAR is a numeric bar code with 6 special characters (-$:/.+) and 4 start/stop characters (A,B,C,D). A start and stop character must bracket the data sent. The letter C is used to select USS-CODABAR bar code.
DTPL Programmer’s Manual 20
Appendix A ASCII Control Chart Ctrl @ Ctrl A Ctrl B Ctrl C Ctrl D Ctrl E Ctrl F Ctrl G Ctrl H Ctrl I Ctrl J Ctrl K Ctrl L Ctrl M Ctrl N Ctrl O Ctrl P Ctrl Q Ctrl R Ctrl S Ctrl T Ctrl U Ctrl V Ctrl W Ctrl X Ctrl Y Ctrl Z Ctrl [ Ctrl \ Ctrl ] Ctrl ^ Ctrl _ Char NUL SOH STX EXT EOT ENQ ACK BEL BS HT LF VT FF CR SO SI DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US Dec 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Hex 00 01 02 03 04 05 06 07 08 09 0A 0B 0C
ASCII Control Chart Char Dec Hex (concluded) Char Dec Hex Char Dec Hex Char Dec Hex Ç 128 80 á 160 A0 192 C0 Ó 224 E0 ü 129 81 í 161 A1 193 C1 ß 225 E1 é 130 82 ó 162 A2 194 C2 Ô 226 E2 â 131 83 ú 163 A3 195 C3 Ò 227 E3 ä 132 84 ñ 164 A4 196 C4 õ 228 E4 à 133 85 Ñ 165 A5 197 C5 Õ 229 E5 å 134 86 ª 166 A6 ã 198 C6 µ 230 E6 Ã ç 135 87 ° 167 A7 ê 136 88 ¿ 168 A8 ® ë 137 89 è 138 8A ï 139 8B 1/2 199