MODEL 814M DIRECT THERMAL PRINTER PROGRAMMING MANUAL PART NUMBER 880048-0101 Revised 04/14 MSG © Copyright 2014 by Microcom Corporation, Lewis Center, Ohio – All rights reserved.
ii
Proprietary Statement This manual contains information proprietary to Microcom Corporation. This information is intended solely for the use of parties operating and maintaining such equipment described herein. The reproduction, disclosure and/or use of such information without the authority of Microcom Corporation to other parties is strongly prohibited. Product Enhancements Microcom Corporation is committed to the continual improvement of performance and quality in our products.
iv
Table of Contents 1. General Information..................................................................................................................................Page 5 1.1 Key Terms .......................................................................................................................................................5 1.2 Command Explanation ...................................................................................................................................5 2.
ESC c 4 n ................................................................................................................................................. 32 ESC c 5 n ................................................................................................................................................. 32 ESC c 8 n ................................................................................................................................................. 33 ESC c 9 t .........................
GS k m d1...dk NUL GS k m n d1...dn.................................................................................................... 60 GS o n ...................................................................................................................................................... 64 GS p n ...................................................................................................................................................... 65 GS q n ............................................
4
1. General Information 1.1 Key Terms Real-time commands – These commands are acted on immediately upon being received by the printer (regardless of the printer’s busy or error status). Page mode -- Under this mode, the printer possesses all data in specified memory and thinks of this as a virtual page. The page is printed when the printer receives a print command, either FF or ESC FF. Standard mode – Standard mode is the default mode of printer uses to operate.
2. Kiosk Command Set HT [Name] Horizontal tab. [Format] ASCII HT Hex 09 Decimal 9 [Description] Moves the print position to the next horizontal tab position. [Notes] This command is ignored unless the next horizontal tab position has been set. If this command is received when the printing position is at the end of a line, the printer prints the current line and moves the print position to the beginning of the next line. Horizontal tab positions are set with ESC D.
FF [Name] Print and feed paper. [Format] ASCII FF Hex 0C Decimal 12 [Description] Under page mode, prints the data in the print buffer collectively and returns to standard mode. [Notes] Under standard mode, this command functions the same as a LF command. The buffer data is deleted after being printed. This command sets the print position to the beginning of the line.
n = 9: Transmit PRST status. n = 10: Reset printer n = 11: Clear printer errors.(function as the clear errors command) [Notes] When n is out of range, the return value is invalid. The printer transmits specified status immediately upon receiving this command Even though the printer is not selected using ESC = (select peripheral device), this command is still effective. The printer transmits the status without confirming whether the host computer can receive data.
4 5 6 7 0/1 0 0 0 00/10 00 00 00 Cutter normal / Cutter error Reserve Reserve Fixed to 0 n = 6, Transmits printer status defined as below: Bit 0 1 2 3 4 5 6 7 Off/On 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0 Hex.
Bit 0 1-3 4 5-7 Off/On 0/1 0 1 0 Hex. 00/01 00 02 00 Description PRST without paper / PRST with paper Fixed to 0 Fixed to 1 Fixed to 0 n = 10, reset printer Printer shall clear error information and buffer area and execute half-auto feeding. n = 11, clear printer error When executing this command, the printer shall clear errors automatically according to error status. If the operation succeeds, it enters normal status, otherwise only via manual operation.
ESC SP n [Name] Set right-side character spacing [Format] ASCII ESC SP n Hex 1B 20 n Decimal 27 32 n [Range] 0 ≤ n ≤ 255 [Description] Sets the character spacing for the right side of the character to [n × horizontal or vertical motion units] inches. [Notes] The horizontal and vertical motion units are specified by GS P. Without setting right-side character spacing, only changing the horizontal or vertical motion unit does not affect the current right-side spacing.
ESC ! n [Name] Select print mode [Format] ASCII ESC ! Hex 1B 21 n Decimal 27 n 33 n [Range] 0 ≤ n ≤ 255 [Description] Selects print mode(s) with n as follows: Bit 0 1/0 0 Hex 00 Decimal 0 Function Standard ASCII characters 1 01 1 Compressed ASCII characters 1,2 3 4 5 Undefined.
ESC $ nL nH [Name] Set absolute print position [Format] ASCII ESC $ Hex 1B 24 nL nH Decimal 27 [Range] nL nH 36 nL nH 0 ≤ nL ≤ 255 0 ≤ nH ≤ 255 [Description] Sets the distance from the beginning of the line to the position at which subsequent characters are to be printed as below. ♦ [(nL + nH × 256) × (vertical or horizontal motion unit)] inches. [Notes] Settings outside the specified printable area are ignored. The horizontal and vertical motion units are specified by GS P.
ESC & y c1 c2 [x1 d1...d(y × x1)]...[xk d1...d(y × xk)] [Name] Define user-defined characters [Format] ASCII ESC & y c1 c2 [x1 d1...d(y × x1)]...[xk d1...d(y × xk)] Hex 1B 26 y c1 c2 [x1 d1...d(y × x1)]... [xk d1...d(y × xk)] Decimal 27 38 y c1 c2 [x1 d1...d(y × x1)]... [xk d1...
When compressed ASCII font (9×17) is selected.
ESC * m nL nH d1... dk [Name] Download and print bit-image [Format] ASCII ESC * m nL nH d1...dk Hex 1B 2A m nL nH d1...dk Decimal 27 42 m nL nH d1...dk [Range] m = 0, 1, 32, 33, 35 0 ≤ nL ≤ 255 0 ≤ nH ≤ 3 0 ≤ d ≤ 255 [Description] Selects a bit-image mode with m for the number of dots specified by nL and nH, d1...
If the value of m is out of the specified range, nL and data following are processed as [Notes] normal data. If the bit-image data input exceeds the number of dots to be printed on a line, the excess data is ignored. d indicates the bit-image data. Set a corresponding bit to 1 to print a dot or to 0 to not print a dot. After printing a bit image, the printer returns to normal data processing mode.
ESC - n [Name] Turn underline mode on/off [Format] ASCII ESC - n Hex 1B 2D n Decimal 27 45 n [Range] 0 ≤ n ≤ 2, 48 ≤ n ≤ 50 [Description] Turns underline mode on or off, based on the following values of n: [Notes] n 0, 48 Function Turns off underline mode 1, 49 Turns on underline mode (1-dot thick) 2, 50 Turns on underline mode (2-dots thick) The printer can underline all characters (including right-side character spacing), but cannot underline the space set by HT.
ESC 2 [Name] Select default line spacing [Format] ASCII ESC 2 Hex 1B 32 Decimal 27 50 [Description] Selects 1/6-inch line (approximately 4.23 mm) spacing. [Notes] The line spacing can be set independently in standard mode and in page mode. [Reference] ESC 3 ESC 3 n [Name] Set line spacing [Format] ASCII ESC 3 Hex 1B 33 n Decimal 27 n 51 n [Range] 0 ≤ n ≤ 255 [Description] Sets the line spacing to [ n × vertical or horizontal motion unit] inches.
ESC = n [Name] Set peripheral device [Format] ASCII ESC = n Hex 1B 3D n Decimal 27 61 n [Range] 0 ≤ n ≤ 255 [Description] Disable or enable peripheral device to which host computer sends data.
ESC @ [Name] Initialize printer [Format] ASCII ESC @ Hex 1B 40 Decimal 27 [Description] 64 Clears the data in the print buffer and resets the printer mode to the default mode when the power was turned on. [Notes] The bit-image data or user-defined characters in RAM are cleared. The macro definition is not cleared. The NV bit image data is not cleared. ESC D n1...nk NUL [Name] Set horizontal tab positions [Format] ASCII ESC D Hex 1B 44 n1...nk 00 Decimal 27 [Range] n1...
[Default] The default tab positions are at intervals of 8 standard ASCII characters (columns 9, 17, 25). [Reference] HT ESC E n [Name] Turn emphasized mode on/off [Format] ASCII ESC E Hex 1B 45 n Decimal 27 n 69 n [Range] 0 ≤ n ≤ 255 [Description] Turns emphasized mode on or off ♦ When the LSB of n is 0, emphasized mode is turned off. ♦ When the LSB of n is 1, emphasized mode is turned on. [Notes] Only the least significant bit of n is effective.
ESC J n [Name] Print and feed paper [Format] ASCII ESC J n Hex 1B 4A n Decimal 27 74 n [Range] 0 ≤ n ≤ 255 [Description] Prints the data in the print buffer and feeds the paper [ n × vertical or horizontal motion unit] inches. [Notes] After printing is completed, this command sets the print starting position to the beginning of the line. The paper feed amount set by this command does not affect the settings of ESC 2 or ESC 3.
This command sets the position where data is buffered to the position specified by ESC T within the printing area defined by ESC W. This command switches the settings for the following commands to those for page mode: -Set right-side character spacing: ESC SP -Select line spacing: ESC 2, ESC 3 Only value settings is possible for the following commands in page mode; these commands are not executed until switch to standard mode.
ESC R n [Name] Select an international character set [Format] ASCII ESC R n Hex 1B 52 n Decimal 27 82 n [Range] 0 ≤ n ≤ 13 [Description] Selects an international character set n from the following table,see below: ASCII Code (Hex) n [Notes] [Default] Country 23 24 40 5B 5C 5D 5E 60 7B 7C 7D 7E 0 U.S.A # $ @ [ \ ] ^ ` { | } ~ 1 France # $ à ° ç § ^ ` é ù è ¨ 2 Germany # $ § Ä Ö Ü ^ ` ä ö ü ß 3 U.K.
-Set right-side character spacing: ESC SP -Select default line spacing: ESC 2, ESC 3 The following commands are enabled only to set in standard mode. -Set printing area in page mode: ESC W -Select print direction in page mode: ESC T The following commands are ignored in standard mode. -Set absolute vertical print position in page mode: GS $ -Set relative vertical print position in page mode: GS \ Standard mode is selected automatically when the printer is reset, or command ESC @ is used.
-If the starting position is the upper right or lower left of the printing area, data is buffered in the paper feed direction: Commands using horizontal motion units: ESC 3, ESC J, GS $, GS \ Commands using vertical motion units: ESC SP, ESC $, ESC \ [Default] n=0 [Reference] ESC $, ESC L, ESC W, ESC \, GS $, GS P, GS \ ESC V n [Name] Turn 90° clockwise rotation mode on/off [Format] ASCII ESC V n Hex 1B 56 n 27 86 n [Range] 0 ≤ n ≤ 1, 48 ≤ n ≤ 49 [Description] Turns 90° clockwise rotati
Printing area height: [Notes] dy = [dyL + dyH × 256] × (vertical motion unit)]inches If this command is input in standard mode, the printer executes only internal flag operation. This command does not affect printing in standard mode. If the horizontal or vertical starting position is set outside the printable area, the printer stops command processing and processes the following data as normal data.
ESC \ nL nH [Name] Set horizontal relative print position [Format] ASCII ESC Hex 1B 5C nL nH Decimal 27 92 nL nH [Range] \ nL nH 0 ≤ nl ≤ 255 0 ≤ nH ≤ 255 [Description] ♦ Sets the print starting position based on the current position by using the horizontal or vertical motion unit. ♦ This command sets the distance from the current position to [(nL + nH × 256) ×horizontal or vertical motion unit] inches [Notes] Any setting that exceeds the printable area is ignored.
ESC a n [Name] Select justification [Format] ASCII ESC a n Hex 1B 61 n Decimal 27 97 n [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: [Notes] n Justification 0,48 Left justification 1, 49 Centering 2, 50 Right justification The command is enabled only when processed at the beginning of the line in standard mode.
ESC c 1 nL nH [Name] Set cutting position [Format] ASCII ESC c Hex 1B 63 31 nL nH Decimal 27 [Range] 1 nL nH 99 49 nL nH 0 ≤ nL ≤ 255; 0 ≤ nH ≤ 255; N=(nL + nH x 256 )( If n < 19, n = 19) [Description] Sets the cutting position to a place when marked paper is selected. [Notes] • Direction settings: feeding paper is front, reversing feed paper is back. • The relationship between N and the cutting position is defined as below.
ESC c 4 n [Name] Select paper sensor(s) to stop printing [Format] ASCII ESC c 4 Hex 1B 63 34 n Decimal 27 99 52 n n [Range] 0 ≤ n ≤ 255 [Description] Selects the paper sensor(s) used to stop printing when a paper-end is detected, using n as follows: Bit 0 1 0/1 Hex Decimal Function 0 00 0 Paper roll near end sensor disabled 1 01 1 Paper roll near end sensor enabled 0 00 0 Paper roll near end sensor disabled 1 02 2 Paper roll near end sensor enabled 2-7 [Notes] Undefine
ESC c 8 n [Name] Select PRST action mode [Format] ASCII ESC c Hex 1B 63 38 n Decimal 27 8 n 99 56 n [Range] 0≤n≤3 [Description] Selects PRST action mode specified by n as follows. [Notes] N PRST action mode 0 Retraction mode 1 Ejection mode(special model) 2 PRST holding waiting mode 3 PRST disabled mode Printer operates after receiving command, then if PRST is enabled, proceed as follows: During printing, the PRST starts and hold the paper head.
ESC c 9 t [Name] Set PRST waiting time [Format] ASCII ESC c Hex 1B 63 39 t Decimal 27 9 t 99 57 t [Range] 0 ≤ n ≤ 240 [Description] Sets the time period (t in seconds) for PRST to wait before it takes any actions set by ESC c 8.
ESC d n [Name] Print and feed n lines [Format] ASCII ESC d n Hex 1B 64 n Decimal 27 100 n [Range] 0 ≤ n ≤ 255 [Description] Prints the data in the print buffer and feeds n lines (character line). [Notes] This command sets the print starting position to the beginning of the line. This command does not affect the line spacing set by ESC 2 or ESC 3. The maximum paper feed amount is 600mm (23.6 inches) for 300DPI printer and is 900mm (35.4 inches) for 203DPI printers.
Y1 = Y 1l + Y1h×255. [Notes] • This command is effective only in page mode. • This command can only make horizontal line and vertical line, so Y0 must equal to Y1 when X0 is unequal to X1,and X0 must equal to X1 when Y0 is unequal to Y1.
ESC v [Name] Transmit device status [Format] ASCII ESC v Hex 1B 76 Decimal 27 118 [Description] Transmits the device status in one-byte data. [Notes] • The command is non-real time • Transmits the status via serial interface and/or USB interface. If printer has serial and USB interfaces, the data return to serial and USB interface at same time.
FS p n m [Name] Print NV bit image [Format] ASCII FS p n m Hex 1C 70 n m Decimal 28 [Range] 112 n m 1 ≤ n ≤ 255 0 ≤ m ≤ 3 , 48 ≤ m ≤51 [Description] Prints a NV bit image n using the mode specified by m. 203DPI: m Vertical Dot Density (DPI) Mode Horizontal Dot Density (DPI) 0.48 Normal 203 203 1.49 Double-width 203 101 2.50 Double-height 101 203 3.51 Quadruple 101 101 300DPI: m Vertical Dot Density (DPI) Mode Horizontal Dot Density (DPI) 0.48 Normal 300 300 1.
FS q n [xL xH yL yH d1...dk]1...[xL xH yL yH d1...dk]n [Name] Define NV bit image [Format] ASCII FS q n [ xL xH yL yH d1...dk]1...[ xL xH yL yH d1...dk]n Hex 1C 71 n [xL xH yL yH d1...dk]1...[ xL xH yL yH d1...dk]n Decimal 28 113 n [xL xH yL yH d1...dk]1...[ xL xH yL yH d1...
yL, yH out of the defined range, it stops processing this command and starts writing into the NV images. At this time, NV bit images that haven’t been defined are disabled (undefined), but any NV bit images before that are enabled. The d indicates the definition data. In data (d) a 1 bit specifies a dot to be printed and a 0 bit specifies a dot not to be printed. This command defines n as the number of a NV bit image. Numbers rise in order from NV bit image 01H.
GS FF [Name] Feed paper until the next black mark reaches print position [Format] ASCII GS FF Hex 1D 0C Decimal 29 [Description] 12 Feed paper until the next black mark reaches print position GS ! n [Name] n select character size [Format] ASCII GS ! n Hex 1D 21 n Decimal 29 [Range] 33 n 0 ≤ n ≤ 255 (1 ≤ vertical number of times ≤ 6, 1 ≤ horizontal number of times ≤ 6) [Description] Selects the character height using bits 0 to 3 and selects the character width using bits 4 to 7, as
Character Width Selection [Notes] Character Height Selection Hex Decimal Width Hex Decimal Width 00 0 1 (normal) 00 0 1 (normal) 10 16 2 01 1 2 20 32 3 02 2 3 30 48 4 03 3 4 40 64 5 04 4 5 50 80 6 05 5 6 60 96 6 06 6 6 70 112 6 07 7 6 This command is effective for all characters (alphanumeric and Kanji) except for HRI characters. If n is outside of the defined range, this command is ignored.
GS $ nL nH [Name] Set absolute vertical print position in page mode [Format] ASCII GS $ nL nH Hex 1D 24 nL nH Decimal 29 36 nL nH [Range] 0 ≤ nL ≤ 255, 0 ≤ nH ≤ 255 [Description] ♦ Sets the absolute vertical print starting position for buffer character data in page mode. ♦ This command sets the absolute print position to [(nL + nH × 256) × (vertical or horizontal motion unit)] inches. [Notes] This command is effective only in page mode.
[Notes] • This command is enabled only when processed at the beginning of a line in standard mode. • This command is not effective in page mode. • When this command is received during macro definition, the printer ends macro definition and begins performing this command. • The printer cuts the paper at the end of the test print. GS ( E pL pH m [parameter] [Name] User-defined commands [Description] The user-defined commands control the values which are stored in the user NV memory.
Flage: Hexadecimal = 20H /Decimal = 32 (1 byte) NUL: Hexadecimal = 00H /Decimal = 0 (1 byte) • In the user-defined mode, only the following commands can be executed: Function 2, Function 3 and Function 4 of this command and GS I: GS ( E pL pH m d1 d2 d3 (m = 2) [Format] ASCII GS ( Hex 1D 28 45 p L pH 02 d1 d2 d3 40 69 p L pH 2 d1 d2 d3 Decimal 29 [Range] E pL pH m d1 d2 d3 pL = 4, pH = 0 m=2 d1 = 79 d2 = 85 d3 = 84 [Description]• Ends the user-defined mode and performs
• If the settings are changed, they become effective when the BA-T500 is reset other power is turned on again. • The setting values can be checked by executing the self-test.
♦ y specifies the number of dots in the vertical direction. [Notes] The number of dots in the horizontal direction is x × 8, in the vertical direction it is y × 8. If x × y is out of the specified range, this command is disabled. The maximum capacity for bit-images in RAM is 16K bytes. The execution of ESC & command will erase the bit-images in RAM downloaded with this command. The d indicates bit-image data. Data (d) specifies a bit printed to 1 and not printed to 0.
3, 51 Quadruple 101 101 300DPI m [Notes] Vertical Dot Density (DPI) Mode Horizontal Dot Density (DPI) 0, 48 Normal 300 300 1, 49 Double-width 300 150 2, 50 Double-height 150 300 3, 51 Quadruple 150 150 This command is ignored if a downloaded bit image has not been defined. This command has no effect in the print modes (emphasized, double-strike, underline, character size, or white/black reverse printing), except for upside-down printing mode.
GS B n [Name] Control white/black reverse printing mode [Format] ASCII GS B n Hex 1D 42 n Decimal 29 66 n [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. ♦ When the LSB of n is 1, white/black reverse mode is turned on. [Notes] Only the LSB of n is valid. This command is available for all built-in characters and user-defined characters except HRI characters.
[Notes] m Printing position Processing of digits less than those specified 0,48 Align right Adds spaces to the left 1,49 Align right Adds 0 to the left 2,50 Align left Adds spaces to the right • If n or m out of the defined range, the previously set print mode is not changed. • If n =0,mdoes not have any meaning.
If setting count-up mode, the minimum value of the counter is [ aL + aH x 256],the maximum number is [ bL + bH x 256].If counting up reaches a value exceeding the maximum, it is resumed with the minimum value. If setting count-down mode, the maximum value of the counter is [aL + aH x 256], the minimum number is [ bL + bH x 256].If counting down reaches a value less than the minimum, it is resumed with the maximum value.
[Description] Select a count mode for the serial number counter. • sa, sb, sn, sr and scare all displayed in ASCII characters, using the codes for "0" to "9". • sa and sb set the counter range. • sn indicates the stepping amount of counting up or down. • sr indicates the repetition number with the counter value fixed. • sc indicates the counter value.
[Default] n=0 [Reference] GS f, GS k GS I n [Name] Transmit printer configuration [Format] ASCII GS I Hex 1D 49 n Decimal 29 73 n n [Range] n = 68, 69, 153 [Description] Transmits the printer configuration specified by n as follows: [Notes] n Printer configuration 68 Transmit firmware version 69 Transmit Boot Loader version 153 Transmit Printer name This command is only enabled for USB and/or serial interfaces.
[Default] nL = 0, nH = 0 [Reference] GS P, GS W GS P xL xH yL yH [Name] Set horizontal and vertical motion units [Format] ASCII GS P xL xH yL yH Hex 1D 50 xL xH yL yH Decimal 29 [Range] 80 xL xH yL yH x = xL + xH x 256, y = yL + yH x 256 0 ≤ x ≤ 360 ,0 ≤ y ≤ 360 0 ≤ y ≤360 [Description] Sets the horizontal and vertical motion units to approximately 25.4/ x mm {1/ x inches} and approximately 25.4/ y mm {1/ y inches} respectively.
GS V m GS V m n [Name] Select cut mode and cut paper [Format] ASCII GS m Hex 1D 56 m Decimal 29 86 m ASCII [Range] V GS V m n Hex 1D 56 m n Decimal 29 86 m n m = 0, 48 m = 66, 0 ≤ n ≤ 255 [Description] Selects a mode for cutting paper and executes paper cutting. The value of m selects the mode as follows: M [Notes for [Note for and ] ] Print mode 0,48 Full cut 66 Feeds paper (n × vertical motion unit) inches and cuts the paper fully.
[Notes] This command is only effective when processed at the beginning of the line in page mode. This command does not affect printing in page mode. If the [left margin + printing area width] exceeds the printable area, [printable area width - left margin) is used. The horizontal and vertical motion units are specified by GS P. Changing the horizontal and vertical motion units does not affect the current left margin and print area width.
ESC $, ESC T, ESC W, ESC \, GS $, GS P [Reference] GS ^ r t m [Name] Execute macro [Format] ASCII GS ^ r t m Hex 1D 5E r t m t m Decimal 29 [Range] 94 r 0 ≤ r ≤ 255 0 ≤ t ≤ 255 m = 0, 1 [Description] Executes a macro. ♦ r specifies the number of times to execute the macro. ♦ t specifies the waiting time for executing the macro. ♦ m specifies macro executing mode. When m = 0: The macro executes r times continuously at the interval specified by t (t x 250 ms).
When the LSB of n = 0, the ASB function is disabled. When the LSB of n = 1, the ASB function is enabled. Only the LSB of n is valid. [Notes] If the ASB function is enabled, the printer automatically transmits a four byte data status. After this, a four byte data status is returned automatically when the printer status changes. Transmit data status only via serial and/or USB interface. If printer has serial and USB interface, data is returned to the serial and USB interfaces at the same time.
00101/10101 05/15 PRST retraction status Normal/Error 00110/10110 06/16 PRST ejection status Error/Normal 00111/10111 07/17 5 0/1 00/20 6 0/1 00/40 7 0/1 00/80 Auto paper loading status Normal/Error PrstIn with paper / PrstIn without paper No FEED button action/FEED button action Paper retract normally/user take the paper away in the process of retracting Top cover open, Print head overheated, paper end / near end , paper jam Top cover open, Print head overheated, paper end / near end , pa
[Description] Selects a font for the HRI characters used when printing a bar code. n selects a font from the following table: n Font 0,48 Standard ASCII characters : 203DPI (12 × 24) 300DPI (18 x 34) 1,49 Compressed ASCII characters: 203DPI ( 9 x 17) 300DPI (12 x 24) [Notes] HRI indicates Human Readable Interpretation. HRI characters are printed at the position specified by GS H.
m Bar Code System Number of Characters Remarks 0 UPC-A 11 ≤ k ≤ 12 48 ≤ d ≤ 57 1 UPC-E 11 ≤ k ≤ 12 48 ≤ d ≤ 57 2 JAN13 (EAN13) 12 ≤ k ≤ 13 48 ≤ d ≤ 57 3 JAN 8 (EAN8) 7≤k≤8 48 ≤ d ≤ 57 4 CODE39 1 ≤ k ≤ 255 45 ≤ d ≤ 57, 65 ≤ d ≤ 90, 32, 36, 37,43 5 ITF 1 ≤ k ≤ 255 48 ≤ d ≤ 57 6 CODABAR 1 ≤ k ≤ 255 48 ≤ d ≤ 57, 65 ≤ d ≤ 68 , 36, 43, 45,46,47,58 10 PDF 417 1 ≤ k ≤ 928 0< d ≤ 255 11 QRCODE 1 ≤ k ≤ 928 0 < d ≤ 255 12 MAXICODE 1 ≤ k ≤ 84 48 ≤ d ≤ 57, 65 ≤ d ≤ 90, 97 ≤ d ≤
1) Daabbcc, D:Linking structure mode, input particular identifier “D”, this mode is selectable. If this mode is selected, the rest three parameters and separate symbol should be specified. aa: The position of particular symbol, input 2 bit numbers in hex. bb: The sum of symbol, input 2 bit numbers in hex. Cc: Even or odd data, input 2 bit numbers in hex. It is a fixed separate symbol 2) E: Error correction class. Range: L, M, Q, H, the correction class increases in turn.
Legal character: Number and alphabet; Variable length: Adjustable. The legal bar width: The ratio of wide and narrow bar can not be adjusted. For example: 1D 6B 0C 33 32 37 38 39 35 35 35 35 38 34 30 36 36 36 54 48 49 53 20 50 41 43 4B 41 47 45 49 53 20 47 4F 49 4E 47 20 54 4F 20 44 41 54 41 4D 41 58 43 4F 52 50 2E 00 [Notes] · n indicates the number of bar code data, and the printer processes n bytes from the next character data as bar code data.
The following data should be selected in corresponding character sets. Specific [Example] Transmit data character ASCII Hex Decimal SHIFT {S 7B, 53 123,83 CODE A {A 7B, 41 123, 65 CODE B {B 7B, 42 123, 66 CODE C {C 7B, 43 123, 67 FNC1 {1 7B, 31 123, 49 FNC2 {2 7B, 32 123, 50 FNC3 {3 7B, 33 123, 51 FNC4 {4 7B, 34 123, 52 "{" {{ 7B, 7B 123, 123 Example data for printing "No. 123456" In this example, the printer first prints "No.
[Range] m = 0, 1 ≤ nA ≤ 255, 0 ≤ nB ≤ 1, 1 ≤ nC ≤ 2 [Description] he meaning of n is defined as follows: Parameters [Notes] Meaning of the parameters m Fixed to 0 nA Width of barcode basic cells nB Language mode 0:Chinese 1:Japanese nC Symbol type 1:Original type 0: Enhanced type When the parameter is beyond the range, this command will be disabled.
[Range] n = 1, 49 [Description] Transmits the status specified by n as follows: N 1, 49 [Notes] Function Transmits paper sensor status and paper end sensor status This command is valid for serial model and / or USB model only. If printer has serial and USB interfaces, data is returned to serial and USB interfaces at the same time.
3.
character or not, then process the first byte and the second byte if the code is for Chinese. • When use Chinese GB18030 character set, the printer process the third and the forth byte if the Chinese character is forth-byte code. • The printer select Chinese character mode automatically when the power is turned on. [Reference] FS .
FS 2 c1 c2 d1...dk [Name] Defined user-defined Chinese character [Format] ASCII FS 2 c1 c2 d1...dk Hex 1C 32 c1 c2 d1...dk Decimal 28 [Range] 50 c1 c2 d1...dk c1, c2 indicate character code for the defined character c1 = FEH A1H ≤ c2 ≤ FEH 0 ≤ d ≤ 255 k = 72 [Description] [Notes] Defined user-defined Chinese character specified by c1 and c2. • c1 ,c2 indicate character code for the defined character,c1 specifies first byte, c2 specifies the second byte. • d indicate data.
FS S n1 n2 [Name] Set the right and left character spacing [Format] ASCII FS S n1 n2 Hex 1C 53 n1 n2 Decimal 28 [Range] 83 n1 n2 0 ≤ n1 ≤ 255 0 ≤ n2 ≤ 255 [Description] Set the right spacing and the left spacing to n1 and n2 respectively. • The left spacing is [n1 × horizontal or vertical motion unit] inch, and the right spacing is [n2 ×horizontal or vertical motion unit] inch. [Notes] • When double-width is set, the right and the left spacing is doubled.
FS W n [Name] Select/cancel quadruple-size mode of Chinese character [Format] [Range] ASCII FS W n Hex 1C 57 n Decimal 28 87 n 0 ≤ n ≤ 255 [Description] Select/cancel quadruple-size mode of Chinese character . • When the LSB of n is 0, quadruple-size mode of Chinese character is turned off. • When the LSB of n is 1, quadruple-size mode of Chinese character is turned on. [Notes] • Only the LSB of n is effective.
4. Programming Instructions 4.1 General Information 1) All programming examples are given in Hex. 2) Commands cited in the instructions are bolded and underlined. For instance, 1B 40. Data following the commands are not underlined. For instance, 42 43. 3) Contents in parentheses are interpretations of the commands. Parentheses and their contents are not parts of the commands transmitted to printer. 4.2 Programming ABC 4.2.
4.2.2 Paper supported Black mark paper is thermal sensitive paper on which black marks are published regularly. The black marks are referenced to set print area and cut position. Refer to relative user’s manual for detailed black mark requirements.
1B 63 38 00 (select PRST action mode) 1B 53 (switch to standard mode) 33 33 33 33 33 20 49 6E 20 73 74 61 6E 64 61 72 64 20 6D 6F 64 65 2E 20 54 68 65 20 70 61 70 65 72 20 69 73 20 63 6F 6E 74 69 6E 75 6F 75 73 2E 20 54 68 65 20 70 72 65 73 65 6E 74 65 72 73 20 69 6E 20 72 65 74 72 61 63 74 69 6F 6E 20 6D 6F 64 65 21 0A (print) 1D 56 00 (cut paper) After transmits the above command, then Printout: 33333 In standard mode. The paper is continuous.
3) Select print mode :1B 53 switch to standard mode (Default) 1B 4C switch to page mode. 4) Select PRST action mode :1B 63 38 n,1B 63 39 n. 4.3.
0A (print) 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 0A (print) 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 1B 24 50 00 (set absolute print position) (The following hex string will print “New absolute start position 333333333333333“) 4E 65 77 20 61 62 73 6F 6C 75 74 65 20 73 74 61 72 74 20 70 6F 73 69 74 69 6F 6E 20 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 0A (print) 1D 56 00 (cut paper) c) Select print direction in
(The following hex string will print “Select underline print mode“) 53 65 6C 65 63 74 20 75 6E 64 65 72 6C 69 6E 65 20 70 72 69 6E 74 20 6D 6F 64 65 1B 2D 02 (turn underline mode on) (The following hex string will print “Now it works! Select Print mode“) 4E 6F 77 20 69 74 20 77 6F 72 6B 73 21 20 53 65 6C 65 63 74 20 50 72 69 6E 74 20 6D 6F 64 65 1B 21 01 (select print mode) 33 33 33 33 33 33 33 1B 21 00 (select print mode) (The following hex string will print “Open inverse print mode“) 4F 70 65 6E 20 69
z Select barcode height (1D 68) z Select barcode width (1D 77) z Select font for HRI characters(1D 66) z Select printing position for HRI characters (1D 48) z Print barcode (1D 6B) Example 1: print Code 128 in standard mode 0A (set the print starting position to the beginning of the line) 1B 40 (initialize printer) 1B 53 (switch to standard mode) (The following hex string will print “Print Code 128“) 50 72 69 6E 74 20 43 6F 64 65 20 31 32 38 1D 68 78 (Select barcode height) 1D 77 03 (Select barcode width)
1D 2F 03 (print downloaded bit image) 1D 56 00 (cut paper) 4.3.3 Print and cut paper To print in line mode, use command 0A. To print in page mode, use command 0C or 1B 0C (do not clear buffer). Cut paper command is 1D 56 00.
c) The status of the first byte and second byte based on printer process status give exact printer status information. For example, “01 04 15 F0” is returned by printer. F0 is synchronous data which cannot be analyzed. 15 : i.e. “10+05” and “05” means the printer is in PRST retraction process and “10” means that there are error occurring in this process.
//************************************************// int AntiRotateBmp90D( char *pBmpData, const int nPixelsOfWidth, const int nPixelsOfHeight, char *pBmpDataRotated ) { // Define process variables int nBytesOfWidth = 0,nBytesOfHeight = 0; int i=0,col=0,row=0,index = 0,colbyte = 0; char* midData; unsigned char tempdata = 0,colnum = 0,rownum = 0; unsigned char temp[8] = {0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01}; //Comparing parameters if (pBmpData == NULL || pBmpDataRotated == NULL) return 0; if (nPixelsOfWi
free(midData); return 1; } Example:Download a bit image into RAM and print it.
4.3.6 Recommendations on applicable flow for programm Make good use of ASB command during programming, since the ASB command is able to automatically transmit printer status messages. Remember to enable the ASB function by using command 1D 61 after the printer is turned on. 1) Inquiry printer status Make sure to send printing data only when the printer is in normal status. We provide all status of printer, at last printer transmits data to print in normal idle status.
Appendix A: ASCII TABLE ASCII Decim al HEX ASCII Decima l HEX ASCII Decima l HEX ASCII Decima l HEX NULL 0 00 SP 32 20 @ 64 40 ` 96 60 SOH 1 01 ! 33 21 A 65 41 a 97 61 STX 2 02 “ 34 22 B 66 42 b 98 62 EXT 3 03 # 35 23 C 67 43 c 99 63 EOT 4 04 $ 36 24 D 68 44 d 100 64 ENQ 5 05 % 37 25 E 69 45 e 101 65 ACK 6 06 & 38 26 F 70 46 f 102 66 BEL 7 07 ‘ 39 27 G 71 47 g 103 67 BS 8 08 ( 40 28 H 72 48 h
Appendix B: Code Page Table Code Page 0 (PC437: USA) 85
Code Page 1(Katakana) 86
Code Page 2 ( PC850: Multilingual) 87
Code Page 3 (PC860: Portuguese) 88
Code Page 4 (PC863: Canadian- French) 89
Code Page 5 (PC865: Nordic) 90
Code Page 16 (WPC1252) 91
Code Page 17 (PC866: Cyrillic #2) 92
Code Page 18 (PC852 Latin2 ) 93
Code Page 19 (PC858) 94
Appendix C: Code 128 Bar Code A.1 Description of the CODE128 Bar Code Code 128 bar codes can encode 128 unique ASCII characters, 2-digit numerals and special characters by using one bar code character that is defined by combining code set A, code set B and code set C.
A.2 Character Set Characters in Code Set A: Character Transmit data Hex Decimal NULL 00 0 SOH 01 STX Character Transmit data Transmit data Character Hex Decimal ( 28 40 P 50 80 1 ) 29 41 Q 51 81 02 2 * 2A 42 R 52 82 ETX 03 3 + 2B 43 S 53 83 EOT 04 4 , 2C 44 T 54 84 ENQ 05 5 - 2D 45 U 55 85 ACK 06 6 .
Characters in Code Set B: Character Transmit data Hex Decimal SP 20 32 ! 21 " Character Transmit data Transmit data Character Hex Decimal H 48 72 p 70 112 33 I 49 73 q 71 113 22 34 J 4A 74 r 72 114 # 23 35 K 4B 75 s 73 115 $ 24 36 L 4C 76 t 74 116 % 25 37 M 4D 77 u 75 117 & 26 38 N 4E 78 v 76 118 ' 27 39 O 4F 79 w 77 119 ( 28 40 P 50 80 x 78 120 ) 29 41 Q 51 81 y 79 121 * 2A 42 R 52 82 z 7A 122 + 2B
Characters in Code Set C Character Transmit data Hex Decimal 0 00 0 1 01 2 Character Transmit data Transmit data Character Hex Decimal 40 28 40 80 50 80 1 41 29 41 81 51 81 02 2 42 2A 42 82 52 82 3 03 3 43 2B 43 83 53 83 4 04 4 44 2C 44 84 54 84 5 05 5 45 2D 45 85 55 85 6 06 6 46 2E 46 86 56 86 7 07 7 47 2F 47 87 57 87 8 08 8 48 30 48 88 58 88 9 09 9 49 31 49 89 59 89 10 0A 10 50 32 50 90 5A 90 11 0B