Kroy K4350 Programming Manual

Thermal transfer printer
Hide thumbs Also See for K4350:
Table of Contents

Advertisement

KROY
KROY – K4350 / K4350C Thermal Transfer Printer Series
PROGRAMMING
MANUAL

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the K4350 and is the answer not in the manual?

Questions and answers

Summary of Contents for Kroy K4350

  • Page 1 KROY KROY – K4350 / K4350C Thermal Transfer Printer Series PROGRAMMING MANUAL...
  • Page 2: Table Of Contents

    kroy CONTENT DOCUMENT CONVENTIONS ......................1 SETUP AND SYSTEM COMMANDS....................2 SIZE ..............................2 GAP ..............................4 BLINE..............................7 OFFSET ............................8 SPEED ............................10 DENSITY............................11 DIRECTION............................. 12 REFERENCE ..........................13 COUNTRY............................14 CODEPAGE ............................ 16 CLS ..............................18 FEED ..............................
  • Page 3 kroy MAXICODE ............................. 36 PDF417 ............................40 PUTPCX............................42 REVERSE ............................43 TEXT............................... 44 STATUS POLLING COMMANDS (RS-232) ..................46 <ESC>!? ............................46 <ESC>!R............................47 ~!A ..............................48 ~!T ..............................49 ~!C ..............................50 ~!I..............................51 ~!F ..............................52 ~!@ ..............................53 MESSAGE TRANSLATION PROTOCOLS ..................
  • Page 4 kroy BASIC COMMANDS AND FUNCTIONS..................74 ABS( ) ............................. 74 ASC( ) ............................. 75 CHR$( ) ............................76 END ..............................77 EOF( ) ............................. 78 OPEN.............................. 80 READ .............................. 82 SEEK .............................. 84 LOF( ).............................. 86 FREAD$( )............................87 FOR… NEXT............................88 IF…...
  • 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 6 kroy INDEX !B ..............56 END..............77 !J ..............57 EOF( ) .............. 78 !N ..............58 EOP..............69 @LABEL ............122 ERASE............. 34 ~!@..............53 FEED..............19 ~!A ..............48 FILES ............... 70 ~!C..............50 FOR… NEXT............88 ~!F ..............52 FORMFEED ............ 20 ~!I ..............51 FREAD$( ) ............87 ~!T ..............49 GAP..............4 ~#..............55...
  • 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 ............
  • Page 8: Document Conventions

    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.
  • Page 9: Setup And System Commands

    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...
  • Page 10 kroy Kroy LLC / Kroy (Europe) Ltd...
  • Page 11: Gap

    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 ≤...
  • Page 12 kroy Kroy LLC / Kroy (Europe) Ltd...
  • Page 13 kroy Special gap (1) English system (inch) GAP 0.30,-0.10 (2) Metric system (mm) GAP 7.62 mm, -2.54 mm Kroy LLC / Kroy (Europe) Ltd...
  • Page 14: Bline

    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.
  • Page 15: Offset

    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.
  • Page 16 kroy Kroy LLC / Kroy (Europe) Ltd...
  • Page 17: Speed

    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...
  • Page 18: Density

    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...
  • Page 19: Direction

    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...
  • Page 20: Reference

    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...
  • Page 21: Country

    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...
  • Page 23: Codepage

    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...
  • Page 24 kroy Example CODEPAGE 437 Kroy LLC / Kroy (Europe) Ltd...
  • Page 25: Cls

    kroy Description This command clears the image buffer. Syntax Parameter Description Example Kroy LLC / Kroy (Europe) Ltd...
  • Page 26: Feed

    kroy FEED Description This command feeds label with the specified length (in dot). Syntax FEED n Parameter Description unit: dot 1 ≤ n ≤ 65535 Example FEED 40 Note: 200 DPI: 1 mm = 8 dots 300 DPI: 1 mm = 12 dots Kroy LLC / Kroy (Europe) Ltd...
  • Page 27: Formfeed

    kroy FORMFEED Description This command feeds label to the beginning of next label. Syntax FORMFEED Parameter Description Example FORMFEED Kroy LLC / Kroy (Europe) Ltd...
  • Page 28: Home

    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.
  • Page 29: Print

    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.
  • Page 30: Sound

    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...
  • Page 31: Cut

    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...
  • Page 32: Limitfeed

    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.
  • Page 33: Label Formatting Commands

    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...
  • Page 34: Barcode

    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 36 kroy EAN8 EAN 8 Kroy LLC / Kroy (Europe) Ltd...
  • 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.)
  • Page 39: Bitmap

    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...
  • Page 40: Box

    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...
  • Page 41: Erase

    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...
  • Page 42: Dmatrix

    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...
  • Page 43: Maxicode

    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...
  • Page 46 kroy GAP 0.16,0 DENSITY 10 MAXICODE 24,24,"[)>-0196B10500569991Z00004951UPSN06X61 015912345671/1Y634 ALPHA DRPITTSBURGHPA -" MAXICODE 24,300,"001,056,B1050,[)>-01961Z00004951UPSN06X610 1512345671/1Y634 ALPHA DRPITTSBURGHPA -" MAXICODE 400,24,"001,056,B1050,[)>-01961Z0 0004951UPSN06X610 1512345671/1Y634 ALPHA DRPITTSBURGHPA -" DIRECTION 0 PRINT 1 Kroy LLC / Kroy (Europe) Ltd...
  • Page 47: Pdf417

    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...
  • Page 49: Putpcx

    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.
  • Page 50: Reverse

    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...
  • Page 51: Text

    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”...
  • Page 53: Status Polling Commands (Rs-232)

    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.
  • Page 54: Esc>!R

    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.
  • Page 61: Message Translation Protocols

    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...
  • Page 63: Commands For Windows Driver

    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...
  • Page 66: File Management Commands

    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...
  • Page 75: Redraw

    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...
  • Page 76: Eop

    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...
  • Page 77: Files

    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.
  • Page 78: Kill

    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.
  • Page 79: Move

    kroy MOVE Description This command is used to move downloaded files to the FLASH memory. Syntax MOVE Parameter Description Kroy LLC / Kroy (Europe) Ltd...
  • Page 80: Updatbios

    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.
  • Page 81: Basic Commands And Functions

    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...
  • Page 82: Asc( )

    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...
  • Page 83: Chr$( )

    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)
  • Page 84: End

    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...
  • Page 85: Eof( )

    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...
  • Page 87: Open

    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,”...
  • Page 89: Read

    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...
  • Page 91: Seek

    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...
  • Page 93: Lof( )

    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...
  • Page 94: Fread$( )

    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...
  • Page 95: For

    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)+"...
  • Page 97: If... Then... Else

    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...
  • Page 99: Gosub

    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...
  • Page 101: Goto

    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...
  • Page 103: Inp$( )

    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”...
  • Page 104: Input

    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.
  • Page 105 kroy GOTO START Kroy LLC / Kroy (Europe) Ltd...
  • Page 106: Rem

    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”...
  • Page 107: Out

    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...
  • Page 108: Getkey( )

    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...
  • Page 109: Int( )

    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...
  • Page 110: Left$( )

    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...
  • Page 111: Len( )

    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...
  • Page 112: Mid$( )

    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...
  • Page 113: Right$( )

    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...
  • Page 114: Str$( )

    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...
  • Page 115: Val( )

    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...
  • Page 116: Beep

    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...
  • Page 117: Device Reconfiguration Commands

    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.
  • Page 118: Set Cutter

    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”...
  • Page 120: Set Key1

    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...
  • Page 122: Set Led1, Led2, Led3

    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...
  • Page 123: Set Peel

    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.
  • Page 124: Set Debug

    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...
  • Page 125: Set Gap

    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...
  • Page 126: Set Ribbon

    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...
  • Page 127: Set Com1

    kroy SET COM1 Description This setting defines communication parameters for printer serial port. Syntax SET COM1 baud, parity, data, stop Parameter Description baud Baud rate, available baud rates are as listed : 24: 2400 bps 48: 4800 bps 96: 9600 bps 19: 19200 bps parity Parity check...
  • Page 128 kroy SET DEBUG LABEL SET RIBBON OFF SET COM1 96,N,8,1 BARCODE 100,100,"39",48,1,0,2,5,"CODE 39” PRINT 1 Kroy LLC / Kroy (Europe) Ltd...
  • Page 129: Label

    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...
  • Page 130: Peel

    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...
  • Page 131: Led1, Led2, Led3

    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...
  • Page 132: Key1, Key2

    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.
  • Page 133: Year

    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"...
  • Page 134 kroy "+HOUR$+":"+MINUTE$ TEXT 10,10,"5",0,1,1,A$ PRINT 1 Kroy LLC / Kroy (Europe) Ltd...
  • Page 135: Month

    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...
  • Page 136 kroy TEXT 10,10,"5",0,1,1,A$ PRINT 1 Kroy LLC / Kroy (Europe) Ltd...
  • Page 137: Date

    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...
  • Page 138 kroy TEXT 10,10,"5",0,1,1,A$ PRINT 1 Kroy LLC / Kroy (Europe) Ltd...
  • Page 139: Week

    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"...
  • Page 140 kroy A$=YEAR$+"/"+MONTH$+"/"+DATE$+"/"+WEEK$+" "+HOUR$+":"+MINUTE$ TEXT 10,10,"5",0,1,1,A$ PRINT 1 Kroy LLC / Kroy (Europe) Ltd...
  • Page 141: Hour

    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...
  • Page 142 kroy TEXT 10,10,"5",0,1,1,A$ PRINT 1 Kroy LLC / Kroy (Europe) Ltd...
  • Page 143: Minute

    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...
  • Page 144 kroy "+HOUR$+":"+MINUTE$ TEXT 10,10,"5",0,1,1,A$ PRINT 1 Kroy LLC / Kroy (Europe) Ltd...
  • Page 145: Second

    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...
  • Page 146 kroy A$=YEAR$+"/"+MONTH$+"/"+DATE$+"/"+WEEK$+" "+HOUR$+":"+MINUTE$+":"+SECOND$ TEXT 10,10,"5",0,1,1,A$ PRINT 1 Kroy LLC / Kroy (Europe) Ltd...
  • Page 147 KROY TEL: (UK) +44-118-986-5200 (USA) +1-216-426-5600 Web site: www.kroy.com REV. A...
  • Page 148 KROY K4452/K4453/K4652/K4653 PROGRAMMING MANUAL...
  • Page 149: Revise History

    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........................
  • Page 151 FILE MANAGEMENT COMMANDS ................ 49 DOWNLOAD......................49 EOP.......................... 52 FILES ........................53 KILL ......................... 54 RUN ......................... 56 BASIC COMMANDS AND FUNCTIONS ..............57 ABS( ) ........................57 ASC( ) ........................58 CHR$( ) ........................59 END.......................... 60 EOF( ) ........................61 OPEN ........................
  • Page 152 @YEAR........................107 @MONTH....................... 108 @DATE ........................109 @DAY ........................110 @HOUR ........................111 @MINUTE .......................112 @SECOND ......................113...
  • Page 153: Document Conventions

    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.
  • Page 154: Setup And System Commands

    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...
  • Page 155 See Also GAP, BLINE...
  • Page 156: Gap

    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...
  • Page 158: 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.
  • Page 159: Offset

    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.
  • Page 160: Speed

    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...
  • Page 161: 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...
  • Page 162: Direction

    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...
  • Page 163: 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...
  • Page 164: Country

    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)
  • Page 165: Codepage

    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...
  • Page 166: Feed

    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...
  • Page 167: Backfeed

    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.
  • Page 168: Formfeed

    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...
  • Page 169: Home

    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...
  • Page 170: Print

    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.
  • Page 171: Cut

    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...
  • Page 172: Label Formatting Commands

    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...
  • Page 173: Bar

    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:...
  • Page 174: Erase

    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...
  • Page 175: Reverse

    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...
  • Page 176: Box

    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...
  • Page 177: Bitmap

    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...
  • Page 178: Putbmp

    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).
  • Page 179: Putpcx

    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.
  • Page 180: Barcode

    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”...
  • Page 184: Dmatrix

    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...
  • Page 185: Maxicode

    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...
  • Page 187: Pdf417

    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...
  • Page 188: Qrcode

    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”...
  • Page 192: Text

    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...
  • Page 193: Status Polling Commands (Rs-232)

    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.
  • Page 194: Esc>!R

    <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...
  • Page 198: Message Translation Protocols

    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.
  • Page 199: Beep

    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...
  • Page 200: Commands For Windows Driver

    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.
  • Page 202: File Management Commands

    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”...
  • Page 206: Files

    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>...
  • Page 207: Kill

    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.
  • Page 208 See Also ~!F, FILES...
  • Page 209: Run

    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.
  • Page 210: Basic Commands And Functions

    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...
  • Page 211: Asc( )

    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$()
  • Page 212: Chr$( )

    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$...
  • Page 213: End

    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...
  • Page 214: Eof( )

    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...
  • Page 216: Open

    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 ↵...
  • Page 218: Read

    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$()
  • Page 220: Seek

    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 221: Lof( )

    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...
  • Page 222: Fread$( )

    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...
  • Page 223: For

    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...
  • Page 227: Gosub

    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...
  • Page 229: 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...
  • Page 230: Inp$( )

    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”...
  • Page 231: Input

    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.
  • Page 232: Rem

    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”...
  • Page 233: Out

    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...
  • Page 234: Getkey( )

    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...
  • Page 235: Int( )

    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...
  • Page 236: Left$( )

    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...
  • Page 237: Len( )

    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...
  • Page 238: Mid$( )

    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.
  • Page 239: Right$( )

    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”...
  • Page 240: Str$( )

    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...
  • Page 241: Val( )

    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...
  • Page 242: Device Reconfiguration Commands

    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”...
  • Page 243: Set Cutter

    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...
  • Page 245: Set Peel

    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.
  • Page 246: Set Tear

    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.
  • Page 247: Set Gap

    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...
  • Page 249: Set Ribbon

    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.
  • Page 250: Set Com1

    SET COM1 Description This setting defines communication parameters for printer serial port. Syntax SET COM1 baud, parity, data, stop Parameter Description baud Baud rate, available baud rates are as listed : 24: 2400 bps 48: 4800 bps 96: 9600 bps 19: 19200 bps 38: 38400 bps 56: 56000 bps...
  • Page 251: Set Printkey

    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...
  • Page 253: Year

    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...
  • Page 254: Month

    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...
  • Page 255: Date

    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...
  • Page 257: Hour

    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...
  • Page 258: Minute

    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...
  • Page 259: Second

    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...
  • Page 260: Year

    @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...
  • Page 261: Month

    @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...
  • Page 262: Date

    @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...
  • Page 263: Day

    @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...
  • Page 264: Hour

    @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...
  • Page 265: Minute

    @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...
  • Page 266: Second

    @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...

This manual is also suitable for:

K4350c

Table of Contents