Page 3
3.2.4 Print..............................26 3.2.5 State query............................26 3.2.6 Bitmap download..........................26 3.2.7 Recommended program application process................29 APPENDIX A:CODE128 BAR CODE........................30 A.1 Description of the CODE128 Bar Code......................30 A.2 Code Tables..............................30 APPENDIX B:Print mode and its transformation......................33 B.1 General Description............................33 B.2 Setting Values in Standard and Page Modes....................
1. Overview 1.1 Key Terms Real-time commands: These commands are acted on immediately upon being received by the printer. Page mode: Under this mode, the printer stores all data in storage and thinks it as a virtual page.The printer doesn’t print the page until it receives commands FF or ESC FF. Standard mode: Standard mode is the default mode of printer,namely line mode.Under this mode,the printer prints data and feeds paper when printer line buffer is full,namely data is...
2. Commands [Name] Horizontal tab [Format] ASCII Decimal Moves the print position to the next horizontal tab position. [Description] 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].
[Notes] When characters are enlarged, the character spacing is n times normal value. This command sets values independently in each mode (standard and page modes). ESC ! n Select print mode(s). [Name] [Format] ASCII Decimal [Range] 0 ≤ n ≤ 255 [Description] Select print mode(s) using n as follows: Decimal...
Choosing 8-dot density: 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 underline mode is turn off 1, 49 underline mode ( one dot width) is turn on...
blank space set by HT. When underline mode is on, 90°clock wise rotated characters and characters and white / black reverse characters cannot be underline. When underline mode is off, there is no underline for following characters. Underline width stays the same, default width: one dot width. Character size change has no effects on underline width.
n specifies the column number for setting a horizontal tab position from the beginning of the line. k indicates the total number of horizontal tab positions to be set. [Notes] The horizontal tab position is stored as a value of [character width × n] measured from the beginning of the line.
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.
ESC S [Name] Select standard mode. [Format] ASCII Decimal [Description] Switches from page mode to standard mode. [Notes] This command is effective only in page mode. Data buffered in page mode is cleared. This command sets the print position to the beginning of the line. The area of page mode is intialized as default value.
Decimal [Range] 0 ≤ n ≤ 2, 48 ≤ n ≤ 50 [Description] Aligns all the data in one line to the specified position. n selects the justification as follows: Justification 0,48 Left justification 1,49 Centering 2,50 Right justification [Notes] The command is enabled only when processed at the beginning of the line in standard mode.
When this command is input in page mode, the printer performs only internal flag operations. This command does not affect printing in page mode. In upside-down printing mode, the printer rotates the line to be printed by 180° and then prints it. [Default] n = 0 [Example]...
After printing the bit image, this command sets the print position to the beginning of the line and processes the data that follows as normal data. [Reference] ESC *, FS q, GS /, GS v 0 FS q n [xL xH yL yH d1...dk]1...[xL xH yL yH d1...dk]n [Name] Define NV bit image.
printing. Printing of the NV bit image is performed by the FS p command. NV bit image of each piece of space in NV memory is equal to the size of the NV bit image data plus 4 bytes. [Reference] FS p [Example] When xL = 64, xH = 0, yL = 96, yH = 0...
Page 18
This command is effective for all characters (alphanumeric and Chinses),except [Notes] for HRI characters . If n is 0 to 3 beyond the specified range, the horizontal magnification is set to 6 times. If n is 4 to 7 beyond the specified range, the horizontal magnification is set to 6 times.
GS * x y d1...d(x × y × 8) [Name] Define download bit image. [Format] × × ASCII x y d1...d(x × × x y d1...d(x × × Decimal x y d1...d(x [Range] 1 ≤ x ≤ 255,1 ≤ y ≤ 48,0 ≤ d ≤ 255 ,x ×...
underline, character size, or white/black reverse printing), except for upside- down printing mode. If the downloaded bit-image to be printed exceeds the printable area, the excess data is not printed. Refer to Figure 3.11.3 for the downloaded bit image development position in page mode.
3,51 Both above and below the bar code HRI indicates Human Readable Interpretation. [Notes] HRI characters are printed using the font specified by GS f. [Default] n = 0 [Reference] GS f, GS k GS L nL nH Set left margin [Name] [Format] ASCII...
[Format] ASCII 102 n Decimal n = 0, 1, 48, 49 [Range] Selects a font for the HRI characters used when printing a bar code. [Description] n selects a font from the following table: Font 0,48 Font ASCII 0(12 × 24) 1,49 Font ASCII 1(8 ×...
Page 23
JAN 8 (EAN8) 7 ≤ k ≤ 8 48 ≤ d ≤ 57 CODE39 1 ≤ k ≤ 255 48 ≤ d ≤ 57, 65 ≤ d ≤ 90, 32, 36, 37,43 d1 = dk = 42 1 ≤ k ≤ 255 48 ≤...
Page 24
Refer to Appendix F for the information for the CODE128 bar code and its code table. When using CODE128 in this printer, take the following points into account for data transmission: ① The top of the bar code data string must be the code set selection character (CODE A, CODE B, or CODE C), which selects the first code set.
GS r n Transmit status [Name] [Format] ASCII Decimal n=1,49 [Range] Transmits the status. [Description] Function 1,49 Transmits paper sensor status. [Note] This command is only valid for serial printer. Since this command is executed after the data is processed in the receive buffer, there may be a time lag between data reception and status transmission.
Printing modes, such as characters amplification/ emphasized/ double-strike/ underline/ white/ black reverse/ upside-down printing, etc., are effective to this command. The part exceeds printing area is not to be printed. ESC a (select justification) is effective to raster bit image. If this command is received while a macro is being defined, the printer ends macro definition mode and execute it.
3.Command User Guide 3.1 Command User Guide Instructions 1.The aim to write this command user guide is that make the users that use instruction programming master the command set quickly. 2.All command example data in this document use hexadecimal. 3.All general font character in this command is data.The data in command example don’t make notes.For example,42 43 is data.Bold underlined font character is command,sush as 1B 40.
1B 21 01(Select character print mode) 33 33 33 33 33 33 33 1B 21 00 (Select character print mode) 20 4F 70 65 6E 20 69 6E 76 65 72 73 65 20 20 70 72 69 6E 74 20 6D 6F 64 65 0A(Print)...
Page 30
See more details in command set 1D 2A(download RAM bitmap) and 1C 71(download NV bitmap); NOTE:When download bitmap,choose the number of bitmap. Simple description of downloading bitmap data dispose (take BMP bitmap as example): 1.The data format of bitmap download command is vertical.See more details in command set(1D 2A and 1C 71).
Page 31
nBytesOfWidth = (nPixelsOfWidth+31)/32*4; nBytesOfHeight = nPixelsOfHeight / 8; //Invert.Incontrary of printer,1 of BMP is white.midData = (char*)malloc(nBytesOfWidth*nPixelsOfHeight+1); for(i=0;i<nBytesOfWidth*nPixelsOfHeight;i++){midData[i] = 0xff-pBmpData[i];} //Rotate,BMP arrange as horizontally,download data of printer arrange as vertically. for (row = 0; row <nPixelsOfWidth; row++){ for (colbyte = 0; colbyte < nBytesOfHeight; colbyte++){ index = row * nBytesOfHeight + colbyte;...
08000FC03E00040000000FC01C000C00000007C000001C000000078000001C0000000780000038000 0000F800000700000000F000000700000001F000000F80000003E000000FE0000007C000000FF80000 0F8000000FFF80003F80000003FFFE00FF00000001FFFFFFFC000000007FFFFFF8000000000FFFFF F00000000001FFFFC000000000001FFF80000000000000FE00000000000003FC0000000000001FF00 00000000780FFC0000000000FFFFF00000000000FFFFC00000000000FFFE000000000000FFF000000 00000007F000000000000000000000000000000000000000000000000003F00000000000001FFC00000 00000007FFE000000000001FFFE000000000007FFFE00000000000FFFFE00000000001FE03E000000 00003F001C000000000078001C0000000000F000380000000001C000380000000001C0007000000000 038000E000000000030001CE00000000070007FE0000000007003FFE000000000703FFFE000000000 73FFFFE0000000007FFFFFC0000000007FFFFFC0000000007FFFE18000000000FFFC038000000000 FF80070000000000FC000E0000000000C0000C00000000000000080000000000000000000000000000 00000000000000020000000000000007000000000000000F0000C0000000001E000FC0000000001C00 FFC000000000380FFFC00000000070FFFFC0000000007FFFFFC0000000007FFFFF0000000000FFFF F00000000000FFFF000000000000FFF0000000000000FFC0000000000000F380000000000000070000 00000000000E000000000000000C000FC0000000001800FFE0000000003807FFE000000000303FFFE 00000000071FFFFE0000000007FFFFFE000000000FFFFF9C000000000FFFF818000000000FFFC038 07C000000FFE00700FE000000FF000E01FF00000070000C03FF80000000000C07FF80000000000007 8780000000003F0F01C000000003FF8E01C00000000FFFDC00C00000003FFFD800C00000007FFFF 800C0000001FFFFF000C0000003FE07E000C0000007F001E001C000000F8001C001C000001E00038 0038000001C00038007800000380007000F80000070000E003F00000070001E01FF00000060007FFFF E000000E003FFFFFC000000E03FFFFFF8000000E3FFFFFFF0000000FFFFFFFFC0000000FFFFFFF E00000000FFFFE00000000001FFFC000000000001FFC0000000000003FC00000000000003C0000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000 1D 23 00 (Choose the number of bitmap) 1D 2F 00 (Print RAM bitmap) 3.2.7 Recommended program application process Because automatically state return command can return all kinds of state an error of printer,we recommend that use automatically state return command and it’s valid when...
APPENDIX A:CODE128 BAR CODE A.1 Description of the CODE128 Bar Code In CODE128 bar code system, it is possible to represent 128 ASCII characters and 2-digit numerals using one bar code character that is defined by combining one of the 103 bar code characters and 3 code sets.
Page 34
" & Printable characters in code set B Transmit Data Transmit Data Transmit Data Character Character Character Decimal Decimal Decimal " & 7B,7B 123,123 — 7B,31 123,49 FNC1 7B,32 123,50 FNC2 7B,33 123,51 FNC3 7B,34 123,52 FNC4 7B,53 123,83 SHIFT 7B,41 123,66 CODEA...
Page 35
Printable characters in code set C Transmit Data Transmit Data Transmit Data Character Character Character Decimal Decimal Decimal FNC1 7B,31 123,49 CODEA 7B,41 123,65 CODEB 7B,42 123,66...
APPENDIX B:Print mode and its transformation 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 the received print data and paper feed commands are proce ssed in the specified memory, and the printer executes no operation.
Page 37
direction. If print data for the next line contains extended characters that are higher than double- height characters, bit images taking up two or more lines, or bar codes higher than normal characters, the amount of line feeding may be insufficient, resulting in overlapping of the characters' higher-order dots with the previous line.
Need help?
Do you have a question about the MPT8 and is the answer not in the manual?
Questions and answers