background image

PPTII-A Programming Manual

www.hprt.com

50

B.1 General Description

The printer operates in two print modes: standard mode and page mode. In standard mode, the printer
prints and feeds paper each time it receives print data or paper feed commands. In page mode, all the
received print data and paper feed commands are proce ssed in the specified memory, and the printer
executes no operation. All the data in the memory is then printed when an ESC FF or FF command is
received.
For example, when the printer receives the data "ABCDEF" <LF> in standard mode, it prints "ABCDEF"
and feeds the paper by one line. In page mode, "ABCDEF" is written to the specified printing area in
memory, and the position in memory for the next print data is shifted by one line.
The ESC L command puts the printer into page mode, and all commands received thereafter are
processed in page mode. Executing an ESC FF command prints the received data collectively, and
executing an FF command restores the printer to standard mode after the received data is printed
collectively. Executing an ESC S command restores the printer to standard mode without printing the
received data in page mode; the received data is cleared from memory instead.

B.2 Setting Values in Standard and Page Modes

1) The available commands and parameters are t he same for both standard and page modes. However,
these values can be set indepe ndently in each mode for the ESC SP , ESC 2 , ESC 3 , and FS S
commands. For these commands, different settings can be stored for each mode.

B.3 Formatting of Print Data in the Printable Area

1) The printable area is set by ESC W. If all printing and feeding operations are complete before the
printer receives the ESC W command, the left side (as you face the printer) is taken as the origin (x0,
y0) of the printable area. The printable rectangular area is defined by the length (dx dots) extending
from and including the origin (x0, y0) in the x di rection (perpendicular to the paper feed direction), and
by the length (dy dots) in the y direction (paper feed direction). (If the ESC W command is not used, the
printable area remains the default value.)
2) When the printer receives print data after ESC W sets the printable area and ESC T sets the printing
direction, the print data is formatt ed within the printable area so that point A in Figure B.2 is at the
beginning of the printable area as a default value. (When a character is pr inted, point A is the baseline.)
Print data containing downloaded bit images or bar codes is formatted so that the bottom point of the
left side of the image data (point B in Figur e B.3) is aligned with the baseline.
3) If the print data (including charac ter spacing) exceeds t he printable area before the printer receives a
command (e.g., LF or ESC J ) that includes line feeding, a line feed is executed aut omatically within the
printable area. The print position, therefore, moves to the beginning of the next line. The line feed
amount depends on the values set by commands (such as ESC 2 and ESC 3 ).
4) The default value of the line spacing is set to 1/6 inch and corresponds to 31 dots in the vertical
direction. If print data for the next line contains extended characters that are higher than double-height
characters, bit images taking up two or more lines, or bar codes higher than normal characters, the
amount of line feeding may be insufficient, resulting in overlapping of the characters' higher-order dots
with the previous line. To avoid this, increase the amount of line spacing.
Example

Содержание PPTII-A

Страница 1: ...ww hprt com 1 PPTII A Programming Manual Xiamen Hanin Electronic Technology Co Ltd ADD Room 305A Angye Building Pioneering Park Torch High tech Zone Xiamen China 361009 Tel 86 0 592 5885993 Fax 86 0 5...

Страница 2: ...ing Manual www hprt com 2 REVISION RECORDS Rev Date Description Drawn Checked Approved 1 0 2014 02 17 Chen Weihua Lin Yang Ren Xiaowei 1 1 2014 07 30 1 change orders ESC M n ESC t n Chen Weihua Yang K...

Страница 3: ...dk 12 ESC n 14 ESC 2 14 ESC 3 n 15 ESC n 15 ESC n 15 ESC 16 ESC D n1 nk NUL 16 ESC E n 16 ESC G n 16 ESC J n 17 ESC L 17 ESC M n 17 ESC R n 18 ESC S 18 ESC T n 18 ESC V n 19 ESC W xL xH yL yH dxL dxH...

Страница 4: ...39 FS S n1 n2 39 FS W n 40 ESC m x x y y w w h h 40 ESC o x x y y r r 41 GS x n 42 GS i n 42 GS k pL pH cn fn n cn 49 fn 67 42 GS k pL pH cn fn n cn 49 fn 69 43 GS k pL pH cn fn m d1 dk cn 49 fn 80 4...

Страница 5: ...like LF HRI character Bar code note character Human Readable Interface NV Non volatile memory in which data stored does not loss when powered off NV Non volatile RAM Random Access Memory ASB Auto Send...

Страница 6: ...ASCII LF Hex 0A Decimal 10 Dscription Prints the data in the print buffer and feeds one line based on the current line spacing Notes This command sets the print position to the beginning of the line W...

Страница 7: ...I DLE EOT n Hex 10 04 n Decimal 16 4 n Range 1 n 4 Dscription The status is transmitted whenever the data sequence 10 H 04 H n 1 n 4 is received Example In ESC m nL nH d1 dk d1 10 H d2 04 H d3 01 H Do...

Страница 8: ...ecimal Function 0 0 00 0 Not used Fixed to Off 1 1 02 2 Not used Fixed to On 2 0 00 0 Drawer kick out connector pin 3 is LOW 1 04 4 Drawer kick out connector pin 3 is HIGH 3 0 00 0 Reserved 1 08 8 Res...

Страница 9: ...Roll paper end sensor paper not present 7 0 00 0 Not used Fixed to Off DLE ENQ n Name Real time request to print Format ASCII DLE ENQ n Hex 10 05 n Decimal 16 5 n Range 1 n 2 Dscription In response to...

Страница 10: ...acter spacing to n 0 125mm n 0 0049 inch Notes When characters are enlarged the character spacing is n times normal value This command sets values independently in each mode standard and page modes De...

Страница 11: ...e GS can also select character size However the setting of the last received command is effective Default n 0 ESC nL nH Name Set absolute print position Format ASCII ESC nL nH Hex 1B 24 nL nH Decimal...

Страница 12: ...r of dots in the horizontal direction Notes The allowable character code range is from ASCII code 20 H to 7E H It is possible to define multiple characters for consecutive character codes If only one...

Страница 13: ...1 to print a dot or set a bit to 0 to not print a dot After the bit image is sent successfully the printer will be back to the normal data processing mode If the width printing area set by GSL and GSW...

Страница 14: ...erline mode on off n value as follows n Function 0 48 underline mode is turn off 1 49 underline mode one dot width is turn on 2 50 underline mode two dot width is turn on Notes 1 This command is effec...

Страница 15: ...be set independently in standard mode and in page mode ESC 3 n Name Set character line spacing Format ASCII ESC 3 n Hex 18 33 n Decimal 27 51 n Range 0 n 255 Dscription Sets the line spacing to n 0 12...

Страница 16: ...rinter default is continuous paper the print mode is standard mode after power on The macro definition is not cleared ESC D n1 nk NUL Name Set horizontal tab positions Format ASCII ESC D n1 nk Hex 1B...

Страница 17: ...position to the beginning of the line The paper feed amount set by this command does not affect the values set by ESC 2 or ESC 3 The maximum paper feed amount is 900 mm If the paper feed amount n line...

Страница 18: ...select character font n Function 0 48 Choose character font A 12 24 1 49 Choose character font B 9 17 2 50 Choose character font C 8 16 Notes 1 ESC can set character font too the command received at...

Страница 19: ...line spacing ESC 2 ESC 3 ESC T n Name Select character font Format ASCII ESC T n Hex 1B 54 n Decimal 27 84 n Range 0 n 3 48 n 51 Dscription Set the print direction and starting position in page mode...

Страница 20: ...Vertical starting position y0 yL yH 256 0 125mm Printing area width dx dxL dxH 256 0 125mm Printing area height dy dyL dyH 256 0 125mm Notes This command is processed in standard mode to set an activa...

Страница 21: ...ement to the right nL nH 256 N Use the complement of N for setting N pitch movement to the left nL nH 256 65536 N Print starting position from the current position to N 0 125mm ESC a n Name Select jus...

Страница 22: ...acing set by ESC 2 or ESC 3 The maximum paper feed amount is 900 mm If the paper feed amount n line spacing of more than 900 mm is specified the printer feeds the paper only 900 mm ESC l n X0l X0h Y0l...

Страница 23: ...t n Hex 1B 74 n Decimal 27 116 n Range 0 n 47 Dscription Select character code table n Character Code table n Character Code table 0 PC437 USA Standard Europe 45 WPC1250 1 Katakana 46 WPC1251 Cyrilli...

Страница 24: ...7 fonts ESC v Name Transmit printer status Format ASCII ESC v Hex 1B 76 Decimal 27 118 Dscription This command is only effective with a serial interface printer to transmit printer status to host mach...

Страница 25: ...in page mode the printer performs only internal flag operations This command does not affect printing in page mode In upside down printing mode the printer rotates the line to be printed by 180 and th...

Страница 26: ...in double height and quadruple modes regardless of the line spacing specified by ESC 2 or ESC 3 After printing the bit image this command sets the print position to the beginning of the line and proce...

Страница 27: ...xH yL yH d1 dk is NV bit image 01H and the last data group xL xH yL yH d1 dk is NV bit image n The total agrees with the number of NV bit images specified by the command FS p The definition data for a...

Страница 28: ...ecimal 29 33 n Range 0 n 255 1 vertical number of times 6 1 horizontal number of times 6 Dscription Selects the character height using bits 0 to 3 and selects the character width using bits 4 to 7 as...

Страница 29: ...ertical 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 Dscription Set absolute vertical print position in page mode This command sets the...

Страница 30: ...x y d1 d x y 8 Name Define download bit image Format ASCII GS x y d1 d x y 8 Hex 1D 2A x y d1 d x y 8 Decimal 29 42 x y d1 d x y 8 Range 1 x 255 1 y 48 0 d 255 x y 1023 Dscription It defines a downlo...

Страница 31: ...pends on the differences between print area position and the starting position Starting position is top left or lower right corner this command set the absolute position at the direction parallel to t...

Страница 32: ...defined bit images bar codes HRI characters and spacing skipped by HT ESC and ESC This command does not affect the space between lines White black reverse mode has a higher priority than underline mo...

Страница 33: ...le area is used Default nL 0 nH 0 GS W nL nH Name Set printing area width Format ASCII GS W nL nH Hex 1D 57 nL nH Decimal 29 87 nL nH Range 0 nL 255 0 nH 255 Dscription Set printing area width using n...

Страница 34: ...n Name Select font for HRI characters Format ASCII GS f n Hex 1D 66 n Decimal 29 102 n Range n 0 1 48 49 Dscription Selects a font for the HRI characters when printing a bar code n Font for the HRI ch...

Страница 35: ...to print the bar code regardless of the line spacing specified by line space setting commands GS r n Name Transmit status Format ASCII GS r n Hex 1D 72 n Decimal 29 114 n Range n 1 49 Dscription This...

Страница 36: ...es in horizontal direction xL xH 256 yL yH indicates the number of bit image bytes in vertical direction yL yH 256 Notes In standard mode this command is effective only when there is no data in the pr...

Страница 37: ...de width as follows n Module Width mm for Multi level Bar Code Binary level Bar Code Thin Element Width mm Thick Element Width mm 2 0 250 0 250 0 625 3 0 375 0 375 1 000 4 0 500 0 500 1 250 5 0 625 0...

Страница 38: ...erline all characters including right and left side character spacing but cannot underline the space set by HT and 90 clockwise rotated characters The thickness of the underline is that specified by F...

Страница 39: ...nd byte Kanji character mode is not selected when the power is turned on Reference FS FS C FS n Name Turn underline mode on off for Kanji characters Format ASCII FS n Hex 1C 2D n Decimal 28 45 n Range...

Страница 40: ...g to n1 and n2 respectively The left side character spacing is n1 0 125 mm and the right side character spacing is n2 0 125 mm Notes This command sets the left and right side character spacing for nor...

Страница 41: ...GS can also select and cancel quadruple size mode by selecting double height and double height modes and the setting of the last received command is effective Default n 0 Reference FS GS ESC m x x y...

Страница 42: ...e pay attention about the size of the canvas page mode Circle can t be drew if the size pass over canvas GS x n Name Set serial port 2 baud rate Format ASCII GS x n Hex 1D 78 n Decimal 29 120 n Dscrip...

Страница 43: ...07 pL pH cn fn n Range pL pH 256 3 pL 3 pH 0 cn 49 fn 69 48 n 51 Dscription Selects the error correction level for QR Code n Function Reference Approx figure of recovery 48 Select error correction lev...

Страница 44: ...n fn m Hex 1D 28 6B pL pH cn fn m Decimal 29 40 107 pL pH cn fn m Range pL pH 256 3 pL 3 pH 0 cn 49 fn 81 m 48 Dscription Encodes and prints the QR Code symbol data in the symbol storage area with GS...

Страница 45: ...s Make sure that the printer status is normal before sending data to print 2 Intitialize the printer Make sure that the previous setting does not affect the current printing 3 Set the print content Se...

Страница 46: ...ters 20H to 7FH Code set C 100 numerals from 00 to 99 The following special characters are also available in CODE128 SHIFT characters In code set A the character just after SHIFT is processed as a cha...

Страница 47: ...PPTII A Programming Manual www hprt com 47...

Страница 48: ...PPTII A Programming Manual www hprt com 48...

Страница 49: ...PPTII A Programming Manual www hprt com 49...

Страница 50: ...are complete before the printer receives the ESC W command the left side as you face the printer is taken as the origin x0 y0 of the printable area The printable rectangular area is defined by the le...

Страница 51: ...formula number of vertical dots 8 6 number of dots for feeding at the beginning of the printable area 24 vertical motion unit 203 203 24 Therefore 24 dots are required for feeding Use the following c...

Страница 52: ...PPTII A Programming Manual www hprt com 52...

Отзывы: