Page 2
Programmer Manual 1. Control Command List Control Code Function Horizontal tab Print and line feed Print and carriage return DLE EOT n Real-time status transmission DLE ENQ n Real-time response to computer ESC SP n Set right-side character spacing ESC ! n Select print modes ESC % n Select/Cancel user-defined character set...
ESC a n Select justification mode ESC c 5 n Enable/Disable panel button ESC d n Print and feed n lines ESC e n Print and reverse feed n lines ESC p m t1 t2 Generate pulse for drawer ESC r n Select print color (#) ESC t n Select character code table...
[ Default ] Gives the default values, if any, for the command parameters. [ Reference ] Lists related commands. [ Example ] Gives examples of how to use the command. ASCII indicates the American Standard Code for Information Interchange Hex indicates the hexadecimal equivalents. Decimal indicates the decimal equivalents.
Page 5
(9) MSB Most Significant Bit (10) LSB Least Significant Bit 2. 3 Control Commands 1.HT [Name] Horizontal Tab [Format] ASCII Decimal [Description] Moves the print position to the next horizontal tab position. [Details] • This command is ignored unless the next horizontal tab position has been set. •...
Page 6
[Range] 1 ≤ n ≤ 4 [Description] Transmits the selected printer status specified by n in real-time, according to the following parameters: n = 1: Transmit printer status n = 2: Transmit off-line status n = 3: Transmit error status n = 4: Transmit paper roll sensor status [Details] •...
Page 7
n = 2: Off-line Status Decimal Function Fixed to Off. Fixed to On. Top cover close Top cover open Paper is not being fed by using the FEED button. Paper is beging fed by the FEED button. Fixed to On. No shortage of paper Shortage of paper No error...
Page 8
Paper not present. Fixed to Off. 5.DLE ENQ n [Name] Send real-time request to printer [Format] ASCII Decimal [Range] n = 0,n = 2 [Description] Responds to a request from the host computer. n = 0: Recover from an error; n = 2: Recover from an error after clearing the receive and print buffers;...
Page 9
[Format] ASCII Decimal [Range] 0 ≤ n ≤ 255 [Description] Sets the character spacing for the right side of the character to [n × 0.159mm {1/160inch}] [Details] • The right-side character spacing for double-width mode is twice the normal value. When characters are enlarged, the right-side character spacing is n times normal value.
Page 10
[Range] 0 ≤ n ≤255 [Description] Selects or cancels the user-defined character set. • When the LSB of n is 0, the user-defined character set is canceled, and the built-in character set is automatically selected. • When the LSB of n is 1, the user-defined character set is selected. [Details] •...
Page 12
[Format] ASCII Decimal [Range] n = 0,1,48,49 [Description] Turns underline mode on or off, based on the following values of n: Function 0, 48 Turn off underline mode 1, 49 Turn on underline mode [Details] • The printer can underline all characters (including right-side character spacing), but cannot underline the space set by HT.
Page 13
15.ESC [Name] Cancel user-defined characters [Format] ASCII Decimal [Range] 32 ≤ n ≤ [Description] Cancels user-defined characters. [Details] • This command cancels the pattern defined for the character code specified by n. After the user-defined characters are canceled, the corresponding pattern of the internal character is printed.
Page 14
• Transmit [n] k in ascending order and place a NUL code 0 at the end. When [n] k is less than or equal to the preceding value [n] k-1, tab setting is finished and the following data is processed as normal data. •...
Page 15
20.ESC [Name] Print and feed paper [Format] ASCII Decimal [Range] 0≤ n≤ [Description] Print the data in the print buffer and feeds the paper [n x 0.176mm (1/44inches)]. [Details] • After printing is completed, this command sets the print starting position to the beginning of a line.
Page 16
[Name] Select an international character set [Format] ASCII Decimal [Range] 0 ≤ n≤ [Description] Select an international character set by setting n to the following values: Character Set U.S.A France Germany U.K. Denmark Sweden Italy Spain I Japan Norway Denmark II Spain II Latin America Korea...
Page 17
[Description] Aligns all data in one line to the specified position n selects the justification as follows: Justification 0,48 Left justification 1, 49 Center 2, 50 Right justification [Details] • The command is enabled only when processed at the beginning of a line. •...
Page 18
[Reference] ESC 28.ESC [Name] Print and reverse feed n lines [Format] ASCII Decimal [Range] 0≤ n≤2 [Description] Prints the data in the print buffer and feeds n lines. [Details] • If n exceeds the specified range, for example, over 8.467mm(48/100inches), printer prints data but do not reverse feed paper.
Page 19
31.ESC [Name] Select character code table [Format] ASCII Decimal [Range] 0 ≤ n ≤ 5, 16 ≤ n≤ 19 [Description] Selects a page n from the character code table: Page PC437 [U.S.A. & Europe Standard] Katakana PC850: Multilingual PC860: Portuguese PC863 [Canadian &...
Page 20
33.GS ( A pL pH n m [Name] Hexadecimal Dumping mode [Format] ASCII Decimal [Range] (pL+pH x256) = 2 (pL=2,pH=0) n=0,48 m=1,49 34.①GS V m ②GS V m n [Name] Select cut mode and cut paper [Format] ①ASCII Decimal ②ASCII Decimal [Range] ①...
Page 21
follows: On/Off Decimal Status for ASB Drawer kick-out connector pin 3 status disabled. Drawer kick-out connector pin 3 status enabled. Undefined. Error status disabled. Error status enabled. Paper roll sensor status disabled. Paper roll sensor status enabled. 4-7 - Undefined. [Default] n = 0 36.GS...
Page 22
Paper roll near-end sensor: paper near end. Not used. Fixed to Off. 5,6 Undefined. Not used. Fixed to Off. Drawer kick-out status (n = 2, 50): Decimal Status Drawer kick-out connector pin 3 is LOW. Drawer kick-out connector pin 3 is HIGH. Undefined.
• During the online recovery wait time, if the paper sensor finds out the paper near-end status, printer returns to the status of waiting paper load. [Default] t1 = 0, t2 = 0 [Reference] DLE EOT,DLE ENQ,GS a 38.FS [Name] Set print mode(s) for Kanji characters [Format] ASCII...
Page 24
Decimal [Range] 0≤ n ≤1 [Description] Turns underline mode on/off for Kanji characters, based on the following values of n. Function 0, 48 Turns off underline mode for Kanji characters 1, 49 Turns on underline mode for Kanji characters (1-dot thick) 2, 50 Turns on underline mode for Kanji characters (2-dot thick) [Details]...
Page 25
[Reference] FS ? ,FS C 43.FS ? c1 c2 [Name] Cancel user-defined Kanji characters [Format] ASCII Decimal [Range] <Available in Simplified Kanji supporting models> c1 = FEH A1H ≤c2 ≤FEH [Description] Cancels user-defined Kanji characters [Details] • This command cancels the user-defined Kanji characters specified by c1 and c2. Spaces are the substitute.
Page 26
46.GS ( F PL PH a m nL nH [Name] Set the offset of black mark position [Format] ASCII pL pH a nL nH 46 pL pH a nL nH Decimal 70 pL pH a nL nH [[Details] • The parameters set by this command won’t be lost even without power supply. •...
Page 27
Paper cutting/tearing position offset = (L0 + length of two neighbor black mark - L)/0.176 dots Note: When setting the paper cutting/tearing position offset, parameter a of GS ( F is 2. (a = 2) 3. When paper cutting/tearing position offset is not 0 or the length (Q) of print starting position is larger than the printer inherency mechanism value (Q0), offset set by GS (...
Page 28
• Cutting/tearing paper position offset calculation: For black mark position is the same as the cutting/tearing paper position, that is L=0, then Cutting/tearing paper position offset = (43-0) / 0.176 = 244 dots • Set the cutting/tearing paper position offset by the following command: GS (...
Page 29
than L0 (43mm), then Cutting/tearing paper position offset = (43-12)/0.176=176 dots • Set the cutting/tearing paper position offset by the following command: GS ( F <4><0><2><0><176><0> • Print starting position offset calculation: (18-18)/0.176+176=176 dots • Set the print starting position offset by the following command: GS (...
Page 30
cutting/tearing paper position offset to a=2 and the print starting position offset to a=1. 3. Only when print starting position is set, GS FF can be use to feed paper to the print starting position, otherwise, situations of unfaithful location or feeding a blank paper may happen.
Page 31
[Details] • The printer receives this command and feeds paper [receipt length – printed length]. 51.GS <(*) [Name] Reset print head and feed black-mark paper to the start position [Format] ASCII < Decimal [Details] • Moves print head to standby position and feeds black-mark paper to the print starting position.
Need help?
Do you have a question about the D45 and is the answer not in the manual?
Questions and answers