Brady TLS PC Link Guide



Copyright
This manual is copyrighted with all rights reserved. No portion of this manual may be copied or reproduced by any means without the prior written consent of Brady Worldwide, Inc.
While every precaution has been taken in the preparation of this document, Brady assumes no liability to any party for any loss or damage caused by errors or omissions or by statements resulting from negligence, accident, or any other cause. Brady further assumes no liability arising out of the application or use of any product or system described, herein; nor any liability for incidental or consequential damages arising from the use of this document. Brady disclaims all warranties of merchantability of fitness for a particular purpose.
Trademarks
TM
TLS PC Link
is a trademark of Brady Worldwide, Inc. DPL (Datamax Programming Language) is a trademark of Datamax Corp. Brady reserves the right to make changes without further notice to any product or
system described herein to improve reliability, function, or design. © 2001 Brady Worldwide, Inc. All Rights Reserved
Revision 0 Firmware Version 1.0
Brady Worldwide, Inc. 6555 West Good Hope Road P.O. Box 2131 Milwaukee, WI 53201
Main Switchboard: (800) 541-1686
(414) 358-6600 FAX: (800) 292-2289 Sales/Customer Support: (800) 537- 8791
TLS PC LinkTM Programmer’s Guide
I
Table of Contents
Introduction................................................................................................................. 1
Scope....................................................................................................................... 1
Programming Overview.............................................................................................. 2
Basic print language overview ................................................................................ 2
Control Codes.......................................................................................................... 3
Power up Conditions ............................................................................................... 3
Generating and Printing a Label With the TLS PC Link Programming Language.4
Determining Printer Status......................................................................................5
COM Port Settings...................................................................................................... 6
Immediate Commands <SOH>................................................................................... 7
Summary of Immediate Commands........................................................................ 7
Reset (SOH #) ......................................................................................................... 7
Send ASCII Status String (SOH A)......................................................................... 8
Toggle Pause (SOH B)............................................................................................ 9
Cancel (SOH C)..................................................................................................... 10
Disable SOH (SOH D) .......................................................................................... 10
Send Batch Quantity (SOH E)............................................................................... 10
System-Level Commands <STX> ............................................................................ 11
Summary of System Level Commands ................................................................. 11
Disable Feedback Characters (STX A) ................................................................. 12
Enable Feedback Characters (STX a).................................................................... 12
Enter Heat Setting Offset (STX b) ........................................................................ 13
Disable Feeding to Cut Position after Print (STX C) ............................................ 13
Enable Feeding to Cut Position after Print and Perform a Feed to Cut (STX c)...14
Set Quantity for Stored Label (STX E).................................................................14
Form Feed (STX F)............................................................................................... 15
Set Form Stop Position (STX f) ............................................................................ 15
Print Last Label Format (STX G).......................................................................... 16
Enable SOH Commands (STX H)......................................................................... 16
Input Image Data (STX I)...................................................................................... 17
Extended System Commands (STX K)................................................................. 18
Enter Label Formatting Command (STX L) ......................................................... 18
Set Printer to Metric (STX m)............................................................................... 18
Set Printer to Inches (STX n) ................................................................................ 19
Set Start of Print Offset (STX O)..........................................................................19
Horizontal Alignment Offset (STX o)................................................................... 20
Set Continuous Label Length (STX P).................................................................. 20
Clear All Memory (STX Q) .................................................................................. 21
Set Continuous Label Spacing (STX S)................................................................ 21
Printhead Dot Pattern Test Label (STX T)............................................................ 22
Send Binary Touch Cell Data (STX t)................................................................... 22
II
TLS PC LinkTM Programmer’s Guide
Label Format Field Replacement (STX U) ........................................................... 24
Send ASCII Touch Cell Data (STX V).................................................................25
Printer’s Firmware Version Information (STX v)................................................. 25
Request Memory Information (STX W) ............................................................... 25
Delete File (STX x)............................................................................................... 26
Pack Memory (STX z) .......................................................................................... 27
Extended-System Commands <STX>K.................................................................... 28
Label-Formatting Commands ................................................................................... 29
Set Format Attribute (A) ....................................................................................... 30
Set Column Offset Amount (C)............................................................................. 31
Terminate Label Formatting Mode and Print Label (E)........................................ 31
Set Row Offset Amount (R).................................................................................. 31
Terminate Label-Formatting Mode (X)................................................................. 32
+ (-) Make Last Field Entered Increment (Decrement) Numeric..........................33
> (<) Make Last Field Entered Increment (Decrement) AlphaNumeric................ 34
Set Count By Amount (^)...................................................................................... 35
Generating Label Formats.........................................................................................36
The structure of a record........................................................................................ 37
Examples of a Label Format:....................................................................................38
Example 1 (1.5” x 1.5” Label, PTL-32):............................................................... 38
Example 2 (1.9” x 4.0” Label, PTL-38):............................................................... 40
Example 3 (0.24” continuous terminal block material, PTLTB-400-240):........... 42
Troubleshooting ........................................................................................................ 44
Common Problems and Corrective Action............................................................ 44
Appendix A: Feedback Characters............................................................................ 47
Appendix B: Image File Definitions.........................................................................48
Image Type U:....................................................................................................... 48
Record Types:........................................................................................................ 48
Data Format...........................................................................................................49
Appendix C: ASCII Control Chart............................................................................ 51
ASCII Control Chart ............................................................................................. 51
Appendix D: List of Commands ............................................................................... 53
Appendix E: Fonts .................................................................................................... 55
TLS PC Link
TM
Printer Fonts................................................................................55
Font Symbol Set.................................................................................................... 57
Appendix F: Barcodes Summary .............................................................................. 58
Appendix G: Mini-DIN 6-Pin to 9-Pin Cable Pinouts .............................................. 59
TLS PC LinkTM Programmer’s Guide
III
Introduction
Scope
The TLS PC LinkTM Programmer’s Guide is intended for technical personnel who have basic programming knowledge and intend to create their own programs to send controls down to the printer for printing labels (design their own label­creation software). A programming language allows the printer to be integrated with a piece of equipment such as a portable data terminal (PDT), scanner, wire tester, electrical meter, or medical device. Operators without programming experience may prefer to use a label-creation software package such as LabelMark detailed information on the Brady Programming Language (based off of the Datamax programming Language (DPL)), specifically regarding the writing, loading, and storing of programs for the control and production of label formats (designs) using the TLS PC Link Printer. The Brady Programming Language (BPL) provides a built-in communication language with every printer.
Note: The TLS PC Link Printer is referred to as “the printer” in this programmer’s guide.
Be sure to check the Brady web site www.tls2200.com for the latest updates.
TM
(included with every printer) or CODESOFTTM. This guide offers
TLS PC LinkTM Programmer’s Guide
1
Programming Overview
Basic print language overview
The TLS PC Link Printer control language is based on Datamax DPL, revision D2.
The print language can be implemented as completely 7-bit ASCII characters. The ASCII table is shown in Appendix C: ASCII Control Chart. All commands and responses are sent as printable ASCII characters with a few exceptions:
1. Some control codes (non-printable ASCII characters) are sent to inform the
printer that a command is to be received or terminated. Refer to table of Control Codes on page 3.
2. 8-bit binary image files can be sent. These include BMP and PCX files.
Also, there is special download format based on Datamax’s image load file and Windows’ print drivers. This file can be sent as an 8-bit binary file or a 7-bit ASCII hex file.
3. International characters and symbols are sent as extended-ASCII or 8-bit
characters.
Throughout the examples in the book, all characters are ASCII unless otherwise noted. Control characters are shown by their symbol in brackets. For example, the SOH control character is shown as <SOH>. The brackets are not symbols to be sent. Only the decimal value of 1 is sent. All hex values are shown with a preceding 0x. For example, 3D hex is shown as 0x3D. Whenever a value is sent as ASCII Hex, this means the hex value is sent as two ASCII characters. For example, 0x3D sent as ASCII Hex will send two ASCII characters ‘3’ and ‘D’.
Command Types
There are three main command types used to create labels and control the printer. These are:
Command Type Description
Immediate Commands Interrupts the printer to perform a
particular action. The printer then resumes normal operations.
System-Level Commands Performed in the sequence that they are
received and generally control the printer’s hardware. In addition, system­level commands allow memory
2
TLS PC LinkTM Programmer’s Guide
Command Type Description
configuration and image downloading.
Label-Formatting Commands Used to control the position of text and
images. The label format termination commands can selectively store and print the label and end the formatting process.
Control Codes
Control codes are used to inform the printer that a command is to be received or terminated. The control codes used are:
ASCII Char
SOH 1 0x01 ^A Start of Immediate
STX 2 0x02 ^B Start of System
CR 13 0x0D ^M Termination of many
Decimal Value
HEX Value
Printer Dump
Control Code for
Commands
Commands
commands
Power up Conditions
On power up, the unit is in the following modes:
! System Level Commands are accepted ! Immediate Commands are turned off ! Feedback Characters are turned off
The unit will never accept System Level Commands and Label Formatting Commands at the same time. When Label Formatting mode is entered, System Level Commands are disabled. After Label Formatting Mode is exited, System Level Commands can be received again.
Immediate Commands can be turned on and off. When turned on, they can be received in both Label Formatting Mode and System Level Mode. They are turned off with an Immediate Command, but turned back on with a System Level command.
Feedback Characters can be turned on and off with System Level Commands. When turned on, all System Level and Label Formatting Commands will reply
TLS PC LinkTM Programmer’s Guide
3
with a feedback character denoting success or an error. Feedback characters are defined in Appendix A. Each command lists the possible feedback characters. Immediate Commands never send these feedback characters. They will send a response if the Immediate Command requires one, such as Read Status String.
Generating and Printing a Label With the TLS PC Link Programming Language
The printer is capable of storing only one label format at a time. A label format specifies what is to be placed on the label. It specifies the text, fonts, barcodes, or image files to use. Some barcodes and fonts are resident in the printer. Fonts and barcodes that are not resident in the printer can only be printed by downloading a bitmap image file of the desired label or portion of the label containing these fonts and barcodes.
It is possible to store multiple image files in the unit. These image files will be lost if the unit is powered down. These files are stored with an 8 character name. When a label format is created, it can contain any number of images. These are specified in the label format by the image file name. The actual image file is not part of the label format. Therefore, an image only needs to be downloaded once, but can be used in multiple label formats.
The basic procedure to create and print a label follows:
1. Power up printer.
2. Enable feedback characters if they are to be used.
3. Download any image files.
4. Enter Label Formatting Mode.
5. Enter all label fields. Each field contains the following:
field type: text, barcode, or image font size or barcode type location within label to place the object the text or file name of the object
6. Exit Label Formatting Mode.
7. Set print quantity.
8. Print label. Each time label formatting mode is entered, it clears out the previous label
format. Therefore, Label Formatting Mode cannot be entered and exited multiple times while creating the same label. The whole label must be created in one entry.
4
TLS PC LinkTM Programmer’s Guide
Determining Printer Status
There are two methods to determine the printer status:
! Feedback Characters ! Immediate Command to Request Status
If feedback characters are used, a response is given after each System Level or Label Formatting Command is completed. If an error occurs on a command, it is known immediately by the response. When a print command is sent, a print complete character is sent by the printer when the print is done. If an error occurred during the print such as being out of labels, the feedback character contains this error.
If feedback characters are not used, the status can be determined by requesting it with an Immediate Command. After a print command is sent, the printer can be queried with a Send ASCII Status String Command. This command will tell if the printer is busy printing or if an error has occurred. If using this method, it is important to have immediate commands enabled. They must be enabled before a print command is sent, or they will not be enabled until after the print job is complete.
TLS PC LinkTM Programmer’s Guide
5
COM Port Settings
In order to establish communication between the TLS PC Link printer and your PC, you must have the correct COM port settings:
Setting Value
BPS 9600 Data Bits 8 Parity None Stop Bits 1 Flow Control Hardware
6
TLS PC LinkTM Programmer’s Guide
Immediate Commands <SOH>
When the printer receives an immediate command it will stop whatever it is doing and perform that command. After the command is complete, the printer will resume the operation it interrupted. Immediate commands are turned off on power up, and can be turned on with the System-Level Command “Enable SOH Commands (STX H)”. When Immediate Commands are enabled, they may be issued at any time. Because of this, it is necessary to disable immediate commands whenever sending image files that contain 8-bit data. The image data in these files may contain an immediate command start code that will be misinterpreted. These can be disabled using immediate command <SOH> D. Immediate commands consist of:
1. Attention Character
2. Command Character
3. Parameters (if any)
Summary of Immediate Commands
The following immediate commands are discussed in this section. Refer to the page number listed to the right of each command for more information and a sample command.
Immediate Command Page
Reset (SOH #) 7 Send ASCII Status String (SOH A) 8 Toggle Pause (SOH B) 9 Cancel (SOH C) 10 Disable SOH (SOH D) 10 Send Batch Quantity (SOH E) 10
Reset (SOH #)
This command resets the printer. Resetting the printer returns all settings to default and clears both the input and print buffers. The command also clears the internal RAM memory.
Sample:
<SOH>#
The printer will now reset.
TLS PC LinkTM Programmer’s Guide
7
Printer Response: Version 01.01 12/21/00<CR> The printer always sends out the Version on power up.
Send ASCII Status String (SOH A)
This command allows the host computer to check the printer for its current status. The printer returns a string of eight characters to the host computer, followed by a carriage return. Each character is either Y or N indicating whether the associated condition is true or false (Y = true). Byte 1 is the first character transmitted by the printer.
Error statuses relating to printer hardware conditions are only updated when performing a print or feed command. For example, this command does not test to see if the printhead is open, it only tests if it was open on the last print or feed command.
Sample:
<SOH>A
Printer Response: abcdefgh<CR>
Byte Character Y/N Condition
1 a = Y/N Y = Printhead open 2 b = Y/N Y = Out of Labels 3 c = Y/N Y = Out of Ribbon 4 d = Y/N Y = Printing Batch 5 e = Y/N Y = Busy Printing 6 f = Y/N Y = Printer Paused 7 g = Y/N Y = Touch Cell Error 8 h = Y/N Y = Low Battery
8
TLS PC LinkTM Programmer’s Guide
Toggle Pause (SOH B)
This command toggles the printer’s paused state between on and off. Sample:
<SOH>B
This command will illuminate the pause/stop light and suspend printing. Printing will not be suspended in the middle of a label. If a label is being printed, the printer will finish the label and then pause.
Printing will resume when the SOH B command is sent to the printer again.
TLS PC LinkTM Programmer’s Guide
9
Cancel (SOH C)
The stop/cancel function will immediately stop the printer and cancel the current print job. If currently in the middle of printing a label, it will stop printing and feed the label to the cut position.
Sample:
<SOH>C
Disable SOH (SOH D)
This command causes the printer to ignore immediate commands (^A). The SOH shutdown command must be sent before loading graphic images that are sent using 8-bit data. These image files may contain data sequences that could be interpreted as an immediate command.
Sample:
<SOH>D
After the SOH shutdown command is sent, immediate commands can be turned back on by sending the system command <STX> H or by resetting the printer. If feedback characters are enabled, a code will be sent back to the host when the SOH commands are enabled. If feedback characters are not used, it is good practice to check batch quantities <SOH>E to verify that the SOH commands are working. This test should not occur in label formatting mode. If it is sent during label formatting mode, and SOH commands are not yet enabled, this command will be misinterpreted.
Send Batch Quantity (SOH E)
This command causes the printer to send back a 4-digit number indicating the quantity of labels left to print in the current batch, followed by a carriage return. Communications latency may cause this value to be higher than actual on some printers.
Sample:
<SOH>E
Printer Response: 0000<CR>
10
TLS PC LinkTM Programmer’s Guide
System-Level Commands <STX>
The most commonly used commands are the system-level commands. These commands are used to load and store graphic information and to control the printer. System-level commands may be used before or after immediate commands but cannot be issued among label-formatting commands. System-level commands can be used to override default parameter values. System commands consist of:
1. Attention Character
2. Command Character
3. Parameters (if any).
Summary of System Level Commands
The following system level commands are discussed in this section. Refer to the page number listed to the right of each command for more information and a sample command.
System Level Command Page
Disable Feedback Characters (STX A) 12 Enable Feedback Characters (STX a) 12 Enter Heat Setting Offset (STX b) 13 Disable Feeding to Cut Position after Print (STX C) 13 Enable Feeding to Cut Position after Print and
Perform a Feed to Cut (STX c) Set Quantity for Stored Label (STX E) 14
Form Feed (STX F) 15 Set Form Stop Position (STX f) 15 Print Last Label Format (STX G) 16 Enable SOH Commands (STX H) 16 Input Image Data (STX I) 17 Extended System Commands (STX K) 18 Enter Label Formatting Command (STX L) 18 Set Printer to Metric (STX m) 18
TLS PC LinkTM Programmer’s Guide
14
11
System Level Command Page
Set Printer to Inches (STX n) 19 Set Start of Print Offset (STX O) 19 Horizontal Alignment Offset (STX o) 20 Clear All Memory (STX Q) 20 Printhead Dot Pattern Test Label (STX T) 21 Send Binary Touch Cell Data (STX t) 22 Label Format Field Replacement (STX U) 24 Send ASCII Touch Cell Data (STX V) 25 Printer’s Firmware Version Information (STX v) 25 Request Memory Information (STX W) 25 Delete File (STX x) 26 Pack Memory (STX z) 26
Disable Feedback Characters (STX A)
This command disables the feedback ASCII characters. Sample:
<STX>A
No feedback response
Enable Feedback Characters (STX a)
This command enables the feedback ASCII characters. These feedback characters contain valuable information about system errors, printing completion, and enabling of immediate commands. These characters are listed in Appendix A. The printer is initialized with feedback characters turned off. When feedback characters are enabled, all commands will have a response associated with them. When there are no errors, the response will be ‘0’. There is no response to the <STX> a command.
Sample:
<STX>a
No feedback response
12
TLS PC LinkTM Programmer’s Guide
Enter Heat Setting Offset (STX b)
This command changes the "on time" of dots on the printhead. The printer powers up with a default setting determined from the media type installed. Varying this number changes the amount of time the dots are "turned on" which in turn changes the amount of heat transferred from the printhead to the media. The range of valid settings is -5 to +5 that corresponds to an offset of +/- 500 microseconds. This command is helpful when the printer is used with several different media types. When a label format is sent to the printer and the media requires more or less heat than the amount set by the default temperature, the host device can send a command before or after the format to correct the heat setting for the media being used.
<STX>bsnn
Where:
s ‘+’ or ‘-’ sign, can be either for setting of 0 nn two digit heat offset value (00-05)
Sample:
<STX>b+05
The above sample sets the printer for a heat value of +5. Feedback possibilities: 0,1,2
Disable Feeding to Cut Position after Print (STX C)
This command will stop the printer from feeding to the cut position after printing. This command should only be used in conjunction with STX c. This is used to send multiple print commands without feeding to the cut position after each print. The STX c command is sent at the end to feed to the cut position and re-enable feeding to the cut position for all future print commands.
<STX>C
Feedback possibilities (only sent if feedback characters are turned on): 0,1, or 2
TLS PC LinkTM Programmer’s Guide
13
Enable Feeding to Cut Position after Print and Perform a Feed to Cut (STX c)
This command will feed the printer to the cut position. It will also enable feeding to the cut position after all future print commands. It is to be used in conjunction with STX C.
<STX>c
Feedback possibilities (only sent if feedback characters are turned on): 1,2,6,7,8,A,B,E,F,J
Set Quantity for Stored Label (STX E)
This command sets the number of labels to print for the label format currently stored in the print buffer. The most recent label sent to the printer will automatically remain stored in the buffer until the printer is reset, turned off, or a batch is canceled. This command is also used in conjunction with the STX G command, which will print the labels.
<STX>Ennnn
Where:
nnnn- a four-digit quantity, including leading zeros
Sample:
<STX>E0025 <STX>G
The above sample will print 25 labels of the current label format in memory. Feedback possibilities: 0,1,2
14
TLS PC LinkTM Programmer’s Guide
Form Feed (STX F)
This command feeds one label to the top of form. Sample:
<STX>F
Feedback possibilities: 0,1,2,6,7,8,A,B,E,F
Set Form Stop Position (STX f)
This command is used to adjust the cutter stop position. When a label is printed, the printer will feed the label to the cut position. This command adjusts the stop position to allow for desired cutting alignment. When the next label format is sent to the printer, it will automatically backfeed to the start-of-print position. If a quantity of more than one label is to be printed (See Set Quantity for Stored Label (STX E), the printer will operate without feeding to the cut position between labels. It will feed to the cut position after the last label.
<STX>fsnn
Where:
s- sign of offset, ‘+’ or ‘-’
nn- two digit value of offset The valid range is -08 to +08. Sample:
<STX>f+08
The above sample adjusts the stop position 8 pixels from default. The ‘+’ means that the paper will feed out 8 pixels further.
Feedback possibilities: 0,1,2,6,7,8,A,B,E,F
TLS PC LinkTM Programmer’s Guide
15
Loading...
+ 44 hidden pages