Page 2
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.
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 ..................
Page 4
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..............
(included with every printer) or CODESOFT . This guide offers 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.
Programming Overview Basic print language overview The TLS PC Link Printer control language is based on Datamax DPL, revision 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.
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.
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.
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.
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 9600 Data Bits Parity None Stop Bits Flow Control Hardware TLS PC Link 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)”.
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.
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.
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).
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 Level Command Page Set Printer to Inches (STX n) Set Start of Print Offset (STX O) Horizontal Alignment Offset (STX o) Clear All Memory (STX Q) Printhead Dot Pattern Test Label (STX T) Send Binary Touch Cell Data (STX t) Label Format Field Replacement (STX U) Send ASCII Touch Cell Data (STX V) Printer’s Firmware Version Information (STX v)
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.
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.
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.
Print Last Label Format (STX G) This command prints a previously formatted label. This command is used when there is a label format in the buffer. The STX E command is used to enter the quantity. (If the STX E command is not used only one label will print.) Sample: <STX>G Feedback possibilities: 1,2,6,7,8,A,B,C,D,E,F,G,H...
Input Image Data (STX I) This command precedes the download of image data from the host to the printer. The data that immediately follows the command string will be image data. If Immediate Commands have been enabled and if any of the 8-bit input formats are to be used, it is necessary to disable the immediate level command interpreter by executing a SOH D command before issuing this command.
Sample: <SOH>D <STX> IBpTest <CR> data...data <STX>H The above sample instructs the printer to receive an 8-bit .PCX image sent by 8- bit data, named ‘Test’. It disables immediate commands first, then re-enables them after. Feedback possibilities: 0,1,2,3,4 Extended System Commands (STX K) This command allows for expansion of the DPL-system commands.
Set Printer to Inches (STX n) This command sets the printer to interpret measurements in inches in terms of in./100, (e.g., <STX>M0500 will be interpreted as 5.00in.). See STX m. Sample: <STX>n Default setting: Inches Feedback possibilities: 0,1,2 Set Start of Print Offset (STX O) This command sets the point where printing starts, relative to the top-of-form position.
Horizontal Alignment Offset (STX o) This command sets the point where printing starts relative to the left edge of the label. This is an offset value from the default position. <STX>osnn Where: sign of offset, ‘+’ or ‘-’ two digit value of offset The valid range is -05 to +99.
This sample creates a label format with “TEST1” placed at the upper left corner of the label, and “TEST2” placed 1” below this. The first <STX>P sets the paper length to 1”. Thus, the following <STX>G will print this label only 1” long and only “TEST1”...
<STX>G This example will print 3 serialized labels: “TEST01”, “TEST02”, and “TEST03”. The label length is 0.5” and the spacing between labels is set to zero. Feedback Possibilities: 0,1,2 Printhead Dot Pattern Test Label (STX T) This command instructs the printer to print a dot pattern test label. To view the full test pattern use the media as wide as the print width and at least 1.5-in.
Page 28
the following: Byte 2,3: 0x0078 means there are 0x78 or 120 labels remaining. Byte 6: 0x1B has bit 0 equal to ‘1’, therefore this is notched material Byte 7,8: 0x0000 means there is no X offset Byte 9,10: 0x0000 means there is no Y offset Byte 11,12: 0x012B means this label is 0x12B or 299 pixels wide Byte 13,14: 0x012B means this label is 0x12B or 299 pixels long Feedback Possibilities: 0,1,2,E...
Label Format Field Replacement (STX U) This command places new label data into format fields. Format fields are used to build a label. The new data string must equal the original string length and contain valid data. To easily keep track of fields put all of the fields to be updated with the command at the beginning of the label format.
Send ASCII Touch Cell Data (STX V) This command causes the printer to send back the touch cell data from the media in a user-readable 7-bit ASCII Hex format. For interpretation of this data, see <STX>t. Sample: <STX>V Response: 01007800001B00000000012B012B11C63200020001010000029400000000 00F1 This sample reads the same data as the sample in <STX>t.
LOGO2<CR> MEM 8C30<CR> This shows that there are two images stored called “LOGO1” and “LOGO2”. The remaining memory is in hex. There are 0x8C30 bytes remaining (35,888 decimal). Notes on Image Storage: Image Files are not stored directly. Excess header information is removed. Following are typical storage sizes for each file type: File Type B,b: BMP Files are stored with a reduced header size.
Pack Memory (STX z) This command causes the printer to reclaim all storage space associated with all deleted files. Sample: <STX>z Feedback possibilities: 0,1,2 TLS PC Link Programmer’s Guide...
Label-Formatting Commands An <STX>L command switches the printer from the system level to the label- formatting command processor. All commands after <STX>L are interpreted as label-formatting commands. These commands define the format of the label to be printed. Label Formatting Command Page Sets format attribute (A) Sets column offset amount (C)
Set Format Attribute (A) This command specifies the type of format operation and remains in effect until another format command is specified or another label format has begun (<STX>L). Each label format defaults to attribute 1 - XOR. Where: is either a 1, 2, 3 or 5 1 = XOR Mode: This is the default mode regions, where text strings, images, or barcodes intersect will not...
Set Column Offset Amount (C) This command allows horizontal adjustment of the point where printing begins. This is a left margin The ‘C’ command instructs the printer to print label formats nnnn units to the right of the position that the format specifies. Cnnnn Where: nnnn-...
nnnn increments above the position the format specifies. Valid input values are numbers between 0000 and 9999, (refer to the C, Set Column Offset Amount Command.) Rnnnn Where: nnnn = is a four-digit offset 0000-9999, in/100 or mm/10 Sample: <STX>L R0037<CR>...
+ (-) Make Last Field Entered Increment (Decrement) Numeric The printer is capable of automatically incrementing and decrementing fields on each label of a batch printed. This command is useful for serializing labels. The command format is *pii Where: Is + for numeric increment, or - for numeric decrement Is the fill character that is displayed for zeros on the left ii - Is the amount to increment the field by from 01 to 99...
> (<) Make Last Field Entered Increment (Decrement) AlphaNumeric The printer is capable of automatically incrementing and decrementing fields on each label of a batch printed. This command will increment or decrement an alphanumeric field. This command is useful for serializing labels. The command format is *pii Where:...
Set Count By Amount (^) An application using incrementing or deincrementing fields (+, -, >, <) will occasionally require that more than one label be printed with the same values before the field data is updated. This situation is handled with the ^nn command. All printers default to 1.
Generating Label Formats Example 1 Example 2 A label format is all the data, in the form of records, that lies between an <STX>L and either a terminating E<cr> or X<cr>. Other system level commands may procede the <STX>L command for printer setup. A record is a data string that contains the information to be printed on the labels.
The structure of a record The 15-byte header portion of a record is composed as follows: a b c d eee ffff gggg ffff gggg 1 = 0° 2 = 90° 3 = 180° 4 = 270° where: = rotation* *Rotation is only supported for fonts and barcodes.
Example 1 (1.5” x 1.5” Label, PTL-32): Note: The bitmaps shown are not supplied. For reference to insert your own bitmaps, the brady.bmp file is 168 pixels x 142 pixels. The logo.bmp bitmap is 139 pixels x 124 pixels. STX>Q ;clear image memory...
Page 44
Method 1 (New label format): <STX>L ;enter label format mode 1Y0000000250000brady<CR> ;specify brady image at X=0.00”,Y=0.25” 1Y0000000100082logo<CR> ;specify logo image at X=0.82”,Y=0.10” 190000600700005PART NUMBER:<CR> ;specify text at X=0.05”,Y=0.70” 190000600950005DESCRIPTION:<CR> ;specify text at X=0.05”,Y=0.95” 190000601200005QUANTITY:<CR> ;specify text at X=0.05”,Y=1.20” 190000600700100 56789 <CR>...
Example 2 (1.9” x 4.0” Label, PTL-38): <STX>n ;put printer in inches mode <STX>L ;enter label format mode 490000803000030Sample Rotated Label<CR> ;specify text at X=0.30”,Y=3.00” 490000603500090270 Degree<CR> ;specify text at X=0.90”,Y=3.50” 490000601100090Rotate<CR> ;specify text at X=0.90”,Y=1.10” 4a000500255008012345678<CR> ;specify barcode at X=0.80”,Y=2.55”...
Page 46
<STX>Q0002 ;set print quantity to 2 labels <STX>G ;print two identical labels Serialize Barcode: This requires sending the label format again. Since Bar Code “12345678” and Text “12345678” are separate fields, they must both be serialized in order for the text to match the bar code.
Example 3 (0.24” continuous terminal block material, PTLTB-400- 240): To print a terminal block label, it is necessary to set the label size and spacing. In order to obtain this spacing, the printer must not be fed to the cut position between terminal block positions on the label.
Page 48
<STX>G ;print 3 copies of this label <STX>c ;feed to cut position TLS PC Link Programmer’s Guide...
Troubleshooting Common Problems and Corrective Action The best method for troubleshooting development with the TLS PC Link Programming Language is to use feedback characters. When these are enabled, all System Level and Label Formatting Commands have a feedback character sent after them. Looking at these feedback characters is very helpful in determining where an error has occurred.
Page 50
Problem Possible Cause/Corrective Action be processed until the print job is complete. Corrective Action: When disabling and enabling immediate commands, it is best to use feedback characters. With feedback characters enabled, wait until an Immediate Commands Enabled response is sent by the printer before sending an immediate command.
Page 51
Problem Possible Cause/Corrective Action Corrective Action: Use hardware flow control. When the serial buffer fills up, the printer will stop the host from sending more data. It will re-enable the serial flow when it catches up. Unable to store an image even Possible Cause: though there is enough memory If trying to store an image that...
Appendix A: Feedback Characters Definition Hex Value Decimal ASCII No error 0x30 Serial timeout error 0x31 Command error 0x32 Memory full error 0x33 Image already exists so it was 0x34 not stored Immediate commands enabled 0x35 Out of labels 0x36 Printhead open 0x37 Out of ribbon...
Appendix B: Image File Definitions Image Type U: Record Types: Dot-Row Record This record defines the pixel data for one dot-row. After each Dot-Row record, the Y cursor is incremented so that the next Dot-Row is on the next line. 0x80 ndd...d where: number of data bytes dd...d...
sent first Terminator This record must be at the end of the file. 0xFF 0xFF <CR> Data Format This image file can be sent as 8-bit data or 7-bit ASCII Hex. The 7-bit version sends the same data as the 8-bit version, but each byte is sent as two ASCII Hex characters.
Page 55
80073FFFFFFFFFFFF0 First line of box 800720000000000010 Second line of box 0000FF2F Repeat second line 47 times 80073FFFFFFFFFFFF0 Last line of box FFFF 0x0D Terminator TLS PC Link Programmer’s Guide...
Appendix D: List of Commands The following table lists all of the commands found in the guide, along with their description. Refer to the page number listed to the right for detailed information on each command. Description Command Page Reset SOH # Send ASCII Status String SOH A...
Page 59
Description Command Page Horizontal Alignment Offset STX o Clear All Memory STX Q Printhead Dot Pattern Test Label STX T Send Binary Touch Cell Data STX t Label Format Field Replacement STX U Send ASCII Touch Cell Data STX V Printer’s Firmware Version Information STX v Request Memory Information...
TLS PC Link Printer Fonts The following fonts are available on the TLS PC Link printer: FONT POINT PRINT SAMPLE NUMBER SIZE BRADY 12345 BRADY 12345 BRADY 12345 BRADY 12345 BRADY 12345 BRADY 12345 BRADY 12345 BRADY 12345 BRADY 12345...
Page 61
FONT POINT PRINT SAMPLE NUMBER SIZE BRADY 1 BRADY BRADY BRAD TLS PC Link Programmer’s Guide...
Appendix G: Mini-DIN 6-Pin to 9-Pin Cable Pinouts Mini-DIN-6S DB-9S Connector to Connector to Printer No Connection No Connection No Connection SHELL SHELL...
Need help?
Do you have a question about the TLS PC Link and is the answer not in the manual?
Questions and answers