Page 2
MLP2 Programming Manual REVISION RECORDS REV. DATE DESCRIPTION Drawn Checked Approved 2013.08.02 —— Chen weihua Lin yang Ren xiaowei 2014.04.02 1.Change orders:ESC t n Chen weihua Lin yang Ren xiaowei 1. Delete Command DLE ENQ n; 2. Delete Command ESC c 0 n;...
Page 4
MLP2 Programming Manual GS h n..................................32 ①GS k m d1 d2 … dk NUL②GS k m n d1 d2 … dn....................32 GS r n..................................33 GS v 0 m xL xH yL yH d1..dk..........................33 GS w n................................... 35 3、Multi-byte code characters commands list.......................36...
MLP2 Programming Manual 1. Overview 1.1 Key terms Real-time commands:These commands are act ed on immediately upon being received by the printer ; Page mode:Under this mode, the printer stores all data in a specified memory and thinks of this as a virtual page.
MLP2 Programming Manual 2、Printing command set [Name] Horizontal tab [Format] ASCII Decimal [Dscription] Moves the print position to the next horizontal tab position. •This command is ignored unless the next horizontal tab position has been set. [Notes] • If the next horizontal tab position exceeds the printing area, the printer sets the printing position to [printing area width + 1].
MLP2 Programming Manual [Description] When the command is allowed, it functions in the same way as LF; when it is not, the command is ignored. [Note] •Set the print position to the beginning of the line. •Whether the command is allowed or not only up to the factory defaults.
MLP2 Programming Manual Printer normal status Printer abnormal status Default 0 n = 2 Printer status Decim Function Default 0 Default 1 Up cover closed Up cover open feed paper without push feed paper with push Default 1 Default 0...
Page 9
MLP2 Programming Manual [Description] Print all buffered data in the printable area collectively in page mode. [Note] 1) This command is enable only in page mode. www.hprt.com...
MLP2 Programming Manual 2) When using label paper, when this command is executed, label location is not executed. 3) The butter data, ESC T and ESC W set and character set are not deleted after printing. ESC SP n [Name]...
MLP2 Programming Manual • GS ! can also select character size. However, the setting of the last received command is effective. [Default] n = 0 ESC $ nL nH [Name] Set absolute print position [Format] ASCII $ nL 24 nL...
MLP2 Programming Manual • When x is less than 13, the user-defined character width by default into 13 points. • Set a corresponding bit to 1 to print a dot or 0 not to print a dot. • Can define up to 26 user-defined characters.
Page 13
MLP2 Programming Manual × × 24-dot double-density ( nL + nH 256) [Note] • If the value of m out of the specified range, nL and the subsequent data will be processed as normal one. • The number of horizontal direction is up to nL and nH, the total number is nL + nH × 256.
MLP2 Programming Manual Choosing 24-dot density: ESC - n [Name] Turn underline mode on /off [Format] ASCII Decimal [Range] 0≤ n ≤ 2 48 ≤ n ≤ 50 [Description] turn underline mode on/off, n value as follows: Function 0, 48...
MLP2 Programming Manual ESC 2 [Name] Set character line spacing for 30 [Format] ASCII Decimal [Description] Selects 3.875 mm (31 0.125 mm) line spacing. [Notes] The line spacing can be set independently in standard mode and in page mode. ESC 3 n...
MLP2 Programming Manual ESC @ [Name] Initialize printer [Format] ASCII Decimal [Description] Clears the data in the print buffer and resets the printer mode to the mode that was in effect when the power was turned on. [Notes] • The bit image has been downloaded and custom characters in RAM is not cleared.When the printer default is label paper, the print mode is page mode after...
MLP2 Programming Manual [Default] n = 0 ESC J n [Name] Print and feed paper [Format] ASCII Decimal [Range] 0 ≤n ≤ 255 [Description] Prints the data in the print buffer and feeds the paper [n×0.125 mm (0.0049”)]. [Notes] After printing is completed, this command sets the print starting position to the beginning of the line.
MLP2 Programming Manual Function 0, 48 Choose ASCII character font ( 12 * 24 ) 1, 49 Choose ASCII character font ( 9 * 17 ) 2,50 Choose user-defined character 3, 51 Choose Chinese character font 3 ( 24 * 24 ) [Note] 1) ESC ! can set character font too, the command received at last is effective.
MLP2 Programming Manual ESC S [Name] Select standard mode [Format] ASCII Decimal [Description] Switches from page mode to standard mode. [Note] 1) this command is effective only in page mode. 2) Data in print buffer is cleared. 3) This command sets the print position to the beginning of the line.
MLP2 Programming Manual ESC V n [Name] Turn 90° clockwise rotation mode on/off [Format] ASCII Decimal [Range] 0 ≤ n ≤ 1, 48 ≤ n ≤ 49 [Description] Set the print direction and starting position in page mode specified by n as shown bellow.
MLP2 Programming Manual •The default set of printing area width is horizontal printable width - horizontal starting position if the value of horizontal starting position + printing area width was beyond printable area. • The default set of printing area height is vertical printable height - vertical starting position if the value of vertical starting position + printing area height was beyond printable area.
MLP2 Programming Manual 1, 49 Centering 2, 50 Right justification [Notes] The command is enabled only when processed at the beginning of the line in standard mode. If this command is input in page mode, the printer performs only internal flag operations This command justifies the space area according to HT, ESC $ or ESC \ .
MLP2 Programming Manual ESC v [Name] Transmit printer status ASCII [Format] Decimal • This command is only effective with a serial interface printer to t ransmit printer [Description] status to host machine. • When the printer receive command, transfer a byte to the hardware.
MLP2 Programming Manual FS p n m [Name] Print NV bit image [Format] ASCII Decimal 1 ≤ n ≤ 255 0 ≤ m ≤ 3 , 48 ≤ m ≤51 [Range] [Description] Prints NV bit image n using the mode specified by m.
MLP2 Programming Manual Once an NV bit image is defined, it is not erased by performing ESC @, reset, and power off. This command performs only definition of an NV bit image and does not perform printing. Printing of the NV bit image is performed by the FS p command.
Page 28
MLP2 Programming Manual Off/On Hex Decimal Function Character height selection. See Table 2. Character width selection. See Table 1. Table 1 Character Width Selection Decimal Width 1 (normal) 2 (double-width) Table 2 Character Height Selection Hex Decimal Width 1 (normal)
MLP2 Programming Manual GS / m [Name] print downloaded bit image [Format] ASCII Decimal [Range] 0 ≤ m ≤ 3, 48 ≤ m ≤ 51 [Description] print a downloaded bit image using the mode specified by m, as follows. Mode...
MLP2 Programming Manual GS B n [Name] Turn white/black reverse printing mode [Format] ASCII Decimal [Range] 0 ≤ n ≤ 255 [Description] Turns on or off white/black reverse printing mode. When the LSB of n is 0, white/black reverse mode is turned off.
MLP2 Programming Manual This command is effective only when processed at the beginning of the line in [Notes] standard mode. If this command is input in page mode, the printer performs only internal flag operations. This command does not affect printing in page mode.
MLP2 Programming Manual 0 ≤ nH ≤ 255 [Description] move the vertical print starting position in page mode from the current position. • This command moves the vertical print starting position in page mode to [( nL + nH × 256) × 0.125mm] from the current position.
MLP2 Programming Manual GS w n [Name] Set bar code width [Format] ASCII Decimal [Range] 2 ≤ n ≤ 6 [Description] Sets the horizontal size of the bar code. n specifies the bar code width as follows: Binary-level Bar Code...
MLP2 Programming Manual 3、Multi-byte code characters commands list FS! n [Name] Set print mode(s) for Kanji characters [Format] ASCII Decimal [Range] 0 ≤ n ≤ 255 [Description] Sets the print mode for Kanji characters, using n as follows: [Notes] When both double-width and double-height modes are set (including right-and left-side character spacing), quadruple-size characters are printed.
MLP2 Programming Manual Kanji character mode is not selected when the power is turned on. Using FS C, the Kanji character code system is selected. For Chinese/Taiwanese Kanji model: When The kanji character mode is selected, the printer checks whether the code is for Kanji or not;...
MLP2 Programming Manual [Range] 0 ≤ n1 ≤ 255 0 ≤ n2 ≤ 255 [Description] Sets left- and right-side Kanji character spacing to n1 and n2, respectively. The left-side character spacing is [n1 × 0.125 mm], and the right-side character spacing is [n2 ×...
MLP2 Programming Manual 0≤hH<3 [Description] xL、xH Denote the low and high bytes on X coordinate of Left upper corner of the rectangle. yL、yH Denote the low and high bytes on Y coordinate of Left upper corner of the rectangle wL、wH Denote the low and high bytes on the rectangle width hL、hH Denote the low and high bytes on the rectangle height...
MLP2 Programming Manual GS ( k pL pH cn fn m (cn = 49, fn = 81) [Name] QR Code: Print the symbol data in the symbol storage area [Format] ASCII pL pH cn fn m pL pH cn fn m...
MLP2 Programming Manual 4、 Programming Process Guide Because the different printing stat us and error can be transmitted by Auto Status Back (ASB) command, it is recommended that you can use ASB command to inquiry status. ASB command is effective when the printer is powered on and can be directly sent to inquiry the status.
MLP2 Programming Manual B.1 General Description The printer operates in two print modes: standard mode and page mode. In standard mode, the printer prints and feeds paper each time it receives print data or paper feed commands. In page mode, all...
Page 48
MLP2 Programming Manual 3) If the print data (including character spacing) exceeds t he printable area before the printer receives a command (e.g., LF or ESC J ) that includes line feeding, a line feed is executed automatically within theprintable area. The print position, therefore, moves to the beginning of the next line.
Need help?
Do you have a question about the MLP2 and is the answer not in the manual?
Questions and answers