Software Developer's Manual FBPL Command Reference TD-4420TN/4520TN TD-4650TNWB/4750TNWB/4650TNWBR/4750TNWBR RJ-2035B/2055WB/3035B/3055WB TJ-4005DN/4010TN TJ-4020TN/4021TN/4021TNR/4120TN/4121TN/4121TNR TJ-4420TN/4520TN/4620TN/4422TN/4522TN Version 10
Copyright ©2019 Brother Industries, Ltd. All rights reserved. Information in this document is subject to change without notice. The software described in this document is furnished under a license agreement. The software may be used or copied only in accordance with the terms of those agreements. No part of this publication can be reproduced in any form or by any means without prior written permission of Brother Industries, Ltd.
TABLE OF CONTENTS 1 2 3 4 5 Example of Command Reference ..................................................................................................................1 Document Conventions ..................................................................................................................................2 Object Position Calculation ...........................................................................................................................3 Supported Printers..............
7.4 7.5 7.6 7.7 7.8 7.9 7.10 7.11 7.12 7.13 7.14 7.15 7.16 7.17 7.18 7.19 8 Commands for Windows Driver ................................................................................................................ 112 8.1 8.2 8.3 9 !B ........................................................................................................................................ 112 !J ..............................................................................................................................
10.36 10.37 10.38 10.39 10.40 10.41 10.42 10.43 10.44 10.45 10.46 10.47 10.48 10.49 10.50 10.51 10.52 10.53 10.54 10.55 10.56 11 Device Reconfiguration Commands ........................................................................................................ 189 11.1 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.10 11.11 11.12 11.13 11.14 11.15 11.16 11.17 11.18 11.19 11.20 11.21 11.22 11.23 11.24 11.25 11.26 11.27 11.28 11.29 11.30 11.31 11.32 12 LEFT$() ............................................
12.9 12.10 12.11 12.12 12.13 12.14 12.15 12.16 12.17 12.18 13 Bluetooth Module Setting Commands ..................................................................................................... 247 13.1 13.2 13.3 13.4 14 SET PRINTQUALITY ......................................................................................................... 264 SET STANDBYTIME .......................................................................................................... 265 SET SLEEPTIME ...............
1 Example of Command Reference 1.1 Print Command Description Print the label format currently stored in the image buffer.
2 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. ASCII 27, control code of status polling command returns/runs 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.
3 Object Position Calculation DIRECTION 0 CLS TEXT 56,24,"3",0,1,1,"ABC" PRINT 1 DIRECTION 1 CLS TEXT 56,24,"3",0,1,1,"ABC" PRINT 1 Note : 1. 203 dpi, 1 mm=8 dots ; 300 dpi, 1 mm=12 dots ; 600 dpi, 1mm=24 dots 2. Only integer portion will be used. Ex. 2 mm = 23.6 dots then 23 dots will be used.
4 Supported Printers Series Models TD-4420TN/4520TN TD-4T series TD-4650TNWB/4750TNWB/4650TNWBR/4750TNWBR RJ series TJ series RJ-2035B/2055WB/3035B/3055WB TJ-4005DN/4010TN/4020TN/4021TN/4021TNR/4120TN/4121TN/4121TNR, TJ-4420TN/4520TN/4620TN/4422TN/4522TN For more information, see Appendix A: Command List by Model.
5 Setup and System Commands SIZE 5.1 Description Define the label width and length. Syntax SIZE m[,n] SIZE m mm[,n mm] SIZE m dot[,n dot] Parameter M [N] in inches in mm in dots Description Label width (inch/ mm/ dot) Label length (inch/ mm/ dot), Optional Note : ▪ ▪ 203 dpi : 1 mm = 8 dots 300 dpi : 1 mm = 12 dots 600 dpi : 1 mm = 24 dots For metric and dot systems, there must be a space between parameter and “mm” or “dot”. Example Sample Code In inches: SIZE 3.5,3.
5.2 GAP Description Define the gap distance between two labels. Syntax GAP m,n GAP m mm,n mm GAP m dot,n dot Parameter M N 0, 0 in inches in mm in dots Description The gap distance between two labels 0 ≤ m ≤1 (inch), 0 ≤ m ≤ 25.
Example Sample Code Normal gap In inches: GAP 0.12,0 Result Normal gap In mm: GAP 3 mm,0 mm Continuous label: GAP 0,0 Special gap In inches GAP 0.30,0.10 Special gap In mm GAP 7.62 mm,2.
5.3 GAPDETECT Description Feed the paper through the gap sensor 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 preprinted logos or texts.
5.4 BLINEDETECT Description Feed the paper through the black mark sensor 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.
5.5 AUTODETECT Description Feed the paper through the gap/black mark sensor 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.
BLINE 5.6 Description Set the height of the black line and the user-defined extra label feeding length each form feed takes. Syntax BLINE m,n BLINE m mm,n mm BLINE m dot,n dot Parameter m n 0,0 in inches in mm in dots Description The height of black line either in inch or mm 0 ≤ m ≤ 1 (inch), 0 ≤ m ≤ 25.4 (mm) 0 ≤ m ≤5 (inch), 0 ≤ m ≤ 127 (mm) The extra label feeding length 0 ≤ n ≤ label length Continuous label Note: ▪ ▪ ▪ For metric system, make sure you add a space between parameter and mm.
OFFSET 5.7 Description Fine-tune the media stop location especially in the peel-off mode and cutter mode. The printer backfeeds the label before printing the next job. Syntax OFFSET m OFFSET m mm OFFSET m dot Parameter m In inches In mm In dots Description The offset distance (inch or mm) -1 ≤ m ≤ 1 (inch) Note: ▪ ▪ ▪ If the offset value is incorrect, it may create a paper jam. For metric system, make sure you add a space between parameter and mm.
SPEED 5.8 Description Define the print speed. Syntax SPEED n Parameter n Description Printing speed in inch per second Model / IPS TD-4420TN TD-4520TN TD-4650TNWB, TD-4650TNWBR TD-4750TNWB, TD-4750TNWBR RJ-2035B, RJ-2055WB RJ-3035B, RJ-3055WB TJ-4005DN, TJ-4010TN TJ-4020TN, TJ-4021TN, TJ-4021TNR TJ-4120TN, TJ-4121TN, TJ-4121TNR TJ-4420TN, TJ-4422TN TJ-4520TN, TJ-4522TN TJ-4620TN 1 1.5 2 2.5 3 3.
5.9 DENSITY Description Set the print darkness. Syntax DENSITY n Parameter n Description 0~15 0: the lightest level 15: the darkest level Note: Default DENSITY setting is 8.
5.10 DIRECTION Description Define the print direction and mirror image. This will be stored in the printer memory. Syntax DIRECTION n[,m] Parameter n m Description 0 or 1.
5.11 REFERENCE Description Set the origin of the printer coordinate system vertically and horizontally. The reference point varies depending on the print direction.
5.12 SHIFT Description Fine-tune the print position. A positive value moves the label further from the printing direction; a negative value moves the label towards the printing direction. Syntax SHIFT [x,] y Parameter x Description Optional. The maximum value is 1 inch. • 200 dpi: –203 to 203 (in dots) • 300 dpi: -300 to 300 (in dots) Y The maximum value is 1 inch. • 200 dpi: –203 to 203 (in dots) • 300 dpi: -300 to 300 (in dots) Example Sample Code SIZE 4,2.
Result See Also OFFSET, REFERENCE 18
5.13 COUNTRY Description Specify a language for an external USB keyboard.
5.14 CODEPAGE Description Define the code page of international character set. Syntax CODEPAGE n Parameter n n Description Name or number of code page, which can be divided into 7-bit code page and 8-bit code page.
Sample Code Result DOWNLOAD "TEST.BAS" str1$ = " " J = 0 y = 50 CODEPAGE 1252 SIZE 4,3 GAP 0,0 DIRECTION 1 CLS TEXT 10,10,"COUR.TTF",0,12,12,"CODEPAGE 1252" FOR I=32 TO 255 str1$=str1$+CHR$(I) + " " J=J+1 IF J=16 THEN GOSUB drawTEXT NEXT PRINT 1 END drawTEXT: TEXT 10,y,"COUR.
5.15 CLS Description Clear the image buffer. Syntax CLS Parameter None Description N/A Note: Make sure you use this command after SIZE command.
5.16 FEED Description Feed the label for the specified distance. The length is specified in dots.
5.17 BACKFEED Description Backfeed the label for the specified distance. The length is specified in dots. Syntax BACKFEED n Parameter n Description unit: dot 1 ≤ n ≤ 9999 Note: • 203 dpi: 1 mm = 8 dots 300 dpi : 1 mm = 12 dots 600 dpi : 1 mm = 24 dots • If the parameter is incorrect, it may create paper jam or wrinkle.
5.18 FORMFEED Description Feed the label to the beginning of the next label. Syntax FORMFEED Parameter None Description N/A Note: Make sure you use this command after SIZE command. Example Sample code SIZE 4,2.
5.19 HOME Description Feed the label until the internal sensor has determined the origin. Syntax HOME Parameter None Description N/A Note: Make sure you define the size and gap of the label before using this command. Example Sample code SIZE 4,2.
5.20 PRINT Description Print the label format currently stored in the image buffer.
5.21 SOUND Description Create a beep sound.
5.22 CUT Description Activate the cutter to immediately cut the labels without backfeeding the label.
5.23 LIMITFEED Description If the gap sensor is not set to a suitable sensitivity while feeding labels, the printer will not be able to locate the correct position of the gap. This command stops label feeding and makes the red LED flash if the printer does not locate gap after feeding the length of one label plus one preset value.
5.24 SELFTEST Description Print the printer information. Syntax SELFTEST [page] Parameter page Description None: Print the whole printer information. PATTERN: Print a pattern to check the print head status. ETHERNET: Print the Ethernet configuration. WLAN: Print the Wi-Fi configuration. RS232: Print the RS-232C serial port configuration. SYSTEM: Print the printer configuration. Z: Print the emulated language settings. BT: Print the Bluetooth configuration.
Sample code SELFTEST Result SELFTEST PATTERN SELFTEST ETHERNET 32
SELFTEST WLAN SELFTEST RS232 SELFTEST SYSTEM SELFTEST PRINTER SELFTEST Z SELFTEST BT 33
5.25 EOJ Description Let the printer wait until process of commands (before EOJ) be finished then go on the next command. Syntax EOJ Example Sample Code SIZE 4,0.2 GAP 0,0 DIRECTION 1 CLS TEXT 10,10,"3",0,1,1,"Two labels are printed without stop." PRINT 1 PRINT 1 SIZE 4,0.2 GAP 0,0 CLS TEXT 10,10,"3",0,1,1,"Printer stops before next printing.
5.26 DELAY Description Define the period of time for the printer to wait before processing the next command. Syntax DELAY ms Parameter ms Description Set the print delay time in milliseconds. 1000 ms = 1 second. Example Sample Code SIZE 4,0.7 GAP 0,0 DIRECTION 1 CLS TEXT 10,10,"3",0,1,1,"The delay time between two labels is 3 seconds.
5.27 DISPLAY Description Display the image, which is in the printer’s image buffer, on the LCD panel. Syntax DISPLAY IMAGE/OFF/CLS/…… Parameter Description Display the image in printer’s image buffer on the LCD panel. IMAGE OFF Disable this function. CLS Display the background color and clear the items in the printer’s image buffer on the LCD panel.
align Text justification (1:left, 2:center, 3:right) content Content of text string Note: This command only can be performed on the printer with LCD display. For more information, see Appendix A: Command List by Model.
5.28 INITIALPRINTER Description Restore printer settings to defaults.
5.29 MENU Description Design user's own menu with a database resident on the printer. Syntax MENU title$, list$, selected Parameter title$ list$ selected Description The title string is shown on LCD screen. List of items, separated by CRLF. It must be a variable to get the result of selection. When selected is 0, the operator has hit ESC (USB keyboard) or MENU button. Note: This command only can be performed on the printer with LCD display. For more information, see Appendix A: Command List by Model.
007 031 033 034 045 EOP DOWNLOAD F,"DEMO.
:SET_COUNTRY IF SETTING$ = IF SETTING$ = IF SETTING$ = IF SETTING$ = IF SETTING$ = RETURN "007" "031" "033" "034" "045" THEN THEN THEN THEN THEN COUNTRY COUNTRY COUNTRY COUNTRY COUNTRY 007 031 033 034 045 EOP RUN "DEMO.
6 Label Formatting Commands 6.1 BAR Description Draw a bar. Syntax BAR x,y,width,height Parameter x y width height Description X-coordinate of the upper left corner (in dots) Y-coordinate of the upper left corner (in dots) Bar width (in dots) Bar height (in dots) Note: ▪ 203 dpi : 1 mm = 8 dots 300 dpi : 1 mm = 12 dots 600 dpi : 1 mm = 24 dots ▪ Recommended max. bar height is 12 mm at 4" width. Bar height over 12 mm may damage the power supply and affect the print quality. ▪ Max.
6.2 BARCODE Description Define a barcode. The available barcodes are listed below: Code Type 128 128M EAN128 EAN128M 25 25C 25S 25I 39 39C 93 EAN13 EAN13+2 EAN13+5 EAN8 EAN8+2 EAN8+5 CODA POST UPCA UPCA+2 UPA+5 UPCE UPCE+2 UPE+5 MSI MSIC PLESSEY CPOST ITF14 EAN14 11 TELEPEN TELEPENN PLANET CODE49 DPI DPL LOGMARS Description 1:1 Code 128, switching code subset automatically Code 128, switching code subset manually.
Syntax BARCODE X,Y, "code type",height,human readable,rotation,narrow,wide,[alignment,] "content " Parameter X Y code type 128 128M Description Starting point of the barcode in the X direction (dots) Starting point of the barcode in the Y direction (dots) Code 128, switching code subset A, B, C automatically Code 128, switching code subset A, B, C manually Control code A B C 096 FNC3 FNC3 NONE 097 FNC2 FNC2 NONE 098 SHIFT SHIFT NONE 099 CODE C CODE C NONE 100 CODE B FNC4 CODE B 101 FNC4 CODE A CODE A 102 F
TELEPEN N PLANET CODE49 DPI DPL Height human readable rotation narrow wide Telepen code.
Note: Check the maximum number of digits in the barcodes. Code Type Character sets 128 128M EAN128 EAN128M See Character set for CODE128. See Character set for CODE128. See Character set for CODE128. See Character set for CODE128. 25 0123456789 25C 25S 25I 0123456789 0123456789 0123456789 0123456789[Space]ABCDEFGHIJKLMNOPQRST UVWXYZ-.$/+% 0123456789[Space]ABCDEFGHIJKLMNOPQRST UVWXYZ!#$%&’()*+,-./:;?@[\]^_`abcdefghijklmn opqrstuvwxyz{|}~ 0123456789[Space]ABCDEFGHIJKLMNOPQRST UVWXYZ!#$%&’()*+,-.
Character set for CODE 128 Value 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 32 33 34 35 128A space ! “ # $ % & ‘ ( ) * + , . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C 128B space ! “ # $ % & ‘ ( ) * + , .
SIZE 4,1 GAP 0,0 DIRECTION 1 CLS TEXT 10,10, "2",0,1,1, "Code 128, switch code subset manually." BARCODE 10,50, "128M",100,1,0,2,2, "!104!096ABCD!101EFGH" PRINT 1 Note: The above example of code 128M encoded with CODE B start character. The next character will be the code 128 function character FNC3 which is then followed by the ABCD characters and EFGH characters encoded as CODE A subset.
SIZE 4,4 GAP 0,0 DIRECTION 1 CLS TEXT 400,26, "2",0,1,1,2, "TELEPEN Number" BARCODE 400,50, "TELEPENN",60,2,0,2,6,2, "1234567890" TEXT 400,136, "2",0,1,1,2, "Code 11" BARCODE 400,160, "11",60,2,0,2,6,2, "1234567890" TEXT 400,246, "2",0,1,1,2, "PLANET" BARCODE 400,270, "PLANET",60,2,0,2,2,2, "12345678901" TEXT 400,356, "2",0,1,1,2, "Deutsche Post Identcode." BARCODE 400,380, "DPI",60,2,0,2,6,2, "12345678901" TEXT 400,466, "2",0,1,1,2, "Deutsche Post Leitcode.
6.3 TLC39 Description Define a TLC39 (TCIF Linked Barcode 3 of 9) barcode.
6.4 BITMAP Description Draw a bitmap image (as opposed to BMP graphic files).
X – axis Y- axis 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Binary 00000000 00000000 00000000 00000111 00000011 00010001 00011000 00011100 00011110 00011111 00011111 00011111 00011111 00011111 00011111 00011111 Sample Code (ASCII) SIZE 4,2 GAP 0,0 CLS BITMAP 200,200,2,16,0, -????? PRINT 1,1 1-byte Hexadecimal 00 00 00 07 03 11 18 1C 1E 1F 1F 1F 1F 1F 1F 1F Hexadecimal 53 49 5A 45 47 41 50 20 4C 53 0D 0A 20 32 30 30 2C 31 36 2C 00 00 07 FF 1C 7F 1E 3F 1F E3 1F E7 50 52 49 4E 0A See Also PUTBMP, PUTPCX 52
6.5 BOX Description Draw a rectangle. Syntax BOX x,y,x_end,y_end,line thickness[,radius] Parameter x y x_end y_end line thickness radius Description X-coordinate of upper left corner (in dots) Y-coordinate of upper left corner (in dots) X-coordinate of lower right corner (in dots) Y-coordinate of lower right corner (in dots) Line thickness (in dots) Optional. Specify the round corner. Default is 0. Note: ▪ 203 dpi : 1 mm = 8 dots 300 dpi : 1 mm = 12 dots 600 dpi : 1 mm = 24 dots ▪ Recommended max.
6.6 CIRCLE Description Draw a circle.
6.7 ELLIPSE Description Draw an ellipse.
6.8 CODABLOCK F mode Description Draw a CODABLOCK F mode barcode.
6.9 DMATRIX Description Define a DataMatrix 2D barcode. Only ECC200 error correction is supported. Syntax DMATRIX x,y,width,height,[c#,x#,r#,a#,row,col,] "content" Parameter x y width height c# Description Starting point of the barcode in the X direction (dots) Starting point of the barcode in the Y direction (dots) Expected width of barcode area (in dots) Expected height of barcode area (in dots) Escape sequence control character (decimal digit) Ex.
Note: For standard symbol sizes for DataMatrix 2D barcode, see the list below.
6.10 ERASE Description Clear a specified region in the image buffer. Syntax ERASE x,y,x_width,y_height Parameter x y x_width y_height Description The x-coordinate of the starting point (in dots) The y-coordinate of the starting point (in dots) The region width in x-axis direction (in dots) The region height in y-axis direction (in dots) Example Sample code Result SIZE 4,2.
6.11 MAXICODE Description Define a 2D Maxicode. Syntax MAXICODE x,y,mode,[class,country,post,Lm,] "content" MAXICODE x,y,mode,class,country,postal code, "content" MAXICODE x,y,mode,[Lm,] "content" Parameter x y mode class country post Lm content For mode 2 or 3, If country is 840, the postal code is in 99999,9999 format. For other countries, the code is up to 6 alphanumeric characters. For mode 4 or 5, AIM special format is supported.
MAXICODE 600,100,4,L19,DEMO 4 FOR MAXICODE TEXT 100,50, "3",0,1,1, "Mode 4 FOR MAXICODE" PRINT 1,1 REM *****MODE 5***** CLS MAXICODE 110,100,5, "DEMO 5 FOR MAXICODE" MAXICODE 600,100,5,L19,DEMO 5 FOR MAXICODE TEXT 100,50, "3",0,1,1, "DEMO 5 FOR MAXICODE" PRINT 1 Result 61
6.12 PDF417 Description Define a PDF417 2D barcode.
Example Sample code SIZE 4,1 GAP 0,0 DIRECTION 1 Result REM *****WITHOUR OPTIONS***** CLS PDF417 50,50,400,200,0, "Without Options" PRINT 1,1 SIZE 4,1.5 GAP 0,0 DIRECTION 1 REM *****OPTION:E3***** CLS PDF417 50,50,400,200,0,E3, "Error correction level:3" PRINT 1,1 REM *****OPTION:E4***** CLS PDF417 50,50,400,200,0,E4, "Error correction level:4" PRINT 1,1 SIZE 4,1.
SIZE 4,1.5 GAP 0,0 DIRECTION 1 REM *****OPTION:E4 W4 H4 R40 C4 T1***** CLS PDF417 50,50,800,800,0,E4,W4,H4,R40,C4,T1 , "Error correction level:4 Module Width 4 dots Bar Height 4 dots Maximum Number of Rows:5 Rows Maximum number of columns:90 Cols Truncation:1" PRINT 1,1 SIZE 4,2.
6.13 AZTEC Description Define an AZTEC 2D barcode.
6.14 MPDF417 Description Define a Micro PDF 417 barcode. Syntax MPDF417 x,y,rotate,[Wn,][Hn,][Cn,] "content" Parameter x y rotate Wn Hn Cn Content Description Starting point of the barcode in the X direction (dots) Starting point of the barcode in the Y direction (dots) 0 : No rotation 90 : Rotated 90 degrees 180 : Rotated 180 degrees 270 : Rotated 270 degrees Optional. Module width in dot. Default is 1. Optional. Module height in dot. Default is 10. Optional. Number of columns.
6.15 PUTBMP Description Print a downloaded a 1-bit (monochrome) or 8-bit (256-color) BMP graphic file in monochrome or grayscale. The direct thermal mode supports both monochrome printing and grayscale printing. The thermal transfer mode supports monochrome printing only.
Download a BMP graphic file to the printer using the Brother Printer Management Tool (BPM). 1. 2. 3. 4. Connect your computer and the printer, and then turn on the printer. Start the BPM and click the File Manager button. Select BMP for File Type. Click Browse to select a BMP file and click Open. Make sure that the file name and its extension are in uppercase letters (FILENAME.BMP). Select Memory Device and click the Download button to start downloading. Sample Code SPEED 2 DENSITY 3 SIZE 4,1.
Result Sample Code SIZE 2,2 GAP 0,0 CLS PUTBMP 10,10, "SAMPLE.
6.16 PUTPCX Description Print a downloaded 1-bit (2-color) or 8-bit (256-color) PCX graphic file in monochrome. Syntax PUTPCX x,y, "filename" Parameter x y filename Description Starting point of the image in the X direction (dots) Starting point of the image in the Y direction (dots) Downloaded PCX file name Make sure the file name is in uppercase letters (FILENAME.PCX). Example Download a PCX graphic file to the printer using the Brother Printer Management Tool (BPM). 1. 2. 3. 4.
SPEED 2 DENSITY 3 SIZE 4,1.5 GAP 0,0 DIRECTION 1 CLS PUTPCX 10,10, "SAMPLE.
6.17 QRCODE Description Define a QR code.
bytes of binary data to be encoded. *If "K" is the first character in the data string, then the following data after "K" is Kanji data. *If "!" is in the data string and follows by "N", "A", "B", "K" then it will be switched to specified encodable character set.
Data string including character (0Dh, 0Ah) SIZE 4,2.5 GAP 0,0 DIRECTION 1 CLS QRCODE 10,10,H,4,A,0, "ABC abc 123 " QRCODE 160,160,H,4,A,0, "123 ABC abc" QRCODE 310,310,H,4,A,0, "Printer ABC abc 123" PRINT 1,1 sample sample sample Data string concatenation (Must be used with DOWNLOAD ... EOP command) DOWNLOAD "DEMO.BAS" SIZE 4,2.
Manual mode General data string SIZE 4,2.5 GAP 0,0 DIRECTION 1 CLS QRCODE 10,10,H,4,M,0, "AABC!B0003abc!N123" QRCODE 160,160,H,4,M,0, "N123!AABC!B0003abc" QRCODE 310,310,H,4,M,0, "K Printer!AABC!B0006abc123" PRINT 1,1 sample sample sample Data string including character, is an 8-bit byte data SIZE 4,2.
Data string including double quote (") character Make sure you use \["] instead of (“) SIZE 4,2.5 GAP 0,0 DIRECTION 1 CLS QRCODE 10,10,H,4,M,0, "AABC!B0005\["]abc\["]!N123" QRCODE 160,160,H,4,M,0, "N123!B0001\["]!AABC!B0004\["]abc" QRCODE 310,310,H,4,M,0, "B0001\["]!K Printer!B0010\["]ABCabc123" PRINT 1,1 sample sample sample Smart phone data string DOWNLOAD "A.
77
6.18 RSS Description Define a GS1 Databar (RSS) barcode.
Note: ▪ ▪ ▪ 203 dpi : 1 mm = 8 dots 300 dpi : 1 mm = 12 dots 600 dpi : 1 mm = 24 dots Recommended max. height of reversed black area is 12 mm at 4 “ width. Height of reversed area that is larger than 12 mm may damage the power supply and affect the print quality. Max. print ratio is different for each printer model. Desktop and industrial printer print ratio is limited to 20% and 30% respectively.
SIZE 100 mm,100 mm GAP 0,0 DIRECTION 1 CLS RSS 300,300,"EAN13",0,2,2,"123456789012|ABCDE FG" RSS 300,300,"EAN8",90,2,2,"1234567|ABCDEFG" RSS 300,300,"UCC128CCA",180,2,2,25,"123456789 0|ABCDEFG" RSS 300,300,"UCC128CCC",270,2,2,25,"123456789 0|ABCDEFG" PRINT 1,1 SIZE 100 mm, 100 mm GAP 0,0 DIRECTION 1 CLS RSS 300,10, "RSSEXP",90,2,2,12, "8110106141411234562891101201212085010048 000214025610048000310123191000" PRINT 1 Example of UPCE mode SIZE 4,1 GAP 0,0 DIRECTION 1 CLS REM UPCE Rule 1: 00abc0000hij = abhi
SIZE 4,1 GAP 0,0 DIRECTION 1 CLS REM UPCE Rule 2: 00abc00000ij = abcij3 RSS 10,10,"UPCE",0,2,2,"001230000045|ABCDEFG" PRINT 1 SIZE 4,1 CLS REM UPCE Rule 3: 00abcd00000j = abcdj4 RSS 10,10,"UPCE",0,2,2,"001234000005|ABCDEFG" PRINT 1 SIZE 4,1 GAP 0,0 DIRECTION 1 CLS REM UPCE Rule 4: 00abcde0000j = abcdej where j = 5-9 RSS 10,10,"UPCE",0,2,2,"001234500005|ABCDEFG" RSS 160,10,"UPCE",0,2,2,"001234500006|ABCDEFG " RSS 310,10,"UPCE",0,2,2,"001234500007|ABCDEFG " RSS 460,10,"UPCE",0,2,2,"001234500008|ABCDEFG " RSS
SIZE 4,2 GAP 0,0 DIRECTION 1 CLS RSS 10,10,"EAN13",0,1,1,"123456789012|ABCDEFG " RSS 210,10,"EAN13",0,2,1,"123456789012|ABCDEF G" RSS 410,10,"EAN13",0,3,1,"123456789012|ABCDEF G" PRINT 1 SIZE 4,2 GAP 0,0 DIRECTION 1 CLS RSS 10,10,"UPCA",0,1,1,"12345678901|ABCDEFG" RSS 210,10,"UPCA",0,2,1,"12345678901|ABCDEFG" RSS 410,10,"UPCA",0,3,1,"12345678901|ABCDEFG" PRINT 1 SIZE 4,2 GAP 0,0 DIRECTION 1 CLS RSS 10,10,"UPCE",0,1,1,"001200000456|ABCDEFG" RSS 210,10,"UPCE",0,2,1,"001210000456|ABCDEFG " RSS 410,10,"UPCE",0,
6.19 REVERSE Description Reverse a region in image buffer. Syntax REVERSE x_start,y_start,x_width,y_height Parameter x_start y_start x_width y_height Description Starting point of the barcode in the X direction (dots) Starting point of the barcode in the Y direction (dots) X-axis region width (in dots) Y-axis region height (in dots) Note: ▪ 203 dpi : 1 mm = 8 dots 300 dpi : 1 mm = 12 dots 600 dpi : 1 mm = 24 dots ▪ Recommended max. height of reversed black area is 12mm at 4" width.
6.20 DIAGONAL Description Draw a diagonal. Syntax DIAGONAL x1, y1, x2, y2, thickness Parameter x1 y1 x2 y2 thickness Description X1-coordinate of the starting point (in dots) Y1-coordinate of the starting point (in dots) X2-coordinate of the ending point (in dots) T2-coordinate of the ending point (in dots) Thickness of diagonal Note: ▪ 203 dpi : 1 mm = 8 dots 300 dpi : 1 mm = 12 dots 600 dpi : 1 mm = 24 dots Example Sample code Result SIZE 4,2.
6.21 TEXT Description Define a text object.
y-multiplication = 1/72 inch). Floating point is supported for *.TTF fonts only. Character width magnification Recommended range: 1~10 Specify the height in point size for Font "0" or other true type fonts (1 point = 1/72 inch). Floating point is supported for *.TTF fonts only. alignment Optional. Specify the alignment of text. 0: Default (Left) 1: Left 2: Center 3: Right content Characters to be printed Note: If the content itself includes double quotes ("), use \["]instead of (").
Sample Code SIZE 4,3 GAP 0,0 DIRECTION 1 CLS TEXT 10,10,"0",0,12,12,"FBPL" TEXT 10,40,"0",0,8,8,"align left" BAR 0,70,800,4 TEXT 10,110,"0",0,12,12,"FONT 0" TEXT 10,160,"1",0,1,1,"FONT 1" TEXT 10,210,"2",0,1,1,"FONT 2" TEXT 10,260,"3",0,1,1,0,"FONT 3" TEXT 10,310,"4",0,1,1,0,"FONT 4" TEXT 10,360,"5",0,1,1,0,"FONT 5" TEXT 10,410,"6",0,1,1,1,"FONT 6" TEXT 10,460,"7",0,1,1,1,"FONT 7" TEXT 10,510,"8",0,1,1,1,"FONT 8" TEXT 10,560,"ROMAN.TTF",0,12,12,"FONT ROMAN.
Sample Code Result SIZE 4,2 GAP 0,0 DIRECTION 1 CLS BAR 60,120,200,1 BAR 160,20,1,200 TEXT 160,120,"0",0,12,12,1,"TEXT alignment" PRINT 1,1 Sample Code Result SIZE 4,2 GAP 0,0 DIRECTION 1 CLS BAR 60,120,200,1 BAR 160,20,1,200 TEXT 160,120,"0",0,12,12,2,"TEXT alignment" PRINT 1,1 Sample Code Result SIZE 4,2 GAP 0,0 DIRECTION 1 CLS BAR 160,120,200,1 BAR 260,20,1,200 TEXT 260,120,"0",0,12,12,3,"TEXT alignment" PRINT 1,1 88
6.22 BLOCK Description Define a paragraph.
Font "ROMAN.TTF" ignores the parameter. Specify the width in point size for Font "0" or other True Type fonts (1 point = 1/72 inch). Floating point is supported for *.TTF fonts only. y-multiplication Character width magnification Recommended range: 1~10 Specify the height in point size for Font "0" or other true type fonts (1 point = 1/72 inch). Floating point is supported for *.TTF fonts only. [space] Add or delete the space between lines (in dots) [align] Text alignment.
Sample Code Result SIZE 4,0.5 GAP 0,0 DIRECTION 1 CLS BOX 10,10,800,100,2 BLOCK 15,15,790,90, "0",0,8,8," With the At your side. spirit in mind. the Brother Group aims to continually create value." PRINT 1 CLS BOX 10,10,800,100,2 BLOCK 15,15,790,90,"0",0,8,8,20,2," With the At your side. spirit in mind. the Brother Group aims to continually create value." PRINT 1 Sample Code for [fit] Parameter Result DATA$ = "With the \["]At your side\["] spirit in mind, the Brother Group aims to continually create val
7 Status Polling and Immediate Commands !? 7.1 Description Obtain the printer status at any time. An inquiry request is solicited by sending an (ASCII 27, escape character) as the beginning control character to the printer. A one-byte character is returned, flagging the printer status. 0 signifies the printer is ready to print labels.
7.2 !C Description Restart the printer and skip the AUTO.BAS program. The beginning of the command is an ESCAPE character (ASCII 27). Syntax !C Note: When the printer receives this command, the printer will restart itself no matter AUTO.BAS exists or not.
7.3 !D Description Disable an immediate command that starts with !. (for example: !R !? !C) The beginning of the command is an ESCAPE character (ASCII 27).
7.4 !O Description Cancel the PAUSE status of printer. The beginning of the command is an ESCAPE character (ASCII 27).
7.5 !P Description Pause the printer. The beginning of the command is an ESCAPE character (ASCII 27).
7.6 !Q Description Restart the printer and skip the AUTO.BAS program. The beginning of the command is an ESCAPE character (ASCII 27). Syntax !Q Note: If there is no AUTO.BAS inside the printer, the printer will not restart itself. See Also !C .
7.7 !R Description Restart the printer. The beginning of the command is an ESCAPE character (ASCII 27). The files downloaded in memory will be deleted. This command cannot be sent when the printer enters the Dump Mode.
!S 7.8 Description Obtain the printer status at any time. An inquiry request is solicited by sending an (ASCII 27, escape character) as the beginning control character to the printer. 8 bytes will be returned, flagging the printer status.
This example uses the Brother CommTool via RS-232C port.
7.9 !F Description Feed a label. This function is the same as to press the FEED button. The beginning of the command is an ESCAPE character (ASCII 27).
7.10 !. Description Cancel all printing files. The beginning of the command is an ESCAPE character (ASCII 27). Syntax !.
7.11 ~!@ Description Inquire the mileage of the printer. The integer part of mileage is returned (the decimal part of mileage is not return) in ASCII characters. The ending character of mileage is 0x0D.
7.12 ~!A Description Inquire the free memory of the printer. The number of bytes of free memory is returned in decimal digits with 0x0d as ending code.
7.13 ~!D Description Enter the Dump Mode. The printer will print all characters that it has received from the system in the Dump Mode.
7.14 ~!E Description Enable an immediate command (for example: !R !? !C) starting with !.
7.15 ~!F Description Request all files resident in the printer memory and fonts installed in the memory module. The filename is returned in ASCII characters. Each file name ends with 0x0D. The ending character is 0x1A. Entering this command multiple times will cycle through the files resident on memory. Syntax ~!F Example Sample code This example uses the Brother CommTool to test ~!F.
7.16 ~!I Description Inquire the code page and country setting of the printer. Syntax ~!I The returned information is given in the following format: code page, country code e.g. 8 bit: 437, 001 7 bit: USA, 001 For more information, see CODEPAGE command.
7.17 ~!T Description Inquire the model name and number of the printer. This information is returned in ASCII characters.
7.18 Y Description Enable the Line Mode for EZC (CPCL) or EZP (ESC/POS) printer.
7.19 Z Description Disable the Line Mode for EZC (CPCL) or EZP (ESC/POS) printer.
8 Commands for Windows Driver 8.1 !B Description Store bitmap image data in the memory. Behind the nnn is the bitmap data.
8.2 !J Description Print bitmap data at the specified position (in y-direction). Syntax !Jnnnn Parameter nnn Description Print image at the specified position in y-direction. The position is expressed in 4 decimal digits.
8.3 !N Description Print a specified number of labels.
9 File Management Commands 9.1 DOWNLOAD Description Transfer data files (including text data files, BMP/PCX graphic files and bitmap font files) and your frequently used print programs or templates to the printer.
FILENAME.BAS E SD CARD U USB File name to be saved Note: ▪ ▪ ▪ ▪ ▪ ▪ Filenames are case sensitive. Specify the template/program name ending with .BAS for the second parameter (for example: DOWNLOAD F,"TEST.BAS, DOWNLOAD F,"DEMO.BAS"). Make sure you use the EOP command. All data in DRAM is lost when the printer is turned off. Send the main filename without BAS extension (for example: TEST, DEMO) or use the RUN command to start the program (for example: RUN “TEST.BAS”,RUN “DEMO.BAS”).
Example Sample code Transfer the file to the printer ‘s DRAM memory DOWNLOAD "EXAMPLE.BAS" SIZE 4,4 GAP 0,0 DIRECTION 1 SET TEAR ON CLS TEXT 100,100, "3",0,1,1, "EXAMPLE PROGRAM" PRINT 1 EOP Sample code Transfer the file to the printer’s FLASH memory DOWNLOAD F, "EXAMPLE.
9.2 EOP Description End of program. To declare the start and end of BASIC language commands used in a program, DOWNLOAD “FILENAME.BAS” must be added in the first line of the program, and “EOP” statement at the last line of program. Syntax EOP Example Sample code (The example program listed below will download to the printer’s DRAM.) DOWNLOAD "DEMO.
9.3 FILES Description Print the total memory size, available memory size and files lists (or lists the files through RS-232C) in the printer memory (both FLASH memory and DRAM).
KILL 9.4 Description Delete a file in the printer memory. The wild card (*) will delete all files resident in specified DRAM or FLASH memory. Syntax KILL [n], “FILENAME” Parameter n Description File location ID Memory device none DRAM F FLASH E SD CARD U USB File name to be deleted from the printer’s memory (case sensitive) FILENAME Note: If optional parameter n is not specified, firmware will delete the file in DRAM. Syntax example KILL "FILENAME" : Delete the specify file in DRAM. KILL "*.
9.5 MOVE Description Move the downloaded files from DRAM to FLASH memory.
9.6 RUN Description Execute a program resident in the printer memory. It is available for FBPL programs only. Syntax RUN "FILENAME.BAS" Example Sample code DOWNLOAD "DEMO.BAS" SIZE 4,4 GAP 0,0 DIRECTION 1 SET TEAR ON CLS TEXT 100,100, "3",0,1,1, PROGRAM" PRINT 1 EOP RUN "DEMO.BAS" DOWNLOAD "DEMO.BAS" SIZE 4,4 GAP 0,0 DIRECTION 1 SET TEAR ON CLS TEXT 100,100, "3",0,1,1, PROGRAM" PRINT 1 EOP DEMO Result "DEMO "DEMO Note: This command is equivalent to typing the filename (Example: RUN “DEMO.
10 BASIC Commands and Functions 10.1 ABS() Description Return the absolute value of an integer, floating point or variable. Syntax ABS (VARIABLE) Example Sample code Result DOWNLOAD "TEST.BAS" SIZE 4,4 GAP 0,0 DIRECTION 1 SET TEAR ON CLS A=ABS(-100) B=ABS(-50.98) C=-99.99 TEXT 100,100, "3",0,1,1,STR$(A) TEXT 100,150, "3",0,1,1,STR$(B) TEXT 100,200, "3",0,1,1,STR$(ABSI) PRINT 1 EOP RUN "TEST.
10.2 ASC() Description Return the ASCII code of the character. Syntax ASC (" A ") Example Sample code Result DOWNLOAD "TEST.BAS" SIZE 4,4 GAP 0,0 DIRECTION 1 SET TEAR ON CLS CODE1=ASC(" A ") TEXT 100,100, " 3 ",0,1,1,STR$(CODE1) PRINT 1 EOP RUN "TEST.
10.3 CHR$() Description Return the character with the specified ASCII code. Syntax CHR$(n) Parameter n Description ASCII code Example Sample code Result DOWNLOAD "TEST.BAS" SIZE 4,4 GAP 0,0 DIRECTION 1 SET TEAR ON CLS A=75 WORD$=CHR$(A) TEXT 100,100, "3",0,1,1,WORD$ PRINT 1 EOP RUN "TEST.
10.4 XOR$() Description Encode the original data to new data by logic XOR. Syntax XOR$(data$,password$) Parameter data$ Password$ Description The original data needs to be encoded by Password$. This parameter will be used to create the new data. Example Sample code Result data$="1234" password$="ABCD" encoded$=XOR$(data$,password$) deconded$=XOR$(encoded$,password$) SIZE 4,0.
10.5 END Description State the end of program. Syntax END Example Sample code Result DOWNLOAD "DEMO.
10.6 EOF() Description Detect an opened download file to see whether it has reached the end of file. Syntax EOF(File Handle) Parameter File handle Description Either 0 or 1 Return value None-zero 0 Description End of file Not end of file Example Sample code DOWNLOAD "DATA",16,COMPUTER 2000 DOWNLOAD "DEMO.BAS" SIZE 3,3 GAP 0.
10.7 OPEN Description Open a downloaded file and establish the file handle. Up to two files can be opened simultaneously. The file to be opened should be downloaded prior to using this command. When opening a file, the firmware will search automatically to see if the file exists in the on-board FLASH memory or extended memory card. Note: If the file doesn’t exist, the printer will create this file in the on-board FLASH.
PRINT 1 EOP TEST See Also DOWNLOAD, EOP, READ, WRITE, SEEK, CLOSE 130
10.8 CLOSE Description Close the file handle which is opened by OPEN command. Syntax CLOSE file handle Parameter file handle Description Either 0 or 1 Example See the example in OPEN command.
10.9 WRITE Description Write data to a downloaded data file. Two files can be open simultaneously.
10.10 READ Description Read data from a downloaded data file. Syntax READ file handle,variables Parameter file handle variables Description 0 or 1 string, integer or float point variable Example Sample code DOWNLOAD "DATA1",20,COMPUTER 2000 12 DOWNLOAD "DATA2",16,Mouse 900 93 DOWNLOAD "DEMO.
10.11 SEEK Description Shift the specified file pointer to a certain position. Syntax SEEK file handle,offset Parameter file handle offset Description 0 or 1 the offset characters which are shifted to a new position Example Sample code Result DOWNLOAD "DATA",12,1234567890 DOWNLOAD "TEST.BAS" SIZE 4,1.
10.12 LOF() Description Return the size of the specified file. Syntax LOF("FILENAME") Parameter FILENAME Description The file downloaded in the printer memory. Example Sample code Result DOWNLOAD "DATA1",10,1234567890 DOWNLOAD "DATA2",15,ABCDEFGHIJKLMNO DOWNLOAD "LofTest.BAS" SIZE 4,1.
10.13 LOC() Description Return the current read/write position within an open file. Syntax LOC(file handle) Parameter file handle Description 0 or 1 Example Sample code Result DOWNLOAD "DATA.DAT",30,12345678 12345678 12345678 DOWNLOAD "TEST.BAS" str1$ = "" location = 0 OPEN "DATA.
10.14 FREAD$() Description Read a specified number of bytes of data from a file. Syntax FREAD$ (file handle,byte) Parameter file handle byte Description 0 or 1 Number of bytes to be read Example Sample code Result DOWNLOAD "DATA1",10,1234567890 DOWNLOAD "DATA2",15,ABCDEFGHIJKLMNO DOWNLOAD "OPEN2.
10.15 PUT Description One byte is appended into a file. Syntax PUT file handle,var1$[, var2$][,var3$][, …] PUT file handle,var1[, var2][,var3][, …] PUT file handle,var1$[, var2$][,var3][, …] Parameter file handle var$ var Description 0 or 1 Data is a character Data is ASCII value Example Sample code DOWNLOAD "DATA1",10,1234567890 DOWNLOAD "TEST.BAS" str1$ = "" str2$ = "" OPEN "DATA1",0 SEEK 0,0 READ 0,str1$ PUT 0,"a","B",49 SEEK 0,0 READ 0,str2$ CLOSE 0 SIZE 4,0.
10.16 GET Description Get one byte from a file. Syntax GET file handle,var1$[,var2$][,var3$][, …] GET file handle,var1[,var2][,var3][, …] GET file handle,var1$[,var2$][,var3][, …] Parameter Description file handle var$ var 0 or 1 Get a character Get ASCII value Example Sample code DOWNLOAD "DATA1",10,1234567890 DOWNLOAD "TEST.BAS" a$="" b$="" c=0 d$="" e$="" OPEN "DATA1",0 SEEK 0,0 GET 0,a$,b$,c SEEK 0,0 FOR I=1 TO 5 GET 0,d$ e$=e$+d$ NEXT SIZE 4,0.
10.17 COPY Description Copy the existing file to another location. Syntax COPY [memory ID of source,] "filename of source",[memory ID of new file,] "new filename" Parameter memory ID of source Description Optional ID none source filename Memory ID of new file F E U Original file name Optional ID none F new filename Memory device DRAM FLASH SD CARD USB Memory device DRAM FLASH New file name Example Sample Code DOWNLOAD "DATA_D.DAT",105, With the "At your side." spirit in mind.
10.18 FOR…NEXT LOOP Description Repeat one or more lines of program a specified number of times. Nested loops are allowed (up to 39 nested loops) in this printer. Jumping out in the middle of the FOR…NEXT LOOP is prohibited.
10.19 WHILE…WEND Description Execute a series of statements if a given condition is True. Nested loops are allowed (up to 39 nested loops) in the printer. Syntax WHILE condition [statement] WEND Parameter condition Statement Description Available relational operator: <, >, =, <=, >=, <> *Relational operator <>, not equal, was supported. One or more statements executed while condition is True. Example Sample Code DOWNLOAD "TEST.BAS" I=0 TOTAL=0 WHILE I<100 I=I+1 TOTAL=TOTAL+I WEND SIZE 4,0.
10.20 DO…LOOP Description Repeat a block of statement while a condition is True. Syntax DO [statement] [EXITDO] [statement] LOOP DO WHILE condition [statement] [EXITDO] [statement] LOOP DO UNTIL condition [statement] [EXITDO] [statement] LOOP DO [statement] [EXITDO] [statement] LOOP WHILE condition DO [statement] [EXITDO] [statement] LOOP UNTIL condition Parameter condition Statement EXITDO Description Available relational operator: <, >, =, <=, >=, <> *Relational operator <>, not equal.
Example Sample Code Result DOWNLOAD "TEST.BAS" I=0 TOTAL=0 DO I=I+1 TOTAL=TOTAL+I IF I=100 THEN EXITDO LOOP SIZE 4,0.5 GAP 0,0 CLS TEXT 10,10, "3",0,1,1, "1+2+3+ ... + 100 = " + STR$(TOTAL) PRINT 1 EOP TEST DOWNLOAD "TEST.BAS" I=0 TOTAL=0 DO WHILE I<=100 TOTAL=TOTAL+I I=I+1 LOOP SIZE 4,0.5 GAP 0,0 CLS TEXT 10,10, "3",0,1,1, "1+2+3+ ... + 100 = " + STR$(TOTAL) PRINT 1 EOP TEST DOWNLOAD “TEST.BAS” I=0 TOTAL=0 DO UNTIL I>100 TOTAL=TOTAL+I I=I+1 LOOP SIZE 4,0.
DOWNLOAD "TEST.BAS" I=0 TOTAL=0 DO TOTAL=TOTAL+I I=I+1 LOOP WHILE I<101 SIZE 4,0.5 GAP 0,0 CLS TEXT 10,10, "3",0,1,1, "1+2+3+ ... + 100 ="+ STR$(TOTAL) PRINT 1 EOP TEST DOWNLOAD "TEST.BAS" I=0 TOTAL = 0 DO TOTAL = TOTAL + I I=I+1 LOOP UNTIL I>100 SIZE 4,0.5 GAP 0,0 CLS TEXT 10,10, "3",0,1,1, "1+2+3+ ...
10.21 IF…THEN…ELSE…ENDIF LOOP Description Execute one or more statements conditionally. Either a single-line syntax or multiple-line “block” syntax can be used. Syntax IF condition THEN statement Note the single-line form of IF …THEN does not use an ENDIF statement.
Example Sample Code DOWNLOAD "DEMO.BAS" SIZE 4,4 GAP 0,0 DIRECTION 1 CLS A=0 B=0 C=0 D=0 E=0 F=0 G=0 H=0 J=0 K=0 L=0 FOR I=1 TO 100 IF I-INT(I/1)*1=0 THEN A=A+I IF I-INT(I/2)*2=1 THEN B=B+I ELSE C=C+I IF I-INT(I/3)*3=0 THEN D=D+I ENDIF IF I-INT(I/5)*5=0 THEN E=E+I ELSE F=F+I ENDIF IF I-INT(I/7)*7=0 THEN G=G+I ELSEIF I-INT(I/17)*17=0 THEN H=H+I ELSEIF I-INT(I/27)*27=0 THEN J=J+I ELSEIF I-INT(I/37)*37=0 THEN K=K+I ELSE L=L+I ENDIF NEXT TEXT 100,110,"3",0,1,1,"(1) 1+2+3+...
TEXT 100,460,"3",0,1,1,"(7) 17+34+51+...+85=” +STR$(H) TEXT 100,510,"3",0,1,1,"(8) 27+54+...+81="+STR$(J) TEXT 100,560,"3",0,1,1,"(9) 37+74="+STR$(K) TEXT 100,610,"3",0,1,1," (1)-(6)(7)-(8)-(9)=”+STR$(L) PRINT 1,1 EOP DOWNLOAD F, "TEST.
10.22 GOSUB…RETURN Description Branch to a subroutine, executing statements until RETURN is reached. Syntax GOSUB LABEL statement END :LABEL statement RETURN Parameter LABEL Description Beginning of the subroutine. The maximum length of the label is 8 characters. Example Sample code DOWNLOAD "GOSUB1.
10.23 GOTO Description Branch to a specified label. The label cannot exceed 8 characters in length. Syntax GOTO LABEL :LABEL Parameter LABEL Description Beginning of the point. The maximum length of the label is 8 characters. Example Sample code DOWNLOAD "GOTO1.BAS" SIZE 4,3 GAP 0,0 DIRECTION 1 CLS A=0 TOTAL=0 :START IF A<100 THEN GOTO SUM ELSE GOTO PRTOUT ENDIF :SUM A=A+1 TOTAL=TOTAL+A GOTO START :PRTOUT B$="THE SUMMATION OF 1..
10.24 INP$() Description One byte is received from the communication port. Syntax INP$(n) Parameter n Description 1 : com1 port in printer Example Sample code DOWNLOAD "TEST.BAS" T$="" FOR I=1 TO 5 T$=T$+INP$(1) NEXT SIZE 4,0.
10.25 INP() Description One byte (ASCII value) is received from the communication port. Syntax INP(n) Parameter n Description 1 : com1 port in printer Example Sample code DOWNLOAD "TEST.BAS" 152sci=0 str$="" FOR I=1 TO 5 152sci=INP(1) str$=str$+" " +STR$(152sci) OUT 152sci NEXT SIZE 4,0.
10.26 LOB() Description Return the size of data in receiving buffer. Syntax LOB() Example Sample Code DOWNLOAD "TEST.BAS" DATA$="" WHILE LOB()<>0 DATA$=DATA$+INP$(1) WEND SIZE 4,0.5 GAP 0,0 CLS BOX 10,10,800,100,2 BLOCK 15,15,790,90, "0",0,8,8,DATA$ PRINT 1 EOP TEST With the "At your side." spirit in mind. the Brother Group aims to continually create value.
10.27 INPUT Description Define a variable area and insert a text you want using an external input device (for example, a barcode reader). Syntax INPUT ["Prompt string", number of digits], variables The comma also can be replaced by semicolon, such as: INPUT ["Prompt string"; number of digits]; variables Parameter Prompt string Number of digits Variables Description Maximum 20 characters Maximum 255 characters Variable name Example Sample template DOWNLOAD F, "TEST.
10.28 PREINPUT Description Define the start character for INPUT command. Syntax PREINPUT var$ PREINPUT CHR$(n) Parameter var$ N Description The specific character or string in front of data.
10.29 POSTINPUT Description Define the end character for INPUT command. Syntax POSTINPUT var$ POSTINPUT CHR$(n) Parameter var$ N Description The specific character or string in end of data.
10.30 SET FILTER Description Enable/disable PREINPUT and POSTINPUT commands. Syntax SET FILTER ON/OFF Parameter ON OFF Description Enable PREINPUT and POSTINPUT Disable PREINPUT and POSTINPUT Note: For the models with LCD, make sure you send SET USBHOST command when using INPUT and SET FILTER command with USB Host devices (for example: USB keyboard, USB scanner). Example Sample Code Result DOWNLOAD "TEST.BAS" PREINPUT "<=" POSTINPUT "=>" SET FILTER ON START: INPUT "DATA",data1$ SIZE 4,0.
10.31 REM Description Comment. Prefix is "REM", which will be ignored by the printer. Syntax REM Example Sample code REM ******************************** REM This is a demonstration program* REM ******************************** DOWNLOAD “REMARK.
10.32 OUT Description Return data through the specific port. Syntax OUT [port] "prompt",variable OUT [port] "prompt";variable Parameter port Prompt Variable , ; Description Optional. Specified the port for returning data/string. Default is returning the data/string from the port which is sending data to printer. COM: Returning data/string from COM port. USB: Returning data/string from USB port. NET: Returning data/string from LAN port. Prompt string. The output message.
10.33 OUTR Description Send data through RS-232C port only. Syntax OUTR "prompt",variable OUTR "prompt";variable Parameter prompt Variable , ; Description Prompt string. The output message. The "prompt" and "variable" are separated by <0x0D><0x0A>. The "variable" comes behinds "prompt" directly. Example Sample Code OUTR "COM: "," This is returning data from RS-232 only.
10.34 GETKEY() Description Get the status of the PAUSE and FEED keys. This command waits until either key is pressed, whereupon 0 is returned if PAUSE key is pressed and 1 is returned if FEED key is pressed. Syntax GETKEY() PAUSE 0 FEED 1 Example Sample code DOWNLOAD "DEMO4.
10.35 INT() Description Truncate a floating point number. Syntax INT(n) Parameter n Description Positive or negative integer, floating point number or mathematical expression Example Sample code Result DOWNLOAD "DEMO.BAS" SIZE 4,1 GAP 0,0 DIRECTION 1 INPUT "Number: ",Num CLS REM **** To round up or down**** N=INT(Num+0.5) IF N>Num THEN TEXT 50,100, "3",0,1,1, "To round up= " +STR$(N) ELSE TEXT 50,100, "3",0,1,1, "To round down= " +STR$(N) ENDIF PRINT 1 EOP 56.
10.36 LEFT$() Description Return the specified number of characters down from the initial character of a string. Syntax LEFT$(X$, n) Parameter X$ n Description The string to be processed The number of characters to be returned Example Sample code Result DOWNLOAD "TEST.
10.37 LEN() Description Return the length of a string. Syntax LEN(string) Parameter string Description The string whose length is to be measured. Example Sample Code Result DOWNLOAD "DEMO.
10.38 MID$() Description Retrieve the specified number of characters down from the mth character of a string. Syntax MID$(string,m,n) Parameter string m n Description The string to be processed The beginning of mth characters in the string 1 <= m <= string length The number of characters to return Example Sample code Result DOWNLOAD "DEMO.
10.39 RIGHT$() Description Return a specified number of characters up from the end of a string. Syntax RIGHT$(X$,n) Parameter X$ n Description The string to be processed The number of characters to be returned from the right side (end) of the string Example Sample code Result DOWNLOAD "DEMO.
10.40 STR$() Description Convert a specified value or expression into corresponding string of characters. Syntax STR$(n) Parameter n Description An integer, floating point number or mathematical expression Example Sample code Result DOWNLOAD "DEMO.
10.41 STRCOMP() Description Returns -1, 0, or 1, based on the result of a string comparison. Syntax STRCOMP(str1$,str2$[,comp]) Parameter str1$ Str2$ Comp Description Required. Any valid string expression. Required. Any valid string expression. Optional. Specifies the type of string comparison. 0: Binary comparison. Default. 1: Textual comparison. The comparison is case-insensitive.
10.42 INSTR() Description Return an integer specifying the start position of the first occurrence of one string within another. Syntax INSTR([start,]str1$,str2$) Parameter start Str1$ Str2$ Description Optional. Numeric expression that sets the starting position for each search. If omitted, search begins at the first character position. The stat index is 1 – based. Required. String expression being searched. Required. String expression sought. Example Sample code DOWNLOAD "DEMO.
10.43 TRIM$() Description Remove both leading and trailing blank spaces or specific characters from a string. Syntax TRIM$(str$[,list$]) Parameter str$ List$ Description String from which you want to remove spaces Optional. The specific characters in list$ will be removed. Example Sample Code DOWNLOAD "DEMO.BAS" data1$="1234567" data2$="a1234567a" data3$="[<12345>]" SIZE 4,1.5 GAP 0,0 DIRECTION 1 CLS TEXT 50,020,"3",0,1,1,"LTRIM$(\["]" TEXT 50,050,"3",0,1,1,"TRIM$ (\["]" TEXT 50,080,"3",0,1,1,"RTRIM$(\[
10.44 LTRIM$() Description Remove leading blank space from a string. Syntax LTRIM$(str$[,list$]) Parameter str$ List$ Description String from which you want to remove spaces Optional. The specific characters in list$ will be removed. Example Sample Code DOWNLOAD "DEMO.BAS" data1$="1234567" data2$="a1234567a" data3$="[<12345>]" SIZE 4,1.5 GAP 0,0 DIRECTION 1 CLS TEXT 50,020,"3",0,1,1,"LTRIM$(\["]" +data1$+" \["]) =" +LTRIM$(data1$) TEXT 50,050,"3",0,1,1,"TRIM$ (\["]" +data1$+" \["]) =" +TRIM$(data1$) TEX
10.45 RTRIM$() Description Remove trailing blank space from a string. Syntax RTRIM$(str$ [, list$]) Parameter str$ List$ Description String from which you want to remove spaces Optional. The specific characters in list$ will be removed. Example Sample Code DOWNLOAD "DEMO.BAS" data1$="1234567" data2$="a1234567a" data3$="[<12345>]" SIZE 4,1.
10.46 TEXTPIXEL() Description Return the width of the text string in dots. Syntax TEXTPIXEL(cont$,font$,size) Parameter cont$ Font $ Size Description Content of text string. Font type. See the font parameter in TEXT command. Font size. See the x-multiplication parameter in TEXT command. Example Sample code Result DOWNLOAD "TEST.
10.47 BARCODEPIXEL() Description Return the width of the barcode in dots. Syntax BARCODEPIXEL(cont$, sym$, narrow, wide) Parameter cont$ Sym $ Narrow Wide Description Barcode content. Barcode type. See the code type parameter in BARCODE command. Width of narrow bar. See the narrow parameter in BARCODE command. Width of wide bar. See the wide parameter in BARCODE command. Example Sample code Result DOWNLOAD "TEST.
10.48 VAL() Description Convert numeric characters into corresponding integer or floating point number. Syntax VAL("numeric character") Parameter numeric character Description " 0~9","." Example Sample code Result DOWNLOAD "DEMO.
10.49 NOW$() Description Return the current date and time according to the printer setting. The returned value always uses with FORMAT$( ) commands.
10.50 NOW Description Return the total days since A.D. 1900. This global variable always uses with FORMAT$( ) and DATEADD() commands. Syntax NOW Example Sample Code SIZE 4,1 GAP 0,0 DIRECTION 1 CLS TEXT 10,10, "3",0,1,1, "Total days since a.d.
10.51 FORMAT$() Description Return the current date, time, number and number value according to the printer setting. Syntax FORMAT$(expression[,style$]) Parameter expression Style$ Description Required. Any valid expression. Optional. A valid named or user-defined format string expression.
ttttt AM/PM am/pm A/P a/p AMPM \ “string” Number General Number Currency Fixed Standard Percent Scientific Yes/No True/False On/Off Time as a complete time (including hour, minute, and second). The default time format is h:mm:ss AM/PM. Uppercase AM with any hour before noon; display an uppercase PM with any hour between noon and 11:59 P.M. Lowercase AM with any hour before noon; display a lowercase PM with any hour between noon and 11:59 P.M.
Example Sample Code Result SIZE 800 dot,1900 dot GAP 0,0 DIRECTION 1 CLS TEXT 15,10, "3",0,1,1, "General Date: "+FORMAT$(NOW,"General Date") TEXT 15,60, "3",0,1,1, "Long Date: "+FORMAT$(NOW,"Long Date") TEXT 15,110, "3",0,1,1, "Medium Date: "+FORMAT$(NOW,"Medium Date") TEXT 15,160, "3",0,1,1, "Short Date: "+FORMAT$(NOW,"Short Date") TEXT 15,210, "3",0,1,1, "Long Time: "+FORMAT$(NOW,"Long Time") TEXT 15,260, "3",0,1,1, "Medium Time: "+FORMAT$(NOW,"Medium Time") TEXT 15,310, "3",0,1,1, "Short Time: "+FORMAT
Sample Code Result SIZE 800 dot,850 dot GAP 0,0 DIRECTION 1 CLS TEXT 15,10, "3",0,1,1, "General Number: "+FORMAT$(1234.5,"General Number") TEXT 15,60, "3",0,1,1, "Currency: "+FORMAT$(1234.5,"Currency") TEXT 15,110, "3",0,1,1, "Fixed: "+FORMAT$(1234.5,"Fixed") TEXT 15,160, "3",0,1,1, "Standard: "+FORMAT$(1234.5,"Standard") TEXT 15,210, "3",0,1,1, "Percent: "+FORMAT$(1234.5,"Percent") TEXT 15,260, "3",0,1,1, "Scientific: "+FORMAT$(1234.5,"Scientific") TEXT 15,310, "3",0,1,1, "Yes/No: "+FORMAT$(1234.
10.52 DATEADD() Description Return a date after which a specified time/date interval has been added. The returned value always uses with FORMAT$( ) command. Syntax DATEADD(interval$,number,date) Parameter interval$, Description Time/date interval for adding. It can be one of following values. Interval$ "yyyy" "q" "m" "y" "d" "w" "ww" "h" "n" "s" Number Date The interval unit of parameter interval$ Year. Quarter. Month. Day of year. Day. Weekday. Week of year. Hour. Minute. Second.
Result 1 Sample Code 2 SIZE 4,2 GAP 0,0 DIRECTION 1 CLS TEXT 10,60, "3",0,1,1, "-1 year: "+FORMAT$(DATEADD("yyyy", -1, "11/26/2012 10:08"),"yyyy/mm/dd hh:nn AM/PM") TEXT 10,110,"3",0,1,1,"+9 months: "+FORMAT$(DATEADD("m",9,"11/26/2012 10:08"),"yyyy/mm/dd hh:nn AM/PM") TEXT 10,160,"3",0,1,1,"+8 hours: "+FORMAT$(DATEADD("h", +8,"11/26/2012 10:08"),"yyyy/mm/dd hh:nn AM/PM") TEXT 10,210,"3",0,1,1,"+00 day: "+FORMAT$("11/26/2012 10:08:00","yyyy/mm/dd hh:nn AM/PM") TEXT 10,260,"3",0,1,1,"+20 days: "+FORMAT$(DATE
10.53 FSEARCH() Description Return the position of a string. Syntax FSEARCH(file handle, STR$) Parameter file handle STR$ Description 0 or 1 Required. Any valid string expression. Example Sample Code Result DOWNLOAD "DATA1",10,1234567890 DOWNLOAD "DATA2",15,ABCDEFGHIJKLMNO DOWNLOAD "Test.BAS" SIZE 4,1.
10.54 TOUCHPRESS() Description Detect the status of the touch screen. Return 1 if the touch screen for the specified region is pressed, otherwise returns 0. Syntax TOUCHPRESS (left, top, right, bottom) Parameter left top right bottom Description Left side position of region (pixel) Top side position of region (pixel) Right side position of region (pixel) Bottom side position of region (pixel) Note: TJ-4021TN/TJ-4021TNR/TJ-4121TN/TJ-4121TNR/TJ-4422TN/TJ-4522TN only. Example Sample Code DOWNLOAD "DEMO.
10.55 RECORDSET$() Description Return a value from a table. Table is represented in a grid format, tabular form in rows and columns. For more information, see the following table format in the Example. Syntax RECORDSET$(TABLE$, ROW, COLUMN [, DELIMITER]) Parameter TABLE$ ROW COLUMN DELIMITER Description Table name Number of row Number (or name) of column Optional. Set the delimiter of table. The default is 09H Note: ROW is always a number. COLUMN can be a number or name.
Sample Code 2: Table format (TEST.CSV) DOWNLOAD "TEST.CSV",121,6, Number,String 1234,ABCD "12,34","AB,CD" "12 34","AB CD" "12""34","AB""CD" """1234","""ABCD" "1234""","ABCD""" OUT RECORDSET$("TEST.CSV", ASC(",")) OUT RECORDSET$("TEST.CSV", OUT RECORDSET$("TEST.CSV", OUT RECORDSET$("TEST.CSV", OUT RECORDSET$("TEST.CSV", OUT RECORDSET$("TEST.CSV", Number of rows Name of column 1, "Number", 2, 3, 4, 5, 6, 1, 1, 1, 1, 1, ASC(",")) ASC(",")) ASC(",")) ASC(",")) ASC(",")) OUT "" OUT RECORDSET$("TEST.
10.56 REPLACE$() Description Return a string in which a specified substring has been replaced with another substring. Syntax REPLACE$(“str1$”,”sub1$”,”sub2$”) Parameter str1$ sub1$ sub2$ Description Required. Original string being searched for. Required. Specified substring to be replaced. Required. New replacement substring. Example Sample Code Result DOWNLOAD F,"TEST.
11 Device Reconfiguration Commands 11.1 SET COUNTER Description Counters can be a real counter or a variable. This setting sets the counter number in the program and its increments. There are three different types of counters: digit (0~9~0), lowercase letter (a~z~a) or uppercase letter (A~Z~A). Syntax SET COUNTER @n step @n= "Expression " Parameter @n Description n: counter number. There are 61 counters available (@0 ~ @60) in the printer. @0 to @50 will be cleared while restarting the printer.
11.2 SET CUTTER Description Enable/disable the full cutter and define how many printed labels is to be cut at one time. This setting will be saved in the printer memory after turning off the power. Syntax SET CUTTER OFF/BATCH/pieces Parameter OFF BATCH Pieces Description Disable cutter function. Set printer to cut label at the end of printing job. Set number of printing labels per cut.
11.3 SET PARTIAL_CUTTER Description Enable/disable the partial cutter and define how many printed labels is to be cut at one time. This setting will be saved in the printer memory after turning off the power. This command prevents label back feeding after a cut. Syntax SET PARTIAL_CUTTER OFF/BATCH/Pieces Parameter OFF BATCH Pieces Description Disable cutter function. Set printer to cut label at the end of printing job. Set number of printing labels per cut.
11.4 SET BACK Description Backfeed labels after a cut or not. Make sure you use this command after SET CUTTER command. Syntax SET BACK OFF/ON Parameter OFF ON Description Disable the backfeed function. Enable the backfeed function.
11.5 SET BACK_BEFORE_PRINT Description Change the backfeed sequence in the cutter mode. Syntax SET BACK_BEFORE_PRINT ON/OFF Parameter OFF ON Description Backfeed a label to the print position immediately after a cut (Default) Backfeed a label to the print position before a print starts Note: A printer reset or restart will not return the setting to the default. The setting will remain unchanged until you perform the factory default or firmware update.
11.6 SET KEYn Description Enable/disable the KEYn function. Before setting KEYn function, make sure you disable the default function of KEYn first. The setting will remain resident in the printer even when the printer is powered off.
:START IF KEY1=1 THEN CLS TEXT 100,10, “3”,0,1,1, PRINT 1,1 ELSEIF KEY2=1 THEN CLS TEXT 100,10, “3”,0,1,1, PRINT 1,1 ELSEIF KEY3=1 THEN CLS TEXT 100,10, “3”,0,1,1, TEXT 100,60, “3”,0,1,1, PRINT 1,1 SET KEY1 ON SET KEY2 ON SET KEY3 ON END ENDIF GOTO START EOP DEMO “KEY1 (MENU key) is pressed!! “ “KEY2 (PAUSE key) is pressed!! “ “KEY3 (FEED key) is pressed!! “ “End of test” See Also OFFEST, PRINT 195
11.7 SET LEDn Description Control LED on/off function. Syntax SET LED1 ON/OFF SET LED2 ON/OFF SET LED3 ON/OFF LED no.
11.8 SET PEEL Description Enable/disable the self-peeling function. The default setting is OFF. When this function is set to ON, the printer stops after each label printing, and does not print the next label until the peeled label is taken away. This setting will be saved in the printer memory when turning off the power.
11.9 SET REWIND Description Enable/disable the internal rewind function. The default setting is OFF. When this function is ON, the printer’s Media Rewind Spindle will rewind the printed labels. This setting will be saved in the printer memory when turning off the power.
11.10 SET TEAR Description Feed the label to the tear-off position. This setting will be saved in the printer memory when turning off the power. Syntax SET TEAR ON/OFF Parameter ON OFF Description The label gap will stop at the tear off position after print. The label gap will NOT stop at the tear off position after print. The beginning of label will be aligned to the print head. Example Sample code REM ***TEAR FUNCTION ON*** SIZE 3,3 GAP 0.
11.11 SET GAP Description Adjust the gap sensor emission sensitivity. The printer initiates automatic gap sensor calibration when the PAUSE key is held down while powering up. Use this setting when auto calibration does not work because the thickness of the backing paper and that of the label with backing paper are not within the sensor’s detection range or there are pre-printed marks or patterns on the label. This setting will be saved in the printer memory when turning off the power.
Example The example below is operated in DOS environment via the parallel port connection to set up the label size, gap distance and sensor sensitivity. C:\>COPY CON LPT1 SIZE 4,2.5 GAP 0.12,0 SET GAP 1 C:\> Note: stands for keyboard ENTER key. In the above example, press ENTER key instead of typing in the above example. stands for keyboard Ctrl key. Troubleshooting: Press the FEED key to test.
11.12 SET BLINE REVERSE / SET BLINE OBVERSE Description Reverse/obverse the sensor function. Syntax SET BLINE REVERSE/SET BLINE OBVERSE Parameter REVERSE OBVERSE Description Reverse the sensor function. Redefine the reflective area is black line and nonreflective part is paper. (Normally, reflective part is paper and non-reflective part is black line.) Disable the SET BLINE REVERSE function.
11.13 SET BLINE PRINTSIDE / SET BLINE BACKSIDE Description Set the upper black mark sensor or the lower black sensor as the main transmitter. Syntax SET BLINE PRINTSIDE / SET BLINE BACKSIDE Parameter PRINTSIDE BACKSIDE Description Black mark on the printing side Black mark on the back side Note: This command is supported on RJ-3055WB (Gap-sensor model only) and TJ-4420TN / TJ-4520TN / TJ4620TN / TJ-4422TN / TJ-4522TN.
11.14 SET HEAD Description Enable/disable the head open sensor. If the head open sensor is turned off, an open printhead will not return an error message. This setting will be saved in the printer memory.
11.15 SET RIBBON Description Enable/disable the ribbon sensors. The printer will detect the presence of a ribbon to determine using either direct thermal or thermal transfer printing at the printer startup. This setting will NOT be saved in the printer memory. Syntax SET RIBBON ON/OFF/INSIDE/OUTSIDE Parameter ON OFF Description Thermal transfer printing Direct thermal printing Example Sample Code REM *****Disable ribbon detection sensor for direct thermal printing.
11.16 SET ENCODER Description Enable/disable the ribbon encoder sensor. Syntax SET ENCODER ON/OFF Parameter ON OFF Description Enable the ribbon encoder sensor. Disable the ribbon encoder sensor.
11.17 SET RIBBONEND Description Enable/disable ribbon end sensor (TJ series only). Syntax SET RIBBONEND ON/OFF Parameter ON OFF Description Enable the ribbon end sensor. Disable the ribbon end sensor.
11.18 SET COM1 Description Define communication parameters for printer serial port.
11.19 SET PRINTKEY Description Print one label and feed label gap to tear bar position for tearing away. Press FEED button to print the next label or batch of labels. If the label content includes serial text or barcode, it will change the serial number accordingly. This setting will be saved in the printer memory.
Execute: Syntax SET PRINTKEY ON or SET PRINTKEY AUTO Receive “PRINT m” 1.) PRINT 2 2.) Press FEED key Print Out Label 1~2 Label 3~4 Syntax Receive “PRINT m,n” 1.) PRINT 1,2 Print Out Label 1, Label 1 2.) Press FEED key Label 2, Label 2 Receive “PRINT -1,n” 1.) PRINT -1,2 Print Out Label 1, Label 1 2.) Press FEED key Label 1, Label 1 Receive “PRINT m” 1.) PRINT 2 Print Out Label 1~2 2.) Press FEED key Label 3~7 Receive “PRINT m,n” 1.) PRINT 1,2 Print Out Label 1, Label 1 2.
11.20 SET REPRINT Description Enable/disable a reprinting attempt subsequent to a “no paper”, “no ribbon” or “carriage open” error.
11.21 SET FEED_LEN Description Set the feeding length when FEED key is pressed. This setting will be memorized by the printer. The initialized value is the label length. Syntax SET FEED_LEN n Parameter n Description Feeding length (in dots) Example Sample code SET FEED_LEN 100 Result The feeding length is 100 dots when you press the FEED key after this setting.
11.22 GETSENSOR() Description Get the sensor status/AD value. You can use it to check the sensor function.
Example (This example uses the Brother CommTool to get the sensor status via RS-232C.
sensor. Sample code OUT GETSENSOR("BATTERY VOLT") OUT GETSENSOR("BATTERY CAP") Result This code is used to detect the battery volatage and battery capacity for RJ printer.
11.23 GETSETTING$() Description Obtain the printer configurations.
PAPER WIDTH LIMIT FEED OFFSET REFERENCE X REFERENCE Y SHIFT X SHIFT Y SPEED COUNTRY CODE CODEPAGE Parameter default$ Paper width Maximum length for sensor calibration. OFFSET value. REFERENCE X value. REFERENCE Y value. SHIFT X value. SHIFT Y value. Print speed. COUNTRY code. CODEPAGE. Description Optional. Expression containing the value to return if no value is set in the key$ setting. If omitted, default is assumed to be a zero-length string ("").
OUT OUT OUT OUT OUT OUT "REFERENCE Y = ";GETSETTING$("CONFIG","FBPL","REFERENCE Y") "SHIFT X = ";GETSETTING$("CONFIG","FBPL","SHIFT X") "SHIFT Y = ";GETSETTING$("CONFIG","FBPL","SHIFT Y") "SPEED = ";GETSETTING$("CONFIG","FBPL","SPEED") "COUNTRY CODE = ";GETSETTING$("CONFIG","FBPL","COUNTRY CODE") "CODEPAGE = ";GETSETTING$("CONFIG","FBPL","CODEPAGE") Result Sample code(NET, WLAN) OUT "Ethernet DEFAULT RAW PORT = ";GETSETTING$("CONFIG","NET","RAW PORT") OUT OUT OUT OUT OUT OUT "WLAN MAC ADDRESS = ";GETSET
11.24 SET USBHOST Description Set the USB host mode for the models with LCD when using INPUT command and SET FILTER command. Syntax SET USBHOST KEYBOARD/SCANNER Parameter KEYBOARD SCANNER Description USB keyboard (Enable the prompt shown on LCD) USB scanner (Disable the prompt shown on LCD) Note: ▪ This command is for the models with USB Host ports and LCD. Example Sample code SET USBHOST KEYBOARD DOWNLOAD "A.BAS" :LOOP SIZE 4,2 GAP 0,0 CLS INPUT A$ TEXT 50,50,"0",0,20,20,A$ PRINT 1 GOTO LOOP EOP A.
11.25 SET AUTORUN Description Redefine the BAS file which can be run automatically while switching on the printer. Default is AUTO.BAS. Syntax SET AUTORUN "filename" Parameter filename Description The file will be defined to AUTO-RUN file. Default is AUTO.BAS. Example Sample Code REM *****Step1: Send the following command to redefine the auto-run file from "AUTO.BAS" to "TEST.BAS" SET AUTORUN "TEST.BAS" REM *****Step2: Send the following commands to download "TEST.BAS" file into printer.
11.26 SET RESPONSE Description Respond to an error automatically. Syntax SET RESPONSE ["Job ID",] ON/OFF/BATCH Parameter ["Job ID"] ON OFF BATCH Description Optional. Set job ID. Default is Null. Enable this function. Disable this function. Default is OFF. Respond at the end of the print job.
Example Sample Code SET RESPONSE ON SIZE 4,2 GAP 0,0 PRINT 3 {00,00001}{00,00002}{00,00003} Sample Code SET RESPONSE "ID1",ON SIZE 4,2 GAP 0,0 PRINT 3,2 {00,00001,ID1}{00,00002,ID1}{00,00003,ID1}{00,00004,ID1}{00,00005,ID1}{00 ,00006,ID1} Sample Code SET RESPONSE "CCCC ",BATCH SIZE 4,2 GAP 0,0 PRINT 3,2 {00,00006,CCCC} 222
11.27 SET DAYLIGHT_SAVE Description Set daylight saving time.
11.28 SET REGISTRATION Description Set the label position mode for the label roll with a different size of labels. Syntax SET REGISTRATION mode Parameter mode Description BYSIZE: Default ACTUAL: For the label roll with different sizes of labels on the same roll Example Sample Code 2 jobs on 2 labels: SET REGISTRATION ACTUAL SIZE 4,1 GAP 0.12,0 CLS TEXT 40,40,"0",0,10,10,"1st Label 4x1" PRINT 1 SIZE 4,5 GAP 0.
11.29 PEEL Description Obtain the status of the peel-off sensor. This attribute is read only. Syntax PEEL Return Value 0 1 Description Paper is not on top of peel sensor Paper is on top of peel sensor Example Sample code DOWNLOAD "DEMO.
11.30 LED1, LED2, LED3 Description Control LED on/off. This attribute is write-only. Specify 1 to light on LED and 0 to turn off LED. Before using this command, make sure you cancel the default LED functions. See the SET LED command.
11.31 KEY1, KEY2, KEY3 Description Read the status of KEY1, KEY2 and KEY3. Model TD-4T series RJ series TJ series KEY0 KEY1 FEED FEED FEED KEY2 KEY3 KEY4 KEY5 KEY6 MENU UP RIGHT LEFT DOWN Syntax KEYm = n Key KEY1 (MENU) KEY2 (PAUSE) KEY3 (FEED) Return Value 0: released 1: pressed 0: released 1: pressed 0: released 1: pressed Example Sample code DOWNLOAD "DEMO.
11.32 SET SENSOR_REF Description Set the threshold detection of the sensor. Syntax SET SENSOR_REF AUTO SET SENSOR_REF MANUAL Key Return Value AUTO When feeding the media, the media positioning threshold is automatically fine-tuned according to the sensor values (high/low peak); Default MANUAL When feeding the media, the media positioning threshold is NOT automatically fine-tuned according to the sensor values (high/low peak), the paper positioning threshold is fixed.
12 Printer Global Variables 12.1 @LABEL Description Count how many pieces of labels have been printed. This attribute cannot be initialized if the printer is reset, but will be retained if the printer is turned off. Syntax Write attribute: @LABEL=n or @LABEL= "n" Read attribute: A=LABEL or A$=STR$(LABEL) Parameter n Description Number of labels printed. 0<=n<=999999999 Example Sample code Result DOWNLOAD "DEMO.BAS" SIZE 4,2.
12.2 YEAR Description Write/read the year data via the Real Time Clock (RTC). Four-digit year format is supported by RTC. Syntax Write attribute: YEAR = 02 Read attribute: A = YEAR Range: 00~50 = 2000~2050; 51~99 = 1951~1999 Example Sample code DOWNLOAD "SetYear.BAS" REM *****Set Year Parameter to RTC***** YEAR=13 EOP SetYear Sample code DOWNLOAD "DEMO.
12.3 MONTH Description Write/read the month data via the Real Time Clock (RTC). Two-digit (01~12) month format is supported by RTC. Syntax Write attribute: MONTH = 01 Read attribute: A = MONTH Range: 01~12 Example Sample code DOWNLOAD "SetMonth.BAS" REM *****Set Month Parameter to RTC***** MONTH=01 EOP SetMonth Sample code DOWNLOAD "DEMO.
12.4 DATE Description Write/read the date data via the Real Time Clock (RTC). Two-digit (01~31) date format is supported by RTC. Syntax Write attribute: DATE = 12 Read attribute: A = DATE Range: 01~31 Example Sample code DOWNLOAD "SetDate.BAS" REM *****Set Date Parameter to RTC***** DATE=10 EOP SetDate Sample code DOWNLOAD "DEMO.
12.5 WEEK Description Read the day of the week data via the Real Time Clock (RTC), which is represented by one single digit (1~7). Syntax Read attribute: A = WEEK Range: 1(Sunday)~7(Saturday) Example Sample code DOWNLOAD "DEMO.
12.6 HOUR Description Write/read the hour data via the Real Time Clock (RTC). The 24-hour-day system (00~23) is supported by RTC. Syntax Write attribute: HOUR = 12 Read attribute: A = HOUR Range: 00~23 Example Sample code DOWNLOAD "SetHour.BAS" REM *****Set Hour Parameter to RTC***** HOUR=10 EOP SetHour Sample code DOWNLOAD "DEMO.
12.7 MINUTE Description Write/read the minute data via the Real Time Clock (RTC). Two-digit (00~59) minute format is supported by RTC. Syntax Write attribute: MINUTE = 12 Read attribute: A = MINUTE Range: 00~59 Example Sample code DOWNLOAD "SetMinute.BAS" REM *****Set Minute Parameter to RTC***** MINUTE=27 EOP SetMinute Sample code DOWNLOAD "DEMO.
12.8 SECOND Description Write/read the second data via the Real Time Clock (RTC). Two-digit (00~59) second format is supported by RTC. Syntax Write attribute: SECOND = 12 Read attribute: A = SECOND Range: 00~59 Example Sample code DOWNLOAD "SetSecond.BAS" REM *****Set Second Parameter to RTC***** SECOND=59 EOP SetSecond Sample code DOWNLOAD "DEMO.
12.9 @YEAR Description Write/read the year data via the Real Time Clock (RTC). Two-digit year format is supported by RTC. @YEAR global variable can be accessed directly without using BASIC language functions.
12.10 @MONTH Description Write/read the month data via the Real Time Clock (RTC). Two-digit (01~12) month format is supported by RTC. @MONTH global variable can be accessed directly without using BASIC language functions.
12.11 @DATE Description Write/read the date data via the Real Time Clock (RTC). Two-digit (01~31) date format is supported by RTC. @DATE global variable can be accessed directly without using BASIC language functions.
12.12 @DAY Description Write/read the day of the week data via the Real Time Clock (RTC), which is represented by one single digit (1~7). @DAY global variable can be accessed directly without using BASIC language functions.
12.13 @HOUR3 Description Write/read the hour data via the Real Time Clock (RTC). The 24-hour-day system (00~23) is supported by RTC. @HOUR global variable can be accessed directly without using BASIC language functions.
12.14 @MINUTE Description Write/read the minute data via the Real Time Clock (RTC). The two-digit (00~59) minute format is supported by RTC. @MINUTE global variable can be accessed directly without using BASIC language functions.
12.15 @SECOND Description Write/read the second data via the Real Time Clock (RTC). The two-digit (00~59) second format is supported by RTC. @SECOND global variable can be accessed directly without using BASIC language functions.
12.16 _MODEL$ Description This variable can be read only. It includes the information of printer’s model name. Syntax _MODEL$ Example Sample code SIZE 4,1 GAP 0,0 DIRECTION 1 CLS TEXT 10,10, "3",0,1,1, "Model: " + _MODEL$ TEXT 10,60, "3",0,1,1, "Serial No.
12.17 _SERIAL$ Description This variable can be read only. It includes the information of the printer’s serial number. The printer’s serial number must be programmed into the printer at factory. Syntax _SERIAL$ Example Sample code SIZE 4,1 GAP 0,0 DIRECTION 1 CLS TEXT 10,10, "3",0,1,1, "Model: " + _MODEL$ TEXT 10,60, "3",0,1,1, "Serial No.
12.18 _VERSION$ Description This variable can be read only. It includes the information of the printer’s firmware version. Syntax _VERSION$ Example Sample code SIZE 4,1 GAP 0,0 DIRECTION 1 CLS TEXT 10,10, "3",0,1,1, "Model: " + _MODEL$ TEXT 10,60, "3",0,1,1, "Serial No.
13 Bluetooth Module Setting Commands 13.1 BT NAME Description Set the Bluetooth module name (Max.15 byte). Syntax BT NAME “name” Note: To check the updated name, send the SELFTEST BT command.
13.2 BT PINCODE Description Set the Bluetooth module PIN code (Max.15 byte). Syntax BT PINCODE “pincode” Note: To check the updated PIN code, send the SELFTEST BT command.
13.3 BT MODE Description Enable or disable the Bluetooth Low Energy (BLE) mode. Syntax • Enable Bluetooth Low Energy (BLE) [TD-4650TNWB/TD-4750TNWB/TD-4650TNWBR/TD-4750TNWBR/RJ-2055WB/RJ-3055WB/TJ4420TN/TJ-4520TN/TJ-4620TN/TJ-4422TN/TJ-4522TN] Send the following commands. BT MODE "BT4.0" WLAN MODULE SAVECFG DELAY 30000 INITIALPRINTER Wait for about 30 seconds for the printer to restart automatically. [RJ-2035B/RJ-3035B] Send the command below. BT MODE BT4.
BT MODE BT2.1 Restart the printer. Note: [TD-4650TNWB/TD-4750TNWB/TD-4650TNWBR/TD-4750TNWBR/RJ-2055WB/RJ-3055WB] • Make sure you use the correct firmware version to enable Bluetooth Low Energy (BLE). Model • Firmware Version TD-4650TNWB / 4750TNWB / 4650TNWBR / 4750TNWBR V1.04.S18 or later RJ-2055WB / 3055WB B1.00.Q28 or later Check whether the Bluetooth/Wi-Fi modules current firmware supports BLE.
13.4 SET BTLINKBACK Description Enable or disable the automatic Bluetooth reconnection feature (MFi model only). Syntax • Enable the automatic Bluetooth reconnection feature (Default) SET BTLINKBACK ON • Disable the automatic Bluetooth reconnection feature Disable the automatic Bluetooth reconnection feature to prevent any previously paired iOS/iPadOS devices from automatically connecting to the printer: SET BTLINKBACK OFF Note: • If the printer firmware version is B1.00.
14 Wi-Fi Module Setting Commands 14.1 WLAN SSID Description Set the SSID of your wireless network into Wi-Fi module. Syntax WLAN SSID "ssid" Parameter ssid Description SSID (name of your wireless network) Note: SSID is case-sensitive. The maximum length is 32 bytes. 1. Type the WLAN SSID command. 2. Type the DELAY command to set the wait time to 30 seconds and then type the SOUND command to make a beep sound. 3. Send the commands to the printer.
14.2 WLAN WPA Description Disable the WPA security mode or set the password (network key). Syntax WLAN WPA OFF WLAN WPA "key" Parameter OFF Key Description Disable WPA security mode. Network security key. 8 to 63 characters. Key = Passphrase or Pre-Shared Key (Passphrase is a string containing between 8 and 63 characters) (Pre-Shared Key is a 32-byte key, formatted as hexadecimal number) Example 1. Type the WLAN WPA command. 2.
14.3 WLAN WEP Description Disable the WEP security mode or set the password (Encryption key). Syntax WLAN WEP OFF WLAN WEP n, "key" Parameter OFF N Key Description Disable WEP security mode. WEP KEY: 1 - 4 Encryption key: 5 or 13 characters or 10 or 26 hexadecimal digits 1. Type the WLAN WEP command. 2. Type the DELAY command to set the wait time to 30 seconds and then type the SOUND command to make a beep sound. 3. Send the commands to the printer.
14.4 WLAN DHCP Description Set the printer to get the IP address from DHCP server. Syntax WLAN DHCP 1. Type the WLAN DHCP command. 2. Type the DELAY command to set the wait time to 30 seconds and then type the SOUND command to make a beep sound. 3. Send the commands to the printer. Example: WLAN SSID "TEST-AP" WLAN WPA "123456789" WLAN DHCP WLAN PORT 9100 DELAY 30000 SOUND 5,400 4. Wait for about 30 seconds. If you hear the beep, restart the printer.
14.5 WLAN IP Description Set the specific static IP address to the printer. Syntax WLAN IP "ip", "mask", "gateway" Parameter ip Mask Gateway Description IP address Subnet mask Default gateway 1. Type the WLAN IP command. 2. Type the DELAY command to set the wait time to 30 seconds and then type the SOUND command to make a beep sound. 3. Send the commands to the printer. Example: WLAN SSID "TEST-AP" WLAN WPA "123456789" WLAN IP "10.0.10.138", "255.255.255.0", "10.0.10.
14.6 WLAN PORT Description Specify the PORT number of Wi-Fi module. Syntax WLAN PORT number Parameter number Description Base raw port number. Default is 9100. 1. Type the WLAN PORT command. 2. Type the DELAY command to set the wait time to 30 seconds and then type the SOUND command to make a beep sound. 3. Send the commands to the printer. Example: WLAN SSID "TEST-AP" WLAN WPA "123456789" WLAN IP "10.0.10.138", "255.255.255.0", "10.0.10.252" WLAN PORT 8000 DELAY 30000 SOUND 5,400 4.
14.7 WLAN THROUGH Description Set the printer’s network interface to Wi-Fi/Bluetooth for TJ-4420TN, TJ-4520TN, TJ-4620TN, TJ-4422TN and TJ-4522TN. These printers cannot use a Wired LAN and a Wi-Fi/Bluetooth connection at the same time. Enable the network connection type you want to use. Syntax WLAN THROUGH • Enable Wi-Fi/Bluetooth and disable Ethernet. Send the following commands. WLAN THROUGH The printer restarts automatically. • Enable Ethernet and disable Wi-Fi/Bluetooth.
15 Internal Ethernet Setting Commands 15.1 NET DHCP Description Set the printer to get the IP address from DHCP server. The printer will restart itself while setting this command.
15.2 NET IP Description Set the specific IP address to the printer. The printer will restart automatically. Syntax NET IP "ip","mask","gateway" Parameter ip mask gateway Description IP address Subnet mask Default gateway Example Sample code NET IP "192.168.10.40","255.255.255.0","192.168.10.
15.3 NET PORT Description Specify the PORT number of Ethernet. The printer will restart automatically. Syntax NET PORT number Parameter number Description Base raw port number. Default is 9100.
15.4 NET NAME Description Set the printer server name. Syntax NET NAME "printerserver" Parameter printerserver Description The specific name of printer server.
15.5 NET THROUGH Description Set the printer’s network interface to Ethernet for TJ-4420TN, TJ-4520TN, TJ-4620TN, TJ-4422TN and TJ4522TN. These printers cannot use an Ethernet and a Wi-Fi/Bluetooth connection at the same time. Enable the network connection type you want to use. Syntax NET THROUGH • Enable Ethernet and disable Wi-Fi/Bluetooth. Send the following commands. NET THROUGH The printer restarts automatically. • Enable Wi-Fi/Bluetooth and disable Ethernet. Send the following commands.
16 Setting Commands for RJ-2035B/2055WB/3035B/3055WB 16.1 SET PRINTQUALITY Description Set the print mode (print quality) for RJ-2035B/2055WB/3035B/3055WB. Syntax SET PRINTQUALITY DRAFT/STANDARD/OPTIMUM Parameter DRAFT STANDARD OPTIMUM Description High print speed with lower density Standard print speed and quality According to the label content such as barcode, text, and graphic to lower the print speed for getting higher print quality Note: The default value is STANDARD.
16.2 SET STANDBYTIME Description Set the standby time for RJ-2035B/2055WB/3035B/3055WB. The battery LED indicators will automatically turn off if it is not used for the specified time period. Syntax SET STANDBYTIME OFF/XXXXX Parameter OFF XXXXX Description Disable 0 ~ 625534 (seconds) Note: The default value is 120.
16.3 SET SLEEPTIME Description Set the sleep time for RJ-2035B/2055WB/3035B/3055WB. The printer will automatically power off if it is not used for the specified time period. Syntax SET SLEEPTIME OFF/XXXXX Parameter OFF XXXXX Description Disable 0 ~ 65534 (minutes) Note: The default value is 120.
17 RFID 17.1 RFID READ / RFID WRITE Description Read/Write to an RFID tag. IMPORTANT: • Always test RFID media on your printer before purchasing large quantities of media. • Perform Media Calibration before RFID Calibration. Make sure you correctly install the ribbon (Thermal transfer only) and the label roll. • For more information, see User’s Guide on your model’s Manual page at support.brother.com.
"Read Data:" or data READ = [prompt of data] WRITE = Contents of data string Note: - RFID WRITE supported "string" or basic variable (for example: VAR$) - [ ] = Optional parameter Example Sample code (1) CLS RFID WRITE,0,H,0,12,EPC,"123456789012" RFID READ,0,H,0,12,EPC,"Read Data: " PRINT 1 268
Sample code (2) This programming example writes a data with lock password into an RFID tag and reads the written data with a prompt. CLS RFID WRITE,1234,H,0,8,EPC,"20191008" RFID READ,0,H,0,8,EPC,"Date: " PRINT 1 Note: For this locked RFID tag, it cannot be overwritten data without using RFID READ unlock password command.
Sample code (3) When using WRITE, if the "size" is larger than the "data", it will be padded with 0 in front of the data to read. When using READ, if the "size" is larger than the WRITE "data", it will be padded with 0 in back of the data to read.
Sample code (4) This programming example changes PC (Protocol Control) bits. Note: Make sure you use the correct firmware version to set the PC bits. Model Firmware Version TD-4650TNWBR / TD-4750TNWBR V1.04.S21 or later TJ-4021TNR / TJ-4121TNR B2.12.
17.2 RFIDDETECT Description Perform RFID calibration.
18 General purpose input output (GPIO) Setting Commands 18.1 Before Using GPIO Internal and External Mode (JP2) - The default setting is the internal mode. To use the external mode, contact your sales representative before your purchase. - The voltage level of Pin 2 should be limited to +5V-28V in the external mode to prevent damage to the PCB. Internal Mode (Default) IO power is set to 5V. • External Mode IO power is set to the voltage level you input to Pin 2.
18.2 SET GPO Description Send out an electrical signal from the printer when detecting the specified printer status. Syntax SET GPOn signal state, delay0, pulse0, delay1, pulse1, function condition Parameter Description n Pin number (n = 1 - 7) Select from the seven GPO pins. signal state HIGH Output a high-level signal when detecting the function conditions listed below. LOW Output a low-level signal when detecting the function conditions listed below.
function condition (warning, error, control…) FAULT RIBBON Ribbon error FAULT PAPER Paper jam or no paper FAULT CARRIAGE Print head unit is open FAULT MEMORY Memory full FAULT CUTTER Cutter error FAULT OVERHEAT Stepping motor or print head has overheated TAKELABEL Label taken PAUSE The printer's operations are paused IDLE Printer in idle mode PRINT Printing in progress FAULT Printer errors other than the errors listed above Example Sample code (1) SET SET SET SET GPO1 GPO2 GPO3 GPO4
Time Chart GPO Level Signal: HIGH/LOW (Printer to host) GPO Pulse Signal: POS/NEG (Printer to host) 276
18.3 SET GPI Description Control the printer using an electrical signal from an external device. Syntax SET GPIn signal, pulse, function Parameter Description n Pin number (n = 1 - 4) Select from the four GPI pins.
Example Sample code (1) SET SET SET SET GPI1 GPI2 GPI3 GPI4 HIGH,0,PAUSE LOW,0,PAUSE ON POS,100,PAUSE OFF NEG,100,CUT Sample code (2) SET GPI1 NEG,100,INPUT "TEST.BAS"+CHR$(13)+CHR$(10) Sample code (3) SET GPI1 POS,100,INPUT "TEST1.BAS" +CHR$(13)+CHR$(10) SET GPI2 NEG,100,CUT SET GPI3 POS,100,INPUT "TEST2.
Time Chart GPI Level Signal: HIGH/LOW (Host to printer) GPI Pulse Signal: POS/NEG (Host to printer) 279
18.4 GPIO Application Note Circuit Diagram Note: Photocouplers: PC357N1TJ000F (PC817) / SMD [IC], PC357NT(PC817) / SMD [IC] All have the same specifications. For more information about IO_power, see the Internal and External Mode (JP2).
GPIO Pin Definition Pin 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Configuration GND 5V(JP2 short) GPI_1 GPI_2 GPI_3 GPI_4 24V GND GPO_1 GPO_2 GPO_3 GPO_4 GPO_5 GPO_6 GPO_7 Signal Type I/O Signal Ground Power Input Input Input Input Power Power Ground Output Output Output Output Output Output Output Note: DO NOT input any signal or voltage to Pin 7 to prevent the damage to the PCB. Pin 7 always outputs 24V as a reference voltage level. For normal operation, we do not recommend using Pin 7.
Appendix A: Command List by Model Command TD-4420TN TD-4520TN TD-4650TNWB TD-4750TNWB TD-4650TNWBR TD-4750TNWBR RJ-2035B RJ-3035B RJ-2055WB RJ-3055WB ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ TJ-4005DN TJ-4010TN TJ-4020TN TJ-4021TN TJ-4120TN TJ-4121TN TJ-4021TNR TJ-4121TNR TJ-4420TN TJ-4520TN TJ-4620TN TJ-4422TN TJ-4522TN ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ Setup and System C
Command TD-4420TN TD-4520TN SOUND ○ CUT ○ LIMITFEED ○ ○ ○ ○ SELFTEST EOJ DELAY BARCODE TLC39 BITMAP BOX CIRCLE ELLIPSE CODABLOCK F mode DMATRIX ERASE MAXICODE RJ-2055WB RJ-3055WB TJ-4005DN ○ ○ ○ ○ Except RFID tags ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ Except RFID tags ○ ○ ○ ○ ○ TJ-4021TN/4121TN/ TJ-4021TNR/4121TNR only TJ-4420TN TJ-4520TN TJ-4620TN TJ-4422TN TJ-4522TN ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○
TD-4420TN TD-4520TN TD-4650TNWB TD-4750TNWB TD-4650TNWBR TD-4750TNWBR MPDF417 ○ ○ ○ ○ ○ ○ PUTBMP ○ ○ PUTPCX ○ ○ ○ ○ ○ ○ ○ Command PDF417 AZTEC QRCODE RSS REVERSE DIAGONAL TEXT BLOCK TJ-4005DN TJ-4010TN TJ-4020TN TJ-4021TN TJ-4120TN TJ-4121TN TJ-4021TNR TJ-4121TNR TJ-4420TN TJ-4520TN TJ-4620TN TJ-4422TN TJ-4522TN ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ RJ-2035B RJ-3035B RJ-2055WB RJ-3055WB ○ ○ ○ ○ ○ ○ ○ ○ (1-bit only) (1-bit only) ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○
Command TD-4420TN TD-4520TN TD-4650TNWB TD-4750TNWB TD-4650TNWBR TD-4750TNWBR ○ ○ ○ ○ ○ ○ ○ ~!@ ~!A ~!D ~!E ~!F ~!I ~!T TJ-4005DN TJ-4010TN TJ-4020TN TJ-4021TN TJ-4120TN TJ-4121TN TJ-4021TNR TJ-4121TNR TJ-4420TN TJ-4520TN TJ-4620TN TJ-4422TN TJ-4522TN RJ-2035B RJ-3035B RJ-2055WB RJ-3055WB ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○
Command CHR$( ) XOR$( ) END EOF( ) OPEN CLOSE WRITE READ SEEK LOF( ) LOC( ) FREAD$( ) PUT GET COPY FOR…NEXT LOOP WHILE…WEND DO…LOOP IF…THEN…ELSE…ENDIF LOOP GOSUB…RETURN GOTO INP$( ) INP( ) TD-4420TN TD-4520TN TD-4650TNWB TD-4750TNWB TD-4650TNWBR TD-4750TNWBR RJ-2035B RJ-3035B RJ-2055WB RJ-3055WB TJ-4005DN TJ-4010TN TJ-4020TN TJ-4021TN TJ-4120TN TJ-4121TN TJ-4021TNR TJ-4121TNR ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○
Command LOB( ) PREINPUT POSTINPUT SET FILTER REM OUT OUTR GETKEY( ) INT( ) LEFT$( ) LEN( ) MID$( ) RIGHT$( ) STR$( ) STRCOMP( ) INSTR ( ) TRIM$( ) LTRIM$( ) RTRIM$( ) TEXTPIXEL( ) BARCODEPIXEL( ) VAL( ) NOW$( ) TD-4420TN TD-4520TN TD-4650TNWB TD-4750TNWB TD-4650TNWBR TD-4750TNWBR RJ-2035B RJ-3035B RJ-2055WB RJ-3055WB TJ-4005DN TJ-4010TN TJ-4020TN TJ-4021TN TJ-4120TN TJ-4121TN TJ-4021TNR TJ-4121TNR ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○
Command NOW FORMAT$( ) DATEADD() FSEARCH() TJ-4010TN TJ-4020TN TJ-4021TN TJ-4120TN TJ-4121TN TJ-4021TNR TJ-4121TNR TJ-4420TN TJ-4520TN TJ-4620TN TJ-4422TN TJ-4522TN ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ TJ-4021TN/4121TN only TJ-4422TN/4522TN only ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ TD-4420TN TD-4520TN TD-4650TNWB TD-4750TNWB TD-4650TNWBR TD-4750TNWBR RJ-2035B RJ-3035B RJ-2055WB RJ-3055WB TJ-4005DN ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ TOUCHPRESS() RECORDSET$ ( ) REPLACE$() ○ ○ ○ ○ Device Reconfiguration Commands
Command TD-4420TN TD-4520TN TD-4650TNWB TD-4750TNWB TD-4650TNWBR TD-4750TNWBR RJ-2035B RJ-3035B RJ-2055WB RJ-3055WB TJ-4005DN TJ-4010TN TJ-4020TN TJ-4021TN TJ-4120TN TJ-4121TN TJ-4021TNR TJ-4121TNR TJ-4420TN TJ-4520TN TJ-4620TN TJ-4422TN TJ-4522TN SET OBVERSE ○ SET BLINE PRINTSIDE / SET BLINE BACKSIDE ○ RJ-3055WB gap-sensor model only ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ PEEL ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ SET REGISTRATION ○ ○ ○ ○ ○ ○ ○ ○
Command TD-4420TN TD-4520TN TD-4650TNWB TD-4750TNWB TD-4650TNWBR TD-4750TNWBR RJ-2035B RJ-3035B RJ-2055WB RJ-3055WB TJ-4005DN TJ-4010TN TJ-4020TN TJ-4021TN TJ-4120TN TJ-4121TN TJ-4021TNR TJ-4121TNR ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ TJ-4420TN TJ-4520TN TJ-4620TN TJ-4422TN TJ-4522TN ○ ○ ○ ○ ○ ○
Command TD-4420TN TD-4520TN TD-4650TNWB TD-4750TNWB TD-4650TNWBR TD-4750TNWBR RJ-2035B RJ-3035B RJ-2055WB RJ-3055WB TJ-4005DN TJ-4010TN TJ-4020TN TJ-4021TN TJ-4120TN TJ-4121TN TJ-4021TNR TJ-4121TNR ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ TJ-4420TN TJ-4520TN TJ-4620TN TJ-4422TN TJ-4522TN ○ SET BTLINKBACK Wi-Fi Module Setting Commands ○ ○ ○ ○ ○ ○ WLAN SSID WLAN WPA WLAN WEP WLAN DHCP WLAN IP WLAN PORT WLAN THROUGH Internal Ethernet Setting Commands NET DHC
Command TD-4420TN TD-4520TN TD-4650TNWB TD-4750TNWB TD-4650TNWBR TD-4750TNWBR RJ-2035B RJ-3035B RJ-2055WB RJ-3055WB TJ-4005DN TD-4650TNWBR/ 4750TNWBR only RFIDDETECT TJ-4010TN TJ-4020TN TJ-4021TN TJ-4120TN TJ-4121TN TJ-4021TNR TJ-4121TNR TJ-4420TN TJ-4520TN TJ-4620TN TJ-4422TN TJ-4522TN TJ-4021TNR/4121TNR only ○ ○ TD-4650TNWBR/ 4750TNWBR only TJ-4021TNR/4121TNR only GPIO Commands ○ ○ SET GPO SET GPI 292 ○ ○ ○ ○
Appendix B: Download your Fonts To use the built-in fonts, select the font name from the list of the TEXT command. To use the downloaded fonts, download your fonts to the printer using the Brother Printer Management Tool (BPM): 1. 2. 3. 4. 5. Connect your computer and the printer, and then turn on the printer. Start the BPM and click the File Manager. Click Browse to select the font file. Select FLASH from the Memory Device drop-down list. Click Download to start downloading the file.