Citizen BD2-2220 Command Reference Manual
Citizen BD2-2220 Command Reference Manual

Citizen BD2-2220 Command Reference Manual

Line thermal printer
Hide thumbs Also See for BD2-2220:
Table of Contents

Advertisement

Command Reference

LINE THERMAL PRINTER
BD2-2220
MODEL
Rev. 0.00 Issued on 2006/8/4

Advertisement

Table of Contents
loading

Summary of Contents for Citizen BD2-2220

  • Page 1: Command Reference

    Command Reference LINE THERMAL PRINTER BD2-2220 MODEL Rev. 0.00 Issued on 2006/8/4...
  • Page 2 REVISION Rev No. Date Comment 0.00 2006/08/04 Newly issued...
  • Page 3: Table Of Contents

    TABLE OF CONTENTS 1. OUTLINE ....................5 1.1 Operation Mode..................5 1.2 Character Set..................5 1.3 Control Commands................5 1.3.1 Control Command Details ..................5 1.3.2 How to Send Control Commands................5 2. CONTROL COMMANDS................6 2.1 ESC/POS Command List ..............6 2.1.1 Description of Items ....................9 2.2 Command Details ................10 2.2.1 Print Control Commands ..................10 ......................
  • Page 4: Esc 2 (Specifying 1/6-Inch Line Feed Rate)

    2.2.3 Print Position Commands..................32 ......................... 32 (Horizontal tab) ESC $ n1 n2 ................33 (Specifying the absolute positions) ESC D [ n ] k NULL ..............34 (Setting horizontal tab position) ESC T n ............. 35 (Selecting the character printing direction in PAGE MODE) ESC W xL xH yL yH dxL dxH dyL dyH .....
  • Page 5 2.2.11 Bar Code Commands ....................68 GS H n ..............68 (Selecting of printing position of HRI characters) GS f n ..................70 (Selecting the font of HRI characters) GS h n ................... 71 (Specifying the height of the bar code) GS k m [d1 ..
  • Page 6 3. CHARACTER CODE TABLE ............115 3.1 Code Page ..................115 3.1.1 Codepage 00H to 7FH & PC437 (USA, Europe Standard)......115 3.1.2 Codepage 00H to 7FH & Katakana ..............116 3.1.3 Codepage 00H to 7FH & PC850 (Multilingual) ..........117 3.1.4 Codepage 00H to 7FH & PC860 (Portuguese) ..........118 3.1.5 Codepage 00H to 7FH &...
  • Page 7: Outline

    BASIC programming is explained. Example 1 Let’s print a character string “CITIZEN” in enlarged (double-height, double-width) and in normal format. Program coding The Control Command shows that the command name for setting the size of a character is GS !. Let’s make a program using this code.
  • Page 8: Control Commands

    2. CONTROL COMMANDS 2.1 ESC/POS Command List Print Control Commands Command Function Mode GS P Printing and paper feed S.P. Back to printing S.P. Printing in PAGE MODE and returning to STANDARD MODE (at the selection of PAGE MODE) ESC FF Printing data in PAGE MODE ESC J Printing and feeding paper in minimum pitch...
  • Page 9 Print Position Commands Commands Function Mode GS P Horizontal tab S.P. ESC $ Specifying the absolute positions S.P. ESC D Setting horizontal tab position S.P. ESC T Selecting the character printing direction in PAGE MODE ESC W Defining the print area in PAGE MODE Specifying the relative position S.P.
  • Page 10 Cutter Commands Command Function MODE GS P ESC i Full cut ESC m Partial cut GS V Cutting the paper S.P. ○ Bar Code Commands Commands Function Mode GS P GS H Selecting of printing position of HRI characters S.P. GS f Selecting the font of HRI characters S.P.
  • Page 11: Description Of Items

    2.1.1 Description of Items XXXX [Function] The name of a command. [Code] The string of codes comprising the command is represented by < >H for hexadecimal numbers, < >B for binary numbers, and < > for decimal numbers, [ ] k denotes the number of repetition of “k”...
  • Page 12: Command Details

    2.2 Command Details 2.2.1 Print Control Commands [Function] Printing and paper feed [Code] <0A>H [Outline] Prints data inside the print buffer and feeds paper based on the line feed amount having been set. [Caution] After this command is executed, the beginning of the line is taken as the start position for the next point.
  • Page 13: Cr (Back To Printing)

    [Function] Back to printing [Code] <0D>H [Outline] (1) When memory switch 1-5 is OFF: This command is ignored. (2) When memory switch 1-5 is ON: The same operation as LF is executed. [See Also] [Sample Program] LPRINT "AAA"; CHR$(&HD); LPRINT "BBB"; CHR$(&HD); LPRINT CHR$(&HD);...
  • Page 14: Ff (Printing In Page Mode And Returning To Standard Mode)

    [Function] Printing in PAGE MODE and returning to STANDARD MODE (at the selection of PAGE MODE) [Code] <0C>H [Outline] Executes a batch printout of the data mapped in the entire print area, and then returns to STANDARD MODE. [Caution] • All mapped data is erased after printout. •...
  • Page 15: Esc Ff (Printing Data In

    ESC FF [Function] Printing data in PAGE MODE [Code] <1B>H<0C>H [Outline] Executes a batch printout of the data mapped in the entire print area in PAGE MODE. [Caution] • This command is only effective when PAGE MODE is selected. • Mapped data, as well as the ESC T and ESC W settings, and the character mapping position are held even after printing.
  • Page 16: Esc D N (Printing And Feeding The Paper By "N" Lines)

    ESC d n [Function] Printing and feeding the paper by “n” lines [Code] <1B>H<64>H<n> [Range] 0≤n≤255 [Outline] Prints data in the print buffer and feeds paper by “n” lines. Specified lines do not remain. [Caution] • After this command is executed, the beginning of the line is taken as the start position for the next print.
  • Page 17: Print Character Commands

    2.2.2 Print Character Commands [Function] Canceling print data in PAGE MODE [Code] <18>H [Outline] Erases all data contained in the currently effective print area in PAGE MODE. [Caution] • This command is only effective when PAGE MODE is selected. • If the previously established print area overlaps the currently effective print area, the overlapped data in the previously established area will be erased.
  • Page 18: Esc Sp N (Setting The Right Spacing Of The Character)

    ESC SP n [Function] Setting the right spacing of the character [Code] <1B>H<20>H<n> [Range] 0≤n≤255 [Outline] Sets the right spacing of character to [n x basic calculation pitch] inches. [Caution] • If the horizontal magnification of character is 2 or more, the right spacing increases with the magnification.
  • Page 19: Esc ! N (Collectively Specifying The Printing Mode)

    ESC ! n [Function] Collectively specifying the printing mode [Code] <1B>H<21>H<n> [Range] 0≤n≤255 [Outline] Printing mode is assigned. Value Function Character Font Font A (12 x 24) Font B (9 x 24) Undefined — — Undefined — — Emphasis Canceled Specified Double height Canceled...
  • Page 20 [Sample Program] LPRINT CHR$(&H1B);"!"; CHR$(&H00);"H"; LPRINT CHR$(&H1B);"!"; CHR$(&H01);"H"; LPRINT CHR$(&H1B);"!"; CHR$(&H08);"H"; LPRINT CHR$(&H1B);"!"; CHR$(&H10);"H"; LPRINT CHR$(&H1B);"!"; CHR$(&H20);"H"; LPRINT CHR$(&H1B);"!"; CHR$(&H80);"H"; LPRINT CHR$(&H1B);"!"; CHR$(&HB9);"H"; LPRINT CHR$(&HA); [Print Results] H H H Font B + Emphasis + Quadruple + Underline Font A + Underline Font A + Double width Font A + Double height Font A + Emphasis...
  • Page 21: Esc % N (Specifying/Canceling Download Character Set)

    ESC % n [Function] Specifying/canceling download character set [Code] <1B>H<25>H<n> [Range] 0≤n≤255 [Outline] Specifying/canceling download characters. • “n” is valid only for the lowest bit (n0). • Control by the lowest bit (n0) is shown as follows: Function Canceling download character set Specifying download character set [Default] n = 0...
  • Page 22: Esc & S N M [A [P] S X A] M-N+1

    ESC & s n m [a [p] s x a] m–n+1 [Function] Defining the download characters [Code] <1B>H<26>H<s>H<n>H<m>H[<a>H<p1>H<p2>··<ps x a>]m – n + 1 [Range] s = 3 (Font A, B) s = 2 (Font C) 32≤n≤m≤127 0≤a≤12 (Font A) 0≤a≤9 (Font B) 0≤a≤8 (Font C) 0≤p1..ps x a≤255...
  • Page 23: Esc - N (Specifying/Canceling Underline)

    ESC – n [Function] edifying/canceling underline [Code] <1B>H<2D>H<n> [Range] 0≤n≤2 48≤n≤50 [Outline] Specifying/canceling an underline. Function 0, 48 Canceling underline 1, 49 Setting 1-dot width underline 2, 50 Setting 2-dot width underline [Caution] • An underline is attached to the full character width. It is, however, not attached to the part having been skipped by horizontal tab (HT) command.
  • Page 24: Esc ? N (Deleting Download Characters)

    ESC ? n [Function] Deleting download characters [Code] <1B>H<3F>H<n> [Range] 32≤n≤126 [Outline] Deletes the downloaded characters of specified code. [Caution] • The character “n” indicates the character code used to delete the defined pattern. After the deletion, characters are printed in the same pattern as the internal characters.
  • Page 25: Esc E N (Specifying/Canceling Emphasis Printing)

    ESC E n [Function] Specifying/canceling emphasis printing [Code] <1B>H<45>H<n> [Range] 0≤n≤255 [Outline] Specifying/canceling the emphasized characters. • “n” is valid only for the lowest bit (n0). • Control by the lowest bit (n0) is shown as follows: Function Canceling emphasis printing Specifying emphasis printing [Caution] •...
  • Page 26: Esc G N (Specifying/Canceling Double Strike Printing)

    ESC G n [Function] Specifying/canceling double strike printing [Code] <1B>H<47>H<n> [Range] 0≤n≤255 [Outline] Specifying/canceling the double strike printing. • “n” is valid only for the lowest bit (n0). • Control by the lowest bit (n0) is shown as follows: Function Canceling double strike printing Specifying double strike printing [Caution]...
  • Page 27: Esc M N (Selection Of Character Fonts)

    ESC M n [Function] Selection of character fonts [Code] <1B>H<4D>H<n> [Range] 0≤n≤2 48≤n≤50 [Outline] Selects character fonts. Function 0, 48 Selection of font A (12 x 24) 1, 49 Selection of font B (9 x 24) 2, 50 Selection of font C (8 x 16) [Caution] •...
  • Page 28: Esc V N (Specifying/Canceling 90°-Right-Turned Characters)

    ESC V n [Function] Specifying/canceling 90°-right-turned characters [Code] <1B>H<56>H<n> [Range] 0≤n≤1 48≤n≤49 [Outline] Specifying/canceling 90°-right-turned characters. Function 0, 48 Canceling 90°-right-turned characters 1, 49 Specifying 90°-right-turned characters [Caution] • No underlines are attached to 90°-right-turned characters. • This command does not affect PAGE MODE but setting is maintained. [Default] n = 0 [Sample Program]...
  • Page 29: Esc T N (Selecting The Character Code Table)

    ESC t n [Function] Selecting the character code table [Code] <1B>H<74>H<n> [Range] 0≤n≤9 16≤n≤19 n = 26, 40, 255 [Outline] Selecting the character code table. The character code table is selected based on the value of “n”. Character Code Table Codepage PC437 Katakana Codepage PC850...
  • Page 30: Esc { N (Specifying/Canceling The Inverted Characters)

    ESC { n [Function] Specifying/canceling the inverted characters [Code] <1B>H<7B>H<n> [Range] 0≤n≤255 [Outline] Specifying/canceling inverted characters. • “n” is valid only for the lowest bit (n0). • Control by the lowest bit (n0) is shown as follows: Turns the data of the line by 180° and print the data. •...
  • Page 31: Gs ! N (Specifying The Character Size)

    GS ! n [Function] Specifying the character size [Code] <1D>H<21>H<n> [Range] 0≤n≤255, where: 1≤vertical magnification≤8, 1≤horizontal magnification≤8 [Outline] Specifies the character size (Vertical and horizontal magnification). Value Function Hex. Number Decimal Number Vertical magnification Refer to Table 2, “Vertical Magnification”. specification Horizontal magnification Refer to Table 1, “Horizontal Magnification”.
  • Page 32: Gs B N (Specifying/Canceling The Black/White Inverted Printing)

    GS B n [Function] Specifying/canceling the black/white inverted printing [Code] <1D>H<42>H<n> [Range] 0≤n≤255 [Outline] This command specifies or cancels the black/white inverted printing. • “n” is valid only for the lowest bit (n0). • Control by the lowest bit (n0) is shown as follows: Function The black/white inverted printing is canceled.
  • Page 33: Gs B N (Specifying/Canceling The Smoothing)

    GS b n [Function] Specifying/canceling the smoothing [Code] <1D>H<62>H<n> [Range] 0≤n≤255 [Outline] This command specifies or cancels the smoothing. • “n” is valid only for the lowest bit (n0). • Control by the lowest bit (n0) is shown as follows: Function The smoothing is canceled.
  • Page 34: Print Position Commands

    2.2.3 Print Position Commands [Function] Horizontal tab [Code] <09>H [Outline] Shifts the printing position to the next horizontal tab position. • Ignored when the next horizontal tab position has not been set. [Caution] The horizontal tab position is set by ESC D. [Default] At the selection of font A, tabs are set every 8 characters (at 9th, 17th, 25th, ...) with right space amount of a character set at 0 and horizontal enlargement rate of a...
  • Page 35: Esc $ N1 N2 (Specifying The Absolute Positions)

    ESC $ n1 n2 [Function] Specifying the absolute positions [Code] <1B>H<24>H<n1><n2> [Range] 0≤n1≤255 0≤n2≤255 [Outline] The printing start position is specified by the absolute position from the left margin with the number of dots divided by 256 and quotient specified as “n2” and remainder as “n1”.
  • Page 36 ESC D [ n ] k NULL [Function] Setting horizontal tab position [Code] <1B>H<44>H [<n>] k<00>H [Range] 1≤n≤255 0≤k≤32 [Outline] Specifying a horizontal tab position. • “n” indicates the number of columns from the beginning to the horizontal tab position. Note, however, that “n = set position –...
  • Page 37: Esc T N (Selecting The Character Printing Direction In

    ESC T n [Function] Selecting the character printing direction in PAGE MODE [Code] <1B>H<54>H<n> [Range] 0≤n≤3 48≤n≤51 [Outline] Selects the direction and start point of character printing in PAGE MODE. Printing Direction Start Point 0, 48 Left to right Top left (“A” in the figure) 1, 49 Bottom to top Bottom left (“B”...
  • Page 38: Esc W Xl Xh Yl Yh Dxl Dxh Dyl Dyh (Defining The Print Area In

    ESC W xL xH yL yH dxL dxH dyL dyH [Function] Defining the print area in PAGE MODE [Code] <1B>H<57>H<xL><xH><yL><yH><dxL><dxH><dyL><dyH> [Range] 0≤xL, xH, yL, yH, dxL, dxH, dyL, dyH≤255, except for dxL = dxH = 0 or dyL = dyH = 0 [Outline] Defines the location and size of the print area.
  • Page 39: Esc \ Nl Nh (Specifying The Relative Position)

    ESC \ nL nH [Function] Specifying the relative position [Code] <1B>H<5C>H<nL><nH> [Range] 0≤nL≤255 0≤nH≤255 [Outline] This command specifies the next print start position in a relative position with respect to the current position. The next print start position will be at a point of [(nL + nH x 256) x basic calculation pitch] inches away from the current position.
  • Page 40: Esc A N (Aligning The Characters)

    ESC a n [Function] Aligning the characters [Code] <1B>H<61>H<n> [Range] 0≤n≤2 48≤n≤50 [Outline] All the printed data within one line are aligned in the specified position. Depending on the value “n”, positional alignment is carried out as shown in the table below: Position 0, 48...
  • Page 41: Gs $ Nl Nh (Specifying The Absolute Vertical Position Of Characters In

    GS $ nL nH [Function] Specifying the absolute position of character vertical direction in PAGE MODE [Code] <1D>H<24>H<nL><nH> [Range] 0≤nL≤255, 0≤nH≤255 [Outline] Specifies the vertical position of character at the start point of data development in PAGE MODE using absolute position based on the start position. The position of vertical direction of character at the start position of next data development is the position [(nL + nH x 256) x basic calculation pitch] from the start position.
  • Page 42: Gs L Nl Nh (Setting The Left Margin)

    GS L nL nH [Function] Setting the left margin [Code] <1D>H<4C>H<nL><nH> [Range] 0≤nL≤255 0≤nH≤255 [Outline] This command sets the left margin specified by nL and nH. The value of the left margin is [(nL + nH x 256) x basic calculation pitch] inches. Printable area Left Print area...
  • Page 43: Gs W Nl Nh (Setting The Print Area Width)

    GS W nL nH [Function] Setting the print area width [Code] <1D>H<57>H<nL><nH> [Range] 0≤nL≤255 0≤nH≤255 [Outline] Sets the print area width specified by nL and nH. The print area width will be [(nL + nH x 256) x basic calculation pitch] inches. Printable area Left margin Print area width [Caution]...
  • Page 44 (2) If a sufficient area cannot be provided as a result of step (1), the print area is extended toward the left (so, the left margin is decreased). Printable area (1) Extended Left margin toward the right (2) The left margin is trimmed Print area width (3) If a sufficient area cannot be provided as a result of step (2), the right spacing is trimmed.
  • Page 45: Gs \ Nl Nh (Specifying The Relative Vertical Position Of A Character In

    GS \ nL nH [Function] Specifying the relative vertical position of a character in PAGE MODE [Code] <1D>H<5C>H<nL><nH> [Range] 0≤nL≤255 0≤nH≤255 [Outline] This command is used in PAGE MODE to specify the vertical position of a character in the data mapping start position, in a relative position with respect to the current position.
  • Page 46: Line Feed Span Commands

    2.2.4 Line Feed Span Commands ESC 2 [Function] Specifying 1/6-inch line feed rate [Code] <1B>H<32>H [Outline] The line feed rate per line is specified by 1/6 inch. [Caution] Line feed rate can be specified respectively for both STANDARD MODE and PAGE MODE.
  • Page 47: Esc 3 N (Setting Line Feed Rate Of Minimum Pitch)

    ESC 3 n [Function] Setting line feed rate of minimum pitch [Code] <1B>H<33>H<n> [Range] 0≤n≤255 [Outline] Sets the line feed width per line to [n x basic calculation pitch] inches. [Caution] • The line feed width can be set separately for the STANDARD and PAGE MODES. •...
  • Page 48: Bit Image Commands

    2.2.5 Bit Image Commands ESC * m n1 n2 [ d ] k [Function] Specifying the bit image mode [Code] <1B>H<2A>H<m>H<n1><n2>[<d>]k [Range] m = 0, 1, 32, 33 0≤n1≤255 0≤n2≤2 0≤d≤255 k = n1 + 256 x n2 (m = 0, 1) k = (n1 + 256 x n2) x 3 (m = 32, 33) [Outline] •...
  • Page 49 [Sample Program] LPRINT CHR$(&H1B);"*"; LPRINT CHR$(0);CHR$(20);CHR$(0); IMG1: GOSUB IMG1 LPRINT CHR$(&HFF); LPRINT CHR$(&HA); FOR I = 1 TO 18 LPRINT CHR$(&H1B);"*"; LPRINT CHR$(&H85); LPRINT CHR$(1);CHR$(20);CHR$(0); NEXT I GOSUB IMG1 LPRINT CHR$(&HFF); LPRINT CHR$(&HA); RETURN LPRINT CHR$(&H1B);"*"; IMG2: LPRINT CHR$(32);CHR$(20);CHR$(0); LPRINT CHR$(&HFF); GOSUB IMG2 LPRINT CHR$(&HFF);...
  • Page 50: Gs * N1 N2 [ D ] N1 X N2 X 8

    GS * n1 n2 [ d ] n1 x n2 x 8 [Function] Defining the download bit image [Code] <1D>H<2A>H<n1><n2> [< d >] n1 x n2 x 8 [Range] 1≤n1≤255 1≤n2≤48 n1 x n2 ≤1536 [Outline] • Defines download bit images of the number of dots specified by “n1” and “n2”. •...
  • Page 51 [Sample Program] GOSUB IMG LPRINT CHR$(&H1D);"/"; CHR$(0); LPRINT CHR$(&H1D);"/"; CHR$(1); LPRINT CHR$(&H1D);"/"; CHR$(2); LPRINT CHR$(&H1D);"/"; CHR$(3); IMG: n1=10:n2=5 LPRINT CHR$(&H1D);"*"; LPRINT CHR$(n1); CHR$(n2); FOR J=1 TO n1*8 FOR I=1 TO n2 LPRINT CHR$(J); NEXT I NEXT J RETURN [Print Results] - 49 -...
  • Page 52: Gs / M (Printing The Downloaded Bit Image)

    GS / m [Function] Printing the downloaded bit image [Code] <1D>H<2F>H<m> [Range] 0≤m≤3 48≤m≤51 [Outline] Prints downloaded bit image in a mode specified by “m”. Modes that can be selected by “m” are shown below. Dot Density in Dot Density in Mode Name Horizontal Vertical Direction...
  • Page 53: Gs V 0 M Xl Xh Yl Yh D1

    GS v 0 m xL xH yL yH d1...dk [Function] Printing of raster bit image [Code] <1D>H<76>H<30>H<m><xL><xH><yL><yH> [<d>] k [Range] 0≤m≤3, 48≤m≤51, 0≤xL≤255, 0≤xH≤255, 0≤yL≤255, 0≤yH≤8, 0≤d≤255, k = (xL + xH x 256) x (yL + yH x 256), however, k ≠ 0 [Outline] Prints raster bit images in mode “m”.
  • Page 54 [Example] When xL + xH x 256 = 64 (xL + xH x 256) 8 dots = 512 dots yL + yH x 256 dots - 52 -...
  • Page 55: Status Commands

    2.2.6 Status Commands DLE EOT n [Function] Sending status in real-time [Code] <10>H<04>H<n> [Range] 1≤n≤4 [Outline] Sends in real-time the status specified by “n”. Status Printer status Status caused by an offline condition Status caused by an error Continuous paper detector status [Caution] •...
  • Page 56 (1) Printer status (When n = 1 is specified) Status Hex. Decimal Fixed Fixed Fixed Online status Offline status Fixed Not waiting online recovery Waiting online recovery LF-SW signal is High-Level LF-SW signal is Low-Level Fixed (2) Status caused by an offline condition (When n = 2 is specified) Status Hex.
  • Page 57 (3) Status caused by an error (when n = 3 is specified) Status Hex. Decimal Fixed Fixed Fixed Auto cutter error not occurred Auto cutter error occurred Fixed Unrecoverable error not occurred Unrecoverable error occurred Auto recovery error not occurred Auto recovery error occurred Fixed Bit 3: If this error occurred because of a paper jam, for example, remove the cause...
  • Page 58: Gs A N (Enabling/Disabling Asb (Automatic Status Back))

    GS a n [Function] Enabling/disabling ASB (Automatic Status Back) [Code] <1D>H<61>H<n> [Range] 0≤n≤255 [Outline] This command selects the status item to be addressed by ASB (Automatic Status Back.) Status Item Addressed by ASB Hex. Decimal Undefined — — Online/offline status = Disabled Online/offline status = Enabled Error status = Disabled Error status = Enabled...
  • Page 59 (1) 1st byte (Printer information) Status Hex. Decimal Unused Unused Unused Online status Offline status Unused Head-down Head-up Not in paper feed state triggered by LF-SW signal In paper feed state triggered by LF-SW signal Unused (2) 2nd byte (Error occurrence information) Status Hex.
  • Page 60 (4) 4th byte (Paper Sensor information) Status Hex. Decimal Reserved Reserved Reserved Reserved Fixed Reserved Reserved Fixed [Default] When MSW 1-3 OFF: n = 0 When MSW 1-3 ON: n = 2 [See Also] DLE EOT, GS r - 58 -...
  • Page 61: Gs R N (Sending Status)

    GS r n [Function] Sending status [Code] <1D>H<72>H<n> [Range] n=1,49 [Outline] Sends the specified status to the host. Function 1, 49 Sends the Paper Sensor status. [Caution] • When the serial interface is used: For DTR/DSR control: The printer sends the status after verifying that the host is ready to receive. If the host is not ready to receive, the printer waits for the host to become ready to receive.
  • Page 62: Paper Detecting Commands

    2.2.7 Paper Detecting Commands ESC c 3 n [Function] Selecting the Paper Sensor valid for a Paper-end signal output [Code] <1B>H<63>H<33>H<n> [Range] 0≤n≤255 [Outline] This command selects by which Paper Sensor a Paper-end signal should be output. Each bit for “n” has the following meaning: Value Position Paper Near-end...
  • Page 63: Esc C 4 N (Selecting The Paper Near-End Sensor Valid For Print Stop)

    ESC c 4 n [Function] Selecting the Paper Near-end Sensor valid for print stop [Code] <1B>H<63>H<34>H<n> [Range] 0≤n≤255 [Outline] This command selects the Paper Near-end Sensor which helps to stop printing when the paper supply almost runs out. Each bit for “n” has the following meaning: Value Position Paper Near-end...
  • Page 64: Panel Switch Commands

    2.2.8 Panel Switch Commands ESC c 5 n [Function] Enabling/disabling LF-SW signal [Code] <1B>H<63>H<35>H<n> [Range] 0≤n≤255 [Outline] Enabling/disabling LF-SW signal. • “n” is valid only for the lowest bit (n0). • Control by the lowest bit (n0) is shown as follows: Condition LF-SW signal valid LF-SW signal invalid...
  • Page 65: Macro Commands

    2.2.9 Macro Commands GS : [Function] Starting/ending macro definition [Code] <1D>H<3A>H [Outline] Specifying starting/ending macro definition. Reception of this command during macro definition signifies ending the macro definition. [Caution] • Maximum content available for macro definition is 2048 bytes. A portion exceeding 2048 bytes is not defined.
  • Page 66: Gs ^ N1 N2 N3 (Executing The Macro)

    GS ^ n1 n2 n3 [Function] Executing the macro [Code] <1D>H<5E>H<n1><n2><n3> [Range] 0≤n1≤255 0≤n2≤255 0≤n3≤1 [Outline] Executing contents defined in macro. n1 : The number of times of macro execution n2 : Waiting time on macro execution: Waiting time of n2 x 100 msec is given for every execution.
  • Page 67: Cutter Commands

    2.2.10 Cutter Commands ESC i [Function] Full cutting of paper [Code] <1B>H<69>H [Outline] Executes full cutting of paper. [Caution] • This command only works it is entered at the beginning of a line. • Before cutting paper, feed the paper more than the cutting position of paper from the print position.
  • Page 68: Esc M (Partial Cut)

    ESC m [Function] Partial cutting of paper [Code] <1B>H<6D>H [Outline] Executes partial cutting of paper. [Caution] • This command only works it is entered at the beginning of a line. • Before cutting paper, feed the paper more than the cutting position of paper from the print position.
  • Page 69: Gs V M

    GS V m ..(1) GS V m n ..(2) [Function] Cutting the paper [Code] (1) <1D>H<56>H<m> (2) <1D>H<56>H<m><n> [Range] (1) 0≤m≤1, 48≤m≤49 (2) m = 65,66 0≤n≤255 [Outline] Performs the specified paper cutting. Function 0, 48 Full cut 1, 49 Partial cut (Leaving a bridge area uncut) Paper feed by “cut position + {n x basic calculation pitch}”...
  • Page 70: Bar Code Commands

    2.2.11 Bar Code Commands GS H n [Function] Selecting of printing position of HRI characters [Code] <1D>H<48>H<n> [Range] 0≤n≤3 48≤n≤51 [Outline] Selecting printing position of HRI characters in printing bar codes. “n” means the followings. Printing Position 0, 48 No printing 1, 49 Above the bar code 2, 50...
  • Page 71 [Print Results] No HRI characters * 1 2 * Printed above Printed below * 1 2 * * 1 2 * Printed above and below * 1 2 * - 69 -...
  • Page 72: Gs F N (Selecting The Font Of Hri Characters)

    GS f n [Function] Selecting the font of HRI characters [Code] <1D>H<66>H<n> [Range] 0≤n≤2 48≤n≤50 [Outline] Selecting the font of HRI characters in printing bar code. The type of font can be selected with “n” as follows: Font 0, 48 Font A (12 x 24) 1, 49 Font B (9 x 24)
  • Page 73: Gs H N (Specifying The Height Of The Bar Code)

    GS h n [Function] Specifying the height of the bar code [Code] <1D>H<68>H<n> [Range] 1≤n≤255 [Outline] Selecting bar code height. “n” denotes the number of dots in the vertical direction. [Default] n = 162 [See Also] GS k, GS w [Sample Program] Refer to Sample Program and Print Results for GS w.
  • Page 74: Printing The Bar Code

    GS k m [d1 ..dk] NULL ..(1) GS k m n [d1 ..dn] ....(2) [Function] Printing the bar code [Code] (1) <1D>H<6B>H<m> [d1..dk] NULL (2) <1D>H<6B>H<m><n> [d1..dn] [Range] (1) 0≤m≤6 The definitions of “k” and “d” vary with the bar code system. (2) 65≤m≤73 The definitions of “n”...
  • Page 75 [Caution] For (1): • This command ends with a NULL code. • For UPC-A or UPC-E, the bar code is printed when 12 bytes of bar code data have been entered, and the subsequent data is handled as normal data. •...
  • Page 76 [Description of Bar Codes] UPC-A This bar code, consisting of numerals only, has a fixed length of 12 columns; a 11- column number entered from the host or application software plus a check digit (12th column) automatically calculated inside the printer. If the 12th-column numeral is sent from the host, the entire bar code will be printed as it is.
  • Page 77 Control Character Control Character Character Character ASCII Hex. Hex. ASCII NULL ■U ■P ■A ■Q ■B ■R ■C ■S ■D ■T ■E ■U ■F ■V ■G ■W ■H ■X ■I ■Y ■J ■Z ■K ■A ■L ■B ■M ■C ■N ■D ■0 ■E...
  • Page 78 When sending print data, note these points: (1) Each string of bar code data must begin with a code set select character (CODE A, CODE B, or CODE C), which selects the first code set to use. (2) Every special character is specified by a combination of two characters: a brace “{” followed by one character.
  • Page 79 [Bar Code Print Example] UPC-A, UPC-E, JAN-13 (EAN), JAN-8 (EAN), CODE39, ITF, CODABAR, CODE93, CODE128 Type Print Sample Outline of Symbol 12-column fixed-length bar code consisting of numerals UPC-A only. 8-column fixed-length bar code consisting of numerals only. UPC-E Abbreviated version of UPC-A. 13-column fixed-length bar code consisting of numerals JAN-13 only.
  • Page 80: Gs W N (Specifying The Horizontal Size (Magnification) Of Bar Code)

    GS w n [Function] Specifying the horizontal size (magnification) of bar code [Code] <1D>H<77>H<n> [Range] 2≤n≤6 [Outline] Selecting bar code width. [Default] n = 3 [Sample Program] LPRINT CHR$(&H1D);"h"; CHR$(30); LPRINT CHR$(&H1D);"w"; CHR$(2); GOSUB BC LPRINT CHR$(&H1D);"h"; CHR$(50); LPRINT CHR$(&H1D);"w"; CHR$(3); GOSUB BC LPRINT CHR$(&H1D);"h";...
  • Page 81: Commands For Non-Volatile Memory

    2.2.12 Commands for Non-volatile Memory F S p n m [Function] Printing the download NV bit images [Code] <1C>H<70>H<n><m> [Range] 1≤n≤255 0≤m≤3,48≤m≤51 [Outline] This command prints the download NV bit images (n) using a specified mode (m). • “n” denotes the number of the download bit image. •...
  • Page 82: F S Q N [Xl Xh Yl Yh D1

    F S q n [xL xH yL yH d1…dk] 1… [xL xH yL yH d1…dk] n [Function] Defining the download NV bit image [Code] <1C>H<71>H<n>[<xL><xH><yL><yH><d1...dk>]1 ...[<xL><xH><yL><yH><d1...dk>]n [Range] 1≤n≤255, 0≤xL≤255, 0≤xH≤3 but, 1≤(xL + xH x256)≤1023 0≤yL≤255 0≤yH≤1 but, 1≤(yL + yH x256)≤288 0≤d≤255 k = (xL + xH x256) x (yL + yH x256) x8 Total definition area = 2M bits (256K bytes)
  • Page 83 • The maximum definition area of this printer is 2M bits (256K bytes). Multiple NV bit images can be defined, but bit images of which total size (Bit image data + Header) exceeds 2M bits (256K bytes) can not be defined. •...
  • Page 84: Printer Function Setting Commands

    2.2.13 Printer Function Setting Commands GS ( E pL pH fn [··· ] [Function] Printer function setting command [Outline] Printer function setting command is a command to change the function of the printer stored on the non-volatile memory and executes the function set by the value of “fn”. Function Function No.
  • Page 85: Fn = 1: Function 1 Transferring To Printer Function Setting Mode

    fn = 1: Function 1 Transferring to Printer Function Setting Mode GS ( E pL pH fn d1 d2 fn = 1 [Code] <1d>H<28>H<45>H pL pH fn d1 d2 [Range] (pL + pH x256) = 3 (pL = 3, pH = 0) fn = 1 d1 = 73 (“I”) d2 = 78 (“N”)
  • Page 86: Fn = 2: Function 2 End Of Printer Function Setting Mode

    fn = 2: Function 2 End of Printer Function Setting Mode GS (E pL pH fn d1 d2 d3 fn = 2 [Code] <1d>H<28>H<45>H pL pH fn d1 d2 d3 [Range] (pL + pH x256) = 4 (pL = 4, pH = 0) fn = 2 d1 = 79 (“O”) d2 = 85 (“U”)
  • Page 87: Fn = 3: Function 3 Setting Memory Switch Value

    fn = 3: Function 3 Setting Memory Switch Value GS (E pL pH fn [a1 b18 ··· b11] ··· [ak bk8 ··· bk1] fn = 3 [Code] <1d>H<28>H<45>H pL pH fn[a1 b18···b11]···[ak bk8···bk1] [Range] 10≤ (pL + pH x256) ≤65535 fn = 3 a = 1, 2, 3 b = 48, 49, 50...
  • Page 88 • Setting memory switch 2 (a = 2) b (Set Function Value) 49 (Default) Reserved 49 (Default) Reserved 48 (Default) Disables stored printing. Enables stored printing. 48 (Default) Line feed immediately at full column width printing Wait for data at full column width printing 48 (Default) After head-down and PE recovery, prints as it is.
  • Page 89: Fn = 4: Function 4 Sending The Set Memory Switch Value

    fn = 4: Function 4 Sending the Set Memory Switch Value GS (E pL pH fn a fn = 4 [Code] <1d>H<28>H<45>H pL pH fn a [Range] (pL + pH x256) = 2 fn = 4 a = 1, 2, 3 [Outline] •...
  • Page 90: Fn = 5: Function 5 Setting Customized Value

    fn = 5: Function 5 Setting Customized Value GS (E pL pH fn [a1 n1L n1H]...[ak nkL nkH] fn = 5 [Code] <1d>H<28>H<45>H pL pH fn [a1 n1L n1H]...[ak nkL nkH] [Range] 4≤(pL + pH x256) 65535 fn = 5 a = 5, 6, 201, 202 1≤(nL + nH x256) ≤65535 [Default]...
  • Page 91 • a = 6: Sets printing speed to the value specified by (nL + nH x256). (nL + nH x256) Printing Speed Printing speed level 1 (84%) Printing speed level 2 (86%) Printing speed level 3 (88%) Printing speed level 4 (90%) Printing speed level 5 (92%) Printing speed level 6 (94%) Printing speed level 7 (96%)
  • Page 92: Fn = 6: Function 6 Sending The Set Customized Value

    fn = 6: Function 6 Sending the Set Customized Value GS (E pL pH fn a fn = 6 [Code] <1d>H<28>H<45>H pL pH fn a [Range] (pL + pH x256) = 2 : (pL = 2, pH = 0) fn = 6 a = 5, 6, 201, 202 [Outline] •...
  • Page 93 • a = 6: When printing speed is specified Setting Status Sending Data Stored Print Density 1st Byte 2nd Byte 3rd Byte 4th Byte 5th Byte Value Speed level 1 49 (“1”) — — — — Speed level 2 50 (“2”) —...
  • Page 94: Fn = 7: Function 7 Copying User-Defined Page

    fn = 7: Function 7 Copying User-defined Page GS (E pL pH fn a d1 d2 fn = 7 [Code] <1d>H<28>H<45>H pL pH fn a d1 d2 [Range] (pL + pH x256) = 4: (pL = 4, pH = 0) fn = 7 a=10, 12, 17 [Outline]...
  • Page 95: Fn = 8: Function 8 Defining Data By The Column Format To Character Code Page Of Work Area

    fn = 8: Function 8 Defining Data by the Column Format to Character Code Page of Work Area GS (E pL pH fn y c1 c2[x d1...d(y × x)]k fn = 8 [Code] <1d>H<28>H<45>H pL pH fn y c1 c2 [x d1..d(y x)]k [Range] 5≤(pL + pH x256)≤65535 fn = 8...
  • Page 96: Fn = 9: Function 9 Defining Data In The Raster Format To The Character Code Page Of Work Area

    fn = 9: Function 9 Defining Data in the Raster Format to the Character Code Page of Work Area GS (E pL pH fn fn = 9 x c1 c2[y d1...d(y × x)]k [Code] <1d>H<28>H<45>H pL pH fn x c1 c2 [y d1...d(y x)]k [Range] 5≤(pL + pH x256)≤65535 fn = 9...
  • Page 97: Fn = 10: Function 10 Erasing Data Of Character Code Page Data In Work Area

    fn = 10: Function 10 Erasing Data of Character Code Page Data in Work Area GS (E pL pH fn c1 c2 fn = 10 [Code] <1d>H<28>H<45>H pL pH fn c1 c2 [Range] (pL + pH x256) = 3 fn = 10 128≤c1≤c2≤255 [Outline] Erases (set to space) data in units of character on the character code page in work...
  • Page 98: Fn = 11: Function 11 Setting Communication Conditions Of Serial Interface

    fn = 11: Function 11 Setting Communication Conditions of Serial Interface GS (E pL pH fn a d1...cdk fn = 11 [Code] <1d>H<28>H<45>H pL pH fn a d1..dk [Range] 3≤(pL + pH x256)≤65535 (0≤pL≤255, 0≤pH≤255) fn = 11 1≤a≤4 (Not changed in other than specified range) 48≤d≤57 (Not changed in other than specified range) 1≤k≤6 [Outline]...
  • Page 99: Fn = 12: Function 12 Sending The Set Communication Conditions Of Serial Interface

    fn = 12: Function 12 Sending the Set Communication Conditions of Serial Interface GS (E pL pH fn a fn = 12 [Code] <1d>H<28>H<45>H pL pH fn a [Range] (pL + pH x256) = 2 (pL = 2, pH = 0) fn = 12 1≤a≤4 (Does not send in other than specified range) [Outline]...
  • Page 100: Fn = 255: Function

    fn = 255: Function 255 Setting All Contents Set by Printer Function Setting Mode to the State at Shipment GS (E pL pH fn a fn = 255 [Code] <1d>H<28>H<45>H pL pH fn a [Range] (pL + pH x256) = 2 fn = 255 a = 3, 5, 7, 11, 255 [Outline]...
  • Page 101: Gs (K Pl Ph Fn M (Customizing The Printer)

    GS (K pL pH fn m [Function] Selecting print control method [Outline] Executes the setting related to the print control specified by the value of “fn”. Function No. (fn) Function Sets printing density. Sets printing speed. - 99 -...
  • Page 102: Fn = 49: Function 49 Setting Printing Density

    fn = 49: Function 49 Setting Printing Density GS (K pL pH fn m fn = 49 [Code] <1d>H<28>H<4B>H pL pH fn m [Range] (pL + pH x256) = 2 : (pL = 2, pH = 0) fn = 49 0≤m≤8, 250≤m≤255 [Default] m = 0 (Customized value setting value)
  • Page 103: Fn = 50: Function 50 Setting Printing Speed

    fn = 50: Function 50 Setting Printing Speed GS (K pL pH fn m fn = 50 [Code] <1d>H<28>H<4B>H pL pH fn m [Range] (pL + pH x256) = 2 : (pL = 2, pH = 0) fn = 50 0≤m≤9, 48≤m≤57 [Default] m = 0 (Customized value setting)
  • Page 104 GS (M pL pH fn m [Function] Customizing the printer [Outline] Executes processing related to escape/recovery of the value set in the work area or the data defined by various kinds of command. Function 1, 49 Copies the set value stored in work area to the storage area. 2, 50 Copies the set value stored in storage area to the work area.
  • Page 105: Fn = 1, 49: Function 1 : Copies The Set Value Stored In Work Area To The Storage Area

    fn = 1, 49: Function 1 : Copies the set value stored in work area to the storage area GS (M pL pH fn m fn = 1, 49 [Code] <1d>H<28>H<4D>H pL pH fn m [Range] (pL + pH x256) = 2 : (pL = 2, pH = 0) fn = 1, 49 m = 1, 49 [Outline]...
  • Page 106: Fn = 3, 51: Function 3: Specifies The Auto Loading Function Of The Set Value At Initialization To Be Valid Or Invalid

    fn = 3, 51: Function 3: Specifies the auto loading function of the set value at initialization to be valid or invalid GS (M pL pH fn m fn = 3, 51 [Code] <1d>H<28>H<4D>H pL pH fn m [Range] (pL + pH x256) = 2 : (pL = 2, pH = 0) fn = 3, 51 m = 0, 1, 48, 49 [Outline]...
  • Page 107: Other Commands

    2.2.14 Other Commands DLE ENQ n [Function] Real-time request to printer [Code] <10>H<05>H<n> [Range] 1≤n≤2 [Outline] The printer responds in real-time to the request that the host specifies with number “n”. Function At the setting of execution of GS ^ by the FEED switch, the same processing as that pressing the FEED switch once is carried out.
  • Page 108: Dle Dc4 Fn D1

    DLE DC4 fn d1...d7 (Specification of fn = 8) [Function] Buffer clear [Code] <10>H<14>H<fn><d1> ...<d7> [Range] fn = 8, d1 = 1, d2 = 3, d3 = 20, d4 = 1, d5 = 6, d6 = 2, d7 = 8 [Outline] •...
  • Page 109: Esc = N (Data Input Control)

    ESC = n [Function] Data input control [Code] <1B>H<3D>H<n> [Range] 0≤n≤255 [Outline] • Selecting equipment for which data input from the host is valid. • Each bit of “n” indicates as follows. • When the printer has not been selected, this printer abandons all the received data until it is selected by this command.
  • Page 110: Esc @ (Initializing The Printer)

    ESC @ [Function] Initializing the printer [Code] <1B>H<40>H [Outline] Clears data stored in the print buffer and brings various settings to the initial state (Default state). [Caution] • The settings of DIP switches are not read again. • Data inside the internal input buffer is not cleared. •...
  • Page 111: Esc L (Selecting

    ESC L [Function] Selecting PAGE MODE [Code] <1B>H<4C>H [Outline] Switches from STANDARD MODE to PAGE MODE. [Caution] • This command is only effective if it entered at the beginning of a line. • This command is not effective if it is entered when in PAGE MODE. •...
  • Page 112: Esc S (Selecting Standard Mode)

    ESC S [Function] Selecting STANDARD MODE [Code] <1B>H<53>H [Outline] Switches from PAGE MODE to STANDARD MODE. [Caution] • This command is only effective if it is entered when in PAGE MODE. • Any data mapped in PAGE MODE is erased. •...
  • Page 113: Gs ( A Pl Ph N M (Execution Of Test Printing)

    GS ( A pL pH n m [Function] Execution of test printing [Code] <1D>H<28>H<41>H<pL><pH><n><m> [Range] (pL + (pH x256)) = 2 (pL = 2, pH = 0) 0≤n≤3, 48≤n≤51 1≤m≤3, 49≤m≤51 [Outline] Specified test printing will be executed. • pL, pH will specify the number of subsequent parameters by (pL + (pH x256))bytes. •...
  • Page 114: Gs I N (Sending The Printer Id)

    Fixed Sends the specified printer information. Kind of Printer Information Firmware version Differs by firmware version. Manufacturer name CITIZEN Model name BD2-2220 Kinds of multi-language fonts Japanese Kanji specifications: KANJI Refer to Table [DSW]. DSW status * Only serial I/F...
  • Page 115 DSW If n = 112 is specified: Meaning Hex. Decimal DIP switch [DSW5] is OFF. DIP switch [DSW5] is ON. DIP switch [DSW6] is OFF. DIP switch [DSW6] is ON. DIP switch [DSW7] is OFF. DIP switch [DSW7] is OFF. DIP switch [DSW8] is OFF.
  • Page 116: Gs P X Y (Specifying The Basic Calculation Pitch)

    GS P x y [Function] Specifying the basic calculation pitch [Code] <1D>H<50>H<x><y> [Range] 0≤x≤255 0≤y≤255 [Outline] • This command sets the horizontal basic calculation pitch to approx. 25.4/x mm (1/x inches), and the vertical basic calculation pitch to approx. 25.4/y mm (1/y inches). •...
  • Page 117: Character Code Table

    3. CHARACTER CODE TABLE 3.1 Code Page 3.1.1 Codepage 00H to 7FH & PC437 (USA, Europe Standard) Ç É á ░ ╨ ü æ í ▒ ╤ é Æ ó ▓ ╥ â ô ú ╙ ä ö ñ ╘ ⌠...
  • Page 118: Codepage 00H To 7Fh & Katakana

    3.1.2 Codepage 00H to 7FH & Katakana ▁ ═ ▂ º ╞ ▃ ╪ ▅ ╡ ▆ ◢ ▇ ◣ █ ◥ ▉ ▕ ◤ ▏ ♠ ▎ ♥ ▍ ♦ ▌ ♣ ▋ ╭ ▋ ╮ ▊ ╰ ╱ ▒...
  • Page 119: Codepage 00H To 7Fh & Pc850 (Multilingual)

    3.1.3 Codepage 00H to 7FH & PC850 (Multilingual) Ç É á ░ ð Ó ü æ í ▒ Ð é Æ ó ▓ Ê Ô â ô ú Ë Ò ¾ ä ö ñ È õ € à ò Ñ Á...
  • Page 120: Codepage 00H To 7Fh & Pc860 (Portuguese)

    3.1.4 Codepage 00H to 7FH & PC860 (Portuguese) Ç É á ░ ╨ ü À í ▒ ╤ é È ó ▓ ╥ â ô ú ╙ ã õ ñ ╘ ⌠ à ò Ñ ╡ ╒ ⌡ Á Ú ╢...
  • Page 121: Codepage 00H To 7Fh & Pc863 (Canadian-French)

    3.1.5 Codepage 00H to 7FH & PC863 (Canadian-French) Ç É ░ ╨ ü È ▒ ╤ é Ê ô ▓ ╥ â ô ú ╙ Â Ë ╘ ⌠ à Ï ╡ ╒ ⌡ û ³ ╢ ╞ ╓ ≈ ç...
  • Page 122: Codepage 00H To 7Fh & Pc865 (Nordic)

    3.1.6 Codepage 00H to 7FH & PC865 (Nordic) Ç É á ░ ╨ ü æ í ▒ ╤ é Æ ó ▓ ╥ â ô ú ╙ ä ö ñ ╘ ⌠ à ò Ñ ╡ ╒ ⌡ å û ╢...
  • Page 123: Codepage 00H To 7Fh & Pc852 (Eastern Europe)

    3.1.7 Codepage 00H to 7FH & PC852 (Eastern Europe) Ç É á ░ đ Ó ü Ĺ í ▒ Đ é Í ó ▓ Ď Ó â Ú ú Ë Ń ˇ ä Ö Ą ď Ń ˘ ů Ľ ą...
  • Page 124: Codepage 00H To 7Fh & Pc866 (Russian)

    3.1.8 Codepage 00H to 7FH & PC866 (Russian) ░ ╨ Ë ▒ ╤ ë ▓ ╥ Є ╙ є ╘ Ї ╡ ╒ ї ╢ ╞ ╓ ў ╖ ╟ ╫ ╕ ╚ ╪ ╣ ╔ ⦆ ║ ╩ ∙ ╗...
  • Page 125: Codepage 00H To 7Fh & Pc857 (Turkish)

    3.1.9 Codepage 00H to 7FH & PC857 (Turkish) Ç É á ░ ó ü æ í ▒ é Æ ó ▓ Ê ô â ô ú Ë ò ¾ à ö ñ È õ ä ò Ñ Á Õ å û...
  • Page 126: Codepage 00H To 7Fh & Pc864 (Arabic)

    3.1.10 Codepage 00H to 7FH & PC864 (Arabic) - 124 -...
  • Page 127: Codepage 00H To 7Fh & Wpc1252

    3.1.11 Codepage 00H to 7FH & WPC1252 € À Ð à ð ¡ Á Ñ á ñ ¸ ¢ ² Â Ò â ò ƒ £ ³ Ã Ó ã ó ¤ Ä Ô ä Ô ‧ ¥ µ Å Õ...
  • Page 128: Codepage 00H To 7Fh & Thai Code 18

    3.1.12 Codepage 00H to 7FH & Thai Code 18 - 126 -...
  • Page 129: International Character Code Table

    3.2 International Character Code Table Country 5C 5D 7C 7D U.S.A # $ @ ╲ France # $ à ° ç § é ù è ¨ Germany # $ § Ä Ö Ü ä ö ö β U.K. £ $ @...
  • Page 130: Appendix

    4. APPENDIX 4.1 Explanation on PAGE MODE 4.1.1 Overview The printer has two print modes: STANDARD and PAGE. In STANDARD MODE, the printer prints or feeds paper each time it receives a print or paper feed command. In PAGE MODE, when the printer receives print commands and/or form feed commands, it simply forwards them to the specified print area of memory.
  • Page 131: Mapping Of Print Data In The Print Area

    4.1.3 Mapping of Print Data in the Print Area Print data is mapped in the print area as follows: (1) The print area is set by ESC W. When the printer has finished all of the print and paper feed actions specified before receiving an ESC W, the ESC W sets the right end (as viewed facing the printer) as the start point (x0, y0) of the print area.
  • Page 132: Example Of Using

    4.1.4 Example of Using PAGE MODE The following explains specific uses of PAGE MODE. When in PAGE MODE, the commands are typically sent from the host to the printer in the following sequence: (1) An ESC L puts the printer in PAGE MODE. (2) An ESC W specifies the print area.
  • Page 133 In Figure 4-3, a line feed occurs between “lesson” and “Test 1” because the space “ “ next to “lesson” does not fit in the horizontal range of the 200 x 400-pitch print area. The line feed width conforms to the value specified by a command such as ESC 3.
  • Page 134 Before an FF is sent (170th line), the following program code can be added to remove part of the data. 180 PRINT #1, CHR$(&H1B);"W";CHR$(72);CHR$(0);CHR$(120);CHR$(0); 190 PRINT #1, CHR$(36);CHR$(0);CHR$(48)CHR$(0); 200 PRINT #1, CHR$(&H18); As a result of the additional program code, a print-out is executed as shown in Figure 4-5 “Print Result of Adding a Program of Example 3 to Example 2”, where the string “GHI”...
  • Page 135: Bidirectional Parallel Interface

    4.2 Bidirectional Parallel Interface Overview The interface of the printer is a Level-1 compatible device according to IEEE-P1284. It supports the communication modes described in 4.2.1 below. 4.2.1 Parallel Interface Communication Mode The parallel interface of the printer provides three communication modes as outlined below. When the printer is turned on or reset, it defaults to Compatibility mode.
  • Page 136: Negotiation

    4.2.3 Negotiation Overview Usually, the printer is started in Compatibility mode, which corresponds to the Centronics interface phase. When the host intends to switch to the Nibble or Byte mode, it sends a request and negotiates with the printer. A general flow of negotiations is given below. (1) The host sets the IEEE 1284 Active signal to High.
  • Page 137 Precautions (1) The Negotiation phase is triggered when the IEEE 1284 Active signal sent by the host becomes High. (2) In Compatibility mode, the time when the negotiation process begins is, as a general rule, after the host sets nStrobe to High and then the printer outputs an nAck pulse. Once the nStrobe signal is set to High, however, the printer immediately moves into the Negotiation phase when the high state of IEEE 1284 Active is detected, even if the nAck pulse has yet to be output or is being output.
  • Page 138: Data Communication From Printer To Host

    Data Communication from Printer to Host Nibble Mode In this mode, data is transferred between the printer and the host through the procedure described below. The steps beginning from (1) are applicable when the Negotiation phase has switched to the Host Busy Data Available phase.
  • Page 139 Byte Mode In this mode, data is transferred between the printer and the host through the procedure described below. The steps beginning from (1) are applicable when the Negotiation phase has switched to the Host Busy Data Available phase. If the Negotiation phase has switched to the Host Busy Data Not Available phase, the procedure starts at step (9).
  • Page 140 The device ID is a character string that provides the ID, the type, and other information regarding the printer connected to the interface. When the printer receives a request for a device ID from the host, it replies with the following device ID: <00>H<2E>H MFG : CITIZEN; CMD : ESC/POS; MDL : BD2-2220; CLS : PRINTER;...
  • Page 141: Identification Of Send Status

    (2) Immediate termination: 1) If the interface is deactivated (IEEE 1284 Active: Low) without Event 22 having taken place, the printer immediately performs Termination. In this termination, the data is not guaranteed, and the printer switches the data bus from output to input within 1 µsec. In the Reverse Idle phase, the printer can notify the host that it has data to transfer to the host.
  • Page 142: Memory Switch

    4.4 Memory Switch Memory switch has a function to store various settings selected by the user alternatively in nonvolatile memory. Memory switch setting is retained unless the memory switch is changed. Memory switch setting can be changed by the manual setting in memory switch change mode or by a command.
  • Page 143: Details Of Memory Switches

    4.4.2 Details of Memory Switches Functions of memory switches, operations at ON (1) setting, and operation at OFF (0) setting are described below. Memory switches without function setting are not explained but default must not be changed. When setting memory switches manually, ON setting allows POWER LED to light and OFF setting allows it to go off.
  • Page 144 •MSW 1-3: BUSY Condition [Outline] Selects the condition for the printer to become BUSY state. Auto status sending function is also activated. OFF (0) ON (1) Busy Condition Full/Err Full Operation at ON (1): When receive buffer is full, the printer is in the BUSY state. Auto status sending (ASB) function is valid.
  • Page 145 •MSW 1-5: CR Code Processing [Outline] Selects whether the printer operates in the same manner as LF (<0A>H) when it receives the CR (<0D>H) code. OFF (0) ON (1) CR mode Ignored Operation at ON (1): Operates in the same manner as LF when receiving CR code. Prints data in the print buffer and performs line feed in accordance with the amount of preset line feed.
  • Page 146: Msw2

    (2) MSW2 • MSW 2-1: Reserved (ON(1)Fixed) • MSW 2-2: Reserved (ON(1)Fixed) • MSW 2-3: Valid/Invalid of buffered printing [Outline] Selects Valid/Invalid of buffered printing. OFF (0) ON (1) Spool print Invalid Valid Operation at ON (1): Enables buffered printing. Stores a certain amount of print buffer in the internal RAM and prints it at a time.
  • Page 147: Msw3

    • MSW 2-5: Processing after Cover Close and PE Clear [Outline] Selects the processing to be carried out when resuming printing after the printer cover is opened or paper empty (PE) is detected during printing. OFF (0) ON (1) Resume aft PE Print next line Print top Operation at ON (1):...
  • Page 148 • MSW 3-3: Reset signal [Outline] Selects whether to reset the printer by the signal of parallel I/F 31 Pin. OFF (0) ON (1) Reset signal Valid Invalid Operation at ON (1): Used as Reset signal. Operation at OFF (0): Not used as Reset signal. [Default] OFF(0) [Valid] •...

This manual is also suitable for:

Ct-s280

Table of Contents