Star SP2000 Series Programmer's Manual

Star SP2000 Series Programmer's Manual

Dot matrix printer
Hide thumbs Also See for SP2000 Series:
Table of Contents

Advertisement

Quick Links

Dot Matrix Printer
SP2000 Series
Programmer's Manual

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SP2000 Series and is the answer not in the manual?

Questions and answers

Summary of Contents for Star SP2000 Series

  • Page 1 Dot Matrix Printer SP2000 Series Programmer’s Manual...
  • Page 2: Table Of Contents

    TABLE OF CONTENTS 1. Control Codes (Star Mode) ................. 1 1-1. Control Codes List ................1 1-1-1. Character Selection ..............1 1-1-2. Print Position Control ............... 3 1-1-3. Dot Graphics Control ............... 4 1-1-4. Download Graphics Printing ............ 4 1-1-5. Peripheral Device Control ............4 1-1-6.
  • Page 3: Control Codes (Star Mode)

    1. Control Codes (Star Mode) 1-1. Control Codes List The following tables show the Star Mode commands that are supported by this printer. 1-1-1. Character Selection Control Hexadecimal Function Page Codes Codes <ESC> "R" n 1B 52 n Selects the international character set <ESC>...
  • Page 4: Control Hexadecimal

    Control Hexadecimal Function Page Codes Codes <ESC> "W" "1" 1B 57 31 Selects double magnification in character <ESC> "W" <1> 1B 57 01 width <ESC> "W" "0" 1B 57 30 Resets magnification in character width <ESC> "W" <0> 1B 57 00 <ESC>...
  • Page 5: Print Position Control

    1-1-2. Print Position Control Control Hexadecimal Function Page Codes Codes <LF> Line feed <VT> Vertical tab <FF> Form feed <CR> Carriage Return <ESC> "a" n 1B 61 n Feeds paper n lines <HT> Horizontal tab <ESC> "A" n 1B 41 n Defines n /72-inch line spacing <ESC>...
  • Page 6: Dot Graphics Control

    1-1-3. Dot Graphics Control Control Hexadecimal Function Page Codes Codes <ESC> "K" n <0> 1B 4B n 00 m1 m2 8 dot normal density graphics m1 m2 ... <ESC> "L" n 1 n 2 1B 4C n 1 n 2 m1 m2 8 dot high density graphics m1 m2 ...
  • Page 7: Auto Cutter Control (Sp2500 Type Printers Only)

    1-1-6. Auto Cutter Control (SP2500 type printers only) Control Hexadecimal Function Page Codes Codes <ESC> "d" "0" 1B 64 30 Full-cut command to the auto cutter <ESC> "d" <0> 1B 64 00 <ESC> "d" "1" 1B 64 31 Partial-cut command to the auto cutter <ESC>...
  • Page 8: Other Commands

    1-1-8. Other Commands Control Hexadecimal Function Page Codes Codes <CAN> Cancels printer buffer & Initialize printer <DC3> Deselects printer <DC1> Sets select mode (Default) <RS> Beeps the buzzer <ESC> "# N , n 1 n 2 n 3 n 4" 1B 23 N 2C n 1 n 2 <LF>...
  • Page 9: Control Code Details

    1-2. Control Code Details The following section explains the details of the printer control codes. 1-2-1. Character Selection FUNCTION Selects the international character set CODE <ESC> "R" n (1B)H (52)H n < = < = (0E)H or n = (40)H (00)H DEFINITION RANGE OUTLINE...
  • Page 10: Selects The Character Code Table

    FUNCTION Selects the character code table CODE <ESC> <GS> "t" n 1B 1D 74 n OUTLINE Selects the character code table This function selects a character code table (as shown below). The default settings follow the settings of the memory switches 3- 8 to 3-5.
  • Page 11 Value of n Character Table Hex. Dec. Normal (Default) Code Page 437 (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)
  • Page 12: Selects Character Set #2

    FUNCTION Selects IBM character set #2 CODE <ESC> "6" (1B)H (36)H OUTLINE Selects IBM character set #2. Switches from IBM character set #1 to character set #2. Subsequent 80H to 9FH codes are handled as character data. This command is invalid when the character code table settings are other than #1.
  • Page 13: Selects The 5 X 9 (2 Pulses Per Dot) Font

    FUNCTION Selects 5 X 9 (2 pulses per dot) font CODE <ESC> "P" (1B)H (50)H OUTLINE Selects 5 X 9 (2 pulses = 1 dot) font. The number of digits per line is set by the DIP switches in the following way.
  • Page 14: Sets The Printing Magnified Double In Character Width

    FUNCTION Sets the printing magnified double in character width CODE <SO> (0E)H OUTLINE Data following this code is printed in double-width characters. Same as <ESC> "W" "1" or <ESC> "W" <1>. FUNCTION Resets the printing magnified in character width (Default) CODE <DC4>...
  • Page 15: Selects Underlining

    OUTLINE Sets the magnification rate in character height Prints the subsequent data with a character height magnified by a rate specified by the value of n . n = 0 and "0"' Reset magnification n = 1 and "1": Double magnification Note: •...
  • Page 16: Cancels Upperlining (Default)

    FUNCTION Cancels upperlining (Default) CODE <ESC> "_" "0" or <ESC> "_" <0> (1B)H (5F)H (30)H or (1B)H (5F)H (00)H OUTLINE Cancels upperline mode. FUNCTION Selects red color printing (SP2360/2560) Selects highlight printing (SP2320/2520) CODE <ESC> "4" (1B)H (34)H OUTLINE (SP2360/2560) Specifies red printing Prints subsequent characters in red.
  • Page 17: Cancels Inverted Printing (Default)

    FUNCTION Cancels inverted printing (Default) CODE <DC2> (12)H OUTLINE Cancels the inverted character mode. This code is valid only when input at the beginning of a line. FUNCTION Specifies rotated print mode for text with a rotation CODE <ESC> <RS> "i" n 1B 1E 96 n OUTLINE This rotates and prints subsequent data 90°...
  • Page 18: Selects Print Direction

    FUNCTION Selects uni-directional print mode CODE <ESC> "U" "1" or <ESC> "U" <1> (1B)H (55)H (31)H or (1B)H (55)H (01)H OUTLINE Prints only when the print head moves from left to right. FUNCTION Selects bi-directional print mode CODE <ESC> "U" "0" or <ESC> "U" <0> (1B)H (55)H (30)H or (1B)H (55)H (00)H OUTLINE Returns to the standard bi-directional print mode.
  • Page 19: Print Position Control

    1-2-2. Ptint Position Control FUNCTION Line feed CODE <LF> (0A)H OUTLINE Data in the line buffer is printed out and one line is fed. If data does not exist before this code is received, the printer only feeds one line. FUNCTION Vertical tab CODE...
  • Page 20: Carriage Return

    FUNCTION Carriage return CODE <CR> (0D)H OUTLINE The <CR> code is valid when the memory switch 3-1 = 1 (set to 0 at exfactory). When the <CR> code is valid, setting the memory switch 3-0 will cause the <CR> to function as shown in the table below.
  • Page 21: Defines N /72-Inch Line Spacing

    FUNCTION Define n /72-inch line spacing CODE <ESC> "A" n (1B)H (41)H n < = < = 85 (Default n = 12) DEFINITION RANGE OUTLINE Line feed is defined at n /72-inch after this code is received. This code sets the feed at n /72-inch with the <ESC> "2" code. FUNCTION Set n /72-inch line spacing CODE...
  • Page 22: Sets Line Spacing To 7/72-Inch

    FUNCTION Sets line spacing to 7/72 inch CODE <ESC> "1" (1B)H (31)H OUTLINE Line feed is set at 7/72-inch after this code is received. FUNCTION One time n /72-inch feed CODE <ESC> "J" n (1B)H (4A)H n < = < = DEFINITION RANGE OUTLINE This code activates the n /72-inch paper feed once.
  • Page 23: Sets Horizontal Tab Stops

    FUNCTION Sets horizontal tab stops CODE <ESC> "D" n1 n2 ...nk <0> (1B)H (44)H n1 n2 ...nk (00)H < = < = < = < = n3 ... < nk (Maximum print columns -1), DEFINITION RANGE < = < = OUTLINE Cancels all horizontal tab stops and sets new tab stops within the character pitch at n1 , n2 , etc.
  • Page 24: Sets Right Margin

    FUNCTION Sets right margin CODE <ESC> "Q" n 1B 51 n OUTLINE Sets the non-printable range with the current character pitch up to the n th postion with the left edge as the reference, after printing the data in the line buffer. Settings changed partway through a line take effect from the subsequent line.
  • Page 25: Left Justification (Default)

    FUNCTION Aligns position CODE <ESC> <GS> "a" n (1B)H (1D)H (61)H n Sets the alignment of the positions. OUTLINE Aligns all print data of one line to the specified position. (00)H, "0": Left edge alignment (default) (01)H, "1": Center alignment (02)H, "2": Right edge alignment ABCD...
  • Page 26: Set Vertical Tab Stops

    FUNCTION Sets vertical tab stops CODE <ESC> "B" n1 n2 ...nk <0> (1B)H (42)H n1 n2 ...nk (00)H < = < = < = < = < = < = < = n3 ... < nk DEFINITION RANGE OUTLINE Cancels all current vertical tab stops and sets new vertical tab stops at lines n1 , n2 , etc.
  • Page 27: Dot Graphics Control

    1-2-3. Dot Graphics Control FUNCTION 8 dot normal density graphics CODE <ESC> "K" n1 <0> m1 m2 ... (1B)H (4B)H n1 (00)H m1 m2 ... < = < = < = < = 200 (DIP SW 1 - 5 = ON) or 1 210 (DIP SW = DEFINITION RANGE OFF)
  • Page 28 First, since the volume of data is 30, n1 = (1E)H. If the data m1 to m30 is converted to hexadecimal, it appears as shown below. Data Binary Data Binary Data Binary m21 00111110 m11 00111110 00000001 m22 00101110 00011110 m12 00000010 02 m23 00101110 m13 00000010 02...
  • Page 29 NOTE For double density bit image printing, dots cannot be printed overlapping each other in the horizontal direction. The following is an example of this. Printing possible Printing not possible m2 m4 m6 m2 m4 m6 m1 m3 m5 m7 m1 m3 m5 m7 Overlapping horizontally...
  • Page 30: Download Graphics Printing

    1-2-4. Download Graphics Printing FUNCTION Defines download characters CODE When the 7 X 9 (half dot) font is set (default setting): <ESC> "&" <0> n1 n2 [m0 m1 m2 m3 m4 m5 m6 m7] n2 - n1 + 1 (1B)H (26)H (00)H n1 n2 [m0 m1 m2 m3 m4 m5 m6 m7] n2 - n1 + 1 When the 5 X 9 font is set: <ESC>...
  • Page 31 Printing possible Printing not possible m2 m4 m6 m2 m4 m6 m1m3 m5 m7 m1 m3 m5 m7 Overlapping horizontally Overlapping horizontally FUNCTION Enables download character set CODE <ESC> "%" "1" or <ESC> "%" <1> (1B)H (25)H (31)H or (1B)H (25)H (01)H OUTLINE Enables the download character set Download characters defined by the ESC &...
  • Page 32: Esc> "/" "0" 1B 2F

    (2) Define the download characters. When character codes where the download character is written are specified as (21)H, (22)H, (23)H, n1 = (21)H, n2 = (23)H are obtained. If the relationship between the character pattern data and printing head is specified to "not use pin 9", m0 = (80)H is obtained. When data m1 to m7 are converted into hexadecimal data, they are indicated as follows.
  • Page 33: Peripheral Device Control

    1-2-5. Peripheral Device Control FUNCTION Defines drive pulse width for peripheral device #1 CODE <ESC> <BEL> n1 n2 (1B)H (07)H n1 n2 < = < = < = < = 127 (default setting n1 = n2 = 20) 127, 1 DEFINITION RANGE OUTLINE Adjusts drive pulse width for peripheral devices requiring other...
  • Page 34: Esc>

    FUNCTION Controls peripheral device #1 immediately CODE <FS> (1C)H OUTLINE Executes drive pulse for peripheral unit 1 (immediate). This code differs from the <BEL> code as follows: When the printer receives an <FS> code, the command is executed immediately. The <BEL> code is stored in the data buffer in the same manner as other codes, and executed in the order in which they are received.
  • Page 35: Auto Cutter Control (Sp2500 Type Printers Only)

    1-2-6. Auto Cutter Control (SP2500 type printers only) FUNCTION Full-cut command to the auto cutter CODE <ESC> "d" "0" or <ESC> "d" <0> (1B)H (64)H (30)H or (1B)H (64)H (00)H OUTLINE Full cut command. Executes a full cut after printing the data in the line buffer.
  • Page 36: Esc> "4" 1B

    FUNCTION Partial-cut command to the auto cutter after paper feed CODE <ESC> “d” “3” or <ESC> “d” <3> (1B)H (64)H (33)H or (1B)H (64)H (03)H OUTLINE Paper feed + full cut command Executes the following actions after printing the data in the line buffer.
  • Page 37: Command To Set The

    1-2-7. Command to Set the Page Format FUNCTION Set page length in n lines CODE <ESC> “C” n (1B)H (43)H n < = < = 255 (default: n =42) DEFINITION RANGE OUTLINE Sets page length in n lines. FUNCTION Set page length in n inches CODE <ESC>...
  • Page 38: Other Commands

    1-2-8. Other Commands FUNCTION Cancels printer buffer & Initialize printer CODE <CAN> (18)H OUTLINE Clears the data buffer and line buffer and initializes all commands that have already been set. <CAN> is executed not when taking data from the reception buffer, but when it is received from the host.
  • Page 39: Esc> "7

    Memory switch number (“0,” “1,” “2,” “3,” “4,” “5,” “6”) n1 n2 n3 n4 : Mode settings (For details see below.) 1) N = 0 (Star mode) n1 : Always “0” n2 : Always “0”...
  • Page 40 2) N = 1 (Star mode only) n1 : Always “0” n2 : Always “0” Parameter Setting “1” “0” (Default) Zero style Normal Slashed International See below character set Country Country Country “0” “3” “6” Italy “1” France “4” Denmark #1 “7”...
  • Page 41 Invalid “8” to “F” Valid *1: Comdex Dual Auto Cut Mechanism (STAR mode only) This mechanism automatically cuts when there is a consecu- tive paper feed exceedin 7/6 inch. Hosts that cannot send an escape sequence such as <ESC> “d” and 0, can cut the paper if a line feed code <LF>...
  • Page 42 Value of n Character Table “0” or “8” “0” Normal (Default) “0” or “8” “1” Code Page 437 (USA, Std. Europe)/IBM Character Set #2 “0” or “8” “2” Katakana “0” or “8” “3” IBM Character Set #1 “0” or “8” “4”...
  • Page 43 (Parallel Interface) Prints and feeds line when nAutoFd signal is “LOW”. Does not feed line when “HIGH.” (Serial Interface) Ignores “3” Ignores 5) N = 4 (Star mode) n3 : Always “0” Para. Setting “0” “1” “2” “3” X on/X off Timing...
  • Page 44 Para. Setting “0” to “F” Device ID (Parallel I/F only) nPError signal (Parallel I/F only) Busy condition (Star mode only) *1 See below Treatment of missing data during reverse mode.*2 Device ID “0” or “2” or “4” or “6” or “8” or “A” or “C” or “E”...
  • Page 45 Treatment of missing data during reverse mode “0” to “7” Store “8” to “F” Delete Valid only when using a parallel interface. Set DIP SW 1-2 if you are using a serial interface. Also, the conditions for BUSY and the automatic status are disregarded.
  • Page 46 FUNCTION Transmits EOT status CODE <EOT> (04)H OUTLINE Transmits the EOT status of the printer to the host in real-time. (Does not execute after taking fro reception buffer, but immedi- ately upon receiving from the host.) It is in a “Data ready” state when using a bi-directional parallel interface.
  • Page 47: Esc> "E" 1B

    FUNCTION Transmits ENQ status CODE <ENQ> (05)H OUTLINE Transmits the ENQ status of the printer to the host in real-time. (Does not execute after taking fro reception buffer, but immedi- ately upon receiving from the host.) It is in a “Data ready” state when using a bi-directional parallel interface.
  • Page 48: Esc> "F" 1B

    FUNCTION Confirms finish of printing CODE <ETB> (17)H OUTLINE This command cause the printer to wait until all printing is completed (the printing motor stops) and sets the printer status 1- 1 of the automatic status (<ETB> command) to “1” (only execute ETB).
  • Page 49 FUNCTION Enables/disables automatic status CODE <ESC> <RS> “a” n (1B)H (1E)H (61)H n OUTLINE This command sets the transmission conditions of the automatic status. Initial values are according to DIP switch 1-6. See Chapter 2 Automatic Status Specifications for details on the contents of the automatic status.
  • Page 50: Esc/Pos Mode Commands

    2. ESC/POS Mode Commands The following table lists the TM-U200 and TM-U300 emulation commands that are supported by this printer. 2-1. Control Codes List Control Hexadecimal Function Codes Codes U200 U300 <HT> Horizontal tab <LF> Line feed <CR> Prints and carriage return <DLE>...
  • Page 51 Control Hexadecimal Function Codes Codes U200 U300 <ESC> R 1B 52 Selects international character set <ESC> U 1B 55 Selects/cancels unidirectional printing mode <ESC> V 1B 56 Designates/cancels 90° character rotation <ESC> a 1B 61 Aligns position <ESC> c 3 1B 63 33 Selects the paper-end sensor for sending the no-paper signal...
  • Page 52: Esc> "P" 1B

    Ignored Commands Control Hexadecimal Function Codes Codes U200 U300 <ESC> < 1B 3c Ignored (Returns home) <ESC> c 0 n 1B 63 30 n Ignored (Selects paper type(s) for printing) <ESC> f t1 t2 1B 66 t1 t2 Ignored (Sets cut sheet wait time) <GS>...
  • Page 53: Auto Status Specifications

    3. Auto Status Specifications 3-1. Auto Status Auto status is a function that automatically relays any changes that occur in the status of the printer from the printer to the host. It is composed of the “Header -1,” “Header - 2” and “a plurality of bytes of printer states.” The host always identifies the data using the method of identification for each byte received.
  • Page 54 Table 3-1 Header 1 (First Byte) Content Status 0 Status 1 Always 1 Printer Status Byte Count Always 0 Printer Status Byte Count Reserved (Fixed at 0) Not Used (Fixed at 0) Table 3-2 Relationship of Actual Transmitted Byte Count and Header 1 Transmitted Byte Count n (7 n 15) Header 1 00001111B (0F Hex)
  • Page 55 Table 3-3 Header 2 (Second Byte) Content Status 0 Status 1 Always 0 Automatic Status Ver. Number Always 0 Automatic Status Ver. Number Not Used (Fixed at 0) Table 3-4 Relationship of Actual Automatic Status Version and Header 2 Version Number n Header 2 00000010B (02 Hex) 00000100B (04 Hex)
  • Page 56 Printer Status Printer Status is the overall status transmitted in the third byte of the auto- matic status. Printer status is returned as transmission byte count -2 added by the Header 1. It always updates with new information. (There is no historical record existing.) Tables 3-5 to 3-9 show the composition of the overall status.
  • Page 57 Table 3-7 Printer Status 3 <Error Information> (Fifth Byte) Content Status 0 Status 1 Always 0 Invalid Invalid Invalid Always 0 Invalid Does not occur Occurs Reception Buffer Overflow Error (*) Not Used (Fixed at 0) * Bit 6 is cleared to 0 when returned to the host. Table 3-8 Printer Status 4 <Sensor Information>...
  • Page 58 (2) Precautions Do not use the <ENQ>, <EOT>, <ESC>, <ACK> or <SOH> commands when the automatic status is valid. You must first invalidate the use of the automatic status function using the DIP switches or the <ESC> <RS> “a” n command to use these inquiry commands.
  • Page 59: Appendix : Character Code Tables

    Appendix : Character Code Tables Star Mode (Character table: Normal) Note: The (7F)H code is a space when neither normal nor katakana.
  • Page 60 Star Mode (Character table: Normal)
  • Page 61: Star Mode

    Star Mode (Character table: IBM Character set #2 (Code page 437 )) Note: Other characters are the same as those for Character table: Normal.
  • Page 62 Star Mode (Character table: Katakana) Note: Other characters are the same as those for Character table: Normal.
  • Page 63 Star Mode (Character table: IBM Character set #1 ) Note: Other characters are the same as those for IBM Character Set #2.
  • Page 64 Star Mode Code Page #858 Code Page #852 Multi-lingual Latin-2 Code Page #860 Code Page #861 Portuguese Icelandic Note: Other characters are the same as those for Character table: Normal.
  • Page 65 Star Mode Code Page #863 Code Page #865 Canadian French Nordic Code Page #866 Cyrillic Russian Note: Other characters are the same as those for Character table: Normal.
  • Page 66 Star Mode Code Page #855 Code Page #857 Cyrillic Bulgarian Turkish 8 9 A B C D E F 8 9 A B C D E F Code Page #862 Code Page #864 Hebrew Arabic 8 9 A B C D E F 8 9 A B C D E F Note: Other characters are the same as those for Character table: Normal.
  • Page 67 Star Mode Code Page #737 Code Page #851 Greek Greek Code Page #869 Code Page #928 Greek Greek Note: Other characters are the same as those for Character table: Normal.
  • Page 68 Star Mode Code Page #772 Code Page #774 Lithuanian Lithuanian Note: Other characters are the same as those for Character table: Normal.
  • Page 69 Star Mode Code Page #874 Code Page #1250 Thai Windows Latin-2 8 9 A B C D E F 8 9 A B C D E F Code Page #1251 Code Page #1252 Windows Cyrillic Windows Latin-1 8 9 A B C D E F 8 9 A B C D E F Note: Other characters are the same as those for Character table: Normal.
  • Page 70 Star Mode Code Page #3840 Code Page #3841 IBM-Russian Gost Code Page #3843 Code Page #3844 Polish Note: Other characters are the same as those for Character table: Normal.
  • Page 71 Star Mode Code Page #3845 Code Page #3846 Hungarian Turkish Code Page #3847 Code Page #3848 Brazil-ABNT Brazil-ABICOMP Note: Other characters are the same as those for Character table: Normal.
  • Page 72 Star Mode Code Page #1001 Code Page #2001 Arabic Lithuanian-KBL Code Page #3001 Code Page #3002 Estonian-1 Estonian-2 Note: Other characters are the same as those for Character table: Normal.
  • Page 73 Star Mode Code Page #3011 Code Page #3012 Latvian-1 Latvian-2 Note: Other characters are the same as those for Character table: Normal. Code Page #3021 Code Page #3041 Bulgarian Maltese Note: Other characters are the Note: Other characters are the...
  • Page 74 Star Mode International Character Set The character codes shown in the table are hexadecimal.
  • Page 75 ESC/POS Mode Page 0 (PC437)
  • Page 76 ESC/POS Mode Page 0 (PC437)
  • Page 77 ESC/POS Mode Page 1 (Katakana) Note: Other characters are the same as those for Page 0.
  • Page 78 ESC/POS Mode Page 2 (PC858: Multilingual) Note: Other characters are the same as those for Page 0.
  • Page 79 ESC/POS Mode Page 3 (PC860: Portuguese) Page 4 (PC863: Canadian-French) Page 5 (PC865: Nordic) Note: Other characters are the same as those for Page 0.
  • Page 80 ESC/POS Mode International Character Set The character codes shown in the table are hexadecimal.
  • Page 81: Please Access The Following Url

    Tel: 732-623-5555, Fax: 732-623-5590 http://www.starmicronics.com Please access the following URL STAR MICRONICS EUROPE LTD. http://www.star-micronics.co.jp/service/frame_sp_spr_e.htm Star House, Peregrine Business Park, Gomm Road, for the lastest revision of the manual. High Wycombe, Bucks, HP13 7DL, U.K. Tel: 01494-471111, Fax: 01494-473333 http://www.StarMicronicsEurope.com 2003.08.31...

Table of Contents