PROGRAMMING GUIDE Contents General ..........................i Printer basic functions ....................i Receipt ..............................i Slip ................................. ii Internal Buffers ............................ii 1.3.1 RAM (Total Size: IRAM 3MB, DRAM 16MB) ................. ii 1.3.2 Flash Memory (Total Size: 8MB) ....................ii Summary of Option Interface ..................iii RS232C Interface ..........................
Page 3
PROGRAMMING GUIDE 3.1.23 Release Paper ..........................xx Vertical Positioning and Print Commands ..................xxi 3.2.1 Print and Feed Paper One Line ....................xxi 3.2.2 Print and Carriage Return ......................xxi 3.2.3 Feed n Print Lines ........................xxi 3.2.4 Feed n Dot Rows ........................xxi 3.2.5 Add n Extra Dot Rows .........................
Page 4
PROGRAMMING GUIDE 3.4.11 Cancel User-defined Characters ....................xxxiii 3.4.12 Select or Cancel Emphasized Mode ..................xxxiii 3.4.13 Select Double Strike ......................... xxxiii 3.4.14 Select or Cancel Italic Print ..................... xxxiv 3.4.15 Select International Character Set (DN Emulation) ..............xxxiv 3.4.16 Select International Character Set.(ESCPOS emulation) ............xxxv 3.4.17 Select character code table(ESCPOS emulation) ..............
Page 5
PROGRAMMING GUIDE 3.5.24 Print User-defined Logo in Flash Memory ................... liii 3.5.25 Transmit the key code for User-defined Logo in RAM ..............liii 3.5.26 Delete all User-defined Logo in RAM ................... liv 3.5.27 Delete User-defined Logo in RAM ....................lv 3.5.28 Define Logo in RAM by the key code ....................
Page 6
PROGRAMMING GUIDE 3.6.3 Transmit Printer ID ........................lxxviii 3.6.4 Transmit Printer ID, Remote Diagnostics Extension ..............lxxxi 3.6.5 Enable/disable Automatic Status Back (ASB)................. lxxxiii 3.6.6 Initialize maintenance counter....................lxxxv 3.6.7 Transmit maintenance counter ....................lxxxvii 3.6.8 Transmit Status ........................lxxxix 3.6.9 Send Printer Firmware Version ....................
Page 7
PROGRAMMING GUIDE 3.8.15 PDF417: Set the error correction level ..................cxvi 3.8.16 PDF417: Select the options ..................... cxvii 3.8.17 PDF417: Store the data in the symbol storage area ..............cxvii 3.8.18 PDF417: Print the symbol data in the symbol storage area ............ cxvii 3.8.19 PDF417: Transmit the size information of the symbol data in the symbol storage area ..
Page 8
PROGRAMMING GUIDE 3.11.3 Select Memory Type for User Defined Data ................cxxxvi 3.11.4 Flash Memory Allocation for User-defined Storage Area ............. cxxxvii 3.11.5 Erase User-defined storage area in Flash Memory .............. cxxxvii 3.11.6 Printer Setting Change ......................cxxxviii 3.11.7 Read Printer Setting ......................... cxliv 3.11.8 LED Configuration ........................
Page 9
PROGRAMMING GUIDE 3.12.2 Select Asian character mode ....................clxx 3.12.3 Turn underline mode ON/OFF in Asian mode ................clxx 3.12.4 Cancel Asian character mode ....................clxx 3.12.5 Define user-defined Asian characters ..................clxxi 3.12.6 Select Asian character code system ..................clxxii 3.12.7 Set Asian character spacing ....................
Page 10
PROGRAMMING GUIDE 4.12 Character code table Page 11 (PC874: Thai): ................clxxxvi 4.13 Character code table Page 12 (PC857: Turkish): ................ clxxxvii 4.14 Character code table Page 13 (WPC1251: Cyrillic): ..............clxxxvii 4.15 Character code table Page 14 (WPC1255: Hebrew):..............clxxxviii 4.16 Character code table Page 15 ((KZ_1048: Kazakh):..............
PROGRAMMING GUIDE General 1. Printer basic functions Receipt Resolution 203.2 dpi x 203.2 dpi (8 dots/mm) Interface (communicate with a USB Type-B 2.0 High Speed / Full Speed system) Printer class Emulation Mode DN POS receipt(P1200) ESC/POS Character set SBCS CP437 (DOS USA),CP720(Arabic),CP737(Greek),CP775(Baltic), CP850 (DOS Latin 1), CP852 (DOS Latin 2), CP857(Turkish), CP858...
PROGRAMMING GUIDE Slip Resolution - Font A 139 DPI x 72 DPI (Font A) - Font B 171 DPI x 72 DPI (Font B) Printable area - Font A 45 char = 82.2 mm - Font B 55 char = 81.7 mm - Graphics 82.2 mm Character configuration...
PROGRAMMING GUIDE 2. Summary of Option Interface The printer initially has USB type-B interface as the primary interface. It additionally allows an operator to install RS232C interface card as an option. In order to make the option interface card available, the USB interface cable has to be disconnected. It is because the option interface card is not activated if USB connection is established with a system.
PROGRAMMING GUIDE Emulation The printer supports the following commands. ESC/ Rcpt Slip Command sequence Function P1200 TH320 Printer Function Commands Clear Printer EM or ESC i 19H or 1BH 69H Perform Full Knife Cut SUB or ESC m 1AH or 1BH 6DH Perform Partial Knife Cut ESC BEL 1BH 07H...
Page 16
PROGRAMMING GUIDE ESC e 1BH 65H Print and Reverse Feed n Lines GS DC4 1DH 14H Reverse Feed n Lines GS NAK 1DH 15H Reverse Feed n Dots Print and Eject Slip ESC F 1BH 46H Set/cancel cut sheet reverse eject Set print position to the beginning of print GS T 1DH 54H...
Page 18
PROGRAMMING GUIDE FS 2 1CH 32H Define user-defined Asian characters FS C 1CH 43H Select Asian character code system FS S 1CH 53H Set Asian character spacing Set quadruple mode ON/OFF in Asian FS W 1CH 57H mode...
Page 19
PROGRAMMING GUIDE ESC/ Rcpt Slip Command sequence Function P120 TH320 Graphics Commands DC1 or GS 11H or 1DH 82H Print Raster Graphics 0x82 GS 0x83 1DH 83H Print Color Raster Graphics ESC “BMP file” 1BH “BMP file” Define Bitmap File as Logo ESC * 1BH 2AH Select Bit Image Mode...
Page 20
PROGRAMMING GUIDE FS ( E 1CH 28H 45H Set bottom logo printing Make extended settings for top/bottom FS ( E 1CH 28H 45H logo printing FS ( E 1CH 28H 45H Enable/disable top/bottom logo printing Define Windows BMP graphics data in GS D 1DH 44H Flash Memory...
Page 21
PROGRAMMING GUIDE GS ETX or 1DH 03H or Real Time Request to Printer DLE ENQ 10H 05H GS ( D 1DH 28H 44H Enable/disable real-time command DLE DC4 10H 14H Generate pulse in real-time DLE DC4 or 10H 14H or 10H 0EH Execute power-off sequence DLE SO DLE DC4...
Page 22
PROGRAMMING GUIDE ESC/ Rcpt Slip Command sequence Function P1200 TH320 GS a 1DH 61H Enable/disable Automatic Status Back (ASB) Barcode Commands GS H 1DH 48H Select Printing Position of HRI Characters GS f 1DH 66H Select Pitch for HRI Characters GS h 1DH 68H Select Bar Code Height...
Page 23
PROGRAMMING GUIDE GS ( k pL pH 33H 1DH 28H 6BH pL pH 2-dimensional GS1 DataBar: Store data in the 33H 50H symbol storage area GS ( k pL pH 33H 1DH 28H 6BH pL pH 2-dimensional GS1 DataBar: Print the symbol data 33H 51H in the symbol storage area 2-dimensional GS1 DataBar: Transmit the size...
Page 24
PROGRAMMING GUIDE ESC/ Rcpt Slip Command sequence Function P1200 TH320 User Data Storage Commands ESC ‘ 1BH 27H Write User Defined Data ESC 4 1BH 34H Read User Defined Data GS “ 1DH 22H Select Memory Type for User Defined Data Flash Memory Allocation for User-defined Storage GS “...
Page 25
PROGRAMMING GUIDE US ETX & STX 1FH 03H 25H 02H Enables or disables the 1B20 n command US ETX & ETX 1FH 03H 25H 03H Enables or disables the 1D50 x y command US ETX & EOT Enables or disables the 1D4 C n L n Hand 1D57 n L 1FH 03H 25H 04H n H commands US ETX &...
PROGRAMMING GUIDE 3. Command Descriptions Printer Function Command 3.1.1 Clear Printer ASCII: Hexadecimal: Decimal: It clears the print buffer and resets the printer settings to the condition when the printer is turned on except the barcode related settings. Sets the printer to the following condition related to slip station when some other command is sent after this command: Receipt station is selected Slip platen is opened...
PROGRAMMING GUIDE 3.1.6 Select Sensors to Stop Printing ASCII: ESC c 4 n Hexadecimal: 1B 63 34 n Decimal: 27 99 52 n Value of n: Function To determine if it suspends printing when it detects paper low. Ignore Suspend To determine if it suspends printing when it detects paper low.
• Receipt shooting flushing is executed only if Receipt shooting was enabled by memory switch (command GS ( E). • Printing of barcode PDF417 will stopped the printout for a short time (see GS k) Diebold Nixdorf specific function 3.1.12...
2300 Hz / 100 ms 1150 Hz / 100 ms 2300 Hz / 100 ms 1150 Hz / 100 ms 2300 Hz / 100 ms Notes: Diebold Nixdorf specific function 3.1.13 Switch the printer into Sleep-Mode ASCII: ESC w n c...
PROGRAMMING GUIDE 3.1.16 Return Home ASCII: ESC < Hexadecimal: 1B 3C Decimal: 27 60 Moves the impact print head (unless already there) to the home position. This command is performed regardless receipt unit or slip unit. Related Information: The printer is able to detect carriage motor jams, eliminating the need to home the print head after each slip transaction.
PROGRAMMING GUIDE 3.1.20 Set Slip Paper Waiting Time ASCII: ESC f m n Hexadecimal: 1B 66 m n Decimal: 27 102 m n Value of m : Minutes Value of n: Tenths of seconds Sets the time (in m minutes) that the printer waits for a slip to be inserted into the slip station. The default is forever, but it can be set to 1, 3, or 5 minutes using the configuration menu.
PROGRAMMING GUIDE Vertical Positioning and Print Commands 3.2.1 Print and Feed Paper One Line ASCII: Hexadecimal: Decimal: It prints data in the print buffer and performs one line feed. LF command will be ignored after CR(if automatic linefeed enabled) 3.2.2 Print and Carriage Return ASCII: Hexadecimal:...
PROGRAMMING GUIDE 7.81 7.52 7.25 7.00 6.77 6.55 6.35 6.16 5.98 5.81 5.64 Slip Station Lines Per Extra Rows Dot Rows Inch 10.29 9.00 8.00 7.20 6.55 6.00 5.54 5.14 4.80 4.50 4.24 4.00 3.79 Limitation: On slip station, the behavior is dependent on rotate command (1B 56). When rotate is enabled, line spacing is not effective on slip station.
PROGRAMMING GUIDE n / 144 inches in slip Default: Receipt .13 inch (3.37 mm or 7.52 lines per inch, 3 extra dot rows.) Slip .14 inch (3.53 mm or 7.2 lines per inch, 3 extra dot rows.) It defines the default line spacing to n/406 inches. For the slip, the line spacing is set to n/144 inches.
PROGRAMMING GUIDE Hexadecimal: 1B 4B n Decimal: 27 75 n Value of n: Slip = n / 144 of an inch 0 – 255 Range of n: Prints one line from the buffer and reverse feeds the paper n/144 of an inch on the slip station. Exceptions: The receipt station cannot be reverse fed.
PROGRAMMING GUIDE Decimal: 27 70 n Value of n: 0: cancels slip reverse eject, 1: sets slip reverse eject 0 – 255 Range of n: Default: Sets or cancels the reverse eject setting for slip paper. • When the LSB of n is 0, cancels slip reverse eject. •...
PROGRAMMING GUIDE 3.3.2 Set Column ASCII: ESC DC4 n Hexadecimal: 1B 14 n Decimal: 27 20 n Value of n: Receipt Slip 1 - 44 (Standard, 80mm) 1 - 45 (Standard) 1 - 56 (Compressed, 80mm) 1 - 55 (Compressed) 1 - 32 (Standard, 58mm) 1 - 42 (Compressed, 58mm) It defines number of characters to be printed in the current line.
PROGRAMMING GUIDE It moves the print position to the relative position specified by ((n1 + n2 x 256) x (horizontal motion unit)) from the current print position. The horizontal motion unit follows Set Horizontal and Vertical Minimum Motion Units (1D 50) command.
PROGRAMMING GUIDE Receipt: Printable Area: 576 dots for 80 mm width, dots for 58 mm width GS L GS W Left margin Print Area Width Slip: Printable Area: 448 dots for slip GS L GS W Left margin Print Area Width Exceptions: The command is valid only when it is specified at the beginning of a line.
PROGRAMMING GUIDE Print Characteristic Commands 3.4.1 Select Double-Wide Characters ASCII: Hexadecimal: Decimal: It prints characters in double width. It automatically comes back to single-wide mode after one line data has been printed or Initialize Printer (1B 40) / Clear Printer (10) command is received. 3.4.2 Select Single-Wide Characters ASCII:...
PROGRAMMING GUIDE It sets the right side character spacing to [n x (horizontal or vertical motion units)]. Values for this command are set independently in Standard and Page Mode. The horizontal and vertical motion unit follows Set Horizontal and Vertical Minimum Motion Units (1D 50) command.
Page 42
PROGRAMMING GUIDE Value of n: 0= Code Page 437 / Code Page GB18030 1= User-defined 2= Code Page 850 (Only TH320 Emulation) Range of n: 0 - 1 P1200 Emulation 0 - 2 TH320 Emulation 0 - 255 ESCPOS Emualation (Only the lowest bit of n is effective) Default: 0 (Code Page 437/ Code Page GB18030) It selects or cancels the user-defined character set.
Page 43
PROGRAMMING GUIDE Total bytes of all user-defined characters (n) defined by this command is 12 X (c2-c1+1) bytes. Not referred Code Page 437 will be selected when Standard DBCS (CP 932, 936, 949, 950) is loaded. Code Page GB18030 will be selected when GB18030 DBCS is loaded xxxii...
PROGRAMMING GUIDE 0 – 255 Range of n: Default: 0 (Bit0): Off It turns double strike mode on or off for the slip and receipt. Overprints a second pass of the print line on the slip station to improve penetration of multi-part forms and increase print contrast.
PROGRAMMING GUIDE 27 = Code page 775 (Receipt Only) 28 = Code page 1257 (Receipt Only) 29 = Code page 28594 (Receipt Only) 30 = Code page 1253 (Receipt Only) Default: 0 (Code Page 437) It selects the international character set. See “SPAA-xxx POS Printer Character Set Specification” for the detail of each character set.
PROGRAMMING GUIDE 3.4.21 Select Print Color ASCII: ESC r n Hexadecimal: 1B 72 n Decimal: 27 114 n Value of n: 0: Monochrome 1: Color Default: 0: Monochrome It turns the color mode on or off. Color printing is available when the printer is configured to the two color paper mode, and setting the two color thermal paper is required to actualize the color printing.
PROGRAMMING GUIDE 1 time (normal) 2 times 3 times 4 times 5 times 6 times 7 times 8 times Character Height Selection Decimal Height 1 time (normal) 2 times 3 times 4 times 5 times 6 times 7 times 8 times Exceptions: This command is not effective for bar code HRI characters.
PROGRAMMING GUIDE Toggles between unidirectional and bi-directional printing on the slip station. Unidirectional printing increases column alignment and provides higher quality printing. Printing is normally bi-directional because of the faster speed. 3.4.27 Select character font (ESCPOS emulation only) ASCII: ESC M n Hexadecimal: 1B 4D n Decimal:...
PROGRAMMING GUIDE Graphics Commands 3.5.1 Print Raster Graphics DC1 n1 … nk or GS 0x82 n1 … nk ASCII: 11 n1 … nk or 1D 82 n1 … nk Hexadecimal: 17 n1 … nk or 29 130 n1 … nk Decimal: Value of n: n specifies the defined data (Raster image format)
PROGRAMMING GUIDE 3.5.4 Select Bit Image Mode ASCII: ESC * m n1 n2 d1 ... dn Hexadecimal: 1B 2A m n1 n2 d1 ... dn Decimal: 27 42 m n1 n2 d1 ... dn It prints the bit image data defined by “d” according to the mode specified by m as follows. Values: Mode Vertical direction...
PROGRAMMING GUIDE even if the graphics data stream was interrupted. • If two-color paper is selected, two lines will be merged to one line. The first line defines the secondary color (i.e. red) and second line defines the primary color (black).
PROGRAMMING GUIDE Exceptions: Advanced Raster graphics is not available in Page Mode. 3.5.8 Select Single Density Graphics ESC K n1 n2 d1 … dn ASCII: Hexadecimal: 1B 4B n1 n2 d1 ... dn Decimal: 27 75 n1 n2 d1 ... dn Values: [ n1 + (256 x n2)] Number of Bytes of Data...
PROGRAMMING GUIDE It selects the current user-defined logo according to ID specified by “n” when a user defines a logo or prints a logo. 1. Logo definition Whenever a user defines a logo, first of all, the logo ID has to be specified by this command so that the logo is defined with this ID.
PROGRAMMING GUIDE y 8 dots y(max)=64 Exceptions: If the logo size of this command is larger than the free space of the user-defined logo area of the flash memory, a logo is tentatively stored into RAM and this status is reflected to bit 3 in Flash memory user sector status (parameter n=4, 52) of Transmit Status(1D 72) command.
PROGRAMMING GUIDE As for the detail of logo definition sequence, please refer to “Select the Current Logo” command. Exception: This command is available only with receipt station. 3.5.15 Define Logo in Flash Memory FS q n [xL xH yL yH d1…dk] 1…[xL xH yL yH d1… dk]n ASCII: 1C 71 n [xL xH yL yH d1…dk] 1…[xL xH yL yH d1…...
PROGRAMMING GUIDE Response format: The decimal value is converted to text data and sent starting from the high order end. (Example: 123456 byte -> 0x37 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x00) Response Decimal Data Header 37 H 1 byte Identifier 30 H 1 byte...
PROGRAMMING GUIDE Header 37 H 1 byte Identifier 32 H 1 byte Data 30 H to 39H 48 to 57 1 to 8 byte 00 H 1 byte 3.5.20 Transmit the key code for User-defined Logo in Flash Memory ASCII: GS ( L pL pH m fn d1 d2 Hexadecimal: 1D 28 4C pL pH m fn d1 d2...
PROGRAMMING GUIDE Hexadecimal: 1D 28 4C pL p m fn kc1 kc2 Decimal: 29 40 76 pL pH m fn kc1 kc2 0 ≤ (pL + pH × 256) ≤ 65535 Range of pL, pH: It indicates the total number of bytes of subsequent data after pH. Value of pL, pH: 4 (pL = 4, pH = 0) Value of m:...
Page 63
PROGRAMMING GUIDE The maximum width of each logo is 576/203 inches, and the maximum height of each logo is 2304/203 inches. If a logo size is more than this, it is not printed. If the graphic size defined by this command is larger than the free space of the user defined logo area of the flash memory, it firstly erases all logo data in the user-defined area and defines this new logo data.
PROGRAMMING GUIDE 3.5.27 Delete User-defined Logo in RAM ASCII: GS ( L pL pH m fn kc1 kc2 Hexadecimal: 1D 28 4C pL pH m fn kc1 kc2 Decimal: 29 40 76 pL pH m fn kc1 kc2 0 ≤ (pL + pH × 256) ≤ 65535 Range of pL, pH: It indicates the total number of bytes of subsequent data after pH.
PROGRAMMING GUIDE The colors of the selectable defined data (c) are Color 1 ~ Color 4 when a = 52 (multi-tone). d: specifies the defined data (raster format). Exceptions: The maximum width of each logo is 576/203 inches, and the maximum height of each logo is 2304/203 inches.
Page 68
PROGRAMMING GUIDE 4: Roll 2 (Right -> Center -> Left -> Right -> ...) 5: Twist (Left -> Center -> Right -> Center -> Left -> ...) yL, yH: It specifies the offset from the bottom of one watermark to the top of the next watermark by the number of dots in the vertical direction as (yL + yH ×...
PROGRAMMING GUIDE 3.5.31 Transmits set values for Watermark ASCII: GS ( L pL pH m fn Hexadecimal: 1D 28 4C pL pH m fn Decimal: 29 40 76 pL pH m fn Range: (pL + pH x 256) = 2 (pL = 2, pH = 0) m = 48 fn = 100 Data to be transmitted is as follows:...
PROGRAMMING GUIDE 3.5.33 Store the graphics data in the print buffer GS 8L p1, p2, p3, p4 m fn a bx by c xL xH yL yH d1 … dk ASCII: 1D 38 4C p1, p2, p3, p4 m fn a bx by c xL xH yL yH d1 … dk Hexadecimal: 29 40 76 p1, p2, p3, p4 m fn a bx by c xL xH yL yH d1 …...
PROGRAMMING GUIDE 3.5.35 Download logo image ASCII: GS 0x84 m n1 n2 d1 ... dn Hexadecimal: 1D 84 m n1 n2 d1 ... dn Decimal: 29 132 m n1 n2 d1 ... dn Value of m : 1 = Monochrome 2 = two-color Value of n1: See the following table.
PROGRAMMING GUIDE 3.5.36 Cancel set values for top/bottom logo printing ASCII: FS ( E pL pH fn m c d1 d2 d3 Hexadecimal: 1C 28 45 pL pH fn m c d1 d2 d3 Decimal: 28 40 69 pL pH fn m c d1 d2 d3 Range: (pL + pH x 256) = 6 (pL = 6, pH = 0) fn = 60...
Page 73
PROGRAMMING GUIDE Fixed value 32 H 0 or 1 byte Flash graphics key codes 20 H to 7E H 32 to 126 0 or 2 bytes Justification setting 30 H to 32 H 48 to 50 0 or 1 byte When c = 50 is specified.
PROGRAMMING GUIDE 3.5.38 Set top logo printing ASCII: FS ( E pL pH fn m kc1 kc2 a n Hexadecimal: 1C 28 45 pL pH fn m kc1 kc2 a n Decimal: 28 40 69 pL pH fn m kc1 kc2 a n Range: (pL + pH x 256) = 6 (pL = 6, pH = 0) fn = 62...
PROGRAMMING GUIDE Settings set by this command are maintained even after power off. 3.5.42 Define Windows BMP graphics data in Flash Memory GS D m fn a kc1 kc2 b c d1…dk ASCII: 1D 44 m fn a kc1 kc2 b c d1…dk Hexadecimal: 29 68 m fn a kc1 kc2 b c d1…dk Decimal:...
Page 77
PROGRAMMING GUIDE Monochrome (digital) Multi-tone c specifies the color of data to define. Color of data to define Color 1 d specifies the data to define (Windows BMP format). Monochrome BMP (1bpp) and color BMP (24bpp, 8bpp, 4bpp) are supported. lxvi...
PROGRAMMING GUIDE 3.5.44 Reverse color text mode ASCII: GS 0x85 m n Hexadecimal: 1D 85 m n Decimal: 29 133 m n Value of m : 0 = white, 1 = black, 2 = paper color Value of n : 0 = white, 1 = black, 2 = paper color Default : m =0 (off)
PROGRAMMING GUIDE 3.5.46 Color shade mode ASCII: GS 0x87 m Hexadecimal: 1D 87 m Decimal: 29 135 m This applies a mixing of color into any monochrome objects such as text and monochrome logos. Rather than fading away, this mode transitions a character or logo from the current color in which it would normally be printed to the other color.
PROGRAMMING GUIDE 3.5.49 Merge watermark mode ASCII: GS 0x8C n m Hexadecimal: 1D 8C n m Decimal: 29 140 n m This command will insert the logo m as a repeated background image, similar to printing a visible watermark, into the print stream. The space between repetitions of this usually shaded logo will be every n*8 dot rows.
PROGRAMMING GUIDE surround graphic, and may be changed before any subsequent surround graphics and/or printing output. This command may be used in page mode. Exceptions: This command is ignored. 3.5.51 Save graphics buffer as logo ASCII: GS 0x91 n Hexadecimal: 1D 91 n Decimal: 29 145 n...
PROGRAMMING GUIDE When a specific item request is made, a returned CRC value of 0 0 indicates that no item is stored at that index. There is a practically negligible possibility that a valid object will have a 0 0 CRC; if this is concern, applications should check the object downloaded byte sequence to verify that this is not the case (as well as store the CRC as an “ID ”...
PROGRAMMING GUIDE overlap region. This command with the first parameter l = 0 turns all margin message merging to off. Exceptions: This command is ignored. 3.5.55 Shade and store logo ASCII: GS 0x9A n m o Hexadecimal: 1D 9A n m o Decimal: 29 154 n m o Value of n: n is ID (logo index value) of an existing logo in either flash or RAM memory...
PROGRAMMING GUIDE Value of n: 0-FF (Hex) n= 01 will cause 1B7201 to printed. Any other value for 1B72 will print black. n= 00 will cause 1B7200 to printed and all other values to print black. This command defines how to interpret the 1B 72 command for legacy environments. It provides a method to resolve any differences in the definition of command 1B 72 between the TH320 mode and earlier implementations in other printers.
Page 85
PROGRAMMING GUIDE is usually needed above the logo. The default value is s = 0 and turns off the f = 1 logo after knifecut link. f = 2 link water mark printing Example: Activate watermark printing using logo #F1 (1F 03 16 02 s r) with “s” being the skip distance in dot rows before activation and “r”...
PROGRAMMING GUIDE definition a = 1 mapping definition (of two available) selects a = 2 second attribute a = 1 or 2, if m = 0 mapping 1 or 2, respectively, is turned off A word (2 bytes) is used to identify the attribute mapping, with “m ” bits 0 – 6 identifying which original attributes should be mapped: turn off margin message at the position of a knife cut and leave a clear space at the top of the next receipt.
PROGRAMMING GUIDE This command configures into EEPROM (permanent configuration switch setting) one or two combinations of character attribute mappings, including substitute attribute settings for color effects. The attributes of the character code are used to form the desired pixel character when the code is placed into the raster print buffer.
PROGRAMMING GUIDE Status Commands Status Command Introduction There are three methods to provide an application the printer status, Batch Status Commands, Real Time Status Commands and Auto Status Back Commands as follows. Batch Status Commands – The batch status command is sent based on the same manner as other commands/data.
It transmits the printer ID specified by n as follows: Printer ID Definition ID(hex) 1, 49 Printer model ID Printer model = 0x29 (P1300 Emulation) 0x27 (ESC/POS Emulation) 2, 50 Type ID Installed options Refer to the following table 1 Byte – FW version in binary...
Page 90
0x00 1 byte • If the printer information is not prepared, [Header + NUL] (2 bytes) are sent. • Be sure to use this function when the host can receive data. P1300 sends the Bare PCB Number (“_A”..”_Z”) lxxix...
Page 91
PROGRAMMING GUIDE • When using GS I, GS ( E or GS g 2 together with Automatic Status Back (ASB status, the status transmitted must be differentiated according to table Transmit Status Identification (see page 196). • When n is out of the specified range, this command is ignored. •...
PROGRAMMING GUIDE “_10” MF interface – USB connected. Type ID (n=254) Sensor Plug Info: Byte# (from left) Sensor Mark sensor Undefined Undefined Undefined Undefined Undefined Undefined Undefined Value (ASCII) Meaning ‘0’ Not plugged ‘1’ Plugged ‘2’ No information available 3.6.4 Transmit Printer ID, Remote Diagnostics Extension ASCII:...
Page 93
PROGRAMMING GUIDE Write to non-volatile memory (max 99,999,999) Receipt length tally Write to non-volatile memory and print on receipt (Front Head, unit : Meter), Clear receipt length tally to 0. (8 digits ASCII numeric) Return receipt length tally, Total 10 bytes Write to non-volatile memory (max 99,999,999) Knife cut tally, Write to non-volatile memory and print on receipt...
PROGRAMMING GUIDE (8 digits ASCII numeric) Write to non-volatile memory and print on receipt Clear Receipt cover open tally to 0. Return Receipt cover open tally, Total 10 bytes Reserved Max temperature tally, Reserved (8 digits ASCII numeric) Clear Thermal head over heat tally Return Thermal head over heat tally, Total 10 bytes Write to non-volatile memory (max 99,999,999) Slip lines tally,...
Page 95
PROGRAMMING GUIDE ⚫ Second byte (printer information) Off/On Decimal Status 0 – 1 Reserved. No mechanical error. Mechanical error occurred. No autocutter error. Autocutter error occurred. Fixed. No unrecoverable error. Unrecoverable error occurred. No automatically recoverable error. Automatically recoverable error occurred. Fixed.
PROGRAMMING GUIDE ⚫ Third byte (paper sensor information) Off/On Decimal Status 0, 1 Roll paper near-end sensor: paper adequate. Roll paper near-end sensor: paper near end. 2, 3 Roll paper end sensor (Paper sensor): paper present. And Roll paper jam sensor: no paper jam Roll paper end sensor (Paper sensor): paper not present Or Roll paper jam sensor: paper jam Fixed.
Page 97
PROGRAMMING GUIDE The number of print characters (for the face of a slip and validation) The number of carriage driving (for the face of a slip) The number of platen/roller opening/closing mechanism driving Note: “Number of lines fed. [Lines]”, “Number of head energizations [Times]” are calculated with “Receipt length tally”...
PROGRAMMING GUIDE 3.6.7 Transmit maintenance counter ASCII: GS g 2 m nL nH Hexadecimal: 1D 67 32 m nL nH Decimal: 29 103 50 m nL nH Range: m = 0 (nL + nH x 256) = 20, 21, 22, 50,52,53,54,55,56,57,59, 70, 148, 149, 150, 178,198 ,200,238,239,240 It transmits the value of the maintenance counter specified by (nL + nH x 256) (nL + nH x 256)
Page 99
PROGRAMMING GUIDE Transmission data is as follows. Data group of Decimal Data maintenance counter (1) Header 1 byte (2) Data 30H ~39H 48 ~ 57 1 byte ~ (3) NULL 1 byte Example: When autocut operations is 123 times, “0x1D 0x67 0x00 0x32 0x00” command response is “0x5F 0x31 0x32 0x33 0x00”...
PROGRAMMING GUIDE 3.6.8 Transmit Status ASCII: GS r n Hexadecimal: 1D 72 n Decimal: 29 114 n Values of n: 1, 49 = printer status 2, 50 = cash drawer status 3, 51 = slip paper status 4, 52 = Flash Memory status Transmits the status specified by n.
PROGRAMMING GUIDE Off/On Decimal Function Undefined Undefined User data storage write successful Failed to write to User data storage area. User defined area not erased properly. Flash Logo area is adequate. Flash logo area was not adequate for the latest logo registration.
PROGRAMMING GUIDE Head Failure 0x15 Counter for number of dots damaged Byte : Number of damaged dots Byte : Reserved (Null) The printer executes Impact Head Failure Detection and returns the result (3bytes). The first byte indicates the result (OK/NG) and 2nd byte indicates the number of dots damaged in NG case. The 3 byte is reserved, so it’s always null.
PROGRAMMING GUIDE 3.6.14 Set control point ASCII: ESC [ ! t nl nh Hexadecimal: 1B 5B 21 74 nl nh Decimal: 27 91 33 116 nl nh 0 ≤ (nL + nH * 256) ≤ 0xFFFF Range: Description: The printer sends the answer to a control point as soon as all mechanical activities are finished Notes: The answer which is sent to the host consists of the complete escape command...
PROGRAMMING GUIDE Real Time Commands Real Time Commands are immediately processed regardless of the condition of the receiving buffer and the printer status as soon as it's received. For example, even if the printer is in an error condition, it properly responds to a real time status command sent.
Page 105
PROGRAMMING GUIDE Undefined Not used. Fixed to off. Transmit 0ffline status (n=2) Off/On Decimal Function Undefined. Fixed to off. Undefined. Fixed to on Cover(Receipt Top & Receipt Front & Slip) is closed Cover(Receipt Top & Receipt Front & Slip) is opened Paper Feed Button is not pressed Paper Feed Button is pressed Not used.
PROGRAMMING GUIDE Slip station: Transmit slip paper status (n=5) Off/On Decimal Function Undefined. Fixed to off. Undefined. Fixed to on Slip station is selected Receipt station is selected Not waiting for slip to insert Waiting for slip to insert Not used. Fixed to on. Slip leading edge (TOF) sensor : paper present Slip leading edge (TOF) sensor : no paper Slip trailing edge (BOF) sensor : paper present...
PROGRAMMING GUIDE 3 = Cancel slip waiting The printer immediately takes the recovery action from an error condition in accordance with the parameter n once it receives this command. This command is valid when the printer is in an error condition.
PROGRAMMING GUIDE pL,pH specify (pL + pH x 256) as the number of bytes after pH (m and [a1 b1] … [ak bk]). Function 0, 48 DLE DC4 fn m t (fn = 1): Not processed (disabled). 1 (Default), 49 DLE DC4 fn m t (fn = 1): Processed (enabled).
PROGRAMMING GUIDE 3.7.6 Control Buzzer (Internal buzzer) ASCII: DLE DC4 fn a n r t1 t2 Hexadecimal: 10 14 03 a n r t1 t2 Decimal: 16 20 3 a n r t1 t2 Value: fn = 3 a = 0 n = 0 r = 0 t1 = 1...
PROGRAMMING GUIDE 3.7.9 Extended Real-Time Status Transmission ASCII: DLE EM n Hexadecimal: 10 19 n Decimal: 16 25 n Values of n: 0x01 = (Reserved) 0x02 = Error status 0x10 = Detail Cutter Error status 0x11 = Detail Printer Jam Error status 0x12 = Detail Thermal Head 1 Error status 0x14 = Detail Memory Error status 0x15 = (Reserved)
Page 111
PROGRAMMING GUIDE Undefined Fixed Fixed to off Jam sensor is OFF. (No paper on jam sensor) It is not an error. Jam sensor is ON. (Paper on jam sensor) Sensor status. Fixed Fixed to off Undefined Undefined Fixed Fixed to on These status bits are detail error status of Jam Error which is assigned at Bit2 in Error status (n=0x02) of Extended Real-Time Status Transmission.
Page 112
PROGRAMMING GUIDE (Reserved) Fixed Fixed to off Sensor calibration has been successfully done. Sensor calibration failed or hasn’t been conducted yet. (Reserved) Fixed Fixed to on Bit 0 indicates actual paper low sensor status. Based on this sensor status, the printer firmware detects the paper low according to “Paper Low Detection”...
Page 113
PROGRAMMING GUIDE Slip Paper Jam in forward feed. (BOF sensor becomes OFF while feeding a paper) No Shutter Jam Shutter motor Jam (Shutter motor did not exit the home position) Fixed Fixed to on Bit 0, Bit 1, Bit 3, Bit 5 and Bit 6 are the detail of Slip Paper Jam which are assigned at Bit 2 in Transmit error status (n=3) of Real Time Status Transmission.
Page 114
PROGRAMMING GUIDE Fixed Fixed to off No Carriage Motor Jam Carriage Motor Jam (It did not return to the home position) No Carriage Motor Jam Carriage Motor Jam (It did not exit the home position) Fixed Fixed to on Bit 5 and Bit 6 are the detail of Slip Paper Jam which are assigned at Bit 2 in Transmit error status (n=3) of Real Time Status Transmission.
PROGRAMMING GUIDE Flash firmware version It returns flash firmware version, Total 6 bytes Flash cycles tally It returns Flash cycles tally, Total 10 bytes Knife jams tally It returns Knife jams tally, Total 10 bytes Cover openings tally It returns Cover opening tally, Total 10 bytes Thermal head over heat tally It returns Thermal head over heat tally, Total 10 bytes...
PROGRAMMING GUIDE When this command is received, the printer resets (turns off) the current state of all color of LED, and then it changes the LED state according to the new parameter specified by this command. Exceptions: If the printer is in Auto mode of LED, this command is ignored. The command is ignored if n is out of range.
Page 117
PROGRAMMING GUIDE It transmits one cycle time of the full cut at the very beginning of the printer. Value of Status Byte: One cycle full cut time. Unit is 10 msec. Return Latest Cut cycle time (0x11) It transmits the latest one cycle time of the knife cut. Value of Status Byte: One cycle full cut time.
PROGRAMMING GUIDE Bar Code Commands 3.8.1 Select Printing Position of HRI Characters ASCII: GS H n Hexadecimal: 1D 48 n Decimal: 29 72 n Value of n: Printing Position of HRI Characters 0, 48 = Not printed 1, 49 = Above the bar code 2, 50 = Below the bar code 3, 51 = Both above and below the bar code Default:...
Page 119
PROGRAMMING GUIDE is not sent from a system. Start/Stop characters of Code 39 are automatically added and processed by the printer if they are not sent from a system. First Formula: String terminated by NULL m = 0 – 6, 10 d = 32 - 126 (see the table) n = 1 - 255 (see the table) First Formula...
Page 121
PROGRAMMING GUIDE The AI is ‘(01)’. Omnidirectional GS1 DataBar Limited GS1 DataBar Expanded Input data: Neither AI nor {(01{)15012345678907{(30{)23{1{(17{)950827 C/D is added GS1 DataBar Expanded HRI print: automatically. Stacked (01)15012345678907(30)23(17)950827 In order to express AI in HRI, AI is surrounded by the bracket and printed. Because this parenthesis needs to distinguish from the usual data, it is necessary to use special data.
PROGRAMMING GUIDE In all GS1 DataBar except Expanded and Expanded Stacked, the printer automatically adds Application Identifier (AI), Check Digit (C/D). Hence n (Length) is 13(Fixed Length) Fig. about the addition of AI & C/D Type of GS1 DataBar example AI &...
PROGRAMMING GUIDE Hexadecimal:1D 28 6B pL pH cn fn n Decimal: 29 40 107 pL pH cn fn n Range: (pL + pH x 256) = 3 (pL = 3, pH = 0) cn = 48 fn = 65 0 ≤ n ≤ 30 Default: n = 0 It sets the number of columns in the data region for PDF417.
PROGRAMMING GUIDE 3.8.19 PDF417: Transmit the size information of the symbol data in the symbol storage area ASCII: GS ( k pL pH cn fn m Hexadecimal: 1D 28 6B pL pH cn fn m Decimal: 29 40 107 pL pH cn fn m Range: (pL + pH x 256) = 3 (pL = 3, pH = 0) cn = 48...
PROGRAMMING GUIDE Range of n: 1-16 Default n : It sets the size of the module for QR Code as n dots. User must secure the quiet zone (left, right, upward, and downward space areas defined by the QR Code symbol specifications) for QR Code printing.
PROGRAMMING GUIDE 3.8.24 QR Code: Store the data in the symbol storage area cn fn m d1…dk ASCII: GS ( k p cn fn m d1…dk Hex: 1D 28 6B p cn fn m d1…dk Decimal: 29 40 107 p 4 - 255, Here 4 ≤...
PROGRAMMING GUIDE In the above, “Other information” represents the possibility of printing QR Code. Other Information: 0x30 - Printing is possible 0x31 - Printing is impossible Horizontal and vertical sizes are specified as ASCII value of received byte. They can be obtained by following equations.
PROGRAMMING GUIDE 3.8.29 2-dimensional GS1 DataBar: Store data in the symbol storage area ASCII: GS ( k pL pH cn fn m n d1,,,dk Hexadecimal: 1D 28 6B pL pH cn fn m n d1,,,dk Decimal: 29 40 107 pL pH cn fn m n d1,,,dk 6 ≤...
PROGRAMMING GUIDE 3.8.31 2-dimensional GS1 DataBar: Transmit size information of the symbol data in the symbol storage area ASCII: GS ( k pL pH cn fn m Hexadecimal: 1D 28 6B pL pH cn fn m Decimal: 29 40 107 pL pH cn fn m Range of pL, pH: (pL + pH ×...
Page 135
PROGRAMMING GUIDE 1 ≤ e ≤ 7 X dimension Width of a single Supported module in dots. 2 ≤ f ≤ 25 Y dimension Height of the code Not supported word in dots. PDF 417 is a multi-row, continuous, variable length symbolism which has high data capacity. Each symbol has between 3 and 90 rows, with each row containing a start pattern, a left row indicator, 1 to 30 data characters, a right row indicator and a stop pattern.
PROGRAMMING GUIDE 3.8.33 DataMatrix: Set the symbol type, number of columns, number of rows ASCII: GS ( k pL pH cn fn m d1 d2 Hexadecimal: 1D 28 6B pL pH cn fn m d1 d2 Decimal: 29 40 107 pL pH cn fn m Range of pL, pH: (pL + pH ×...
Page 137
PROGRAMMING GUIDE following table provides a useful guide to estimating size of symbol depending on number of data to be encoded: Symbol Maximum Data Type Numeric Alphanumeric Square 10,10 12,12 14,14 16,16 18,18 20,20 22,22 24,24 26,26 32,32 36,36 40,40 44,44 48,48 52,52...
PROGRAMMING GUIDE 3.8.34 DataMatrix: Set the size of the module ASCII: GS ( k pL pH cn fn n Hexadecimal: 1D 28 6B pL pH cn fn n Decimal: 29 40 107 pL pH cn fn n Range of pL, pH: (pL + pH ×...
PROGRAMMING GUIDE DataMatrix: 3.8.36 Print the symbol data in the symbol storage area ASCII: GS ( k pL pH cn fn m Hexadecimal: 1D 28 6B pL pH cn fn m Decimal: 29 40 107 pL pH cn fn m Range of pL, pH: (pL + pH ×...
PROGRAMMING GUIDE DataMatrix: Transmit the size information of the symbol data in the symbol storage 3.8.37 area ASCII: GS ( k pL pH cn fn m Hexadecimal: 1D 28 6B pL pH cn fn m Decimal: 29 40 107 pL pH cn fn m Range of pL, pH: (pL + pH ×...
PROGRAMMING GUIDE Page Mode Commands Standard Mode is the default mode which prints data as soon as one line data in the print buffer is ready to print. One line data is printed once a print command such as LF (0x0A) is processed or one line buffer is full.
PROGRAMMING GUIDE 3.9.4 Select Page Mode ASCII: ESC L Hexadecimal: 1B 4C Decimal: 27 76 It switches from Standard Mode to Page Mode. Exceptions: The command is valid at the beginning of a line in Standard Mode. The Select Paper (1B 63 30) command can not be used in Page Mode. The command is available only when the receipt is selected.
PROGRAMMING GUIDE n = 0 n = 3 n = 1 n = 2 Default: 0 (Upper left corner proceeding across page to the right) Exceptions: This command is valid in Page Mode. This command is ignored if the value of n is out of the range. 3.9.7 Set Printing Area in Page Mode ASCII:...
Page 144
PROGRAMMING GUIDE Default values Receipt Slip 576, 2.8 in. 420, 3 in. 576, 2.8 in. 1500, 10 in Receipt: The maximum printable area in the x direction is 576/203 inches. Slip: The maximum printable area in the x direction is 3 inches. Receipt and Slip: The maximum printable area in the y direction depends on the available memory.
Page 145
PROGRAMMING GUIDE When the starting position specified by “Select Print Direction in Page Mode” command (1B 54) is set to the upper right or lower left of the printing area, Horizontal Motion Unit is used for this formula. Exceptions: This command is valid in Page Mode. If the position specified exceeds the print area, this command is ignored.
PROGRAMMING GUIDE 3.10 Macro Commands 3.10.1 Start and Terminate Macro Definition ASCII: GS : Hexadecimal: 1D 3A Decimal: 29 58 It starts and terminates a macro definition to the target memory specified by Select Memory Type for User Defined Data(1D 22 n) command. Only one macro can be stored in Macro area of each target memory (RAM and Flash memory).
PROGRAMMING GUIDE characters are printed according to the character code irrespective of the storage area. n = 52 (ASCII n = 4) It specifies RAM as Macro definition area. The subsequent commands to define Macro are stored into RAM. It also specifies RAM as the target memory to read Macro defined. n = 53 (ASCII n = 5) It specifies the flash memory as Macro definition area.
PROGRAMMING GUIDE 3.11.6 Printer Setting Change US 6 [m n], [m n] … [m n] 0FFH ASCII: 1F 36 [m n], [m n] … [m n] 0FFH Hexadecimal: 31 54 [m n], [m n] … [m n] 0FFH Decimal: Value of m, n: It sets the printer configuration specified by m and n.
Page 150
PROGRAMMING GUIDE m (Hex) Function n (Hex) Option Effect Reserved 28-29 Reserved Receipt Shooting Disable(Defalut) Immediate Enable Receipt Shooting time Endless(Defalut) Immediate 01-FF Time out value (250ms~63.75s) Compatible Top Margin Disable (Default) Power off/on Enable Compatible top margin time out Disable (Default) Power off/on 01-FF...
Page 151
PROGRAMMING GUIDE - 2 : 90% - 1 : 95% 0 : 100% 1 : 105% 2 : 110% 3 : 115% 4 : 120 5 : 125% 6 :130% Paper mode 0-15 0 : NPI paper Immediate 1 : FA paper 2 : PF paper 3 : Blue4est paper 4~15 : User defined paper...
Page 152
PROGRAMMING GUIDE m (Hex) Function n (Hex) Option Effect 437 (Default) Immediate Default code page(Recipt) 1252 1251 1255 KZ 1048 1254 1250 28591 28592 28599 28605 1256 28596 KATAKANA. 1257 28594 1253 41 - 45 Reserved Remove Upper Space Disable (Default) Power off/on (ECO funtionality) Enable...
Page 153
PROGRAMMING GUIDE m (Hex) Function Option Effect (Hex) 51 - 56 Reserved ECO function Disable/Enable Disable (Default) Power off/on Enable Remove lines containing only Disable (Default) Power off/on spaces (ECO funtionality) Enable 59 – 5C Reserved Slip Left margin F1 – 0F -15 (F1), -14 (F2),…., -1 (FF), 0 Immediate (00), +1(01), +2(02),…., +15 (0F)
Page 154
PROGRAMMING GUIDE Denmark II Spain II Latin America Korea Slovenia/ Croatia China Reserved Arabia Immediate Top logo alignment Left justification (Default) Centering Right justification Immediate Bottom logo alignment Left justification (Default) Centering Right justification Immediate Top logo while paper Disable feeding to the cutting Enable (Default) position...
PROGRAMMING GUIDE 3.11.7 Read Printer Setting ASCII: US DC2 m Hexadecimal: 1F 12 m Decimal: 31 18 m Value of m: 16 (0x10) to 191 (0xBF). Refer to 3.11.6 Printer Setting Change Command in detail. This command is to read the setting specified by m. 3.11.8 LED Configuration ASCII:...
PROGRAMMING GUIDE …. Blink pattern Example: LED ON: These parameters are 0xFF 0xFF 0xFF 0xFF LED OFF: These parameters are 0x00 0x00 0x00 0x00 Range of q: 0 to 255 It specifies ON time of bit specified as ON (=1) in blink pattern. Unit is 100 m sec, so Actual time = Parameter (q) x Unit time (100 ms) Range of r: 0 to 255...
Page 158
PROGRAMMING GUIDE 2-4 to 2-7 Reserved Listen to Real-Time-Commands – Always Listen to Real-Time-Commands – Only if Receive-Buffer is not full When a = 2, memory switch 1 is set as follows: Setting Function value(b) 128-1 Power button is enabled Power button is disabled 128-2 In Sleep-Mode is Interface Power On...
PROGRAMMING GUIDE (original controller) this Memory switch is 0. After a controller change this Memory switch is set to 1. • Memory switch “Power Button Delay” (Memory switch 2-7): The delay time is effective when switching off the device. When switching on the power button reacts always with no delay. •...
Page 160
PROGRAMMING GUIDE Value of a: Parameters in Setting Type pf customized value Change Command (1F 36) Roll paper width 1F 36 32 n Print density when printing in monochrome and multi-tone 1F 36 30 n Default international character 1F 36 A0 n Maximum power 1F 36 36 n Print speed...
Page 161
PROGRAMMING GUIDE 120% 125% 130% Default international character (When a = 7) See (n) of the ESC R command to select international character. Power supply output (a = 9) (nL +nH x 256) Power Supply Output Default Auto(default) Auto 48…110 48W…110W Print speed setting (a = 10) (nL + nH x 256)
Page 162
PROGRAMMING GUIDE (nL +nH x 256) Flush time Default Endless 1…255 Time in 0.25 Sec This value sets the time how long the printer is waiting for print commands from the host before the receipt is printed out. The value must be multiplied by 250 milliseconds (i.e. CV13 = 8 -> Receipt shooting flush time = 2 sec).
Page 163
PROGRAMMING GUIDE Paper auto-cut after closing the roll paper cover (when a = 100) (nL + nH x 256) Paper auto-cut after closing the roll paper cover Disabled Enabled (Default) Enabling/disabling reduction of excessive top margin (when a = 101) (nL + nH x 256) Reduction of excessive top margin Disabled (Default)
Page 164
PROGRAMMING GUIDE (nL + nH x 256) Buzzer frequency No sound 1 time 65535 Continuous (Default) Buzzer function: Sound Pattern (when a = 121,123, 125) (nL + nH x 256) Sound pattern Pattern A (Default) Pattern B Pattern C Pattern D Pattern E Buzzer function: Buzzer frequency (when a = 122, 124, 126) (nL + nH x 256)
PROGRAMMING GUIDE 3.11.17 Transmit the configuration item for the serial interface ASCII: GS ( E pL pH fn a Hexadecimal: 1D 28 45 pL pH fn a Decimal: 29 40 69 pL pH fn a Range: (pL + pH x 256) = 2 (pL = 2, pH = 0) fn = 12 a = 1 It transmits the configuration item for the serial interface specified by a.
Page 169
PROGRAMMING GUIDE Hexadecimal: 1D 28 45 pL pH fn a Decimal: 29 40 69 pL pH fn a Range: (pL + pH x 256) = 2 (pL =2, pH = 0) fn = 16 a = 1 It transmits the set values for USB communication specified by a. Configuration item Class Transmission data is as follows:...
PROGRAMMING GUIDE types: (m n = 1 0) red/black paper. When issuing this command a value of n = 0xFF can always be use: that is interpreted as requested the setting of the highest version defined in the printer of that category. This is a save way for an application to always select the latest of a manufacturer’s paper category, thus choosing “latest standard red/black”.
Page 172
PROGRAMMING GUIDE Item offset size note Paper category Version in type category Target print head type. Print head type Valid for pre-load parameter. structure format type Fixed 1 Monochrome Density offset. Same as GS ( E density -10 ~ 6 : 50% ~ 130% Density offset.
Page 173
PROGRAMMING GUIDE Value note -15 ~ 15 : (-7.5m ~ F1-0F +7.5m) ・ Max speed : set max speed adjustment this area is same as GS ( E fn=5,a = 10 or 1F 36 AA ・ Print quality adjustment(txt) : This area able to adjust print speed for txt print Value note 0 ~ 50 : reduce duty...
PROGRAMMING GUIDE 3.11.26 Set temporary max target speed ASCII: GS 0xA0 nl nh Hexadecimal: 1D A0 nl nh Decimal: 29 160 nl nh 0x15 ≤ (nL + nH * 256) ≤ 0x162 monochrome Range: 0x15 ≤ (nL + nH * 256) ≤ 0x6E color Default : (nL + nH * 256) = 0 = normal speed Description: This command sets a specific speed for an operation, allowing the user more control of the print...
PROGRAMMING GUIDE 3.11.29 Select Slip lines per inch ASCII: US ETX % EOTn Hexadecimal: 1F 03 25 04 n Decimal: 31 03 37 04 n Range of n: 0: 7.2 LPI 1: 6.0 LPI Description: This command sets the slip station lines per inch setting. 3.11.30 Select Narrow Slip Configuration Option to Ignore n Leading Spaces ASCII:...
PROGRAMMING GUIDE Select Narrow slip 51 –column Compressed Print Option 3.11.32 ASCII: US ETX % LF n Hexadecimal: 1F 03 25 0A n Decimal: 31 03 37 0A n Range of n: 0: Disable (default) 1: Enable Description: When enabled, all normal text is printed in 51 – column compressed print. This accommodates existing applications printing up to 51 columns on the slip station.
PROGRAMMING GUIDE 3.11.35 Select Slip Stop Options ASCII: US ETX % CR n Hexadecimal: 1F 03 25 0D n Decimal: 31 03 37 14 n Range of n: 0: No slip stop emulation 1: TH420 Slip Stop emulation (default) Description: The TH420/A758/A756 mechanism has a positive slip stop for positioning a form at its top right corner.
PROGRAMMING GUIDE 3.11.39 Enables or disables the 1D 4C n L n H and 1D 57 n L n H commands ASCII: US ETX & EOT n Hexadecimal: 1F 03 26 04 n Decimal: 31 03 38 04 n Range of n: 0: Disable Set left margin (1D 4C n L n H) and print width (1D 57 n L n H) on the slip station commands 1: Enable Set left margin (1D 4C n L n H) and print width (1D 57 n L n H) on the slip stationcommands...
PROGRAMMING GUIDE 3.12 Asian character command 3.12.1 Select print modes for Asian characters ASCII: FS ! n Hexadecimal: 1C 21 n Decimal: 28 33 n Value of n: The character attribute for Asian character Off/On Decimal Function Undefined Undefined Double width mode is not selected Double width mode is selected Double height mode is not selected Double height mode is selected...
PROGRAMMING GUIDE 3.12.5 Define user-defined Asian characters FS 2 c1 c2 d1 … dn ASCII: 1C 32 c1 c2 d1 … dn Hexadecimal: 28 50 c1 c2 d1 … dn Decimal: Value of c1: Specified the first Asian character code Value of c2: Specified the second Asian character code Value of d:...
PROGRAMMING GUIDE 3.12.6 Select Asian character code system ASCII: Hexadecimal: 1C Decimal: Range: n = 0, 1, 48, 49 Default: n = 0 It selects a Kanji character code system for the Japanese model. Kanji character code system 0, 48 JIS code 1, 49 SHIFT JIS code...
PROGRAMMING GUIDE 3.13 IPL(Initial Program Loader) Command There are two ways to update the firmware in online. 1) Update the firmware in IPL mode 2) Update the firmware in Main firmware mode Following commands are to update the firmware in IPL mode provided for the serious malfunction such as the corruption of the main firmware.
PROGRAMMING GUIDE 3.13.5 Erase all Flash Memory ASCII: GS SO Hexadecimal: 1D 0E Decimal: 29 14 Response: ACK (0x06) This command is not used in the sequence of the firmware flashing in IPL. Therefore, it does not do anything except returning the acknowledgement. This command is available only in IPL mode. 3.13.6 Return Main Firmware CRC ASCII:...
PROGRAMMING GUIDE 3.14 Flash Download Commands in Main Firmware These commands are used to download the firmware in online. Since it does not switch to IPL mode, the flashing firmware is performed without disconnecting the interface. Those are not allowed to use in an application. Otherwise, it may cause the printer failure, or it may become not operational in worst case.
Page 187
PROGRAMMING GUIDE Error Code: 00H: Unknown error 01H: Illegal Parameter (n and p) 05H: No firmware in alternative area 06H: Fail to activate This command is not available in IPL mode. clxxvi...
PROGRAMMING GUIDE 3.15 Diagnostic Commands All diagnostic commands are supported for the printer production. Those are not allowed to use in an application. Otherwise, it may cause the printer failure, or it may become not operational in worst case. 3.15.1 Execute test print ASCII: GS ( A pL pH n m...
Page 189
PROGRAMMING GUIDE Range of n: n = 01H: execute sensor calibration n = 02H: execute sensor calibration for the slip station Response: ACK (0x06) + AA + EE + GG Index Sensor Value Jam Sensor If the respective sensor If the respective sensor calibration is successful or calibration is not done or if Paper Low Sensor...
PROGRAMMING GUIDE TOF Sensor If the respective sensor If the respective sensor calibration is successful or calibration is not done or if BOF Sensor already if calibration is done the calibration is failed after after power up power up This command is to calibrate the following sensors. - TOF Sensor - BOF Low Sensor Steps to calibrate sensors in the slip station:...
Page 191
PROGRAMMING GUIDE Cutter Error Recoverable Error (operator intervention is not required) Thermal head over heat 3) Warning (This will not affect any printer behavior) Maintenance Information (m=02) It transmits 1556 bytes detail maintenance information. The content of this information is exactly same information as two QR barcode. clxxx...
PROGRAMMING GUIDE 5. Appendix 2 Printable area Physical Right Margin Physical Printable Area GS L GS W Left margin Logical Printing Area The left margin can be set using GS L command. While printing area width is set by GS W command. These commands are ignored in page mode.
PROGRAMMING GUIDE 6. Appendix 3 Eco function Please refer the specification of Utility(T.B.D) for the detail of each Eco function. Eco function is available for the receipt station only. General Eco settings configured are stored into the non-volatile memory. Therefore, even if the printer is powered off, the settings remain.
PROGRAMMING GUIDE 6.2.2 Remove Lower Space It eliminates the extra lower space and rectifies the cutting position at the end of print data regardless of the original cutting position. Lower space implies the area from the end edge of the last printable data until the cutting position. Enabled Disabled Physical margin...
PROGRAMMING GUIDE 6.2.4 Line Feed Reduction It reduces the height of space created by the vertical feed command without printable data according to the ratio setting (Disable* / 25% / 50% / 75% / 100%). e.g. If it is configured to 50%, space height becomes half of the original height. If it is 100%, the space is completely removed.
PROGRAMMING GUIDE 6.2.6 Registered Logo Removal It ignores the registered Logo print command. Disabled Enabled AAAAAAAAAAA LOGO BBBBBBBBBBBB CCCCCCCCCCCC AAAAAAAAAAA BBBBBBBBBBBB CCCCCCCCCCCC This setting is ignored when the compatible top margin mode is enabled. 6.2.7 Force Single High Font It ignores the attribute commands which make character’s height higher. Disabled Enabled Physical margin...
PROGRAMMING GUIDE Power reduction 6.3.1 Bold Font Removal It ignores the Bold Font attribute settings. Disabled Enabled LOGO LOGO AAAAAAAAAAA AAAAAAAAAAA BBBBBBBBBBBB BBBBBBBBBBBB CCCCCCCCCCC CCCCCCCCCCCC 6.3.2 Force Single Wide Font It ignores the Double Width and wider Font attribute settings. Disabled Enabled LOGO...
PROGRAMMING GUIDE 6.3.3 No White/Black Reverse Printing It ignores the White/Black Reverse Printing attribute setting. Disabled Enabled LOGO LOGO AAAAAAAAAAA AAAAAAAAAAA BBBBBBBBBBBB BBBBBBBBBBBB CCCCCCCCCCCC CCCCCCCCCCCC 6.3.4 Stand-by Mode It disables / enables the stand-by mode. 6.3.5 Power Off Mode It disables / enables the power off mode. The power off mode is enabled by selecting the duration (60min, 120min, 180min, 240min and 300min) of idle time which triggers going in to the power off mode.
PROGRAMMING GUIDE Affected commands Below commands are affected by each eco functions Paper Reduction Power Reduction Line Line Barcode Registere Force Force No White Remove Remove Bold Space Feed Height Single Single /Black functions Upper Lower Font Reductio Reductio Reductio Logo High Wide...
PROGRAMMING GUIDE 7. Appendix 4 Thai font support Outline The printer supports Thai font (Code Page 874). It prints each character one by one according to the code number specified. However, Thai character basically consists of the combination of multiple characters. The printer provides the functionality to automatically construct Thai character according to the order of specified Thai character.
PROGRAMMING GUIDE Each character type is explained below. Baseline characters Circled by Red, Purple and pink characters are baseline characters. The characters circled by purple will not have below level characters, but they rarely use. The characters circled by pink will not have top level and above level, but only ฬ rarely use. Every character in red and purple must have a top and below level.
Page 218
PROGRAMMING GUIDE ESC 2 Set Line Spacing to 1/6 Inch ESC 3 Set Line Spacing The line pitch is changed by below commands because the code page is changed by below commands. ESC R Select international character set ESC t Select character code table (same as ESC R) ESC % Set/cancel user defined character set...
PROGRAMMING GUIDE 8. Appendix 5 Paper low detection Paper low sensor is located in receipt station to detect the paper roll when there is certain amount of paper remaining. Depend on diagnostic setting FW will calculate remaining paper length. There are three parameters to calculate paper remaining length. : Paper core diameter : Paper thickness : Length Adjustment.
PROGRAMMING GUIDE 9. Appendix 6 Barcode Information GS k Print Barcode • Modular check character is processed as following: - Automatically added when processing data is 11 byte. - The 12th byte data is processed as a modular check character when processing data is 12 byte.
Page 221
PROGRAMMING GUIDE Data (0331230|Composite) Command 0x1D 0x6B 0x42 0x0C "012345600007|Composite" Output • Modular check character is processed as follows: - Automatically added when processing data is 13 byte. - The 13th byte data is processed as a modular check character when processing data is 13 byte.
Page 222
PROGRAMMING GUIDE Data (1234567|CompositeAbcdefghij) Command 0x1D 0x6B 0x44 0x1B "1234567|CompositeAbcdefghij" Output • The printer processes the start code (ASCII = */Hex = 2Ah/Decimal = 42) as follows: - When the first bar code (d1) is “*”, the printer processes the data as a first character. - If the first bar code (d1) is not “*”, the printer adds a start character (*) automatically.
Page 223
PROGRAMMING GUIDE • Start code and stop code are not added automatically. Transmit data including the codes. • Check digits are not calculated and added. Example: Data (0123456789 CODABAR Command (m = 6, 71) 0x1D 0x6B 0x06 "A0123456789A" 0x00 process: 0x1D 0x6B 0x47 0x0C "A0123456789A"...
Page 224
PROGRAMMING GUIDE • The printer does not print HRI characters that correspond to the shift character or code set selection character (CODE A, CODE B, or CODE C). • HRI characters of the function characters (FNC1, FNC2, FNC3, or FNC4) and control characters (0x00 to 0x1F and 0x7F) are printed as spaces.
Page 225
PROGRAMMING GUIDE (m=13, 78) • Barcode will not be printed if the separator is given without composite process: code • If encoding of composite code failed, barcode will not be printed Data (2001234567890|Composite) Command 0x1D 0x6B 0x4E 0x17 "2001234567890|Composite" Output •...
Page 226
PROGRAMMING GUIDE Composite CC-B (m=16, 81) • Separator to composite code is ‘|’ (ASCII), 7C (HEX), 124 (DEC) process: • Barcode can be printed without the composite part • Barcode will not be printed if the separator is given without composite code •...
Page 230
PROGRAMMING GUIDE GS ( k Print 2-dimensional Barcode • PDF417: Print the symbol data in the symbol storage area Data (0123456789) Command 0x1D 0x28 0x6B 0x0D 0x00 0x30 0x50 0x30 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 PDF417 ;...
Page 231
PROGRAMMING GUIDE • DataMatrix: Print the symbol data in the symbol storage area Data (123456789012345678901234567890) Command 0x1D 0x28 0x6B 0x05 0x00 0x36 0x42 0x00 0x16 0x16 ; Set the symbol type, number of columns, number of rows 0x1D 0x28 0x6B 0x03 0x00 0x36 0x43 0x04 ;...
PROGRAMMING GUIDE Diagnostics 10. Offline Diagnostic 10.1 Offline Printer Configuration It configures the printer by Feed Key operation in offline mode. When the printer is turned on while Feed Key is pressed down, it enters Offline Printer Configuration mode. In this mode, all the interfaces are not available. Service Menu Structure –...
Page 233
PROGRAMMING GUIDE Main Menu / Diagnostic Diagnostic Exit Rolling Pattern Test Rolling Pattern Test Exit Sensor Test Print Pattern Once Print Pattern Unlimited Cutter Test(Full Cut) Print Pattern 10 Times Print Pattern 50 Times Cutter Test(Partial Print Pattern 100 Times Cut) Print Pattern 500 Times Print Pattern Once for slip...
Page 234
PROGRAMMING GUIDE Main Menu / Configuration / Hardware Hardware Exit/Save Power Button Power Button Exit Max. Power Enable Button Disable Button Sleep Mode Max. Power Exit Set Max. Power to Auto Set Max. Power to 48W Set Max. Power to 55W Set Max.
Page 235
PROGRAMMING GUIDE Main Menu / Configuration / Software Diagnostic Exit Power-ON Power-ON notice Notice Exit Paper-NE Transmit Don’t Transmit Notice Automatic Line Feed Paper-NE Notice Legacy Printer Exit Support Enable Paper-NE Notice Listen To RT- Disable Paper-NE Notice Cmds Asian font Automatic Line Feed Exit Enable Automatic Line Feed...
Page 236
PROGRAMMING GUIDE Main Menu / Configuration / Print Options Hardware Exit/Save Print Speed Print Speed Exit Paper Width PaperWidth 1.5 IPS Exit 2 IPS Paper Type 58mm 4 IPS 80mm 6 IPS Print Density 8 IPS Paper Type 10 IPS Color Print Density Exit 12 IPS...
Page 237
PROGRAMMING GUIDE Main Menu / Configuration / Print Options Configuration & Counters Exit Set Configuration to Default Main Menu / Configuration / RS232 Diagnostic Exit Baud Rate Baud Rate Exit Parity 9600 bps 19200 bps Flow Control 38400 bps 57800 bps Bit Length 115200 bps Receive Buffer...
Page 238
PROGRAMMING GUIDE Main Menu / Configuration / Slip Options Slip Options Wait for Slip Paper Exit 1 Exit Wait for Slip paper 2 Forever 3 1 minute 4 3 minutes 5 5 minutes Clamp Delay Clamp Delay Exit 1 second Print Justification Print Justification 0.5 second...
Page 239
PROGRAMMING GUIDE Diagnostic - Menu Every diagnostic function will be explained in the table below. Menu Description Available Options Exit/Save Rolling Pattern Test 1, 10, 50, 100, 500, The rolling pattern menu allows you to print out a endless, rolling pattern in numerous ways. Once for slip You can print it out once, endless, which will be interrupted by a long click of the LF button, and a...
Page 240
PROGRAMMING GUIDE during Sleep Mode 4.2.5.4 Sleep Mode Cash Drawer Delay 0 sec, 0.5 sec, 1 sec, The minimum time between leaving 1.7 sec, 2.5 sec, 5 sec Sleep Mode and opening cash drawer 4.2.5.5 ccxxix...
Page 241
PROGRAMMING GUIDE software Menu Description Available Options 4.3.1 Exit Exit this menu level and give a save request, if there are unsaved changes. 4.3.2 Power-ON Notice Transmit, Don’t Transmit Select a power up notification on the communication interface 4.3.3 Paper-NE Notice Enable Paper-NE Notice, Select the usage of the Paper-Near- Disable Paper-NE Notice...
Page 242
PROGRAMMING GUIDE Print Options In this menu section is it possible to change some printer parameter. It is very important to know what effects a change of a value. The procedure to save settings should be read. To leave this menu, choose “Exit/Save”. Menu Description Available Options...
Page 243
PROGRAMMING GUIDE RS232 Configuration In this configuration menu, you can configure the parameters for use with one RS232 communications Interface. This interfaces boards are available with different options. This menu is available with RS232 option card. Menu Description Available Options 4.6.1 Exit Exit this menu level and gives a...
Page 244
PROGRAMMING GUIDE Slip Options In this menu section is it possible to change slip function parameter. It is very important to know what effects the change of a value. The procedure to save settings should be read to leave this menu, choose “Exit/Save”.
Page 245
PROGRAMMING GUIDE Information - Menu Menu Description Available Options Exit Exit this menu level. Print Installed Code Pages That prints a printout with printer data and an overview of installed codepages. Print Code Pages That prints a collection of printouts of all chars of installed codepages.
Page 248
PROGRAMMING GUIDE Statistic Report : Dots Total Dots Actual Printhead Changes : 0 Linefeeds Total Linefeeds Actual Mechanic Changes : 0 Cuts Total Cuts Actual Cutter Changes Cutter Errors Max. Head Temp. : 35℃ Thermistor Error Low Volt. Error High Volt. Error Cover Open FW Starts Power On (Hours)
PROGRAMMING GUIDE Printer Errors 11. Error Detection The followings are errors and warnings detected in this printer. 1) Unrecoverable Error Those are very critical errors that the printer may not be functional at all and may require the repair. Once those errors are detected, it is not able to recover from an error condition unless the printer is reset.
Page 250
PROGRAMMING GUIDE The printer is not able to recover from this error condition unless the printer is turned off. Even if it is rebooted, there is a high possibility that same error is detected because this is the fatal error. Thermal Head Abnormal Temperature Error When the printer observes that the thermal head temperature is too high, it is detected as Thermal Head Abnormal Temperature Error.
Page 251
PROGRAMMING GUIDE Note: Even if the cutter overshoots (cannot stop at) the home position while performing cut, it is not considered as the abnormal condition as long as returning to the home position is recognized. Cover Open Error / Slip Cover Open Error When the printer recognizes that the cover sensor implies the cover open, it is detected as Cover Open Error.
PROGRAMMING GUIDE 12. LED Indication 11.1 LED Pattern in Auto Mode This is the default LED pattern in “Auto Mode” which printer itself controls LED according to the printer status. This pattern can be changed by LED configuration command. Stage Printer Status Cycle Color...
Page 253
PROGRAMMING GUIDE State 33 to 64 are for LED on Slip Station. State Printer Status Cycle Color Control Boot Up AMBER AMBER -> OFF Idle Slip Active GREEN (Reserved) (Reserved) (Reserved) (Reserved) Standby mode (Reserved) Waiting for Paper to insert 2 Hz GREEN BLINK...
PROGRAMMING GUIDE 11.2 LED Pattern in User Mode When the printer is configured to “User Mode”, a system controls LED by “LED Control Request” command according to the printer status. The printer itself does not control the LED at all. For example, if a system recognizes that the cover is opened, it may send LED Control Request command (1D 7A 25) so that LED starts blinking RED in 3Hz.
Page 255
PROGRAMMING GUIDE ID 33 to 64 are for LED on Slip Station. Color Pattern Cycle (Hz) Control Green Blink 3 Hz 1 Blink Pause 3 seconds Green Blink 3 Hz 2 Blink Pause 3 seconds Green Blink 3 Hz 3 Blink Pause 3 seconds Green Blink 3 Hz...
Need help?
Do you have a question about the P1300 and is the answer not in the manual?
Questions and answers