Page 5
kroy SET CUTTER..........................111 SET KEY1 ............................. 113 SET KEY2 ............................. 113 SET LED1, LED2, LED3 ........................ 115 SET PEEL ............................. 116 SET DEBUG..........................117 SET GAP............................118 SET RIBBON..........................119 SET COM1............................ 120 @LABEL ............................122 PEEL............................. 123 LED1, LED2, LED3........................124 KEY1, KEY2 ..........................
Page 7
kroy OUT ..............100 SET DEBUG..........117 PDF417 ............40 SET GAP ............118 PEEL ..............123 SET KEY1............113 PRINT...............22 SET KEY2............113 PUTPCX............42 SET LED1, LDE2, LED3....... 115 READ..............82 SET PEEL............116 REDRAW ............68 SET RIBBON..........119 REFERENCE...........13 SIZE ..............2 REM..............99 SOUND ............
kroy Document Conventions This manual uses the following typographic conventions. Convention Description [expression list] Items inside square brackets are optional. <ESC> ESCAPE (ASCII 27), control code of status polling command, which returns the printer status immediately, no matter the printer is ready or not.
kroy Setup and System Commands SIZE Description This command defines the label width and length. Syntax (1) English system (inch) SIZE m, n (2) Metric system (mm) SIZE m mm, n mm Parameter Description Label width (inch or mm) Label length (inch or mm) Note: 200 DPI: 1 mm = 8 dots 300 DPI: 1 mm = 12 dots...
kroy Description Define the gap distance between two labels Syntax (1) English system (inch) GAP m, n (2) Metric system (mm) GAP m mm, n mm Parameter Description The gap distance between two labels 0 ≤ m ≤ 1 (inch), 0 ≤ m ≤ 25.4 (mm) The offset distance of the gap [-]n ≤...
kroy BLINE Description This command is used to set the height of the black line and the user- defined extra label feeding length each form feed takes. Syntax (1) English system (inch) BLINE m, n (2) Metric system (mm) BLINE m mm, n mm Parameter Description The height of black line either in inch or mm.
kroy OFFSET Description This command defines the selective, extra label feeding length each form feed takes, which, especially in peel-off mode and cutter mode, is used to adjust label stop position, so as for label to register at proper places for the intended purposes.
kroy SPEED Description This command defines the print speed. Syntax SPEED n Parameter Description Set print speed at 1.5 inch/sec (B 442, 443) Set print speed at 2.0 inch/sec (B 442, B- 443) Set print speed at 3.0 inch/sec (B-443) Example SPEED 2.0 Kroy LLC / Kroy (Europe) Ltd...
kroy DENSITY Description This command designates the level of darkness of printing. Syntax DENSITY n Parameter Description 0, specifies the lightest level 15, specifies the darkest level Example DENSITY 7 Kroy LLC / Kroy (Europe) Ltd...
kroy DIRECTION Description This command defines the print direction. Syntax DIRECTION n Parameter Description 0 or 1. Please refer to the illustrations below: Example DIRECTION 0 Kroy LLC / Kroy (Europe) Ltd...
kroy REFERENCE Description This command defines the reference point of the label. The reference (origin) point varies with the print direction, as shown: Syntax REFERENCE x, y Parameter Description Horizontal coordinate, with “ dot” as the unit. Vertical coordinate, with “ dot” as the unit. Example REFERENCE 10,10 Kroy LLC / Kroy (Europe) Ltd...
kroy COUNTRY Description This command defines what special character to have on the portable LCD keyboard (KP-200, option) to orient the keyboard for use in different countries. Syntax COUNTRY n Parameter Description 001: USA 002: Canadian-French 003: Spanish (Latin America) 031: Dutch 032: Belgian 033: French (France)
Page 22
kroy Example COUNTRY 001 Kroy LLC / Kroy (Europe) Ltd...
kroy CODEPAGE Description This command defines the code page of international character set. Syntax CODEPAGE n Parameter Description name or number of code page, which can be divided into 7-bit code page and 8-bit code page further. 7-bit code page name USA: USA BRI: British GER: German...
kroy FORMFEED Description This command feeds label to the beginning of next label. Syntax FORMFEED Parameter Description Example FORMFEED Kroy LLC / Kroy (Europe) Ltd...
kroy l HOME Description It is not expected the first label will be printed on the right position when the printer power is turned on. This command will feed the label to find the gap first and then back feed to the beginning of label, on condition that the size of the label was set in advance.
kroy PRINT Description This command prints the label form stored in the image buffer. Syntax PRINT m [,n] Parameter Description Specifies how many sets of labels will be printed. 1 ≤ m ≤ 65535 Specifies how many copies should be printed for each set of label.
kroy l SOUND Description This command is used to control the sound frequency of the beeper. There are 10 levels of sounds. The timing control of the sound can be set by the “ interval” parameter. Syntax SOUND level, interval Parameter Description level...
kroy l CUT Description At this command, the printer will activate the cutter to cut the labels. Applicable models: B-443 Syntax Parameter Description None Kroy LLC / Kroy (Europe) Ltd...
kroy l LIMITFEED Description When feeding labels, if the gap sensor is not set to a suitable strength, the printer will be unable to locate the correct position of the gap. This command is used to stop label feeding and make the red LED flash if the printer does not locate gap after feeding the length of one label plus one preset value.
kroy Label Formatting Commands l BAR Description This command is used to draw a line or a bar on the label form. Syntax BAR x, y, width, height Parameter Description The upper left corner x-coordinate in dot The upper left corner y-coordinate in dot width The width of bar in dot height...
kroy BARCODE Description This command is used to print 1D barcodes on label form. The available bar codes in B-443 are listed below: Code 128 (switching code subset automatically) Code 128M (switching code subset manually) EAN 128 (switching code subset automatically) Interleaved 2 of 5 Interleaved 2 of 5 with check digit Code 39...
Page 35
kroy Parameter Description Specify the x-coordinate of the bar code on label Specify the y-coordinate of the bar code on label code type Code 128, switching code subset A, B, C automatically 128M Code 128, switching code subset A, B, C manually. Control code FNC3 FNC3...
Page 37
kroy EAN8+2 EAN 8 with 2 digits add-on EAN8+5 EAN 8 with 5 digits add-on CODA Codabar POST Postnet UPCA UPC-A UPCA+2 UPC-A with 2 digits add-on UPCA+5 UPC-A with 5 digits add-on UPCE UPC-E UPCE+2 UPC-E with 2 digits add-on UPCE+5 UPC-E with 5 digits add-on height...
Page 38
kroy EAN 8 EAN 8+2 EAN 8+5 CODA POST UPCA UPCA+2 UPCA+5 UPCE UPCE+2 UPCE+5 code number the bar code content Example BARCODE 100,100,” 39” ,96,1,0,2,4,” 1000” BARCODE 10,10,” 128M” ,48,1,0,2,2,” !104!096ABCD!101EFGH” (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.)
kroy BITMAP Description This command is used to draw bitmap images (Not BMP graphic file). Syntax BITMAP X, Y, width, height, mode, bitmap data… Parameter Description Specify the x-coordinate of the bitmap image Specify the y-coordinate of the bitmap image width The width of the image in bytes height...
kroy Description This command is used to draw rectangles on the label. Syntax BOX X_start, Y_start, X_end, Y_end, line thickness Parameter Description X_start Specify x-coordinate of upper left corner in dot Y_start Specify y-coordinate of upper left corner in dot X_end Specify x-coordinate of lower right corner in dot Y_end...
kroy ERASE Description This command is used to blot out a specified region from image. Syntax ERASE X_start, Y_start, X_width, Y_height Parameter Description X_start The x-coordinate of the starting point in dot Y_start The y-coordinate of the starting point in dot X_width The region width in x-axis direction in dot Y_height...
kroy l DMATRIX Description This command is used to define the DataMatrix 2D bar code. Syntax DMATRIX x, y, width, height, [xm, row, col], expression Parameter Description Horizontal start position in dot Vertical start position in dot width The width of barcode area in dot height The height of barcode area in dot Module size in dot...
kroy MAXICODE Description This command is used to define a 2D Maxicode. Syntax MAXICODE x, y, ”class, country, post, message” For mode 2 or 3: MAXICODE x, y, "class, country, postal code, low priority message" if country is 840, the postal code could be 999999999 or 99999,9999 ( Both expressions are acceptable, with or without comma in between) for all the other countries, the code is up to 6 alphanumeric...
Page 44
kroy X-coordinate of the staring point in dot Y-coordinate of the starting point in dot class Class of service, 3-digit number country Country code, 3-digit number post Post code USA: 5-digit, 4-digit number Canada: 6-digit number message Barcode content Example For USA: MAXICODE 100,100,”300,840,06810,7317,DEMO FOR MAXICODE”...
Page 45
kroy SET MAXIMODE 5 MAXICODE 24,24,"THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MA" BOX 424,16,700,60,2 DIRECTION 0 PRINT 1 REM this will use mode 2 automatically REM please check the difference of the 3 MAXICODE commands REM all 3 MAXIMODE produce same symbol SPEED 2 SIZE 4.00,3.00...
kroy PDF417 Description This command is used to define a PDF417 2D barcode. Syntax PDF417 x, y, width, height, rotate, [option], expression Parameter Description X-coordinate of the starting point in dot Y-coordinate of the starting point in dot width The width of barcode in dot height The height of barcode in dot rotate...
Page 48
kroy Y: Human readable characters in the specified y- coordinate. c: Maximum characters of human readable character per line. Module width in dot Range: 2~9 Bar height in dot Range: 4~99 Maximum number of rows Maximum number of columns Truncation. 0: Not truncated 1: Truncated Example...
kroy PUTPCX Description This command is used to print PCX format image. Syntax PUTPCX X, Y, ”filename” Parameter Description The x-coordinate of the PCX image The y-coordinate of the PCX image filename The downloaded PCX filename. Note: Only two colors (black and white) are supported by this command.
kroy REVERSE Description This command is used to reverse a region of image. Syntax REVERSE X_start, Y_start, X_width, Y_height Parameter Description X_start The x-coordinate of the starting point in dot Y_start The y-coordinate of the starting point in dot X_width The region width in x-axis direction in dot Y_height The region height in y-axis direction in dot...
kroy TEXT Description This command is used to print text on label Syntax TEXT X, Y, ”font”, rotation, x-multiplication, y-multiplication, “content” Parameter Description The x-coordinate of the text The y-coordinate of the text font: font name 8 x 12 dot font 12 x 20 dot font 16 x 24 dot font 24 x 32 dot font...
Page 52
kroy NOTE: Font “5” supports capital characters only. If there is any double quote (“) within the text, please change it “ to \[“] If there is any carriage return within the text, please change CR to \[R]. If there is any line feed within the text, please change LF to \[L] Example TEXT 100,100,”4”,0,1,1,”DEMO FOR TEXT”...
kroy Status Polling Commands (RS-232) <ESC>!? Description This command is used to obtain the printer status. An inquiry request is solicited by sending an <ESC> (ASCII 27, escape character) as the beginning control character to the printer. It can be sent any time, even in the event of printer error.
kroy <ESC>!R Description This command is used to reset the printer. It can be sent at any time as long as the printer is powered on and not in the dump mode. The beginning of the command is an ESCAPE character (ASCII 27). The files downloaded in memory will be deleted.
Page 55
kroy Description This command is used to inquire the free memory of the printer. The number of bytes of free memory is returned in decimal digits, with 0x0d as ending code to PC. Syntax Parameter Description Kroy LLC / Kroy (Europe) Ltd...
Page 56
kroy Description This command is used to inquire the model name and number of the printer. They are returned in ASCII characters. Printer type Returned string B-443 B-443 Syntax Parameter Description Kroy LLC / Kroy (Europe) Ltd...
Page 57
kroy Description This command is used to inquire the presence of Real Time Clock. One byte is returned from the printer, indicating whether or not the RTC is installed. Return value Description RTC is not installed. RTC is installed. Syntax Parameter Description Kroy LLC / Kroy (Europe) Ltd...
Page 58
kroy Description The command is used to inquire the code page and country setting of the printer. The returned information is given in the following format codepage, country code ex: 8 bit: 437, 001 7 bit: USA, 001 Regarding the codepages and country codes supported by the printer, please refer to the CODEPAGE and COUNTRY command respectively.
Page 59
kroy Description This command is used to inquire about 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 of the last filename is 0x0D or 0x1A. Syntax Parameter Description...
Page 60
kroy Description This command is used to inquire the mileage of the printer. The integer part of mileage is returned (the decimal part of mileage is not returned). It is returned to PC in ASCII characters. The ending character of mileage is 0x0D.
kroy Message Translation Protocols <ESC>!, <ESC>& Description The error message is returned by printer either to label or through RS-232 to PC by setting SET DEBUG LABEL or SET DEBUG RS232. The error message is enclosed in between the beginning <ESC>! identifier and the ending <ESC>&...
Page 62
kroy Description The beginning identifier of the prompt message is sent from the printer to the portable keyboard (KP-200). The ending identifier is ~&. Syntax ~#Prompt~& Parameter Description Example ~#SELF TEST~& Kroy LLC / Kroy (Europe) Ltd...
kroy Commands for Windows Driver Description This command is used to store bitmap image data in the memory. Behind the nnn is the bitmap data. Syntax !Bnnn Parameter Description The number of bytes of image data sent from PC to printer,expressed in 3 decimal digits. Example !B100 Kroy LLC / Kroy (Europe) Ltd...
Page 64
kroy Description This command is used to print the bitmap data at the specified position (in y-direction). Syntax !Jnnnn Parameter Description nnnn Print image at the specified position in y-direction. The position is expressed in 4 decimal digits. Example !J0100 Kroy LLC / Kroy (Europe) Ltd...
Page 65
kroy Description This command is used to print specified number of labels. Syntax !Nnnn Parameter Description Specifies the number of copies to be printed. Example !N001 Kroy LLC / Kroy (Europe) Ltd...
kroy File Management Commands DOWNLOAD Description “DOWNLOAD” is a header of the file that is to be saved in the printer's memory. The downloaded files can be programs, data files, PCX graphic files and bitmap font files The detailed descriptions regarding the download syntax for different files are shown below: Syntax 1.
Page 67
kroy DOWNLOAD “FILENAME”, DATA SIZE, DATA CONTENT… where FILENAME is the name of data file that will remain resident in the printer memory. DATA SIZE parameter is the actual size of the data file without header. Note: CR (carriage return) 0x0D and LF (Line Feed) 0x0A are accepted by printer.
Page 68
kroy (1) Fixed pitch font A. BF1 font file Extension with BF1 font file is the format of ASCII sequential arrangement. File format as follows: DOWNLOAD “FILENAME.BF1”, FILE SIZE, FONT DATA … . where FILE SIZE: The original size of *.BF1 file; “DOWNLOAD FILE SIZE”...
Page 69
kroy P4: ASCII code of first character P5: ASCII code of last character B. BF2 font file BF2 font file is characterized by the feature that its font is searched by a specified address formula. The semi-colon must be added at the end of formula, which serves as the separator between formula and font data.
Page 70
kroy Double bytes character set where P1: 0 (constant) P2: Character height (in dot) P3: Character width (in dot) Address formula: Example: (94*(HB-163)+LB-161)*72+128; where HB: A fixed variable for double byte character, which means high byte LB: A fixed variable which means low byte 163: The starting ASCII code of high byte 161: The staring ASCII code of low byte 72: The size of character in byte...
Page 71
kroy DOWNLOAD “FILENAME.BF3”, FILE SIZE, FONT DATA… . where FILE SIZE: The original size of *.BF3 file. “DOWNLOAD FILE SIZE” “FILENAME.BF3”, included. FONT DATA: The font arrangement is as shown below: where P1: 0 (constant) P2: Character height (in dot) P3: Character width (in dot) P4: Character counts P5: Character code.
Page 72
kroy where P1: 0 (constant) P2: Character height (in dot) P3: ASCII code of first character P4: ASCII code of last character P5: Character width (in dot) Double byte character set where P1: 0 (constant) P2: Character height (in dot) P3: ASCII code of first character P4: ASCII code of last character P5: Character width (in dot)
Page 73
kroy Single byte character set where P1: 0 (constant) P2: Character height (in dot) P3: Character width (in dot) Address formula: Example: (LB-32)*24+18; where LB: A fixed variable for single byte character 32: The starting ASCII code 24: The size of character in bytes 18: The offset bytes beginning from P1 to ;...
Page 74
kroy LB: A fixed variable, meaning low byte 163: The starting ASCII code of high byte 161: The staring ASCII code of low byte 72: The size of character in byte 128: The offset bytes beginning from P1 to ; ;: Semi-colon, the ending of formula Kroy LLC / Kroy (Europe) Ltd...
kroy REDRAW Description This command is used to copy font file to the flash memory of the font cartridge Syntax REDRAW n, size, font data… Parameter Description The Number of flash memory. Available numbers are 1~4. The size of each flash memory is 1MB. size The file size of font file Note: If the size of font file is larger that 1MB, you have to split it into two files...
kroy Description End of program. To declare the start and end of BASIC language commands used in a program, the “DOWNLOAD “FILENAME.BAS” must be added in the first line of the program, and EOP the last. . Syntax Example DOWNLOAD “DEMO.BAS” SIZE 4,4 GAP 0,0 DENSITY 8...
kroy FILES Description This command lists the files that are resident in the printer memory. The total memory size as well as available memory size are also listed. Syntax FILES Example Follow the steps below to list the files that are saved in printer memory in DOS environment.
kroy KILL Description This command deletes a file in the printer memory. The wild card can be called into use in this command. Syntax KILL “ FILENAME” KILL “ *.PCX” KILL “ *” Example Users can use printer SELF TEST utility to list printer configurations and files saved in the printer memory, or use the FILES command to inquire the files saved in printer.
kroy MOVE Description This command is used to move downloaded files to the FLASH memory. Syntax MOVE Parameter Description Kroy LLC / Kroy (Europe) Ltd...
kroy UpdatBios Description This command is used to upgrade the printer firmware. To upgrade, the printer must be in Ready status before the command can be issued. When updating the firmware, the checksum will be calculated and compared with the value of the pre-calculated checksum stored at address FE00h. If the two values are different, the upgrade process is a failure and the SYNTAX ERROR message is printed.
kroy BASIC Commands and Functions ABS( ) Description This function returns the absolute value of an integer, floating point or variable. Syntax ABS (-100) ABS (-99.99) ABS (VARIABLE) Example DOWNLOAD “TEST.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF...
kroy ASC( ) Description This function returns the ASCII code of the character. Syntax ASC (“ A” ) Example DOWNLOAD “TEST.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF CODE1=ASC(“A”) TEXT 100,100,”3”,0,1,1,STR$(CODE1) PRINT 1 Kroy LLC / Kroy (Europe) Ltd...
kroy CHR$( ) Description This function returns the character that has the specified ASCII code. Syntax CHR$(n) Parameter Description The ASCII code Example DOWNLOAD “TEST.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF A=65 WORD$=CHR$(A)
kroy Description This command stops the execution of program. Syntax Example DOWNLOAD “TEST.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF :START IF A>10 THEN END ELSE A=A+1 GOTO START TEXT 100,100,”3”,0,1,1,STR$(A) PRINT 1 Kroy LLC / Kroy (Europe) Ltd...
kroy EOF( ) Description This function is used to detect an opened download file to see whether it has reached the end of file. Syntax EOF (File Handle) Parameter Description File handle Either 0 or 1. Return value Description None-zero End of file Not end of file Example...
Page 86
kroy A$="ITEMS:"+ITEM$ B$="PRICE:"+STR$(PRICE) C$="QTY:"+STR$(QTY) TEXT 128,114,"2",0,1,1,A$ TEXT 130,198,"2",0,1,1,B$ TEXT 132,268,"2",0,1,1,C$ BARCODE 132,365,"39",96,1,0,2,4,"PRICE-2000" PRINT 1 I=EOF(0) IF I=0 THEN GOTO A PRINT 1 Kroy LLC / Kroy (Europe) Ltd...
kroy OPEN Description This command is used to open a downloaded file and establish the file handle. Up to 2 files can be opened at the same time. The file to be opened should be downloaded prior to using this command. Syntax OPEN “...
Page 88
kroy SPEED 2 DENSITY 8 SET CUTTER OFF SET PEEL OFF DIRECTIO 0 REFERENCE 0,0 OPEN “ DATA” ,1 SEEK 1,0 READ 1,ITEM$,PRICE,QTY I=EOF(1) IF I>0 THEN END BOX 98,48,502,514,2 A$=” ITEMS:” +ITEM$ B$=” PRICE:” +STR$(PRICE) C$=” QTY:” +STR$(QTY) TEXT 128,114,” 2” ,0,1,1,A$ TEXT 130,198,”...
kroy READ Description This command is used to read data from downloaded data file Syntax READ file handle, variables Parameter Description file handle 0 or 1 variables string, integer or float point variable Example DOWNLOAD “OPEN1.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0...
Page 90
kroy TEXT 128,114,"2",0,1,1,A$ TEXT 130,198,"2",0,1,1,B$ TEXT 132,268,"2",0,1,1,C$ BARCODE 132,365,"39",96,1,0,2,4,"PRICE-2000" PRINT 1 I=EOF(0) IF I=0 THEN GOTO A SEEK 1,0 READ 1,ITEM$,PRICE,QTY TEXT 10,10,"4",0,1,1,"OPEN, READ, EOF() COMMAND TEST" BOX 98,48,502,514,2 A$="ITEMS:"+ITEM$ B$="PRICE:"+STR$(PRICE) C$="QTY:"+STR$(QTY) TEXT 128,114,"2",0,1,1,A$ TEXT 130,198,"2",0,1,1,B$ TEXT 132,268,"2",0,1,1,C$ BARCODE 132,365,"39",96,1,0,2,4,"PRICE-2000" PRINT 1 I=EOF(1) IF I=0 THEN GOTO B...
kroy SEEK Description This command is used to shift the specified file pointer to a certain position. Syntax SEEK file handle, offset Parameter Description file handle 0 or 1 offset the offset characters which are shifted to the beginning of a new position Example DOWNLOAD “TEST.BAS”...
Page 92
kroy TEXT 130,198,"2",0,1,1,B$ TEXT 132,268,"2",0,1,1,C$ BARCODE 132,365,"39",96,1,0,2,4,"PRICE-2000" PRINT 1 Kroy LLC / Kroy (Europe) Ltd...
kroy LOF( ) Description This function returns the size of the specified file. Syntax LOF (“ FILENAME” ) Parameter Description FILENAME The file downloaded in the printer memory. Example DOWNLOAD “OPEN2.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF...
kroy FREAD$( ) Description This function reads a specified number of bytes of data from a file. Syntax FREAD$ (file handle, byte) Parameter Description file handle Either 0 or 1 byte Number of bytes to be read Example DOWNLOAD “FREAD.BAS” SIZE 4,4 GAP 0,0 DENSITY 8...
kroy FOR… NEXT LOOP Description Loop is used to execute one or more lines of program repetitively. Before anything, a value should be assigned the loop counter to specify the execution times. Nested loop is allowed (up to 10 nested loops) in this printer.
Page 96
kroy FOR I=1 TO 10 STEP 1 A$=A$+STR$(I)+" " TEXT 10,10,"3",0,1,1,A$ NEXT FOR I=1 TO 1000 STEP 100 B$=B$+STR$(I)+" " TEXT 10,50,"3",0,1,1,B$ NEXT FOR I=50 TO 10 STEP -10 C$=C$+STR$(I)+" " TEXT 10,100,"3",0,1,1,C$ NEXT FOR I=1 TO 5 STEP 0.5 H$=H$+STR$(I)+"...
kroy IF… THEN… ELSE Description Use the IF… THEN… ELSE to execute programs conditionally. Syntax IF condition THEN statement [ ELSE statement ] The syntax of IF… THEN… ELSE requires that the command be typed in one single line in less than 255 characters. Parameter Description condition...
Page 98
kroy PRINT 1 A=A+B D$=STR$(A)+" IS LARGER THAN 100" TEXT 100,100,"4",0,1,1,D$ PRINT 1 GOTO L1 Kroy LLC / Kroy (Europe) Ltd...
kroy GOSUB… RETURN Description Branch to and return from a subroutine. Branch to the specified label and execute subroutines until “ RETURN” is reached and then go back to the statement following the GOSUB statement. Syntax GOSUB LABEL statement :LABEL statement RETURN Parameter...
Page 100
kroy Y=300 GOSUB DASH GOSUB DR_LINE PRINT 1 :DR_LINE BOX X,Y,X+200,Y+200,5 RETURN :DASH SET PEEL OFF DENSITY 13 FOR I=21 TO 50 TEXT 10,I,100,”3”,0,1,1,”==============================” NEXT RETURN Kroy LLC / Kroy (Europe) Ltd...
kroy GOTO Description This command is used to branch to a specified label. The label cannot exceed 8 characters in length. Syntax GOTO LABEL :LABEL Parameter Description Example DOWNLOAD “GOSUB1.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF...
Page 102
kroy B$="THE SUMMATION OF 1..100 IS "+STR$(TOTAL) TEXT 10,100,"3",0,1,1,B$ PRINT 1 Kroy LLC / Kroy (Europe) Ltd...
kroy INP$( ) Description One byte is received from a serial port through this function. Syntax INP$(n) Parameter Description 1: com1 port in printer Example DOWNLOAD “GOSUB1.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF PRICE$=”123456”...
kroy INPUT Description This command is used to receive data through serial port. This command is used with portable keyboard. Syntax INPUT [“ Prompt string” ], variables Parameter Description Prompt string The prompt string is shown on keyboard LCD screen. The maximum length of prompt string is 20 characters.
kroy Description Comment. Anything beginning with “ REM” is ignored by the printer. Syntax Example REM ******************************** REM This is a demonstration program* REM ******************************** DOWNLOAD “REMARK.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF TEXT 50,50,”3”,0,1,1,”REMARK DEMO PROGRAM”...
kroy Description This command is used to send data through printer serial port. Syntax OUT “ prompt” , variable Parameter Description prompt Prompt which is shown on LCD screen. Variable The output message Example DOWNLOAD “INPUT1.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0...
kroy GETKEY( ) Description This command is used to get the status of PAUSE key and FEED key. This command waits until either key is pressed. 0 is returned if PAUSE key is pressed and 1 is returned if FEED key is pressed. Syntax GETKEY() Example...
kroy INT( ) Description This function is used to truncate a floating point number. Syntax INT (n) Parameter Description n can be positive or negative integer, floating point number or mathematical expression. Example DOWNLOAD “DEMO5.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0...
Example DOWNLOAD "STR1.BAS" SIZE 4.00,4.00 GAP 0.12,0.00 SPEED 2.0 DENSITY 8 SET CUTTER OFF DIRECTION 0 REFERENCE 0,0 SET DEBUG LABEL A$="KROY EUROPE LTD." C$=LEFT$(A$,10) TEXT 10,10,"3",0,1,1,A$ TEXT 10,100,"3",0,1,1,"10 LEFT CHARS "+C$ PRINT 1 Kroy LLC / Kroy (Europe) Ltd...
The string whose length is to be measured. . Example DOWNLOAD "DEMO6.BAS" SIZE 4.00,4.00 GAP 0.12,0.00 SPEED 2.0 DENSITY 8 SET CUTTER OFF DIRECTION 0 REFERENCE 0,0 SET DEBUG LABEL A$="KROY EUROPE LTD." B=LEN(A$) TEXT 10,10,"3",0,1,1,A$ TEXT 10,50,"3",0,1,1,"STRING LENGTH="+STR$(B) PRINT 1 Kroy LLC / Kroy (Europe) Ltd...
Example DOWNLOAD "DEMO7.BAS" SIZE 4.00,4.00 GAP 0.12,0.00 SPEED 2.0 DENSITY 8 SET CUTTER OFF DIRECTION 0 REFERENCE 0,0 SET DEBUG LABEL A$="KROY EUROPE LTD." E$=MID$(A$,11,10) TEXT 10,10,"3",0,1,1,A$ TEXT 10,200,"3",0,1,1,"10 MIDDLE CHARS "+E$ PRINT 1 Kroy LLC / Kroy (Europe) Ltd...
Example DOWNLOAD "DEMO8.BAS" SIZE 4.00,4.00 GAP 0.12,0.00 SPEED 2.0 DENSITY 8 SET CUTTER OFF DIRECTION 0 REFERENCE 0,0 SET DEBUG LABEL A$="KROY EUROPE LTD." D$=RIGHT$(A$,10) TEXT 10,10,"3",0,1,1,A$ TEXT 10,150,"3",0,1,1,"10 RIGHT CHARS "+D$ PRINT 1 Kroy LLC / Kroy (Europe) Ltd...
SIZE 4.00,4.00 GAP 0.12,0.00 SPEED 2.0 DENSITY 8 SET CUTTER OFF DIRECTION 0 REFERENCE 0,0 SET DEBUG LABEL A$="KROY EUROPE LTD." F$="100" G$="500" H=VAL(F$)+VAL(G$) I$=STR$(H) TEXT 10,10,"3",0,1,1,A$ TEXT 10,250,"3",0,1,1,"STR$() FUNCTION TEST "+I$ PRINT 1 Kroy LLC / Kroy (Europe) Ltd...
SIZE 4.00,4.00 GAP 0.12,0.00 SPEED 2.0 DENSITY 8 SET CUTTER OFF DIRECTION 0 REFERENCE 0,0 SET DEBUG LABEL A$="KROY EUROPE LTD." F$="100" G$="500" H=VAL(F$)+VAL(G$) I$=STR$(H) TEXT 10,10,"3",0,1,1,A$ TEXT 10,250,"3",0,1,1,"VAL FUNCTION TEST= "+I$ PRINT 1 Kroy LLC / Kroy (Europe) Ltd...
kroy BEEP Description This command is used to issue a beep sound on portable keyboard (KP- 200). Printer sends 0x07 to portable keyboard. Syntax BEEP Parameter Description Example DOWNLOAD “DEMO11.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF...
kroy Device Reconfiguration Commands SET COUNTER Description This setting sets the counter number in program and their increments. Counter does not support mathematical operation. Syntax SET COUNTER @n step Parameter Description n: counter number. There are 50 counters available (0~49) in the printer for text and barcode. step The increment of the counter, can be positive or negative.
kroy SET CUTTER Description This setting is used to activate/deactivate the cutter and define how many printed labels to be cut at one time. Syntax SET CUTTER OFF/BATCH/pieces Parameter Description Disable cutter function. BATCH Set printer to cut label per set of printing. Please refer to PRINT command pieces...
Page 119
kroy REM This program cuts 3 times (3 set) DOWNLOAD “DEMO15.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER BATCH SET PEEL OFF TEXT 50,50,”3”,0,1,1,”DEMO14” BARCODE 50,500,”39”,48,1,0,2,4,”DEMO14” PRINT 3,2 REM SET CUTTER BATCH EXAMPLE PROGRAM REM This program cuts each printed label DOWNLOAD “DEMO16.BAS”...
kroy SET KEY1, SET KEY2 Description This setting is used to enable/disable the KEY1/ KEY2 function. The default function of KEY1 is pause and KEY2 feed. Before setting KEY1/ KEY2 function otherwise, please disable KEY1/ KEY2 first. The settings will remain resident in the printer even when the printer is power off.
Page 121
kroy IF A=0 THEN GOTO PAUSEB IF A=1 THEN GOTO FEEDB :PAUSEB TEXT 50,10,"4",0,1,1,"PAUSE key is pressed!" PRINT 1 GOTO START :FEEDB TEXT 50,10,"4",0,1,1,"FEED key is pressed!" PRINT 1 GOTO START Kroy LLC / Kroy (Europe) Ltd...
kroy SET LED1, LED2, LED3 Description This setting is used to control LED on/off function. The default function of LED1, LED2 and LED3 is as listed below: LED no. Default Function LED1 Power on/off LED2 Printer on-line/off-line LED3 Error/normal Syntax SET LED1 ON/OFF SET LED2 ON/OFF SET LED3 ON/OFF...
kroy SET PEEL Description This setting is used to enable/disable the self-peeling function. The default setting for this function is off. When this function is set on, the printer stops after each label printing, and does not print the next label until the peeled label is taken away.
kroy SET DEBUG Description This setting is used to set the output of the error message. The default error message output is set to off. Syntax SET DEBUG OFF/ LABEL/ RS232 Parameter Description Turn off error message output LABEL Output error message to label RS232 Output error message through RS-232 port Example...
kroy SET GAP Description This setting is used to set the gap sensor light emission strength. The printer initiates automatic gap sensor calibration as you hold down the PAUSE key and then turn on the printer power. But this function may cease to work if the thickness of the backing paper and that of label with backing paper are not of appreciable difference to the sensor, or when...
kroy SET RIBBON Description This setting is used to enable/disable DC motor of the ribbon mechanism (Thermal Transfer Printing/Thermal Direct Printing) Syntax SET RIBBON ON /OFF Parameter Description Thermal transfer printing Thermal direct printing Example REM Thermal direct printing SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3...
kroy Printer Global Variables @LABEL Description This variable is used to count how many pieces of labels have been printed. It won’ t be initialized if the printer is reset. It will be memorized if the printer power is turned off. Syntax Write attribute: @LABEL=n Read attribute: A=@LABEL...
kroy PEEL Description This command is used to obtain the status of the peel-off sensor. Its attribute is read only. Syntax Return Value Description Set peel-off sensor off Set peel-off sensor on Example DOWNLOAD “DEMO19.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0...
kroy LED1, LED2, LED3 Description This command is used to control LED on/off. Its attribute is write only. Specify 1 to light on LED and 0 to turn off LED. Before using this command, be sure to cancel the LED defaults. Please refer to the SET LED command. Syntax LED m=n Parameter...
kroy KEY1, KEY2 Description This command is used to read the status of KEY1 and KEY2. Syntax Return value KEY1 0: released 1: pressed KEY2 0: released 1: pressed Note: This command is read only. Example The example below instructs printer to light on LED1 if the Pause key is pressed.
kroy YEAR Description This variable is used to read from/write to RTC the year data. Two-digit (00~99) year format is supported by RTC also the leap year and year of 2000. Syntax Write attribute: YEAR=98 Read attribute: A=YEAR Range: 00~99 Example DOWNLOAD "DEMO21.BAS"...
kroy MONTH Description This variable is used to read from/write to RTC the month data. Two-digits (01~12) month format is supported by RTC. Syntax Write attribute: MONTH=01 Read attribute: A=MONTH Range: 01~12 Example DOWNLOAD "DEMO21.BAS" SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0...
kroy DATE Description This variable is used to read from/write to RTC the date data. Two-digits (01~31) date format is supported by RTC. Syntax Write attribute: DATE=12 Read attribute: A=DATE Range: 01~31 Example DOWNLOAD "DEMO21.BAS" SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0...
kroy WEEK Description This variable is used to read from/write to RTC the week data, which is represented by one single digit (1~7).. . Syntax Write attribute: WEEK=3 Read attribute: A=WEEK Range: For B-442: 0 (Sunday)~6 (Saturday) For B-443: 1(Sunday)~7(Saturday) Example DOWNLOAD "DEMO21.BAS"...
kroy HOUR Description This variable is used to read from/write to RTC the hour data. The 24-hour- system (00~23) is supported by RTC. Syntax Write attribute: HOUR=12 Read attribute: A=HOUR Range: 00~23 Example DOWNLOAD "DEMO21.BAS" SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0...
kroy MINUTE Description This variable is used to read from/write to RTC the minute data. Two-digits (00~59) minute format is supported by RTC. Syntax Write attribute: MINUTE=12 Read attribute: A=MINUTE Range: 00~59 Example DOWNLOAD "DEMO21.BAS" SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0...
kroy SECOND Description This variable is used to read from/write to RTC the second data. Two-digits (00~59) second format is supported by RTC. Syntax Write attribute: SECOND=12 Read attribute: A=SECOND Range: 00~59 Example DOWNLOAD "DEMO21.BAS" SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0...
Revise History Date Description Remark 2003/09/19 1. BASIC functions are added 2. Supported code page update 2004/5/21 QR code is supported 2004/9/7 Modify PDF417 example 2004/9/21 Page 49, DOWNLOAD commend. Add procedures to disable “AUTO.BAS” auto execution.
Page 150
TABLE OF CONTENTS DOCUMENT CONVENTIONS ............I SETUP AND SYSTEM COMMANDS................. 1 SIZE ........................... 1 GAP ........................... 3 BLINE ........................5 OFFSET ........................6 SPEED ........................7 DENSITY........................8 DIRECTION ....................... 9 REFERENCE ......................10 COUNTRY........................ 11 CODEPAGE ......................12 FEED........................
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; <ESC> ESCAPE (ASCII 27), control code of status polling command, which returns the printer status immediately, no matter the printer is ready or not.
Setup and System Commands SIZE Description This command defines the label width and length. Syntax (1) English system (inch) SIZE m, n (2) Metric system (mm) SIZE m mm, n mm Parameter Description Label width (inch or mm) Label length (inch or mm) Note: 200 DPI: 1 mm = 8 dots 300 DPI: 1mm = 12 dots...
Description Define the gap distance between two labels Syntax (1) English system (inch) GAP m, n (2) Metric system (mm) GAP m mm, n mm Parameter Description The gap distance between two labels 0 ≤ m ≤ 1 (inch), 0 ≤ m ≤ 25.4 (mm) The offset distance of the gap n ≤...
Page 157
Special gap (1) English system (inch) GAP 0.30, 0.10 (2) Metric system (mm) GAP 7.62 mm, 2.54 mm See Also SIZE, BLINE...
BLINE Description This command is used to set the height of the black line and the user-defined extra label feeding length each form feed takes. Syntax (1) English system (inch) BLINE m, n (2) Metric system (mm) BLINE m mm, n mm Parameter Description The height of black line either in inch or mm.
OFFSET Description This command defines the selective, extra label feeding length each form feed takes, which, especially in peel-off mode and cutter mode, is used to adjust label stop position, so as for label to register at proper places for the intended purposes.
SPEED Description This command defines the print speed. Syntax SPEED n Parameter Description printing speed in inch per second K4652 K4653 K4452 K4453 Example SPEED 10 See Also DENSITY...
DENSITY Description This command designates the level of darkness of printing. Syntax DENSITY n Parameter Description 0, specifies the lightest level 15, specifies the darkest level Example DENSITY 7 See Also DENSITY...
DIRECTION Description This command defines the printout direction. Syntax DIRECTION n Parameter Description 0 or 1. Please refer to the illustrations below: Example DIRECTION 0 See Also REFERENCE...
REFERENCE Description This command defines the reference point of the label. The reference (origin) point varies with the print direction, as shown: Syntax REFERENCE x, y Parameter Description Horizontal coordinate, with “dot” as the unit. Vertical coordinate, with “dot” as the unit. Note: 200 DPI: 1 mm = 8 dots 300 DPI: 1 mm = 12 dots...
COUNTRY Description This command defines what special character to have on the KP-200 portable LCD keyboard (option) to orient the keyboard for use in different countries. Syntax COUNTRY n Parameter Description 001: USA 002: Canadian-French 003: Spanish (Latin America) 031: Dutch 032: Belgian 033: French (France) 034: Spanish (Spain)
CODEPAGE Description This command defines the code page of international character set. Syntax CODEPAGE n Parameter Description name or number of code page, which can be divided into 7-bit code page and 8-bit code page further. 7-bit code page name USA: USA BRI: British GER: German...
FEED Description This command feeds label with the specified length. The length is specified by dot. Syntax FEED n Parameter Description unit: dot 1 ≤ n ≤ 9999 Example FEED 40 Note: 200 DPI: 1 mm = 8 dots 300 DPI: 1 mm = 12 dots See Also BACKFEED, SIZE, GAP, BLINE...
BACKFEED Description To back feed label with the specified length The length is specified by dot. Syntax BACKFEED n Parameter Description unit: dot 1 ≤ n ≤ 9999 Example BACKFEED 40 CAUTION: Impropriety back feed value may cause paper jam or wrinkle.
FORMFEED Description This command feeds label to the beginning of next label. Syntax FORMFEED Parameter Description None Example FORMFEED See Also FEED, SIZE, GAP, BLINE...
HOME Description It is not expected the first label will be printed on the right position when the printer power is turned on. This command will feed label to the beginning of next label. The size of the label should be setup in advance. Syntax HOME Parameter...
PRINT Description This command prints the label format stored in the image buffer. Syntax PRINT m [,n] Parameter Description Specifies how many sets of labels will be printed. 1 ≤ m ≤ 999999999 If m=-1, printer will print the last label content for n copies.
Description At this command, the printer will activate the cutter to cut the labels immediately without back feeding the label. Syntax Parameter Description None See Also SET CUTTER...
Label Formatting Commands Description This command clears the image buffer. Syntax Parameter Description None Note: This command must be placed after SIZE command. Example See Also SIZE, GAP, BLINE...
Description This command is used to draw a line or a bar on the label format. Syntax BAR x, y, width, height Parameter Description The upper left corner x-coordinate in dot The upper left corner y-coordinate in dot width The width of bar in dot height The height of bar in dot Note:...
ERASE Description This command is used to clear a specified region in image buffer. Syntax ERASE X_start, Y_start, X_width, Y_height Parameter Description X_start The x-coordinate of the starting point in dot Y_start The y-coordinate of the starting point in dot X_width The region width in x-axis direction in dot Y_height...
REVERSE Description This command is used to reverse a region in image buffer. Syntax REVERSE X_start, Y_start, X_width, Y_height Parameter Description X_start The x-coordinate of the starting point in dot Y_start The y-coordinate of the starting point in dot X_width The region width in x-axis direction in dot Y_height The region height in y-axis direction in dot...
Description This command is used to draw rectangles on the label. Syntax BOX X_start, Y_start, X_end, Y_end, line thickness Parameter Description X_start Specify x-coordinate of upper left corner in dot Y_start Specify y-coordinate of upper left corner in dot X_end Specify x-coordinate of lower right corner in dot Y_end Specify y-coordinate of lower right corner in dot...
BITMAP Description This command is used to draw bitmap images (Not BMP graphic file). Syntax BITMAP X, Y, width, height, mode, bitmap data… Parameter Description Specify the x-coordinate of the bitmap image Specify the y-coordinate of the bitmap image width The width of the image in bytes height The height of the image in dot...
PUTBMP Description This command is used to print BMP format image. Syntax PUTBMP X, Y, ”filename” Parameter Description The x-coordinate of the BMP format image The y-coordinate of the BMP format image filename The downloaded BMP filename. Case sensitive Note: Recommend two-color format (black and white).
PUTPCX Description This command is used to print PCX format image. Syntax PUTPCX X, Y, ”filename” Parameter Description The x-coordinate of the PCX image The y-coordinate of the PCX image filename The downloaded PCX filename. Case sensitive Note: Recommend two-color format (black and white). Maximum 256-color.
BARCODE Description This command is used to print 1D barcodes on label form. The available bar codes are listed below: Code 128 (switching code subset automatically) Code 128M (switching code subset manually) EAN 128 (switching code subset automatically) Interleaved 2 of 5 Interleaved 2 of 5 with check digit Code 39 Code 39 with check digit...
Page 181
Syntax BARCODE X, Y, ”code type”, height, human readable, rotation, narrow, wide, “code” Parameter Description Specify the x-coordinate of the bar code on label Specify the y-coordinate of the bar code on label code type Code 128, switching code subset A, B, C automatically 128M Code 128, switching code subset A, B, C manually.
Page 182
UPCE UPC-E UPCE+2 UPC-E with 2 digits add-on UPCE+5 UPC-E with 5 digits add-on CPOST China post code MSI code PLESSEY PLESSEY code ITF14 ITF 14 code EAN14 EAN 14 code height bar code height expressed by dot human readable 0: human not readable 1: human readable rotation...
Page 183
EAN14 code number the maximum number of digits of bar code content Maximum bar Barcode type code length EAN128 EAN13 EAN13+2 EAN13+5 EAN 8 EAN 8+2 EAN 8+5 CODA POST UPCA UPCA+2 UPCA+5 UPCE UPCE+2 UPCE+5 CPOST PLESSY ITF14 EAN14 Example BARCODE 100,100,”39”,96,1,0,2,4,”1000”...
DMATRIX Description This command is used to define the DataMatrix 2D bar code. Currently, it supports ECC200 error correction only. Syntax DMATRIX x, y, width, height, [Xm, Lm], expression Parameter Description Horizontal start position in dot Vertical start position in dot width The expected width of barcode area in dot height...
MAXICODE Description This command is used to define a 2D Maxicode. Syntax MAXICODE x, y, mode, [class, country, post, Lm,] “message” For mode 2 or 3: MAXICODE x, y, mode, class, country, postal code, ”low priority message" if country is 840, the postal code is in 99999,9999 format. For other countries, the code is up to 6 alphanumeric characters.
Page 186
REM MODE 4 SPEED 6 SIZE 4.00,3.00 GAP 0.10,0 DENSITY 10 MAXICODE 24,24,4,”THIS IS A 93 CHARACTER CODE SET A MESSAGE THAT FILLS A MODE 4, UNAPPENDED, MAXICODE SYMBOL…” BOX 424,16,700,60,2 DIRECTION 0 PRINT 1 REM MODE 5 SPEED 6 SIZE 4.00,3.00 GAP 0.10,0 DENSITY 10...
PDF417 Description This command is used to define a PDF417 2D barcode. Syntax PDF417 x, y, width, height, rotate, [option], expression Parameter Description X-coordinate of the starting point in dot Y-coordinate of the starting point in dot width The expected width of barcode in dot height The expected height of barcode in dot rotate...
QRCODE Description This command is used to print QR code Syntax QRCODE X, Y, ECC Level, cell width, mode, rotation, [model, mask,]”Data string” Parameter Description The upper left corner x-coordinate of the QR code The upper left corner y-coordinate of the QR code ECC level Error correction recovery level cell width...
Page 189
1). Numeric data: 1,167 characters 7,089 characters 2). Alphanumeric data: 707 characters 4,296 characters 3). 8-bit byte data: 486 characters 2,953 characters 4). Kanji data: 299 characters 1,817 characters *If “A” is the first character in the data string, then the following data after “A”...
Page 190
SIZE 4,2.5 GAP 0.12,0 QRCODE 10,10,H,4,A,0,”ABC<Enter> abc<Enter> 123” QRCODE 160,160,H,4,A,0,”123<Enter> ABC<Enter> abc” QRCODE 310,310,H,4,A,0,”¦ L ª í ¾ ÷ <Enter> ABC<Enter> abc<Enter> 123” PRINT 1,1 c. Data string concatenation (Must be used with DOWNLOAD … EOP command) DOWNLOAD “DEMO.BAS” SIZE 4,2.5 CAP 0.12,0 QRCODE 10,10,H,4,A,0,”ABCabc123”+STR$(1234) QRCODE 160,160,H,4,A,0,”123ABCabc”+”1234”...
Page 191
QRCODE 10,10,H,4,M,0,”AABC!B0007<Enter> abc<Enter> !N123” QRCODE 160,160,H,4,M,0,”N123!B0002<Enter> !AABC!B0005<Enter> abc” QRCODE 310,310,H,4,M,0,”K ¦ L ª í ¾ ÷ !B0002<Enter> !AABC!B0010<Enter> abc<Enter> 123” PRINT 1,1 c. Data string concatenation (Must be used with DOWNLOAD … EOP command) SIZE 4,2.5 CAP 0.12,0 QRCODE 10,10,H,4,M,0,”AABC!B0006abc123!N”+STR$(1234) QRCODE 160,160,H,4,M,0,”N123!AABC!B0007abc”+”1234”...
TEXT Description This command is used to print text on label Syntax TEXT X, Y, ”font”, rotation, x-multiplication, y-multiplication, “content” Parameter Description The x-coordinate of the text The y-coordinate of the text font Font name 8 x 12 fixed pitch dot font 12 x 20 fixed pitch dot font 16 x 24 fixed pitch dot font 24 x 32 fixed pitch dot font...
Status Polling Commands (RS-232) <ESC>!? Description This command is used to obtain the printer status. An inquiry request is solicited by sending an <ESC> (ASCII 27, escape character) as the beginning control character to the printer. It can be sent any time, even in the event of printer error.
<ESC>!R Description This command is used to reset the printer. It can be sent at any time as long as the printer is powered on and not in the dump mode. The beginning of the command is an ESCAPE character (ASCII 27). The files downloaded in memory will be deleted.
Page 195
Description This command is used to inquire the model name and number of the printer. They are returned in ASCII characters. Printer Type Returned String K4452 Deluxe 200 K4453 Deluxe 300 K4652 Deluxe 200 K4653 Deluxe 300 Syntax Parameter Description None See Also ~!I, ~!F...
Page 196
Description The command is used to inquire the code page and country setting of the printer. The returned information is given in the following format code page, country code ex: 8 bit: 437, 001 7 bit: USA, 001 Regarding the code pages and country codes supported by the printer, please refer to the CODEPAGE and COUNTRY command respectively.
Page 197
Description This command is used to inquire about 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 0x0A. The ending character is 0x1A. Syntax Parameter Description...
Message Translation Protocols Description The beginning identifier (~#) of the prompt message is sent from the printer to the KP-200 portable keyboard. The ending identifier is ~&. @0 following the ending identifier ~& is used to instruct keyboard to display the prompt in the first line of LCD display.
BEEP Description This command is used to issue a beep sound on portable keyboard. Printer sends 0x07 to KP-200 portable keyboard. Syntax BEEP Parameter Description None Example DOWNLOAD “DEMO.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 6 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF BEEP...
Commands for Windows Driver Description This command is used to store bitmap image data in the memory. Behind the nnn is the bitmap data. Note: This command is available for TTP-243/342 series ,243M/342M series, 643/643plus series. Syntax !Bnnn Parameter Description The number of bytes of image data sent from PC to printer,expressed in 3 decimal digits.
Page 201
Description This command is used to print the bitmap data at the specified position (in y-direction). Note: This command is available for TTP-243/342 series ,243M/342M series, 643/643plus series. Syntax !Jnnnn Parameter Description nnnn Print image at the specified position in y-direction. The position is expressed in 4 decimal digits.
File Management Commands DOWNLOAD Description “DOWNLOAD” is a header of the file that is to be saved in the printer’s memory. The downloaded files can be divided to two categories: program file and data file (including text data file, PCX graphic files and bitmap font file) The detailed descriptions regarding the download syntax for different files are shown below: Maximum numbers of file saved in DRAM: 50...
Page 203
FILENAME.BAS The filename resident in printer memory. Note: (1). The filename is case sensitive. (2). The extension of the program file must be “.BAS” (3). Filename format must be in 8.3 format. (4). If memory is not specified, all files will be downloaded to DRAM.
Page 204
SET PEEL OFF TEXT 100,100,”3”,0,1,1,”EXAMPLE PROGRAM” PRINT 1 Note: When writing a download program, “DOWNLOAD” header must be placed in the beginning of file, and “EOP” must be placed at the end of program. To run the program, you can call the main filename without BAS extension or use RUN command to start the download program.
Page 205
Description End of program. To declare the start and end of BASIC language commands used in a program, the “DOWNLOAD “FILENAME.BAS” must be added in the first line of the program, and “EOP” statement at the last line of program. Syntax Example DOWNLOAD “DEMO.BAS”...
FILES Description This command lists the files that remained in the printer memory (both FLASH memory and DRAM). The total memory size and available memory size are listed as well. Syntax FILES Example Follow the steps below to list the files that are saved in printer memory in DOS environment through serial port connection C:\>MODE COM2 96,N,8,1<ENTER>...
KILL Description This command deletes 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 Description Specify the memory location that files will be deleted. F: Download files to main board flash memory.
Description This command is used to execute a program that resident in printer memory Syntax RUN “FILENAME.BAS” Example C:\>COPY CON LPT1<ENTER> RUN “DEMO.BAS”<ENTER> <CTRL><Z><ENTER> C:\> Note: <ENTER> stands for keyboard “ENTER” key. In the above example, please press “ENTER” key instead of typing <ENTER> in the above example.
BASIC Commands and Functions ABS( ) Description This function returns the absolute value of an integer, floating point or variable. Syntax ABS (-100) ABS (-99.99) ABS (VARIABLE) Example DOWNLOAD “TEST.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF...
ASC( ) Description This function returns the ASCII code of the character. Syntax ASC (“A”) Example DOWNLOAD “TEST.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF CODE1=ASC(“A”) TEXT 100,100,”3”,0,1,1,STR$(CODE1) PRINT 1 See Also DOWNLOAD, EOP, STR$()
CHR$( ) Description This function returns the character that has the specified ASCII code. Syntax CHR$(n) Parameter Description The ASCII code Example DOWNLOAD “TEST.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF A=65 WORD$=CHR$(A) TEXT 100,100,”3”,0,1,1,WORD$...
Description This command states the ending of program. Syntax Example DOWNLOAD “DEMO.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF TEXT 10,600,”5”,0,1,1,”GOSUB & RETURN COMMAND TEST” X=300 Y=300 GOSUB DASH GOSUB DR_LINE PRINT 1 :DR_LINE...
EOF( ) Description This function is used to detect an opened download file to see whether it has reached the end of file. Syntax EOF (File Handle) Parameter Description File handle Either 0 or 1. Return value Description None-zero End of file Not end of file Example DOWNLOAD “DEMO.BAS”...
Page 215
See Also DOWNLOAD, EOP, OPEN, READ, SEEK...
OPEN Description This command is used to open a downloaded file and establish the file handle. Up to 2 files can be opened at the same time. The file to be opened should be downloaded prior to using this command. Syntax OPEN “Filename”, File handle Parameter...
Page 217
BOX 98,48,502,514,2 A$=”ITEMS:”+ITEM$ B$=”PRICE:”+STR$(PRICE) C$=”QTY:”+STR$(QTY) TEXT 128,114,”2”,0,1,1,A$ TEXT 130,198,”2”,0,1,1,B$ TEXT 132,268,”2”,0,1,1,C$ BARCODE 132,365,”39”,96,1,0,2,4,”PRICE-2000” PRINT 1 CLOSE 1 Saving the above contents of data under the file name of “DEMO”. Follow the steps below to download data to the printer <under MS-DOS mode>: C:\>MODE COM1:96,N,8,1 ↵...
READ Description This command is used to read data from downloaded data file Syntax READ file handle, variables Parameter Description file handle 0 or 1 variables string, integer or float point variable Example DOWNLOAD “OPEN1.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0...
Page 219
B$=”PRICE:”+STR$(PRICE) C$=”QTY:”+STR$(QTY) TEXT 128,114,”2”,0,1,1,A$ TEXT 130,198,”2”,0,1,1,B$ TEXT 132,268,”2”,0,1,1,C$ BARCODE 132,365,”39”,96,1,0,2,4,”PRICE-2000” PRINT 1 I=EOF(1) IF I=0 THEN GOTO B OPEN “DATA2”,0 Z$=”” Z$=FREAD$(0,6) TEXT 10,20,”4”,0,1,1,”FREAD$() FUNCTION TEST” TEXT 10,70,”4”,0,1,1,”ITEM3$= “+Z$ J=LOF(“DATA2”) TEXT 10,140,”3”,0,1,1,”THE FILE SIZE OF DATA2 IS: “+STR$(J)+” Bytes” PRINT 1 See Also DOWNLOAD, EOP, OPEN, EOF, LOF, SEEK, FREAD$()
SEEK Description This command is used to shift the specified file pointer to a certain position. Syntax SEEK file handle, offset Parameter Description file handle 0 or 1 offset the offset characters which are shifted to the beginning of a new position Example DOWNLOAD “TEST.BAS”...
LOF( ) Description This function returns the size of the specified file. Syntax LOF (“FILENAME”) Parameter Description FILENAME The file downloaded in the printer memory. Example DOWNLOAD “OPEN2.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF OPEN “DATA2”,0...
FREAD$( ) Description This function reads a specified number of bytes of data from a file. Syntax FREAD$ (file handle, byte) Parameter Description file handle Either 0 or 1 byte Number of bytes to be read Example DOWNLOAD “FREAD.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3...
FOR…NEXT LOOP Description Loop is used to execute one or more lines of program repetitively. Before anything, a value should be assigned the loop counter to specify the execution times. Nested loop is allowed (up to 10 nested loops) in this printer.
Page 224
TEXT 10,100,”3”,0,1,1,C$ NEXT FOR I=1 TO 5 STEP 0.5 H$=H$+STR$(I)+” “ TEXT 10,150,”3”,0,1,1,H$ NEXT PRINT 1 See Also DOWNLOAD, EOP...
Page 225
IF…THEN…ELSE Description Use IF…THEN block to execute one or more statements conditionally. You can use either a single-line syntax or multiple-line “block” syntax: Syntax IF condition THEN statement Notice that the single-line form of IF …THEN does not use an ENDIF statement.
Page 226
SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF A=50 C$=”” D$=”” IF A>100 THEN GOTO L1 ELSE A=A+10 C$=STR$(A)+” IS SMALLER THAN 100” TEXT 100,10,”4”,0,1,1,C$ PRINT 1 A=A+B D$=STR$(A)+” IS LARGER THAN 100” TEXT 100,100,”4”,0,1,1,D$ PRINT 1 GOTO L1 Note If the result of the expression is nonzero, the statement following...
GOSUB…RETURN Description Branch to and return from a subroutine. Branch to the specified label and execute subroutines until “RETURN” is reached and then go back to the statement following the GOSUB statement. Syntax GOSUB LABEL statement :LABEL statement RETURN Parameter Description LABEL Beginning of the subroutine.
Page 228
DENSITY 13 FOR I=21 TO 50 TEXT 10,I,100,”3”,0,1,1,”==============================” NEXT RETURN See Also DOWNLOAD, EOP, END, GOTO...
GOTO Description This command is used to branch to a specified label. The label cannot exceed 8 characters in length. Syntax GOTO LABEL :LABEL Parameter Description None Example DOWNLOAD “GOSUB1.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF...
INP$( ) Description One byte is received from a serial port through this function. Syntax INP$(n) Parameter Description 1: com1 port in printer Example DOWNLOAD “DEMO.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF PRICE$=”123456”...
INPUT Description This command is used to receive data through serial port. This command is used with portable keyboard KP-200. Syntax INPUT [“Prompt string”], variables Parameter Description Prompt string The prompt string is shown on keyboard LCD screen. The maximum length of prompt string is 20 characters.
Description Comment. Prefix is “REM” that will be ignored by the printer. Syntax Example REM ******************************** REM This is a demonstration program* REM ******************************** DOWNLOAD “REMARK.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF SET PEEL OFF TEXT 50,50,”3”,0,1,1,”REMARK DEMO PROGRAM”...
Description This command is used to send data through printer serial port. Syntax OUT “prompt”, variable Parameter Description prompt Prompt which is shown on LCD screen. Variable The output message Example DOWNLOAD “DEMO.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF...
GETKEY( ) Description This command is used to get the status of PAUSE key and FEED key. This command waits until either key is pressed. 0 is returned if PAUSE key is pressed and 1 is returned if FEED key is pressed. Syntax GETKEY() Example...
INT( ) Description This function is used to truncate a floating point number. Syntax INT (n) Parameter Description n can be positive or negative integer, floating point number or mathematical expression. Example DOWNLOAD “DEMO5.BAS” SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0...
LEFT$( ) Description This function returns the specified number of characters down from the initial character of a string. Syntax LEFT$ (X$, n) Parameter Description The string to be processed The number of characters to be returned Example DOWNLOAD “STR1.BAS” SIZE 4.00,4.00 GAP 0.12,0.00 SPEED 2.0...
LEN( ) Description This function returns the length of a string. Syntax LEN (string) Parameter Description string The string whose length is to be measured. . Example DOWNLOAD “DEMO6.BAS” SIZE 4.00,4.00 GAP 0.12,0.00 SPEED 2.0 DENSITY 8 SET CUTTER OFF DIRECTION 0 REFERENCE 0,0 SET DEBUG LABEL...
MID$( ) Description This function is used to get the specified number of characters down from the mth character of a string. Syntax MID$(string, m, n) Parameter Description string The string to be processed. The beginning of mth characters in the string. 1 <= m <= string length The number of characters to return.
RIGHT$( ) Description This function returns the specified number of characters up from the end of a string. Syntax RIGHT$ (X$, n) Parameter Description The string to be processed The number of characters to be returned from the right side (end) of the string Example DOWNLOAD “DEMO8.BAS”...
STR$( ) Description This function converts a specified value or expression into corresponding string of characters. Syntax STR$ (n) Parameter Description An integer, floating point number or mathematical expression Example DOWNLOAD “DEMO9.BAS” SIZE 4.00,4.00 GAP 0.12,0.00 SPEED 2.0 DENSITY 8 SET CUTTER OFF DIRECTION 0 REFERENCE 0,0...
VAL( ) Description This function is used to convert numeric character into corresponding integer or floating point number. Syntax VAL (“numeric character”) Parameter Description numeric character “0~9”, “.” Example DOWNLOAD “DEMO10.BAS” SIZE 4.00,4.00 GAP 0.12,0.00 SPEED 2.0 DENSITY 8 SET CUTTER OFF DIRECTION 0 REFERENCE 0,0 SET DEBUG LABEL...
Device Reconfiguration Commands SET COUNTER Description Counter can be a real counter or a variable. This setting sets the counter number in program and their increments. There are three different kind of counters: digit (0~9~0), lower case letter (a~z~a) and upper case letter (A~Z~A). Syntax SET COUNTER @n step @n = “Expression”...
SET CUTTER Description This setting is used to activate/deactivate the cutter and define how many printed labels to be cut at one time. This setting will be saved in printer memory when turning off the power. Syntax SET CUTTER OFF/BATCH/pieces Parameter Description Disable cutter function.
Page 244
REM SET CUTTER PIECE EXAMPLE PROGRAM REM This program cuts each printed label SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 6 DIRECTION 0 REFERENCE 0,0 SET CUTTER 1 SET PEEL OFF TEXT 50,50,”3”,0,1,1,”SET CUTTER PIECE” BARCODE 50,500,”39”,48,1,0,2,4,”DEMO16” PRINT 3,2 See Also OFFSET, PRINT...
SET PEEL Description This setting is used to enable/disable the self-peeling function. The default setting for this function is off. When this function is set on, the printer stops after each label printing, and does not print the next label until the peeled label is taken away.
SET TEAR Description This command is used to enable/disable feeding label to gap/black mark position for tearing off. This setting will be saved in printer memory when turning off the power. Syntax SET TEAR ON/OFF Parameter Description The label gap will stop at the tear off position after print.
SET GAP Description This setting is used to set the gap sensor emission sensitivity. The printer initiates automatic gap sensor calibration as you hold down the PAUSE key and then turn on the printer power. But this function may cease to work if the thickness of the backing paper and that of label with backing paper are not of appreciable difference to the sensor, or when there are pre-printed marks or patterns on the label.
Page 248
values gradually. See Also SIZE, GAP, BLINE...
SET RIBBON Description This setting is used to enable/disable ribbon sensor detection. (Thermal Transfer Printing/Thermal Direct Printing) Printer will detect if there is ribbon or without ribbon installed in ribbon mechanism at the instance of turning on printer power to determine direct thermal or thermal transfer printing.
SET PRINTKEY Description This command will 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 label content includes serial text or barcode, it will change the serial number accordingly.
Page 252
Description This variable (read only) is used to count how many pieces of labels have been printed. It can’t be initialized if the printer is reset. It will be memorized if the printer power is turned off. Syntax @LABEL 0<=@LABEL<=999999999 Example SIZE 4,4 GAP 0,0...
YEAR Description This variable is used to read from/write to RTC the year data. Four-digit year format is supported by RTC. Syntax Write attribute: YEAR=02 Read attribute: A=YEAR Range: 00~99 Example DOWNLOAD "DEMO21.BAS" SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0 SET CUTTER OFF...
MONTH Description This variable is used to read from/write to RTC the month data. Two-digits (01~12) month format is supported by RTC. Syntax Write attribute: MONTH=01 Read attribute: A=MONTH Range: 01~12 Example DOWNLOAD "DEMO21.BAS" SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0...
DATE Description This variable is used to read from/write to RTC the date data. Two-digits (01~31) date format is supported by RTC. Syntax Write attribute: DATE=12 Read attribute: A=DATE Range: 01~31 Example DOWNLOAD "DEMO21.BAS" SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0...
Page 256
WEEK Description This variable is used to read from/write to RTC the week data, which is represented by one single digit (1~7).. . Syntax Write attribute: WEEK=3 Read attribute: A=WEEK Range: 1(Sunday)~7(Saturday) Example DOWNLOAD "DEMO21.BAS" SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0...
HOUR Description This variable is used to read from/write to RTC the hour data. The 24-hour-day system (00~23) is supported by RTC. Syntax Write attribute: HOUR=12 Read attribute: A=HOUR Range: 00~23 Example DOWNLOAD "DEMO21.BAS" SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0...
MINUTE Description This variable is used to read from/write to RTC the minute data. Two-digits (00~59) minute format is supported by RTC. Syntax Write attribute: MINUTE=12 Read attribute: A=MINUTE Range: 00~59 Example DOWNLOAD "DEMO21.BAS" SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0...
SECOND Description This variable is used to read from/write to RTC the second data. Two-digits (00~59) second format is supported by RTC. Syntax Write attribute: SECOND=12 Read attribute: A=SECOND Range: 00~59 Example DOWNLOAD "DEMO21.BAS" SIZE 4,4 GAP 0,0 DENSITY 8 SPEED 3 DIRECTION 0 REFERENCE 0,0...
@YEAR Description This variable is used to read from/write to RTC the year data. Four-digit year format is supported by RTC. @YEAR global variable can be accessed directly without using BASIC language functions. Syntax Write attribute: YEAR=”2001” Read attribute: YEAR Range: 2000~9999 Example SIZE 4,4...
@MONTH Description This variable is used to read from/write to RTC the month data. Two-digits (01~12) month format is supported by RTC. @MONTH global variable can be accessed directly without using BASIC language functions. Syntax Write attribute: @MONTH=”01” Read attribute: @MONTH Range: 01~12 Example SIZE 4,4...
@DATE Description This variable is used to read from/write to RTC the date data. Two-digits (01~31) date format is supported by RTC. @DATE global variable can be accessed directly without using BASIC language functions. Syntax Write attribute: @DATE=”12” Read attribute: @DATE Range: 01~31 Example SIZE 4,4...
@DAY Description This variable is used to read from/write to RTC the week data, which is represented by one single digit (1~7).. . @DAY global variable can be accessed directly without using BASIC language functions. Syntax Write attribute: @DAY=”3” Read attribute: @DAY Range: 0(Sunday)~6(Saturday) Example...
@HOUR Description This variable is used to read from/write to RTC the hour data. The 24-hour-day system (00~23) is supported by RTC. @HOUR global variable can be accessed directly without using BASIC language functions. Syntax Write attribute: @HOUR =”12” Read attribute: @HOUR Range: 00~23 Example SIZE 4,4...
@MINUTE Description This variable is used to read from/write to RTC the minute data. Two-digits (00~59) minute format is supported by RTC. @MINUTE global variable can be accessed directly without using BASIC language functions. Syntax Write attribute: @MINUTE =”12” Read attribute: @MINUTE Range: 00~59 Example SIZE 4,4...
@SECOND Description This variable is used to read from/write to RTC the second data. Two-digits (00~59) second format is supported by RTC. @SECOND global variable can be accessed directly without using BASIC language functions. Syntax Write attribute: @SECOND=”12” Read attribute: @SECOND Range: 00~59 Example SIZE 4,4...
Need help?
Do you have a question about the K4350 and is the answer not in the manual?
Questions and answers