0% found this document useful (0 votes)
45 views123 pages

Dotcom Epm

This document provides specifications for commands used to control a dot impact printer. It includes sections that list and describe standard commands for setting font style and character sets, character expansion settings, print modes, line spacing, page control, and positioning the horizontal print position. The document provides details on over 30 specific printer control commands.

Uploaded by

Sergio Figueroa
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views123 pages

Dotcom Epm

This document provides specifications for commands used to control a dot impact printer. It includes sections that list and describe standard commands for setting font style and character sets, character expansion settings, print modes, line spacing, page control, and positioning the horizontal print position. The document provides details on over 30 specific printer control commands.

Uploaded by

Sergio Figueroa
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 123

Dot Impact Printer

STAR Command Specifications


Rev 0.20

CONTENTS
1. 2. 3. GENERAL DESCRIPTION .................................................................................................................................1-1 COMMAND FUNCTION LIST.............................................................................................................................2-1 COMMAND DETAILS .........................................................................................................................................3-1 3-1) 3-2) Explanation of Terms .....................................................................................................................................3-1 Exception Processing ....................................................................................................................................3-2

3-3) Standard Command Details ..........................................................................................................................3-3 3-3-1) Font style and character set ...................................................................................................................3-3 ESC GS t n.......................................................................................................................................................3-3 ESC R n ...........................................................................................................................................................3-4 ESC / n.............................................................................................................................................................3-4 ESC 6...............................................................................................................................................................3-5 ESC 7...............................................................................................................................................................3-5 ESC M..............................................................................................................................................................3-6 ESC P ..............................................................................................................................................................3-6 ESC :................................................................................................................................................................3-7 ESC SP n .........................................................................................................................................................3-7 3-3-2) Character expansion settings .................................................................................................................3-8 SO ....................................................................................................................................................................3-8 DC4 ..................................................................................................................................................................3-8 ESC W n ..........................................................................................................................................................3-9 ESC h n............................................................................................................................................................3-9 3-3-3) Print mode ............................................................................................................................................3-10 ESC E ............................................................................................................................................................3-10 ESC F.............................................................................................................................................................3-10 ESC n..........................................................................................................................................................3-11 ESC _ n..........................................................................................................................................................3-11 ESC 4.............................................................................................................................................................3-12 ESC 5.............................................................................................................................................................3-12 SI....................................................................................................................................................................3-13 DC2 ................................................................................................................................................................3-13 ESC RS i n .....................................................................................................................................................3-14 3-3-4) Line spacing .........................................................................................................................................3-15 LF ...................................................................................................................................................................3-15 CR ..................................................................................................................................................................3-15 ESC a n..........................................................................................................................................................3-16 ESC 0.............................................................................................................................................................3-16 ESC 1.............................................................................................................................................................3-16 ESC z 0 ..........................................................................................................................................................3-17 ESC z 1 ..........................................................................................................................................................3-17 ESC A n .........................................................................................................................................................3-18 ESC 2.............................................................................................................................................................3-18 ESC 3 n..........................................................................................................................................................3-19

ESC y n ..........................................................................................................................................................3-19 ESC J n ..........................................................................................................................................................3-20 ESC I n...........................................................................................................................................................3-20 3-3-5) Page control commands .......................................................................................................................3-21 FF...................................................................................................................................................................3-21 ESC C n .........................................................................................................................................................3-22 ESC C NUL n .................................................................................................................................................3-22 VT ..................................................................................................................................................................3-23 ESC B n1 n2nk NUL ...................................................................................................................................3-23 ESC N n .........................................................................................................................................................3-24 ESC O ............................................................................................................................................................3-24 3-3-6) Horizontal direction printing position .....................................................................................................3-25 ESC l n ...........................................................................................................................................................3-25 ESC Q n .........................................................................................................................................................3-26 HT ..................................................................................................................................................................3-27 ESC D n1 n2nk NUL...................................................................................................................................3-27 ESC GS a n....................................................................................................................................................3-28 ESC GS A n1 n2 ............................................................................................................................................3-29 ESC GS R n1 n2 ............................................................................................................................................3-29 3-3-7) Download..............................................................................................................................................3-30 ESC & NUL n1 n2 [m d1 d2 d3 d4 d5 (d6 d7)]n2-n1+1 ..................................................................................3-30 ESC % n.........................................................................................................................................................3-33 3-3-8) Bit image graphics ................................................................................................................................3-34 ESC K n NUL d1 d2dn................................................................................................................................3-34 ESC L n1 n2 d1 d2dk..................................................................................................................................3-35 3-3-9) 3-3-10) Cutter control ........................................................................................................................................3-36 External device drive ..........................................................................................................................3-37 ESC d n..........................................................................................................................................................3-36 ESC BEL n1 n2 ..............................................................................................................................................3-37 BEL ................................................................................................................................................................3-38 FS ..................................................................................................................................................................3-38 SUB................................................................................................................................................................3-39 EM..................................................................................................................................................................3-39 3-3-11) Status..................................................................................................................................................3-40 ENQ ...............................................................................................................................................................3-40 EOT................................................................................................................................................................3-40 ESC ACK SOH...............................................................................................................................................3-41 ESC RS a n....................................................................................................................................................3-41 ETB ................................................................................................................................................................3-42 ESC RS E n ...................................................................................................................................................3-43 3-3-12) Chinese characters (only on models that carry Chinese characters)..................................................3-44 ESC s n1 n2 ...................................................................................................................................................3-44 ESC r c1 c2 d1dk........................................................................................................................................3-45 ESC u 1..........................................................................................................................................................3-46 ESC u 0..........................................................................................................................................................3-46 ESC x 1 ..........................................................................................................................................................3-47 ESC x 0 ..........................................................................................................................................................3-47 ESC w 1 .........................................................................................................................................................3-48

ESC w 0 .........................................................................................................................................................3-48 3-3-13) Others.................................................................................................................................................3-50 RS ..................................................................................................................................................................3-50 CAN ...............................................................................................................................................................3-50 DC3 ................................................................................................................................................................3-51 DC1 ................................................................................................................................................................3-51 ESC @ ...........................................................................................................................................................3-52 ESC U n .........................................................................................................................................................3-52 ESC GS # m N n1 n2 n3 n4 LF NUL..............................................................................................................3-53 ESC # N m n1 n2 n3 n4 LF NUL ....................................................................................................................3-54 ESC ? LF NUL ...............................................................................................................................................3-55 3-4) Star Black Mark Related Command Details ................................................................................................3-56 ESC d n..........................................................................................................................................................3-58 FF...................................................................................................................................................................3-59 ESC FF n1 n2 ................................................................................................................................................3-60 ESC GS ( F p1 p2 a m n1 n2 .........................................................................................................................3-61 4. CHARACTER CODE TABLES ...........................................................................................................................4-1 4-1) ANK Codes....................................................................................................................................................4-1 4-1-1) Standard (SBCS) ....................................................................................................................................4-1 4-1-2) Kanji Specification (DBCS) .....................................................................................................................4-6 4-1-3) International Character sets....................................................................................................................4-6 4-2) Japanese Character Codes...........................................................................................................................4-7 Shift-JIS Code Type..............................................................................................................................4-14 4-2-1) JIS Code Type (Conforming to JIS x0208-1983) ....................................................................................4-7 4-2-2) 4-3) Chinese Character Codes (Conforming to GB8312-80) ..............................................................................4-20 4-4) Taiwanese Character Codes .......................................................................................................................4-28 5. APPENDIX .........................................................................................................................................................5-1 5-1) Status Specification .......................................................................................................................................5-1 5-1-1) ENQ command status.............................................................................................................................5-1 5-1-2) EOT command status .............................................................................................................................5-1 5-1-3) Auto status..............................................................................................................................................5-2 5-2) Expanding Position........................................................................................................................................5-7 5-2-1) 7 9 Fonts..............................................................................................................................................5-7 5-2-2) 5 9 (2P - 1) Fonts.................................................................................................................................5-7 5-2-3) Chinese Character Fonts........................................................................................................................5-8 6. SPECIAL APPENDIX COMMAND LIST BY MODEL .....................................................................................6-1

1. GENERAL DESCRIPTION
This specifications document describes the command specifications for the STAR MODE on dot impact printers.

Information contained herein applies to models with the following conditions.


Dot impact printers Printer head: Interfaces: Paper width: Paper feed minimum pitch:

72 DPI (vertical direction) Parallel/RS-232C 3 inch/2.25 inch/1.75 inch 1/144 inch (0.176 mm)

<Applicable Models> Board unit: Completed printer product:

BD100, BD500 SP2000, SP500

STAR Command Specifications

1-1

2. COMMAND FUNCTION LIST


Standard commands
Class Font style and character set Commands ESC GS t ESC R ESC / ESC 6 ESC 7 ESC M ESC P ESC : ESC SP SO DC4 ESC W ESC h ESC E ESC F ESC ESC _ ESC 4 ESC 5 SI DC2 ESC RS i LF CR ESC a ESC 0 ESC 1 ESC z 0("0") ESC z 1("1") ESC J ESC A ESC 2 ESC 3 ESC y ESC I FF ESC C ESC C 0 VT ESC B ESC N ESC O Name Specify code page Specify international character set Specify/cancel slash zero Switch to IBM character set #2 Switch to IBM character set #1 Specify 79 font (half dots) Specify 59 font (2P-1) Specify 59 font (3P-1) Specify character space Specify double-wide expanded characters Cancel double wide printing Specify/cancel double-wide printing Specify/cancel double-high printing Select emphasized printing Cancel emphasized printing Select/cancels underline mode Select/cancels upperline mode Specify white/black inversion and red color printing Cancel white/black inversion and specify black color printing Select upside-down printing Cancel upside-down printing Specify/cancel rotating print mode Line feed Line feed (according to memory switch settings) Feed paper n lines Set line feed to 1/8 inch Set line feed to 7/72 inch Set line feed to 1/12 inch Set line feed to 1/6 inch Execute n/72 inch paper feed one time Define n/72 inch pitch line feed Set ESC A line feed pitch Set line feed to n/216 inch line feed pitch (approximate value) Set line feed to n/144 inch line feed pitch Execute n/144 inch paper feed one time Form feed Set page length to n lines Set page length to n inches Feed paper to vertical table position Set vertical tab position Set bottom margin to n lines Cancel bottom margin

Character expansion settings Print modes

Line spacing

Page control commands

STAR Command Specifications

2-1

Class Horizontal

Commands ESC l ESC Q HT ESC D ESC GS a ESC GS A ESC GS R ESC & ESC % ESC K ESC L ESC d ESC BEL BEL FS SUB EM ENQ EOT ESC ACK SOH ESC RS a ETB ESC RS E ESC s ESC r ESC u 1 ESC u 0 ESC x 1 ESC x 0 ESC w 1 ESC w 0 RS CAN DC3 DC1 ESC @ ESC U ESC GS # ESC # ESC ? LF NUL

Name Set left margin Set right margin Move print position to horizontal tab position Set/cancel horizontal tab position Specify position alignment Specify absolute position Specify relative position Register/delete download characters Set/cancel download characters Standard density bit image Double density bit image Paper cut instruction Set pulse width for external device drive External device 1 drive instruction External device 1 drive instruction (real time) External device 2 drive instruction (real time) External device 2 drive instruction (real time) Inquire ENQ status Inquire EOT status Inquire status Set status transmission conditions Update ETB status (check after printing) Clear the ETB counter and ETB status Set two byte Chinese characters left/right spaces Register Chinese download characters Specify 816 dot Chinese characters Specify 1616 dot Chinese characters Specify two byte Chinese characters (cancel expanded Chinese characters) Specify expanded Chinese characters (Double high/Double high & wide) Specify two byte 8 16 dot Chinese characters (default) Specify double high & wide Chinese characters Buzzer Cancel print data and initialize commands Printer deselect Printer select Command initialization Select printing direction Set memory switch Set memory switch Reset printer and test print

Download Bit image graphics Cutter control External device Drive

Status

Chinese Characters (*1)

Others

STAR Command Specifications

2-2

(*1) Chinese character commands Chinese character control commands are ignored on printers not installed with Chinese character fonts (those intended for overseas). All Chinese character control commands are ignored if the specification for the location of use is specified as SBCS (single byte countries) by the memory switch.

Black mark related commands


Class Black mark related Commands ESC d (*2) FF(*2) ESC FF ESC GS ( F Name Paper cut instruction Top of form operation Set top of form amount after detecting black mark Set top of form amount in black mark control

(*2) Black mark related commands These are commands whose operation specifications vary when the black mark function is enabled by the memory switch.

STAR Command Specifications

2-3

3. COMMAND DETAILS
3-1) Explanation of Terms

Reception buffer The buffer for storing data (reception data) received from the host. Reception data is temporarily stored in the reception buffer, then processed sequentially. Line buffer The buffer for storing image data for printing is called the line buffer. Line buffer full The state in which the buffer has no more space available is called line buffer full. When the buffer is full in standard mode, data in the line buffer is printed and a line feed is performed when new print data is processed. This is the same as a LF. When the line buffer is full in the page mode, the printer move the print position to the head of the next line then starts with the new print data. Top of line The top of line is a state that satisfies the following conditions. 1. There is currently no print data in the line buffer. 2. The position is not specified with the horizontal direction position command. Printable region This is the maximum printable area with the printers specifications. Print region This is the printing area specified by a command. (Print region printable region) SBCS This is an abbreviation of Single Byte Character Set. These are characters in languages that can be displayed using the information in one byte. In this specifications manual, it refers to the standard specifications (destination: single byte countries). DBCS This is an abbreviation of Double Byte Character Set. These are characters in languages that are displayed using the information in two byte. In this specifications manual, it refers to the Chinese character specifications such as Japan, China and Taiwan (destination: double byte countries). Inches Units of length; One inch = 25.4 mm MSB/LSB Most significant bit/Least significant bit

STAR Command Specifications

3-1

3-2) Exception Processing 1) Undefined codes Codes from <00>H to <1F>H are targeted. When codes not defined as commands in this region are received, they are discarded. (Ex.) If processing the data string of <30>H<31>H<03>H<32>H<0A>H<33>H, the printer will discard <03>H as an undefined code. 2) Undefined commands When data continuing the codes of ESC, FS are codes not defined as commands, ESC, FS and subsequent codes are discarded. (Ex.) If processing the data string of <30>H<1B>H<22>H<31>H<32>H, the printer will read and discard <1B>H<22>H as an undefined command. 3) Settings outside of the defined area Processing values outside of the defined area in commands accompanying arguments, those commands are ignored and the preset values are unchanged. The processing of commands is terminated at the point values outside of the defined region are processed in arguments having a plurality of commands. Data after that is processed as normal data. (Ex.) If processing the data string of <1B>H<52>H<15>H, the printer will discard the data string of <1B>H<52>H<15>H because although <1B>H<52>H is defined as a commands (ESC R) , the argument <15>H is outside of the definition. Therefore, the international character set that is already set experiences no change.

STAR Command Specifications

3-2

3-3) 3-3-1)

Standard Command Details Font style and character set

ESC GS t n
[Name] [Code] Select code page ASCII ESC GS t Hexadecimal 1B 1D 74 Decimal 27 29 116 n n n

[Defined Region] 0 n 21 32 n 34 64 n 79 [Initial Value] Memory switch setting When installed with Japanese language characters and DBCS setting: Fixed at n=2 When installed with Chinese language characters and DBCS setting: Fixed at n=0 When installed with Taiwanese language characters and DBCS setting: Fixed at n=0 [Function] Specifies code page according to n value. When installed with Japanese and Chinese language characters and DBCS setting, this command is ignored. n 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 Code Page Normal* CodePage437 (USA, Std. Europe) / IBM Character Set #2 Katakana IBM Character Set #1 Codepage 858 (Multilingual) Codepage 852 (Latin-2) Codepage 860 (Portuguese) Codepage 861 (Icelandic) Codepage 863 (Canadian French) Codepage 865 (Nordic) Codepage 866 (Cyrillic Russian) Codepage 855 (Cyrillic Bulgarian) Codepage 857 (Turkish) Codepage 862 (Israel (Hebrew) ) Codepage 864 (Arabic) Codepage 737 (Greek) Codepage 851 (Greek) Codepage 869 (Greek) Codepage 928 (Greek) Codepage 772 (Lithuanian) Codepage 774 (Lithuanian) Codepage 874 (Thai) n 32 33 34 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 Code Page Codepage 1252 (Windows Latin-1) Codepage 1250 (Windows Latin-2) Codepage 1251 (Windows Cyrillic) Codepage 3840 (IBM-Russian) Codepage 3841 (Gost) Codepage 3843 (Polish) Codepage 3844 (CS2) Codepage 3845 (Hungarian) Codepage 3846 (Turkish) Codepage 3847 (Brazil-ABNT) Codepage 3848 (Brazil-ABICOMP) Codepage 1001 (Arabic) Codepage 2001 (Lithuanian-KBL) Codepage 3001 (Estonian-1) Codepage 3002 (Estonian-2) Codepage 3011 (Latvian-1) Codepage 3012 (Latvian-2) Codepage 3021 (Bulgarian) Codepage 3041 (Maltese)

See the printer specification manual for details regarding memory switch settings.

STAR Command Specifications

3-3

ESC R n
[Name] [Code] Specify international character set ASCII ESC R n Hexadecimal 1B 52 n Decimal 27 82 n

[Defined Region] 0 n 14 n = 64 [Initial Value] Memory switch setting [Function] n 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 64 Specifies international characters according to n value. International characters USA France German UK Denmark Sweden Italy Spain Japan Norway Denmark II Spain II Latin America Korea Ireland Legal

See the printer specification manual for details regarding memory switch settings.

ESC / n
[Name] [Code] Specify/cancel slash zero ASCII ESC / Hexadecimal 1B 2F Decimal 27 47 n n n

[Defined Region] n = 0, 1, 48, 49 [Initial Value] Memory switch setting [Function] n 0, 48 1, 49 Specifies/cancels slash zero according to n value.

Cancels slash zero Specifies slash zero See the printer specification manual for details regarding memory switch settings.

STAR Command Specifications

3-4

ESC 6
[Name] [Code] Switch to IBM character set #2 ASCII ESC 6 Hexadecimal 1B 36 Decimal 27 54

[Defined Region] -----[Initial Value] -----[Function] Switches from IBM character set #1 to #2. The subsequent <80>H to <9F>H codes are handled as character data. Other than when the character code table settings are for the IBM character set #1, this command is ignored. This command is only effective in the standard mode.

ESC 7
[Name] [Code] Switch to IBM character set #1 ASCII ESC 7 Hexadecimal 1B 37 Decimal 27 55

[Defined Region] -----[Initial Value] -----[Function] Switches from IBM character set #2 to #1. The subsequent <80>H to <9F>H codes are handled as control codes. Other than when the character code table settings are for the IBM character set #2, this command is ignored. This command is only effective in the standard mode.

STAR Command Specifications

3-5

ESC M
[Name] [Code] Specify 7 9 font (half dots) (default) ASCII ESC M Hexadecimal 1B 4D Decimal 27 77

[Defined Region] -----[Initial Value] -----[Function] Specifies 7 9 (half dots) fonts Sets the number of printable digits in one line to [total half dot count/(10 + character right space amount).

ESC P
[Name] [Code] Specify 5 9 font (2P-1) ASCII ESC P Hexadecimal 1B 50 Decimal 27 80

[Defined Region] -----[Initial Value] -----[Function] Specifies 5 9 (2 pulse = 1) dot fonts. Sets the number of printable digits in one line to [total half dot count/(12 + character right space amount).

STAR Command Specifications

3-6

ESC :
[Name] [Code] Specify 5 9 font (3P-1) ASCII ESC : Hexadecimal 1B 3A Decimal 27 58

[Defined Region] -----[Initial Value] -----[Function] Specifies 5 9 (3 pulse = 1) dot fonts. Sets the number of printable digits in one line to [total half dot count/(18 + character right space amount).

ESC SP n
[Name] [Code] Specify character space ASCII ESC SP Hexadecimal 1B 20 Decimal 27 32 n n n

[Defined Region] 0 n 15 [Initial Value] n=0 [Function] Sets character right space in n half-dots. When in double-wide printing, the right space is also double.

STAR Command Specifications

3-7

3-3-2) Character expansion settings

SO
[Name] [Code] Specify double-wide expanded characters ASCII SO Hexadecimal 0E Decimal 14

[Defined Region] -----[Initial Value] Cancel double-wide expanded characters [Function] Prints ANK characters and Chinese characters with characters expanded twice the normal width. This command is equivalent to ESC W n (n = 1).

DC4
[Name] [Code] Cancel double wide printing ASCII DC4 Hexadecimal 14 Decimal 20

[Defined Region] -----[Initial Value] Cancel double-wide expanded characters [Function] Cancels expanded wide printing if the following commands specify expanded wide printing. Double wide printing specifying command (SO) Set/cancel double wide printing (ESC W) This command is equivalent to ESC W n (n = 0).

STAR Command Specifications

3-8

ESC W n
[Name] [Code] Specify/cancel expanded double-wide printing ASCII ESC W n Hexadecimal 1B 57 n Decimal 27 87 n

[Defined Region] n = 0, 1, 48, 49 [Initial Value] n = 0 (Double wide printing cancelled) [Function] Specifies/cancels double-wide expanded printing for ANK characters and Chinese characters, according to an n value. n 0, 48 1, 49 Function Cancel double-wide printing Specify double-wide expanded printing

ESC h n
[Name] [Code] Specify/cancel expanded double-high printing ASCII ESC h n Hexadecimal 1B 68 n Decimal 27 104 n

[Defined Region] n = 0, 1, 48, 49 [Initial Value] n = 0 (Double-high printing cancelled) [Function] Specifies/cancels double-high expanded printing for ANK characters and Chinese characters, according to an n value. n 0, 48 1, 49 Function Cancel printing expanded character height Specify double-high expanded printing Double-high & wide expanded character printing is possible by combining the double-wide and double-high expanded character commands. The line feed amount including the expanded double-high characters is twice the normal amount. However, in standard specifications, only the line feed amount is doubled for font configurations of 6 12 IBM block graphic characters. When double-high expanded characters and normal printing are mixed in the same line, they are aligned at the bottom. Double-high expanded is effective only for ANK characters, and not effective for Chinese characters.

STAR Command Specifications

3-9

3-3-3) Print mode

ESC E
[Name] [Code] Select emphasized printing ASCII ESC E Hexadecimal 1B 45 Decimal 27 69

[Defined Region] -----[Initial Value] Emphasized printing cancelled [Function] Specifies emphasized printing for subsequent data. When in emphasized printing, data is printed in two passes. This command is effective for both ANK characters and Chinese characters (prints with four passes for 2 pass Chinese characters, and with 8 passes for 4 passes Chinese characters).

ESC F
[Name] [Code] Cancel emphasized printing ASCII ESC F Hexadecimal 1B 46 Decimal 27 70

[Defined Region] -----[Initial Value] Emphasized printing cancelled [Function] Cancels emphasized printing for subsequent data.

STAR Command Specifications

3-10

ESC n
[Name] [Code] Specify/cancel underline mode ASCII ESC n Hexadecimal 1B 2D n Decimal 27 45 n

[Defined Region] n = 0, 1, 48, 49 [Initial Value] n = 0 (Underline cancelled) [Function] n 0, 48 1, 49 Specifies underline according to the n value. Function Cancel underline Specify underline Underlines are applied to the 9th dot of the character. Underlines are not applied to horizontal tabs and to specified horizontal direction positions. When double-wide expanded characters have been specified, the underline is also expanded, but if double-high expanded characters have been selected, the underline does not expand in the vertical direction. It remains a one-dot line. This command is enabled for ANK characters and Chinese characters and is ineffective for block graphic characters.

ESC _ n
[Name] [Code] Specify/cancel upperline ASCII ESC _ Hexadecimal 1B 5F Decimal 27 95 n n n

[Defined Region] n = 0, 1, 48, 49 [Initial Value] n = 0 (Upperline cancelled) [Function] n 0, 48 1, 49 Specifies upperline according to the n value. Function Cancel upperline Specify upperline Upperlines are applied to the 1st dot of the character. Upperlines are not applied to horizontal tabs and to specified horizontal direction positions. When double-wide expanded characters have been specified, the upperline is also expanded, but if double-high expanded characters have been selected, the upperline does not expand in the vertical direction. It remains a one-dot line. This command is enabled for ANK characters and Chinese characters and is ineffective for block graphic characters.

STAR Command Specifications

3-11

ESC 4
[Name] [Code] Specify white/black inversion and red color printing ASCII ESC 4 Hexadecimal 1B 34 Decimal 27 52

[Defined Region] -----[Initial Value] White/black inversion cancelled/black color printing specified [Function] The following shows the details of this command. They vary according to the model. Specifies white/black inverted printing (only on models that do not handle two color printing) Subsequent characters are printed, including the character pitch, with white and black inverted. Printing is uni-directional. (SP2000, BD100) Cautions when using this command: (1) This command is enabled for ANK characters only. White/black is not inverted for Chinese characters and block graphic characters. (2) Do not use when ANK fonts are set to 59 (3P=1) (Print quality is not guaranteed.) (3) When ANK fonts are set to 5 x 9 (2P = 1), and character spacing is set to an odd number, the gap between characters is created, so set the character space to an even value. Specifies red color printing (only on models that handle two color printing) Subsequent characters are printed in red. Red and black characters can be mixed on the same line. This command is enabled for all print data (ANK characters, Chinese characters and bit images). When switched to red or black colored, printing is uni-directional.

ESC 5
[Name] [Code] Cancel white/black inversion/specify black color printing ASCII ESC 5 Hexadecimal 1B 35 Decimal 27 53

[Defined Region] -----[Initial Value] Cancel white/black inverted printing/specify black printing [Function] The following shows the details of this command. They vary according to the model. Cancels white/black inverted printing (only on models that do not handle two color printing) Cancels white/black inverted printing Specifies black color printing (only on models that handle two color printing) Cancels red color printing and prints subsequent data in black.

STAR Command Specifications

3-12

SI
[Name] [Code] Select upside-down printing ASCII SI Hexadecimal 0F Decimal 15

[Defined Region] -----[Initial Value] Upside-down printing cancelled [Function] Specifies upside-down printing This command is enabled only when at the top of the line. Therefore, upside down and right-side up characters cannot both exist in the same line. This command is enabled for following. ANK characters Chinese characters Bit-Image

DC2
[Name] [Code] Cancel upside-down printing ASCII DC2 Hexadecimal 12 Decimal 18

[Defined Region] -----[Initial Value] Upside-down printing cancelled [Function] Cancels upside-down printing This command is enabled only when at the top of the line.

STAR Command Specifications

3-13

ESC RS i n
[Name] [Code] Specify/cancel character rotate mode ASCII ESC RS i n Hexadecimal 1B 1E 69 n Decimal 27 30 105 n

[Defined Region] 0 n 2 48 n 50 ("0" n "2") [Initial Value] Character rotation cancelled (n = 0) [Function] Specifies direction to rotate print (clockwise) or to cancel rotation for subsequent data, according to the n value. n 0, 48 1, 49 2, 50 Set rotation Cancelled (0 rotation) 270 rotation 90 rotation Rotated characters cannot be applied with underlines or upperlines. The relationship between double-high and double-wide is reverse to when cancelled when rotating. When in Chinese character mode, rotation is effective for both ANK characters and Chinese characters. Chinese character spacing is always applied with the two-byte Chinese character spacing value. In standard specifications, rotating IBM block graphic characters is changed to vertical 8 dot fonts. Cautions when character fonts Characters are printed using 5 x 9 fonts (2P = 1) Registered characters are printed using 5 x 9 font for download characters as well. Characters return to 7 x 9 fonts when Chinese character rotation is cancelled (when there is no specification for 5 x 9 fonts when specifying rotation).

STAR Command Specifications

3-14

3-3-4) Line spacing

LF
[Name] [Code] Line feed ASCII Hexadecimal Decimal LF 0A 10

[Defined Region] -----[Initial Value] Set line feed to 1/6 inch [Function] After printing data in the line buffer, paper is fed according to the currently set line feed amount.

CR
[Name] [Code] Carriage return (line feed) ASCII CR Hexadecimal 0D Decimal 13

[Defined Region] -----[Initial Value] Set line feed to 1/6 inch [Function] Specifies the function according to the memory switch value. Memory SW Condition 1 Condition 2 Condition 3 Function Ignored Same as the LF code Executes only printing, with no paper feed.

Refer to the explanations on memory switches in each of the printer's product specification manuals for details regarding memory switch settings.

STAR Command Specifications

3-15

ESC a n
[Name] [Code] Feed paper n lines ASCII ESC Hexadecimal 1B Decimal 27 a 61 97 n n n

[Defined Region] 1 n 127 [Initial Value] -----[Function] After printing data in the line buffer, paper is fed according to the currently set line feed amount n. Line feed amount is unaffected even if double-high characters and double-high/wide characters exist in the same line.

ESC 0
[Name] [Code] Set line feed to 1/8 inch ASCII ESC 0 Hexadecimal 1B 30 Decimal 27 48

[Defined Region] -----[Initial Value] 1/6 inch [Function] Sets subsequent line feeds to 1/8 inch.

ESC 1
[Name] [Code] Set line feed to 7/72 inch ASCII ESC 1 Hexadecimal 1B 31 Decimal 27 49

[Defined Region] -----[Initial Value] 1/6 inch [Function] Sets subsequent line feeds to 7/72 inch.

STAR Command Specifications

3-16

ESC z 0
[Name] [Code] Set line feed to 1/12 inch ASCII ESC z Hexadecimal 1B 7A Decimal 27 122 0 00 0 or ESC z 1B 7A 27 122 0 30 48

[Defined Region] -----[Initial Value] 1/6 inch [Function] Sets subsequent line feeds to 1/12 inch.

ESC z 1
[Name] [Code] Set line feed to 1/6 inch ASCII ESC z Hexadecimal 1B 7A Decimal 27 122 1 01 1 or ESC z 1B 7A 27 122 1 31 49

[Defined Region] -----[Initial Value] 1/6 inch [Function] Sets subsequent line feeds to 1/6 inch.

STAR Command Specifications

3-17

ESC A n
[Name] [Code] Define n/72 inch pitch line feed ASCII ESC A n Hexadecimal 1B 41 n Decimal 27 65 n

[Defined Region] 0 n 85 [Initial Value] n = 12 (1/6 inch line feed) [Function] Defines line feed amount for one line as n/72 inch. To enable this code, ESC 2 (line feed pitch setting) is required.

ESC 2
[Name] [Code] Set ESC A line feed pitch ASCII ESC 2 Hexadecimal 1B 32 Decimal 27 50

[Defined Region] -----[Initial Value] -----[Function] Sets one line feed amount to the value defined by ESC A (n/72 inch pitch line feed definition). Line feed pitch is set to 1/6 inch if executing this command when ESC A (n/72 inch pitch line feed definition) is not set.

STAR Command Specifications

3-18

ESC 3 n
[Name] [Code] Set line feed to n/216 inch line feed pitch ASCII ESC 3 n Hexadecimal 1B 33 n Decimal 27 51 n

[Defined Region] 0 n 255 [Initial Value] n = 36 (1/6 inch) [Function] Sets subsequent line feed amounts to a value approximate to n/216 inch. Because the minimum pitch for the paper feed mechanism is 1/144 of an inch, the setting value will be approximated according to the following equation. INT (n 2/3 + 0.5)/144 of an inch

ESC y n
[Name] [Code] Set line feed to n/144 inch line feed pitch ASCII ESC y n Hexadecimal 1B 79 n Decimal 27 121 n

[Defined Region] 0 n 255 [Initial Value] n = 24 (1/6 inch) [Function] Sets subsequent line feed amounts to a n/144 inch.

STAR Command Specifications

3-19

ESC J n
[Name] [Code] Execute n/72 inch paper feed one time ASCII ESC J n Hexadecimal 1B 4A n Decimal 27 74 n

[Defined Region] 1 n 255 [Initial Value] -----[Function] After printing data in the line buffer, paper is fed n/72 of an inch in the paper feed direction. Line feed amount is unaffected even if double-high characters and double-high/wide characters exist in the same line. The single line feed setting value is not changed by this command.

ESC I n
[Name] [Code] Execute n/144 inch paper feed one time ASCII ESC I n Hexadecimal 1B 49 n Decimal 27 73 n

[Defined Region] 1 n 255 [Initial Value] -----[Function] After printing data in the line buffer, paper is fed n/144 of an inch in the paper feed direction. Line feed amount is unaffected even if double-high characters and double-high/wide characters exist in the same line. The single line feed setting value is not changed by this command.

STAR Command Specifications

3-20

3-3-5) Page control commands

FF
[Name] [Code] Form feed ASCII Hexadecimal Decimal FF 0C 12

[Defined Region] -----[Initial Value] -----[Function] This command performs the following operations after the printer prints the printing data in the line buffer. Operations are set by the memory switch. Memory SW Condition 1 Cutter model Tear-bar model Executes a form feed. Executes a form feed. Feeds paper to the cutting position and Paper is fed to the tear-bar position. (*2) Condition 2 performs a full cut. (*1) Condition 3 Executes a form feed. Executes a form feed. Feeds paper to the cutting position and Paper is fed to the tear-bar position. (*2) Condition 4 performs a partial cut. (*1) (*1) Paper feed to cutting position: Executes a 1 inch paper feed. (*2) Paper feed to tear-bar position: Executes a 7/6 inch paper feed. Refer to the explanations on memory switches in each of the printer's product specification manuals for details regarding memory switch settings.

STAR Command Specifications

3-21

ESC C n
[Name] [Code] Set page length to n lines ASCII ESC C Hexadecimal 1B 43 Decimal 27 67 n n n

[Defined Region] 1 n 255 [Initial Value] 1/6 inch 42 [Function] This command sets the length of one page to [currently set line feed amount x n] lines The current position is the top position of the page. The page length set using this command is unaffected by changing the form feed amount later. Moving to the top of the page is performed using the FF (form feed) command. The page length setting becomes effective and the bottom margin setting value is cleared when the page length is set to a value below the current bottom margin setting.

ESC C NUL n
[Name] [Code] Set page length to n inches ASCII ESC C NUL Hexadecimal 1B 43 00 Decimal 27 67 0 n n n

[Defined Region] 1 n 127 [Initial Value] n=7 [Function] This command sets the length of one page to n inches. The current position is the top position of the page. The page length set using this command is unaffected even if the line feed amount is subsequently changed. Moving to the top of the page is performed using the FF (form feed) command. The page length setting becomes effective and the bottom margin setting value is cleared when the page length is set to a value below the current bottom margin setting.

STAR Command Specifications

3-22

VT
[Name] [Code] Feed paper to vertical table position ASCII VT Hexadecimal 0B Decimal 11

[Defined Region] -----[Initial Value] -----[Function] This command performs paper feeds up to the next vertical tab position after the printer prints the data in the line buffer. This command is ignored if there are no tabs set. If a vertical tab is set, and the current position is the same as the vertical tab position, or if it is below that position, it feeds paper to the top of the next page.

ESC B n1 n2nk NUL


[Name] [Code] Set vertical tab ASCII ESC Hexadecimal 1B Decimal 27 B 42 66 n1 n1 n1 n2 n2 n2 nk NUL nk 00 nk 0

[Defined Region] 1 n 255 1 k 16 [Initial Value] (Not set) [Function] Sets the vertical tab to the (current form feed amount n) position. All other vertical tabs set before setting the vertical tab using this command are cancelled A maximum of 16 vertical tabs can be set. However, the tab position must satisfy the condition of 1 n1 n2... nk. When receiving the illegal codes that do not satisfy the condition, tabs up to the illegal code are set, but those after the illegal code are discarded up to the NUL code so illegal code tab are not set. The vertical tab set using this command is unaffected by changing the form feed amount later. All vertical tabs are cleared by inputting ESC B NUL. When set, this is unaffected by double-high and double-high/wide character settings.

STAR Command Specifications

3-23

ESC N n
[Name] [Code] Set bottom margin to n lines ASCII ESC N n Hexadecimal 1B 4E n Decimal 27 78 n

[Defined Region] 0 n 255 [Initial Value] n=0 [Function] This command sets the bottom margin position to (current line feed amount n).

Portion of automatic paper feed. Page length

Bottom margin of n line

The current position when setting is effective from the next page when within the bottom margin. The bottom margin set using this command is unaffected by changing the form feed amount. The set bottom margin is cleared using the ESC N NUL or the ESC O command. The bottom margin must be a value smaller than that for the length of one page. If it is higher than the length of one page, the setting is ignored.

ESC O
[Name] [Code] Cancel bottom margin ASCII ESC O Hexadecimal 1B 4F Decimal 27 79

[Defined Region] -----[Initial Value] (Not set) [Function] This command clears the bottom margin set using the ESC N (set bottom margin to n lines).

STAR Command Specifications

3-24

3-3-6)

Horizontal direction printing position

ESC l n
[Name] [Code] Set left margin ASCII ESC l Hexadecimal 1B 6C Decimal 27 108 n n n

[Defined Region] 0 n (Right margin -2) 255 [Initial Value] n=0 [Function] This command sets the left margin (current ANK character pitch n) using the left edge as a reference after printing data in the line buffer. Upside-down printing uses the same left edge as a reference. Setting this command partway will print the data in the line buffer at that point and perform a line feed. It will take affect from the next line. Character spacing is included in the character pitch but is unaffected by expansion settings. The left margin set using this command is unaffected by changing the character pitch after being set. The left margin must be at least a minimum of 18 dots with the right margin (*1). If the printable region as set by the left and right margins is smaller than one character, including the space between characters, printing is not possible. A question mark (?) is printed instead of the character. (*1) More than 4 characters of 7 x 9 fonts, and more than 3 characters in 5 x 9 (2P = 1) fonts (when character space = 0).

Printable region Left margin Right margin Print region

STAR Command Specifications

3-25

ESC Q n
[Name] [Code] Set right margin ASCII ESC Hexadecimal 1B Decimal 27 Q 51 81 n n n

[Defined Region] 2 n Maximum printable digits 255 [Initial Value] Maximum printable digits [Function] This command sets the printable region (current ANK character pitch n) using the left edge as a reference after printing data in the line buffer. Upside-down printing uses the same left edge as a reference. Setting this command partway will print the data in the line buffer at that point and perform a line feed. It will take affect from the next line. Character spacing is included in the character pitch but is unaffected by expansion settings. The right margin set using this command is unaffected by changing the character pitch. The printable region within the defined range must be at least a minimum of 18 dots for the right margin (*1). If the printable region as set by the left and right margins is smaller than one character, including the space between characters, printing is not possible. A question mark (?) is printed instead of the character. (*1) More than 4 characters of 7 x 9 fonts, and more than 3 characters in 5 x 9 (2P = 1) fonts (when character space = 0).

Printable region Left margin Right margin Print region

STAR Command Specifications

3-26

HT
[Name] [Code] Move horizontal tab ASCII HT Hexadecimal 09 Decimal 9

[Defined Region] -----[Initial Value] -----[Function] Move print position to next horizontal tab position. The current moves to the next tab position when at the horizontal tab position. This command is ignored with under the following conditions. When there is no horizontal tab set: When the current position is the same as the furthest right horizontal tab position or to the right of it. In the underline/upperline modes, underlines and upperlines are not printed in the spaces created by a horizontal tab.

ESC D n1 n2nk NUL


[Name] [Code] Set horizontal tab ASCII ESC Hexadecimal 1B Decimal 27 D 44 68 n1 n1 n1 n2 n2 n2 nk nk nk NUL 00 0

[Defined Region] 1 n Maximum printable digits 255 0 k 16 [Initial Value] (Not set) [Function] Uses the left edge as a standard to set the horizontal tab to the position of (current ANK character pitch n). The horizontal tab reference point is the left edge of the paper, regardless of the left margin. When upside-down printing is specified, the right side becomes the reference. ANK character pitches, including right spaces, are unaffected by expansion settings. All other horizontal tabs set before setting the horizontal tab using this command are cancelled A maximum of 16 horizontal tabs can be set, but the tab position must satisfy the following conditions. If the following conditions are not met, data up to the NUL code is discarded. Normal tabs that meet the conditions below are set and tabs after errors occur are not set. 1 n1 n2 nk nk Printable region The horizontal tab set using this command is unaffected by changing the character pitch. All horizontal tabs are cleared by inputting ESC D NUL.

STAR Command Specifications

3-27

ESC GS a n
[Name] [Code] Specify position alignment ASCII ESC GS a Hexadecimal 1B 1D 61 Decimal 27 29 97 n n n

[Defined Region] 0 n 2 48 n 50 ("0" n "2") [Initial Value] n=0 [Function] n 0, 48 1, 49 2, 50 This specifies position alignment for all data in one line, in the set print region. Position alignment Left alignment Center alignment Right alignment

ABC ABCD ABCDE

<ESC><GS> "a" 0

<ESC><GS> "a" 1

ABC ABCD ABCDE ABC ABCD ABCDE

<ESC><GS> "a" 2

STAR Command Specifications

3-28

ESC GS A n1 n2
[Name] [Code] Specify absolute position ASCII ESC GS Hexadecimal 1B 1D Decimal 27 29 A 41 65 n1 n1 n1 n2 n2 n2

[Defined Region] 0 n1 255 0 n2 255 [Initial Value] -----[Function] Moves the print position to the dot position based on the left margin (n1 + n2 x 256). When printing up-side down, the right margin is the reference. When the print area has been exceeded, this command is ignored. If print data is duplicated, the older print data is overwritten by new data (that older data being deleted in the process). However, bit image data is processed using OR for the old print data.

ESC GS R n1 n2
[Name] [Code] Specify relative position ASCII ESC GS Hexadecimal 1B 1D Decimal 27 29 R 52 82 n1 n1 n1 n2 n2 n2

[Defined Region] 0 n1 255 0 n2 255 [Initial Value] -----[Function] Moves the print position to the dot position based on the left margin (n1 + n2 x 256). When the print area has been exceeded, this command is ignored. When (n1 + n2 x (256) 32768: This moves {65536 (n1 + n2 x 256)} in the left direction. When (n1 + n2 x (256) < 32768: This moves (n1 + n2 x 256) in the right direction. If print data is duplicated, the older print data is overwritten by new data (that older data being deleted in the process). However, bit image data is processed using OR for the old print data.

STAR Command Specifications

3-29

3-3-7) Download

ESC & NUL n1 n2 [m d1 d2 d3 d4 d5 (d6 d7)] n2-n1+1


[Name] [Code] Register/cancel download characters ASCII ESC & NUL n1 n2 Hexadecimal 1B 26 00 n1 n2 Decimal 27 38 0 n1 n2 [m d1 d2 d3 d4 d5 (d6 d7)]n2-n1+1 [m d1 d2 d3 d4 d5 (d6 d7)]n2-n1+1 [m d1 d2 d3 d4 d5 (d6 d7)]n2-n1+1

[Defined Region] 33 n1 n2 127 (21h n1 n2 7Fh) m = 0, 128 (00h, 80h) 0 d1~d7 255 [Initial Value] -----[Function] Registers download characters to the specified character code. A maximum of 10 download characters of 7 x 9 font and 5 x 9 font can be registered. The range for writing download characters is specified by n1, n2. When the registered character is 1 character, n1 = n2. If one has been already registered to an address, it is overwritten. This command registers download characters independent to each font. m indicates the relationship of the character pattern and the print head (see figure below). Definition data (d1 to d7) set the bits that correspond to the dots to print to 1, and the bits that correspond to the dots that are not printed to 0. Even if ESC @ (command initialization) is executed, a registered download character is not cleared. <Relationship of the character pattern data and print head> 1. When m = 0(00h):
Upper D8 1 2 3 4 5 6 7 8 9 D7 D6 D5 D4 D3 D2 Lower D1

Pin No. (Unused)

2. When m = 128 (80h):


Upper D8 1 2 3 4 5 6 7 8 9 D7 D6 D5 D4 D3 D2 Lower D1

Pin No.

(Unused)

[Note]

When registering 7 9 fonts, dots adjacent in the horizontal direction do not print. 7 x 9 font registered fonts cannot be printed when rotated characters are specified. 5 x 9 font characters are always printed. 3-30

STAR Command Specifications

[Ex.]

When selecting 7 9 fonts, and defining the character to 20H:

7 dots d1 8 dots d2 d3 d4 d5 d6 d7 MSB

LSB

Code (Hex)

ESC 1B

& 26

NUL 00

n1 21

n2 21

m d1 80 3E

d2 40

d3 88

d4 00

d5 88

d6 d7 40 3E

(1 when printing corresponding bits, and 0 for no print)

STAR Command Specifications

3-31

[Ex.]

When selecting 5 9 fonts, and defining the character to 20H:

5 dots MSB

8 dots

d1

d2

d3

d4

d5

LSB

Code (Hex)

ESC 1B

& 26

NUL 00

n1 21

n2 21

m 00

d1 38

d2 45

d3 45

d4 d5 45 7E

(1 when printing corresponding bits, and 0 for no print)

STAR Command Specifications

3-32

ESC % n
[Name] [Code] Set/cancel download characters ASCII ESC % n Hexadecimal 1B 25 n Decimal 27 37 n

[Defined Region] n = 0, 1, 48, 49 [Initial Value] Download character cancelled [Function] n 0, 48 1, 49 Specifies/cancels download character according to n value.

Cancel download characters Specify download characters <Print example of download characters> 1. Download character register (ESC & NUL n1 n2 m0 m1 m2...) 2. Specify download characters (ESC % n (n = 1)) 3. Print download characters

STAR Command Specifications

3-33

3-3-8) Bit image graphics

ESC K n NUL d1 d2dn


[Name] [Code] Standard density bit image ASCII ESC K Hexadecimal 1B 4B Decimal 27 75 n NUL n 00 n 0 d1 d1 d1 d2 d2 d2 dn dn dn

[Defined Region] 1 n Total dot count 0 d 255 [Initial Value] -----[Function] This command prints bit images with only the data count determined by n. The amount of data that can be printed in one line is limited to the total dot count. Data that exceeds the total dot count or the right margin is ignored. See each printer's product specifications manual for details regarding the total dot count. The printing of this command is a uni-directional print (SP2000, BD100). After printing this bit image, it automatically returns to the character mode. The following drawing shows the relationship of the print head needle wires and the data.

Upper b8 1 2 3 4 5 6 7 8 9

b7

b6

b5

b4

b3

b2

Lower b1

Pin No.

(Unused)

STAR Command Specifications

3-34

ESC L n1 n2 d1 d2dk
[Name] [Code] Double density bit image ASCII ESC L Hexadecimal 1B 4C Decimal 27 76 n1 n1 n1 n2 n2 n2 d1 d1 d1 d2 d2 d2 dk dk dk

[Defined Region] 1 (n1 + n2 x 256) Total half dot count k = n1 + n2 x 256 0 d 255 [Initial Value] -----[Function] This command executes double-density (half-dot prints) bit images with only the data count determined by n1 and n2. The amount of data that can be printed in one line is limited to the total half-dot count. Data that exceeds the total half-dot count or the right margin is ignored. See each printer's product specifications manual for details regarding the total half-dot count. The relationship of the print head needle wires and the data is the same as ESC K (Standard density bit image). When printing double-density bit images, dots adjacent in the horizontal direction do not print. The printing of this command is a uni-directional print (SP2000, BD100). After printing the bit image, it automatically returns to the character mode.

STAR Command Specifications

3-35

3-3-9) Cutter control

ESC d n
[Name] [Code] Paper cut instruction ASCII ESC d Hexadecimal 1B 64 Decimal 27 100 n n n

[Defined Region] 0 n 3 48 n 51 ("0" n "3") [Initial Value] -----[Function] This command executes the auto-cut according to the n specification, after printing data in the line buffer. After auto-cutter is executed, the printer considers that position to be the top of the page. n 0, 48 Auto cutter Full cut at the current position. This command is ignored on tear-bar models. 1, 49 Partial cut at the current position. This command is ignored on tear-bar models. 2, 50 Paper is fed to cutting position, then a full cut is executed. (*1) On tear-bar models, paper is fed to the tear-bar position. (*2) 3, 51 Paper is fed to cutting position, then a partial cut is executed. (*1) On tear-bar models, paper is fed to the tear-bar position. (*2) (*1) Paper feed to cutting position: Executes a 1 inch paper feed. (*2) Paper feed to tear-bar position: Executes a 7/6 inch paper feed. The auto-cutter function operates in the following ways on models that only have a full cut or a partial cut. Models that perform only a full cut: Executes a full cut when for instructions calling for a partial cut. Models that perform only a partial cut: Executes a partial cut when there are for instructions calling for a full cut.

STAR Command Specifications

3-36

3-3-10) External device drive

ESC BEL n1 n2
[Name] [Code] Set external drive device 1 pulse width ASCII ESC BEL n1 n2 Hexadecimal 1B 07 n1 n2 Decimal 27 7 n1 n2

[Defined Region] 1 n1 127 1 n2 127 [Initial Value] n1 = 20 (Energizing time: 200 msec) n2 = 20 (Delay time: 200 msec) [Function] Sets the energizing and delay times for drive of the external device (such as cash drawers). Energizing time = 10 n1 (ms) Delay time = 10 n2 (ms)

ON Drive pulse OFF 10n1 (msec) (Energize time) 10n2 (msec) (Delay Time)

Print operation

Print, paper feed prohibited

After printing, this is executed by BEL (External device 1 drive instruction) or FS (External device 1 drive instruction (real time)). This command is ignored when n1 and n2 are out of range. n1 = 0 or n2 = 0: This command is ignored. When n1 > 128: n = 128. When n2 > 128, n = 128.

STAR Command Specifications

3-37

BEL
[Name] [Code] External device 1 drive instruction ASCII BEL Hexadecimal 07 Decimal 7

[Defined Region] -----[Initial Value] -----[Function] Executes the external device drive conditions set according to the ESC BEL (external device drive pulse width setting command). As with other commands, this command temporarily stores data in the data buffer, then executes in the order received. External device 1 and external device 2 cannot be executed simultaneously.

[Note]

FS
[Name] [Code] External device 1 drive instruction (real time) ASCII FS Hexadecimal 1C Decimal 28

[Defined Region] -----[Initial Value] -----[Function] Executes the external device drive conditions set according to the ESC BEL (external device drive pulse width setting command). The printer executes this command immediately upon reception. External device 1 and external device 2 cannot be executed simultaneously.

[Note]

STAR Command Specifications

3-38

SUB
[Name] [Code] External device 2 drive instruction (real time) ASCII SUB Hexadecimal 1A Decimal 26

[Defined Region] -----[Initial Value] -----[Function] Drives external device 2. The energizing time and delay time are fixed at 200 ms each. The printer executes this command immediately upon reception. This command is the same as the EM command. External device 1 and external device 2 cannot be executed simultaneously.

[Note]

EM
[Name] [Code] External device 2 drive instruction (real time) ASCII EM Hexadecimal 19 Decimal 25

[Defined Region] -----[Initial Value] -----[Function] Drives external device 2. The energizing time and delay time are fixed at 200 ms each. The printer executes this command immediately upon reception. This command is the same as the SUB command. External device 1 and external device 2 cannot be executed simultaneously.

[Note]

STAR Command Specifications

3-39

3-3-11) Status

ENQ
[Name] [Code] Inquire ENQ status ASCII ENQ Hexadecimal 05 Decimal 5

[Defined Region] -----[Initial Value] -----[Function] This command is effective only when using an interface capable of bi-directional data communications. When this command is received, the printer sends the ENQ status in real time to the host (not taking it from the reception buffer, but executing it immediately upon reception from the host). Bi-directional parallel interfaces enter a "data present" state. See the Appendix, ENQ Command Status for details regarding status. When this command is sent once to the printer, do not send the next ENQ command until the ENQ status has been received. This command is not used when automatic status is valid.

EOT
[Name] [Code] Inquire EOT status ASCII EOT Hexadecimal 04 Decimal 4

[Defined Region] -----[Initial Value] -----[Function] This command is effective only when using an interface capable of bi-directional data communications. When this command is received, the printer sends the EOT status in real time to the host (not taking it from the reception buffer, but executing it immediately upon reception from the host). Bi-directional parallel interfaces enter a "data present" state. See the Appendix, EOT Command Status for details regarding status. When this command is sent once to the printer, do not send the next EOT command until the EOT status has been received. This command is not used when automatic status is valid.

STAR Command Specifications

3-40

ESC ACK SOH


[Name] [Code] Inquire status ASCII Hexadecimal Decimal ESC ACK SOH 1B 06 01 27 6 1

[Defined Region] -----[Initial Value] -----[Function] This command is effective only when using an interface capable of bi-directional data communications. When this command is received, the printer sends the status in real time to the host (not taking it from the reception buffer, but executing it immediately upon reception from the host). Bi-directional parallel interfaces enter a "data present" state. See the Appendix, Auto Status for details regarding status. When in the serial interface DTR mode, and using a parallel interface, set so that the status can be inquired even when offline for errors, etc. This command is not used when auto status is valid. When this command is sent once to the printer, do not send the next ESC ACK SOH command until the final auto status has been received.

ESC RS a n
[Name] [Code] Sets auto status transmission conditions ASCII ESC RS a n Hexadecimal 1B 1E 61 n Decimal 27 30 97 n

[Defined Region] 0 n 3 48 n 51 ("0" n "3") [Initial Value] DIP switch or memory switch setting [Function] This command is effective only when using an interface capable of bi-directional data communications. Specification 1: This command sets the auto status transmission conditions in the table below. The auto status transmission is sent once with this command. Specification 2: The function of this command is set by the memory switch. Memory Switch Condition 1: Sets the auto status transmission in the table below. Memory Switch Condition 2: Sends the auto status transmission once. Auto status transmission conditions N 0, 48 1, 49 Status transmission conditions Auto status invalid Auto status valid See Appendix 2 for details regarding the auto status. Settings of this command are unaffected by the ESC @ (command initialization) command. See the printer manual for details on memory switches.

STAR Command Specifications

3-41

ETB
[Name] [Code] Update ETB status (check after printing) ASCII ETB Hexadecimal 17 Decimal 23

[Defined Region] -----[Initial Value] Specification 1 -----Specification 2 ETB counter = 0 [Function] This command is effective only when using an interface capable of bi-directional data communications. Specification 1 This command waits until all printing is completed (the print motor is stopped), and after printing is completed, the auto status printer status 1-1 (ETB command) is set to "1" (ETB execution completed). When print data remains in the line buffer when executing this command, this command is executed after that residual data is printed. The host checks that this bit has become 1 to recognize that the printing of the transmitted data has been completed. The ETB status bit is cleared to 0 when returned to host. The following shows the details of the processing with this command. (1) Read out from the ETB command and reception buffer (2) Wait for the printing of data to be completed before the ETB command (3) After checking the end of printing, the auto status ETB status is set (4) Auto status transmission (only when auto status is valid) See Appendix for details regarding the auto status. Specification 2 This command waits until all printing is completed (the print motor is stopped). After printing, auto status 1 1 (ETB command) is set to 1 (ETB execution completed) and the ETB counter is updated. When print data remains in the line buffer when executing this command, this command is executed after that residual data is printed. The host checks that this bit has become 1 to recognize that the printing of the transmitted data has been completed. The ETB status bit is cleared to 0 when returned to host. Also, ETB is applied to the end of one data block and batch transmits a multiple of blocks. By getting the next ETB counter, the end of the printing of the multiple of blocks is recognized to be completed. Note that zero clearing of the ETB counter is done by the ESC RS E command. The following shows the details of the processing with this command. (1) Read out from the ETB command and reception buffer (2) Wait for the printing of data to be completed before the ETB command (3) After checking the end of printing, the auto status ETB status is set and the ETB counter is positively incremented. (4) Auto status transmission (only when auto status is valid) See Appendix for details regarding the auto status.

STAR Command Specifications

3-42

ESC RS E n
[Name] [Code] Clear the ETB counter and ETB status ASCII ESC RS E n Hexadecimal 1B 1E 45 n Decimal 27 30 69 n

[Defined Region] n = 0 n = 48 (0) [Initial Value] -----[Function] Clears the ASB ETB counter to zero and clears the auto status 1 1 ETB status.

STAR Command Specifications

3-43

3-3-12) Chinese characters (only on models that carry Chinese characters)

ESC s n1 n2
[Name] [Code] Set two byte Chinese characters left/right spaces ASCII ESC s n1 n2 Hexadecimal 1B 73 n1 n2 Decimal 27 115 n1 n2

[Defined Region] 0 n1 255 0 n2 255 (However, n1 + n2 + Character width Printable region) [Initial Value] For China and Taiwan SP2000, BD100, BD500: n1 = 0, n2 = 4 SP500: Memory Switch Settings Memory Switch Condition 1 Condition 2 [Function] n1 0 0 n2 4 2

n1, n2 specified spaces are Chinese character spaces. n1 is the left side of the character; n2 is the right of the side character. The values of n1 and n2 when using two-byte 8 16, two-byte 16 16 and double-high 8 16 characters correspond to 1/2 dots and the n1 and n2 values for double-high & wide 16 16 characters correspond to 1 dot. When the Chinese character size (n1 + character width + n2), including spaces on the left and right sides, exceeds the print region, printing is not possible. A (?) is printed instead of the character. This command is ignored for models not equipped with Chinese fonts (for overseas) and when the specification for the location of use is specified as SBCS (single byte countries) by the memory switch. Refer to your printer manual for details regarding the memory switches.

STAR Command Specifications

3-44

ESC r c1 c2 d1dk
[Name] [Code] Register Chinese download characters ASCII ESC r c1 c2 d1 Hexadecimal 1B 72 c1 c2 d1 Decimal 27 114 c1 c2 d1 dk dk dk

[Defined Region] 0 d 255 k=32 c1 and c2 differ according to specifications and code type (see table below). [Initial Value] All spaces [Function] Registers Chinese download characters to c1 and c2 addresses, but the following shows the possible code range. If one has been already registered to an address, it is overwritten. Chinese download characters once defined are valid until redefined or the power is turned OFF. Specification Japanese characters Chinese characters c1 c1=77h c1=F8h c2 20h c2 29h 21h c2 2Ah Registration count 10 characters 10 characters

Defined Chinese download characters are accessed with two-bytes, in the same way as other Chinese characters. At that time, c1 is the first byte, c2 is the second byte. d1, d2 ... d32 are character data. They are calculated as shown below and data is sent sequentially.

Horizontal 16 dots
d1 d3 d5 d7 d9 d11 d13 d15 d17 d19 d21 d23 d25 d27 d29 d31

MSB

Vertical 16 dots

LSB
d2 d4 d6 d8 d10 d12 d14 d16 d18 d20 d22 d24 d26 d28 d30 d32

MSB

LSB

The font of Chinese download characters is composed of 16 16 dot patterns. Bits that correspond to the dots to print are 1, and the bits that correspond to the dots that are not printed are 0.

STAR Command Specifications

3-45

ESC u 1
[Name] [Code] Specify 8 16 dot Chinese characters ASCII ESC u 1 Or ESC u "1" Hexadecimal 1B 75 01 1B 75 31 Decimal 27 117 1 27 117 1 49

[Defined Region] -----[Initial Value] Specify two-byte 8 16 dot Chinese characters [Function] Sets 8 16 dot Chinese characters. When two-bytes is selected, they become two-pass characters (state (B) to state (A)). This command sets to the double-high expanded character mode by combining with ESC 0 (Specify expanded Chinese characters) (state (B) to state (C)). See "Relationship of Chinese Character Size Selection".

ESC u 0
[Name] [Code] Specify 16 16 dot Chinese characters ASCII ESC u 0 or ESC u "0" Hexadecimal 1B 75 00 1B 75 30 Decimal 27 117 0 27 117 1 48

[Defined Region] -----[Initial Value] Specify two-byte 8 16 dot Chinese characters [Function] Sets 16 16 dot Chinese characters. When two-bytes is selected, they become four-pass characters (state (A) to state (B)). This command sets to the 4 expanded character mode by combining with ESC 0 (Specify expanded Chinese characters) (state (A) to state (D)). See "Relationship of Chinese Character Size Selection".

STAR Command Specifications

3-46

ESC x 1
[Name] [Code] Specify two byte Chinese characters (cancel expanded Chinese characters) ASCII ESC x 1 or ESC x "1" Hexadecimal 1B 78 01 1B 78 31 Decimal 27 120 1 27 120 49

[Defined Region] -----[Initial Value] Specify two-byte 8 16 dot Chinese characters [Function] Cancels specify Chinese character expansion, and sets to two-byte Chinese characters When 8 16 dot Chinese characters are selected, they become two-pass characters (state (C) to state (A)). When 16 16 dot Chinese characters are selected, they become four-pass characters (state (D) to state (B)). See "Relationship of Chinese Character Size Selection".

ESC x 0
[Name] [Code] Specify expanded Chinese characters (Double-high/double-high & wide) ASCII ESC x 0 or ESC x "0" Hexadecimal 1B 78 00 1B 78 30 Decimal 27 120 0 27 120 48

[Defined Region] -----[Initial Value] Specify two-byte 8 16 dot Chinese characters [Function] Sets Chinese character expansion. When 8 16 dot Chinese characters are selected, they become vertically expanded characters (double-high size: state (A) to state (C)). When 16 16 dot Chinese characters are selected, they become horizontally and vertically expanded characters (double-high & wide size: state (B) to state (D)). See "Relationship of Chinese Character Size Selection".

STAR Command Specifications

3-47

ESC w 1
[Name] [Code] Specify two byte 8 16 dot Chinese characters (default) ASCII ESC w 1 or ESC w "1" Hexadecimal 1B 77 01 1B 77 31 Decimal 27 119 1 27 119 49

[Defined Region] -----[Initial Value] Specify two-byte 8 16 dot Chinese characters [Function] Cancels specify Chinese character expansion, and sets to two-byte 8 16 dot Chinese characters Chinese characters become two-pass characters (to state (A)). When the power is turned on, this is set. See "Relationship of Chinese Character Size Selection".

ESC w 0
[Name] [Code] Specify double-high & wide Chinese characters ASCII ESC w 0 or ESC w Hexadecimal 1B 77 00 1B 77 Decimal 27 119 0 27 119 "0" 30 48

[Defined Region] -----[Initial Value] Specify two-byte 8 16 dot Chinese characters [Function] Sets double-wide/double-high 16 16 Chinese characters (to state (D)). See "Relationship of Chinese Character Size Selection".

STAR Command Specifications

3-48

<Relationship of Chinese Character Size Selection>

State (A) Two-byte 8 16 dot Chinese characters (Two-pass print)

ESC x 0 ESC x 1

State (C) Double-high 8 16 dot Chinese characters (Double-high size, two-pass

ESC w 0 ESC u 0 ESC u 1 ESC w 1 ESC u 0 ESC u 1

State (B) Two-byte 16 16 dot Chinese characters (Four-pass high density print)

ESC x 0

ESC x 1

State (D) Double-high & wide 16 16 dot Chinese characters (Double-wide double high size, two-pass print)

STAR Command Specifications

3-49

3-3-13) Others

RS
[Name] [Code] Buzzer ASCII Hexadecimal Decimal RS 1E 30

[Defined Region] -----[Initial Value] -----[Function] Issues a short buzzer sound from the printer.

CAN
[Name] [Code] Cancel print data and initialize commands ASCII CAN Hexadecimal 18 Decimal 24

[Defined Region] -----[Initial Value] -----[Function] When the reception buffer and line buffer are cleared, the set commands are initialized. Immediately executed not when taking out from the reception buffer, but when received from the host. DIPSW and memory switches are not reread. The following shows the specifications that are not initialized by this command. DC1 and DC3 select/deselect status ESC BEL external device drive conditions Auto status valid/invalid conditions

STAR Command Specifications

3-50

DC3
[Name] [Code] Printer deselect ASCII DC3 Hexadecimal 13 Decimal 19

[Defined Region] -----[Initial Value] Select printer [Function] Deselects printer. All received data is discarded until the next DC1 (printer select) is received.

DC1
[Name] [Code] Select printer ASCII DC1 Hexadecimal 11 Decimal 17

[Defined Region] -----[Initial Value] Select printer [Function] Cancels the deselect state of the DC3 (printer deselect) and selects the printer.

STAR Command Specifications

3-51

ESC @
[Name] [Code] Command initialization ASCII ESC @ Hexadecimal 1B 40 Decimal 27 64

[Defined Region] -----[Initial Value] -----[Function] Initializes each command after printing data in the line buffer. DIPSW and memory switches are not reread. The following shows the specifications that are not initialized by this command. DC1 and DC3 select/deselect status ESC BEL external device drive conditions Auto status valid/invalid conditions

ESC U n
[Name] [Code] Select printing direction ASCII ESC U Hexadecimal 1B 55 Decimal 27 85 n n n

[Defined Region] 0 n 2 48 n 50 ("0" n "2") [Initial Value] Standard models (memory switch SBCS setting): n=0 Chinese character models (memory switch DBCS setting): n = 2 or n = 0 (*1 Model dependent) [Function] N 0, 48 1, 49 2, 50 Executes print direction specified by this command after printing data in the line buffer. Print direction Specify bi-directional printing Specify uni-directional printing Specify ANK bi-directional, Chinese character single direction (only on models that carry Chinese characters) Bi-directional printing is faster than uni-directional printing. With uni-directional printing, printing is performed only when the print head moves from left to right. When n = 2, the printer prints ANK continuous printing bi-directionally. Continuous printing including Chinese characters is done in multiple passes on the first line only when the head moves from the left to the right. On the next line, it prints in a multiple of passes only when the head moves from the right to the left. However, if there are ruled lines in one line of print, or if the paper feed amount after printing exceeds 1/6 of an inch, printing is uni-directional from the left to the right. Regarding n = 1, depending on the model, settings can be made valid or invalid using the memory switch. See each printer's product specifications manual for details regarding memory switch settings. (*1) Model dependent n = 2: Models employing a DC motor for the carriage motor. n = 0: Models employing a stepping motor (logical seeking) for the carriage motor.

STAR Command Specifications

3-52

ESC GS # m N n1 n2 n3 n4 LF NUL
[Name] [Code] Set memory switch ASCII ESC GS Hexadecimal 1B 1D Decimal 27 29 # 23 35 m m m N N N n1 n1 n1 n2 n2 n2 n3 n3 n3 n4 n4 n4 LF NUL 0A 00 10 0

[Defined Region] m = 87, 84, 44, 43, 45, 64 ( m = "W", "T", ",", "+", "-", "@" ) 48 N 57 ("0" N "9"), 65 N 70 ("A" N "F") 48 n1 57 ("0" n1 "9"), 65 n1 70 ("A" n1 "F") 48 n2 57 ("0" n2 "9"), 65 n2 70 ("A" n2 "F") 48 n3 57 ("0" n3 "9"), 65 n3 70 ("A" n3 "F") 48 n4 57 ("0" n4 "9"), 65 n4 70 ("A" n4 "F") [Initial Value] -----[Function] After defining the memory switches using the definition commands determined in the Class item of the table below, the memory switches are set by sending this write command. The printer executes a reset automatically after writing the setting values defined by the write command to the non-volatile memory. Do not turn the printer power off while writing to the non-volatile memory. If it is turned off, the memory switch settings will be corrupted and the settings may return to initial values where the offset value settings are a digit off from all the memory switch settings. Consider the life of the non-volatile memory and avoid over-use of this command. m N Functions Class Definition data (Data specification) Definition "," N Definition data (Set specified bit) Definition "+" N Data definition (Clear specified bit) Definition "-" N Data definition (Initialize all data) Definition "@" Fixed at "0" Data definition write and reset Write "W" Fixed at "0" Data definition write and reset and self print Write "T" Fixed at "0" m: Mode selection N: Memory switch number to specify n1 n2 n3 n4: Specify data m = "," Specify data m = "+" Bit number to set m = "-" Bit number to clear [Note] n1 n2 n3 n4 n1 n2 n3 n4 n1 n2 n3 n4 n1 n2 n3 n4 Fixed at "0000" Fixed at "0000" Fixed at "0000"

The status of this command varies according to the model, so check the special appendix.

STAR Command Specifications

3-53

ESC # N m n1 n2 n3 n4 LF NUL
[Name] [Code] Set memory switch ASCII ESC Hexadecimal 1B Decimal 27 # 23 35 N N N m m m n1 n1 n1 n2 n2 n2 n3 n3 n3 n4 n4 n4 LF NUL 0A 00 10 0

[Defined Region] m = 44, 43, 45 (m = ",", "+", "-") 48 N 57 ("0" N "9"), 65 N 70 ("A" N "F") 48 n1 57 ("0" n1 "9"), 65 n1 70 ("A" n1 "F") 48 n2 57 ("0" n2 "9"), 65 n2 70 ("A" n2 "F") 48 n3 57 ("0" n3 "9"), 65 n3 70 ("A" n3 "F") 48 n4 57 ("0" n4 "9"), 65 n4 70 ("A" n4 "F") [Initial Value] -----[Function] Sends command to write after defining memory switch using the definition command specified by the following classes. This command is set only and not changed for the current operating environment. Changed settings are valid after the power is turned on again, or when the printer is reset. Consider the life of the non-volatile memory and avoid over-use of this command. Functions Class m N "," N Data definition (data specification) Definition "+" N Data definition (specify bit and set) Definition "-" N Data definition (specify bit and clear) Definition m: Mode selection N: Memory switch number to specify n1 n2 n3 n4: Specify data m = "," Specify data m = "+" Bit number to set m = "-" Bit number to clear [Note] n1 n2 n3 n4 n1 n2 n3 n4 n1 n2 n3 n4 n1 n2 n3 n4

The status of this command varies according to the model, so check the special appendix.

STAR Command Specifications

3-54

ESC ? LF NUL
[Name] [Code] Reset printer and execute self print ASCII ESC ? LF NUL Hexadecimal 1B 3F 0A 00 Decimal 27 63 10 0

[Defined Region] -----[Initial Value] -----[Function] Hardware resets the printer and executes on self print. After sending this command, the next data should not be sent until the printer is online (in a state wherein it can receive data).

STAR Command Specifications

3-55

3-4) Star Black Mark Related Command Details The Star black mark related commands are to control the top of form (black mark) functions. This commands are effective only when black mark function is valid.

<Black mark specifications>


1. Top of form (black mark detection) operation

(1) Selectable when power is turned on (reset signal is input), when self-print test is completed and by the memory switch. When power is turned on (reset signal is input) Memory switch setting When self-print test is completed Condition 1 Maintain Condition 2 Top of form (black mark detection) to printing start position (2) When the Feed switch is pressed Execute top of form (black mark) to printing start position (3) Commands See the following command details. (4) Other detail settings See each printers product specification manual for details. 2. Black mark error (1) Black mark error - Entered When white detection occurs continuously more than a predetermined length (* model dependent) when feeding paper Black mark error - Entered When black detection occurs continuously more than a predetermined length (* model dependent) when feeding paper On BM/PE dual use models Paper out error On BM stand-alone models Black mark error * Model dependent: Refer to your printer for details on the predetermined length for the error detection and BM sensor specifications (dual use/dedicated models) (2) Operations during black mark error Offline Only the following commands are valid. Other commands are stored in the reception buffer. ENQ: Inquire ENQ status EOT: Inquire EOT status ESC ACK SOH: Inquire auto status Auto status is valid (3) Canceling a black mark error Refer to your printer manual for details.

STAR Command Specifications

3-56

3.

Ignore command When the black mark is effective, the following page control commands are ineffective. Class Command ESC C ESC C 0 VT ESC B ESC N ESC 0 Function Ignores three bytes (sets n line page length) Ignores four bytes (sets n inch page length) Ignores one byte (paper feed to vertical tab position) Ignores until NUL (sets vertical tab position) Ignores three bytes (sets n line bottom margin) Ignores two bytes (cancels bottom margin)

Page control command

STAR Command Specifications

3-57

ESC d n
[Name] [Code] Paper cut instruction ASCII ESC d Hexadecimal 1B 64 Decimal 27 100 n n n

[Defined Region] 0 n 3 48 n 51 ("0" n "3") [Initial Value] -----[Function] This command executes the auto-cut according to the n specification, after printing data in the line buffer. After auto-cutter is executed, the printer considers that position to be the top of the page. n 0, 48 Auto cutter Full cut at the current position. This command is ignored on tear-bar models. 1, 49 Partial cut at the current position. This command is ignored on tear-bar models. 2, 50 Paper is fed to cutting position, then a full cut. On tear-bar models, paper is fed to the top of form position. 3, 51 Paper is fed to cutting position, then a partial cut. On tear-bar models, paper is fed to the top of form position. The auto-cutter function operates in the following ways on models that only have a full cut or a partial cut. Models that perform only a full cut: Executes a full cut when for instructions calling for a partial cut. Models that perform only a partial cut: Executes a partial cut when there are for instructions calling for a full cut. The cutting position is the position (after detection of the black mark) set by the ESC GS ( F (Set top of form amount in black mark control). If not set by these commands, paper is fed to the initial position set by the memory switch. The cutting position (black mark) varies according to the paper used and to customer specifications. Refer to the printer product specifications you use for details regarding the distance to the cutting position (the physical value from the black mark to the print head to the cutter position).

STAR Command Specifications

3-58

FF
[Name] [Code] Top of form operation ASCII FF Hexadecimal 0C Decimal 12

[Defined Region] -----[Initial Value] -----[Function] This command performs the following operations after the printer prints the printing data in the line buffer. Operations are set by the memory switch. Memory SW Cutter model Tear-bar model Condition 0 Paper feed to printing start position Paper feed to printing start position Condition 1 Paper feed to the cutting position and Paper feed to cutting position performs a full cut. (*) Condition 2 Paper feed to printing start position Paper feed to printing start position Condition 3 Paper feed to the cutting position and Paper feed to cutting position performs a partial cut. (*) (*) The auto-cutter function operates in the following ways on models that only have a full cut or a partial cut. Models that perform only a full cut: Executes a full cut when for instructions calling for a partial cut. Models that perform only a partial cut: Executes a partial cut when there are for instructions calling for a full cut. The printing start position is the position (after detection of the black mark) set by the ESC FF (Set top of form amount after detecting black mark) and ESC GS ( F (Set top of form amount in black mark control) commands. The cutting position is the position (after detection of the black mark) set by the ESC GS ( F (Set top of form amount in black mark control). If not set by these commands, paper is fed to the initial position set by the memory switch. The printing start position (black mark) varies according to the paper used and to customer specifications. Refer to the printer product specifications you use for details regarding the distance to the printing start position (the physical value from the black mark to the print head to the cutter position).

STAR Command Specifications

3-59

ESC FF n1 n2
[Name] [Code] Set top of form amount after detecting black mark ASCII ESC FF n1 n2 Hexadecimal 1B 0C n1 n2 Decimal 27 12 n1 n2

[Defined Region] 0 n1 256 + n2 2047 (However, up to length between marks.) [Initial Value] Memory switch setting [Function] This command sets the amount for top of form after black mark detection (n1 256 + n2) to steps. (1 step = 1/144 of an inch) The setting value of this command is affected by the printer initialization command (ESC @). If the parameter is outside of the defined range, this command is received and discarded. The settings of top of form by this command are valid in executing the top of form operation using the FF (top of form operation) and pressing the Feed switch. To make the setting value valid, set this command before the execution command. The paper position varies according to the printer type. Refer to your printer manual for details on the memory switches.

STAR Command Specifications

3-60

ESC GS ( F p1 p2 a m n1 n2
[Name] [Code] Set top of form amount in black mark control ASCII ESC GS ( F p1 p2 Hexadecimal 1B 1D 28 46 p1 p2 Decimal 27 29 40 70 p1 p2 a a a m m m n1 n1 n1 n2 n2 n2

[Defined Region] p1 = 4, p2 = 0 a = 1, 2 m = 0, 48 0 n1 + n2 256 1700 (However, up to length between marks.) [Initial Value] According to memory switch settings [Function] Set top of form position (printing start position and cutting position) when using black mark control. (p1 + p2 256) specifies the subsequent reception byte count. a selects the target to set. a = 1: Amount of movement of the printing start position (FF, Feed switch) corresponding to the black mark position. a = 2: Amount of movement of the cutting position (ESC d) corresponding to the black mark position. m specifies the direction of position movement. m = specifies the direction of paper feed with 0, 48. n1, n2 specify the actual amount of movement ((n1 + n2 256) 1/144 of an inch). The setting value of this command is affected by the printer initialization command (ESC @). If the parameter is outside of the defined range, this command is received and discarded. The settings of the movement of the printing start position (a = 1) are valid in executing the top of form operation using the FF (top of form operation) and pressing the Feed switch. To make the setting value valid, set this command before the execution command. The settings of the movement of the cutting position (a = 2) are valid when executing ESC d (paper cut). To make the setting value valid, set this command before the execution command. The initial value of the set movement amounts abide the memory switch settings. The paper position varies according to the printer type. Refer to your printer manual for details on the memory switches.

STAR Command Specifications

3-61

Rev 0.20

1.
4-1)

CHARACTER CODE TABLES


ANK Codes

4-1-1) Standard (SBCS)

Rev 0.20

Rev 0.20

Rev 0.20

Rev 0.20

Rev 0.20

Rev 0.20

Rev 0.20

Rev 0.20

4-1-2)

Kanji Specification (DBCS)

4-1-3)

International Character sets The character codes shown in the table are hexadecimal.

Rev 0.20

4-2) 4-2-1)

Japanese Character Codes JIS Code Type (Conforming to JIS x0208-1983)

Rev 0.20

Rev 0.20

Rev 0.20

Rev 0.20

Rev 0.20

Rev 0.20

Rev 0.20

4-2-2)

SHIFT-JIS Code Type

Rev 0.20

Rev 0.20

Rev 0.20

Rev 0.20

Rev 0.20

Rev 0.20

4-3)

Chinese Character Codes (Conforming to GB8312-80)

Rev 0.20

Rev 0.20

Rev 0.20

Rev 0.20

Rev 0.20

Rev 0.20

Rev 0.20

Rev 0.20

4-4)

Taiwanese Character Codes

Rev 0.20

Rev 0.20

Rev 0.20

Rev 0.20

Rev 0.20

Rev 0.20

Rev 0.20

Rev 0.20

Rev 0.20

Rev 0.20

Rev 0.20

5. APPENDIX
5-1) Status Specification This function is valid only when using an interface capable of bi-directional data communications. Refer to your printer's product specification manual to verify if the interface cable on the printer you use is capable of bi-directional data communications. 5-1-1) ENQ command status This status is the one the printer transmits using the ENQ command. Status "0" OPEN No error Has Data "1" CLOSE Overflow Empty No paper Error Error Error
BD100 SP2000

Bit

Contents

By model
BD500 SP500

7 Conversion SW 6 Buffer overflow 5 Reception Buffer Empty 4 Fixed at "0" 3 Paper end Paper 2 Mechanical error No error No error 1 Framing error No error 0 Parity error Framing error/Parity error These errors occur when using a serial I/F. (Parallel I/F: Bit 0 = Bit 1 = 0) These errors hold the information at the time of the error. Using this command, when the status is inquired, this ic cleared after the error status is sent. Conversion SW When the conversion switch is ON, Bit 7 = 1.

5-1-2) EOT command status This status is the one the printer transmits using the EOT command. Status "0" "1"
BD100 SP2000

Bit

Contents

By model
BD500 SP500

7 6 5 4 Fixed at "1" 3 Paper end 2 Paper near-end Black mark detection 1 error 0 Fixed at "0" Paper end Same as the ENQ status Bit 3 Bit 5 to 7 states are unknown

Paper Paper No error

No paper No paper Error

STAR Command Specifications

5-1

5-1-3) Auto status Auto status is a group of states that are automatically returned from the printer to the host when the printer's status has changed. Automatic status is composed of "Header 1," "Header 2" and "plurality of bytes of the printer status" and is continuously returned to the host. The host always uses an identifying method to identify the data for every byte received. (It is possible that Xon/Xoff codes are exceptionally mixed in the auto status in the Xon/Xoff mode (when using a serial I/F), so it is necessary to consider that on the receiving side.) The valid/invalid conditions of the auto status abide by the DIPSW or the memory switch settings for the initial values. It is possible to change the conditions using the ESC RS a n command after turning ON the power. Also, it is possible to get the auto status using the ESC ACK SOH command, regardless of the valid/invalid conditions.

(1) Header 1 Header 1 is the 1 byte length information transmitted at the head of the automatic status. The table below shows the composition of the Header 1. Header 1 represents the entire status transmission byte count, including Header 1, using bit 1 to bit 3 and bit 5. The host gets the transmission byte information and always receives the status data for that amount transmission bytes. For reference, the table below shows the relationship of actual transmission bytes and the Header 1. Because the bit 0 that indicates that this is the Header 1 is normally 1 (the second byte and beyond is 0), to detect the Header 1, it is acceptable to verify that bit 0 is 1 and bit 4 = 0 for this data. Note that bit 6 is for future expansion and is ignored in host-side processes. < Header 1 (First byte) > Bit 7 6 5 4 3 2 1 0 Contents Fixed at "0" Reserved (Fixed at "0") Printer status Byte count Fixed at "0" Printer status Byte count Printer status Byte count Printer status Byte count Fixed at "1" Status "0" "1"
BD100 SP2000

By model
BD500 SP500

Actual transmission byte count and Header 1 table Transmission byte count n (7 n 15) 7 8 9 10 11 12 13 14 15

Header 1 00001111B (0F Hex) 00100001B (21 Hex) 00100011B (23 Hex) 00100101B (25 Hex) 00100111B (27 Hex) 00101001B (29 Hex) 00101011B (2B Hex) 00101101B (2D Hex) 00101111B (2F Hex)

STAR Command Specifications

5-2

(2) Header 2 Header 2 is the 1 byte length information transmitted from the second byte of the automatic status. The table below shows the composition of the Header 2. Header 2 represents the auto status version (called automatic status version below) using bit 1 to bit 3 and bit 5. For reference, the table below shows the relationship of actual version bytes and the Header 2. The auto status version will be used as new information is added to the printer status bit positions that were empty, by adding new functions in the future. When the host does not control the auto status version, it is acceptable to ignore Header 2 received. < Header 2 (Second byte) > Bit 7 6 5 4 3 2 1 0 Contents Fixed at "0" Version No. Version No. Fixed at "0" Version No. Version No. Version No. Fixed at "0" Status "0" "1"
BD100 SP2000

By model
BD500 SP500

Actual automatic status version and Header 2 table Version No. n Header 2 1 00000010B (02 Hex) 2 00000100B (04 Hex) 3 00000110B (06 Hex) 4 00001000B (08 Hex) 5 00001010B (0A Hex) 6 00001100B (0C Hex) 7 00001110B (0E Hex) 8 00100000B (20 Hex) 9 00100010B (22 Hex) 30 01101100B (6C Hex) 31 01101110B (6E Hex)

Contents Status 1 5 (seventh byte) Status 1 7 (ninth byte)

STAR Command Specifications

5-3

(3) Printer status Printer status is the status of the printer sent from the 3rd byte of the automatic status. For the printer status, (the number of bytes added in Header 1 minus two) is returned. Printer status is always updated for new information. (No log exists.) The following shows the composition of the status. < Printer status 1 Bit 7 6 5 4 3 2 1 0 (*) Printer status (Third byte) > Status Contents "0"

By model "1"
BD100 SP2000 BD500 SP500

Fixed at "0" OFFLINE by switch input No Yes Cover status Close Open Fixed at "0" ONLINE/OFFLINE status ON-LINE OFF-LINE Conversion SW OPEN CLOSE <ETB> command Not executed Executed Fixed at "0" Bit 1 cleared to 0 when returned to the host (by clearing bit 1 to 0, auto status is not targeted to occur).

< Printer status 2 Bit 7 6 5 4 3 2 1 0

Error information (Fourth byte) > Status Contents "0" Not stopped No error No error No error

By model "1" Stopped Error Error Error


BD100 SP2000 BD500 SP500

Fixed at "0" Stopped by high head temperature Non-recoverable error Fixed at "0" Auto-cutter error Mechanical error Not used (Fixed at "0") Fixed at "0"

Error information (Fifth byte) > Status Bit Contents "0" 7 Fixed at "0" 6 Buffer overflow No error 5 Not used (Fixed at "0") 4 Fixed at "0" 3 Black mark detection error No error 2 Not used (Fixed at "0") 1 Not used (Fixed at "0") 0 Fixed at "0" (*) Bit 6 is cleared to 0 when returned to the host.

< Printer status 3

By model "1" Error Error


BD100 SP2000 BD500 SP500

STAR Command Specifications

5-4

< Printer status 4 Sensor information (Sixth byte) > Status Bit Contents "0" 7 6 5 4 3 2 1 0 Fixed at "0" Not used (Fixed at "0") Black mark detection status Fixed at "0" Paper end Paper near-end Not used (Fixed at "0") Fixed at "0"

By model "1"
BD100 SP2000 BD500 SP500

White detection Paper Paper

Black detection No paper No paper

< Printer status 5 Sensor information (Seventh byte) > Status Bit Contents "0" "1" 7 6 5 4 3 2 1 0 Fixed at "0" Not used (Fixed at "0") Not used (Fixed at "0") Fixed at "0" Not used (Fixed at "0") Not used (Fixed at "0") Not used (Fixed at "0") Fixed at "0"

By model
BD100 SP2000 BD500 SP500

< Printer status 6 Sensor information (Eight byte) > Status Bit Contents "0" 7 Fixed at "0" 6 ETB counter (Bit 4) 5 ETB counter (Bit 3) 4 Fixed at "0" 3 ETB counter (Bit 2) 2 ETB counter (Bit 1) 1 ETB counter (Bit 0) 0 Fixed at "0"

By model "1"
BD100 SP2000 BD500 SP500

< Printer status 7 Sensor information (Ninth byte) > Status Bit Contents "0" 7 Fixed at "0" 6 Not used (Fixed at "0") 5 Not used (Fixed at "0") 4 Fixed at "0" 3 Not used (Fixed at "0") 2 Not used (Fixed at "0") 1 Not used (Fixed at "0") 0 Fixed at "0"

By model "1"
BD100 SP2000 BD500 SP500

STAR Command Specifications

5-5

(4) Precautions Do not use ENQ, EOT, ESC, ACK and SOH when auto status is valid. Invalidate the automatic status in advance using the DIPSW (memory switch) or the ESC RS a n command to query these commands.

(5) Status identification method Command/Functions bit7 0 0 * * 0 0 bit6 0 0 * * * * bit5 0 0 * * * *

XON XOFF ENQ EOT Auto status (Header 1) Auto status (Other than Header 1) 0 = Fixed at 0 bit / 1 = Fixed at 1 bit / * = Variable bits

Status bit4 bit3 1 0 1 0 0 * 1 * 0 * 0 *

bit2 0 0 * * * *

bit1 0 1 * * * *

bit0 1 1 * 0 1 0

STAR Command Specifications

5-6

5-2)

Expanding Position

5-2-1) 7 9 Fonts Head Pin No. #1 #2 #3 #4 #5 #6 #7 #8 #9 #1 #2 #3 #4 #5 #6 #7 #8 #9 Normal 7 9 Double-high 7 9 Bit Image

Normal Dot Head Pin No. #1 #2 #3 #4 #5 #6 #7 #8 #9 Half Dot

5-2-2) 5 9 (2P - 1) Fonts Head Pin No. #1 #2 #3 #4 #5 #6 #7 #8 #9 #1 #2 #3 #4 #5 #6 #7 #8 #9 Double-high 5 9 Bit Image

Normal Dot Head Pin No. #1 #2 #1 #4 #5 #6 #7 #8 #9 Normal 5 9

STAR Command Specifications

5-7

5-2-3) Chinese Character Fonts Normal Dot Half Dot Head Pin No. #1 #2 #3 #4 #5 #6 #7 #8 #9 ANK 7 9 1 Pass Head Pin No. #1 #2 #3 #4 #5 #6 #7 #8 #9 #1 1/144 inch Two Byte Chinese Characters 8 16 1 Pass 2 Passes Normal Dot Half Dot Head Pin No. #1 #2 #3 #4 #5 #6 #7 #8 #9 ANK 7 9 1 Pass Head Pin No. #1 #2 #3 #4 #5 #6 #7 #8 #9 #1 1/144 inch Two Byte Chinese Characters 16 16 1 Pass 2 Passes 3 Passes 4 Passes 1/72 inch #2 #3 #4 #5 #6 #7 #8 #9 #2 #3 #4 #5 #6 #7 #8 #9 1/72 inch

STAR Command Specifications

5-8

6. SPECIAL APPENDIX
Standard commands
Class Font style and character set Commands ESC GS t ESC R ESC / ESC 6 ESC 7 ESC M ESC P ESC : ESC SP SO DC4 ESC W ESC h ESC E ESC F ESC ESC _ ESC 4 ESC 5 SI DC2 ESC RS i LF CR ESC a ESC 0 ESC 1 ESC z 0 ESC z 1 ESC A ESC 2 ESC 3 ESC y ESC J ESC I FF ESC C ESC C 0 VT ESC B ESC N ESC O

COMMAND LIST BY MODEL


Model name SP500 (*2) (*2)

BD100

SP2000

BD500

Character expansion settings Print modes

Line spacing

Page control commands

STAR Command Specifications

6-1

Class Horizontal

Commands ESC l ESC Q HT ESC D ESC GS a ESC GS A ESC GS R ESC & ESC % ESC K ESC L ESC d ESC BEL BEL FS SUB EM ENQ EOT ESC ACK SOH ESC RS a ETB ESC s ESC r ESC u 1 ESC u 0 ESC x 1 ESC x 0 ESC w 1 ESC w 0 RS CAN DC3 DC1 ESC @ ESC U ESC GS # ESC # ESC ?

BD100 Ignored Ignored (Spec.1) (Spec.1)

SP2000 (Spec.1) (Spec.1)

Model name BD500 SP500 Ignored Ignored (Spec.1) (Spec.1) Ignored (Spec.2) (Spec.2) Ignored

Download Bit image graphics Cutter control External device drive

Status

Chinese characters (*1)

Others

STAR Command Specifications

6-2

(*1) Chinese character commands Chinese character control commands are ignored on printers not installed with Chinese character fonts (those intended for overseas). All Chinese character control commands are ignored if the specification for the location of use is specified as SBCS (single byte countries) by the memory switch. (*2) Red/black switching function selectable using the memory switches. Refer to your printer manual for details.

Black mark related commands


Class Black mark related commands Commands ESC d (*3) FF (*3) ESC FF ESC GS ( F BD100 SP2000 BD500 Model name SP500

(*3) These are commands whose operating specifications are different when the black mark function is effective.

STAR Command Specifications

6-3

ELECTRONIC PRODUCTS DIVISION STAR MICRONICS CO., LTD. 536 Nanatsushinya, Shimizu, Shizuoka, 424-0066 Japan Tel : 0543-47-0112 Fax: 0543-48-5013

OVERSEAS SUBSIDIARY COMPANIES STAR MICRONICS AMERICA, INC. 1150 King Georges Post Road, Edison, NJ 08837-3729 U.S.A. Tel : 732-623-5555 Fax: 732-623-5590 http://www.starmicronics.com

STAR MICRONICS U.K. LTD. Star House, Peregrine Business Park, Gomm Road, High Wycombe, Bucks, HP13 7DL, U.K. Tel : 01494-471111 Fax: 01494-473333 http://www.starmicronics.co.uk

Please access the following URL http://www.star-micronics.co.jp/service/frame_sp_spr_e.htm for the lastest revision of the manual.

Distributed by
REV. 0.20 2003.02.14 Printed in Japan, 80874545

You might also like