COMMANDS MANUAL TG02H CUSTOM S.p.A. Via Berettine 2/B 43010 Fontevivo (PARMA) - Italy Tel. : +39 0521-680111 Fax : +39 0521-610701 http: www.custom.biz Customer Service Department: Email : [email protected] © 2014 CUSTOM S.p.A. – Italy. All rights reserved. Total or partial reproduction of this manual in whatever form, whether by printed or electronic means, is forbidden. While guaranteeing that the information contained in it has been carefully checked, CUSTOM S.p.A. and other entities utilized in the realization of this manual bear no responsibility for how the manual is used. Information regarding any errors found in it or suggestions on how it could be improved are appreciated. Since products are subject to continuous check and improvement, CUSTOM S.p.A. reserves the right to make changes in information contained in this manual without prior notification. The pre-installed multimedia contents are protected from Copyright CUSTOM S.p.A. Other company and product names mentioned herein may be trademarks of their respective companies. Mention of third-party products is for informational purposes only and constitutes neither an endorsement nor a recommendation. CUSTOM S.p.A. assumes no responsibility with regard to the performance or use of these products. THE IMAGES USED IN THIS MANUAL ARE USED AS AN ILLUSTRATIVE EXAMPLES. THEY COULDN’T GENERAL SAFETY INFORMATION Your attention is drawn to the following actions that could compromise the characteristics of the product: • Read and retain the instructions which follow. • Follow all indications and instructions given on the device. • Make sure that the surface on which the device rests is stable. If it is not, the device could fall, seriously damaging it. • Make sure that the device rests on a hard (non-padded) surface and that there is sufficient ventilation. • When positioning the device, make sure cables do not get damaged. • Use the type of electrical power supply indicated on the device label. If uncertain, contact your dealer. • Make sure the electrical system that supplies power to the device is equipped with a ground wire and is protected by a differential switch. • Do not block the ventilation openings. • Do not insert objects inside the device as this could cause short-circuiting or damage components that could jeopardize printer functioning. • Do not carry out repairs on the device yourself, except for the normal maintenance operations given in the user manual. • Make sure that there is an easily-accessible outlet with a capacity of no less than 10A closely to where the device is to be installed. • Periodically perform scheduled maintenance on the device to avoid dirt build-up that could compromise the correct, safe operation of the unit. • Before any type of work is done on the machine, disconnect the power supply. • Do not touch the head heating line with bare hands or metal objects. Do not perform any operation inside the printer immediately after printing because the head and motor tend to become very hot. REPRODUCE THE DESCRIBED MODEL FAITHFULLY. UNLESS OTHERWISE SPECIFIED, THE INFORMATION GIVEN IN THIS MANUAL ARE REFERRED TO ALL MODELS IN PRODUCTION AT THE ISSUE DATE OF THIS DOCUMENT. GENERAL INSTRUCTIONS CUSTOM S.p.A. declines all responsibility for accidents or damage to persons or property occurring as a result of tampering, structural or functional modifications, unsuitable or incorrect installations, environments not in keeping with the equipment’s protection degree or with the required temperature and humidity conditions, failure to carry out maintenance and periodical inspections and poor repair work. THE CE MARK AFFIXED TO THE PRODUCT CERTIFY THAT THE PRODUCT SATISFIES THE BASIC SAFETY REQUIREMENTS. The device is in conformity with the essential Electromagnetic Compatibility and Electric Safety requirements laid down in Directives 2006/95/CE and 2004/108/CE inasmuch as it was designed in conformity with the provisions laid down in the following Standards: • EN 55022 Class B (Limits and methods of measurements of radio disturbance characteristics of Information Technology Equipment) • EN 55024 (Information Technology Equipment – Immunity characteristics – Limits and methods of measurement) • EN 60950-1 (Safety of information equipment including electrical business equipment) GUIDELINES FOR THE DISPOSAL OF THE PRODUCT The crossed-out rubbish bin logo means that used electrical and electronic products shall NOT be mixed with unsorted municipal waste. For more detailed information about recycling of this product, refer to the instructions of your country for the disposal of these products. • Do not dispose of this equipment as miscellaneous solid municipal waste, but arrange to have it collected separately. • The re-use or correct recycling of the electronic and electrical equipment (EEE) is important in order to protect the environment and the wellbeing of humans. • In accordance with European Directive WEEE 2002/96/EC, special collection points are available to which to deliver waste electrical and electronic equipment and the equipment can also be handed over to a distributor at the moment of purchasing a new equivalent type. • The public administration and producers of electrical and electronic equipment are involved in facilitating the processes of the re-use and recovery of waste electrical and electronic equipment through the organisation of collection activities and the use of appropriate planning arrangements. • Unauthorised disposal of waste electrical and electronic equipment is punishable by law with the appropriate penalties. The format used for this manual improves use of natural resources reducing the quantity of necessary paper to print this copy. INTRODUCTION ESC/POS™ EMULATION INTRODUCTION Each command reported in this manual is described as shown in the following picture. In the first heading field is reported the hexadecimal command value and the ASCII command value. In the second heading field reported the command function. In the third heading field are listed the devices on which it is possible to use the command (for example, device AAAA). 0x0D <CR> Print and carriage return Valid for Command value Command function AAAA Devices that use the command BBBB CCCC [Format] ASCII Hex Decimal CR 0D 13 [Range] [Description] When autofeed is “CR enabled”, this command functions in the same way as 0x0A, otherwise it is disregarded. [Notes] This command sets the print position to the beginning of the line. AAAA BBBB CCCC Information valid for devices AAAA, BBBB, CCC Information valid for devices AAAA, BBBB • This command sets the print position to the beginning of the line. Information valid for device • This command is immediately executed even when the data buffer CCCC is full. • This status is transmitted whenever data sequence is received. [Default] [Reference] [Example] 0x0A Information valid only for the devices marked in bold Information valid for all the devices listed in the third heading field Introduction │ 5 The fields shown in the scheme of the previous figure have the following meaning: [Format] ASCII, hexadecimal and decimal command value. [Range] Limits of the values the command and its variables can take [Description] Description of command function [Notes] Additional information about command use and settings . [Default] Default value of the command and its variables. [Reference] Pertaining commands related to described command. [Example] Example of using the command Listed below are the meanings of some of symbols that may be found in the command description: 0x indicates the representation of the command hexadecimal value (for example 0x40 means HEX 40). n, m, t, x, y are optional parameters that can have different values. 6 │ Introduction ESC/POS™ emulation COMMANDS LISTED IN ALPHANUMERIC ORDER 0x08 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <BS> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 0x09 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <HT> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 0x0A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .<LF> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 0x0D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <CR> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 0x10 0x04 . . . . . . . . . . . . . . . . . . . . . . . . . <DLE EOT> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 0x18 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <CAN> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 0x1B 0x20 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC SP> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 0x1B 0x21 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC !> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 0x1B 0x24 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC $> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 0x1B 0x25 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC %> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 0x1B 0x26 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC &> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 0x1B 0x28 0x76 . . . . . . . . . . . . . . . . . . . . . <ESC (> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 0x1B 0x2A . . . . . . . . . . . . . . . . . . . . . . . . . <ESC *> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 0x1B 0x2D . . . . . . . . . . . . . . . . . . . . . . . . . <ESC -> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 0x1B 0x30 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC 0> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 0x1B 0x32 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC 2> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 0x1B 0x33 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC 3> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 0x1B 0x34 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC 4> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 0x1B 0x3D . . . . . . . . . . . . . . . . . . . . . . . . . <ESC => . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 0x1B 0x3F . . . . . . . . . . . . . . . . . . . . . . . . . <ESC ?> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 0x1B 0x40 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC @> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 0x1B 0x44 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC D> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 0x1B 0x45 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC E> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 0x1B 0x47 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC G> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 0x1B 0x4A . . . . . . . . . . . . . . . . . . . . . . . . . <ESC J> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 0x1B 0x4D . . . . . . . . . . . . . . . . . . . . . . . . . <ESC M> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 8 │ ESC/POS™ emulation 0x1B 0x52 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC R> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 0x1B 0x56 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC V> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 0x1B 0x57 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC W> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 0x1B 0x5C . . . . . . . . . . . . . . . . . . . . . . . . . <ESC \> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 0x1B 0x61 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC a> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 0x1B 0x63 0x35 . . . . . . . . . . . . . . . . . . . . . <ESC c> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 0x1B 0x64 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC d> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 0x1B 0x74 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC t> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 0x1B 0x76 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC v> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 0x1B 0x78 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC x> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 0x1B 0x7B . . . . . . . . . . . . . . . . . . . . . . . . . <ESC {> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 0x1B 0xC1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 0x1B 0xFA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 0x1B 0xFD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 0x1B 0xFF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 0x1C 0x25 . . . . . . . . . . . . . . . . . . . . . . . . . <FS %> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 0x1D 0x21 . . . . . . . . . . . . . . . . . . . . . . . . . <GS !> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 0x1D 0x28 0x6B . . . . . . . . . . . . . . . . . . . . <GS (> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 0x1D 0x28 0x6B [fn 065] . . . . . . . . . . . . . . <GS (> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 0x1D 0x28 0x6B [fn 066] . . . . . . . . . . . . . . <GS (> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 0x1D 0x28 0x6B [fn 067] . . . . . . . . . . . . . . <GS (> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 0x1D 0x28 0x6B [fn 069] . . . . . . . . . . . . . . <GS (> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 0x1D 0x28 0x6B [fn 080] . . . . . . . . . . . . . . <GS (> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 0x1D 0x28 0x6B [fn 081] . . . . . . . . . . . . . . <GS (> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 0x1D 0x2A . . . . . . . . . . . . . . . . . . . . . . . . . <GS *> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 0x1D 0x2F . . . . . . . . . . . . . . . . . . . . . . . . . <GS /> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 ESC/POS™ emulation │ 9 0x1D 0x3A . . . . . . . . . . . . . . . . . . . . . . . . . <GS :> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 0x1D 0x42 . . . . . . . . . . . . . . . . . . . . . . . . . <GS B> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 0x1D 0x48 . . . . . . . . . . . . . . . . . . . . . . . . . <GS H> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 0x1D 0x49 . . . . . . . . . . . . . . . . . . . . . . . . . <GS I> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 0x1D 0x4C . . . . . . . . . . . . . . . . . . . . . . . . . <GS L> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 0x1D 0x50 . . . . . . . . . . . . . . . . . . . . . . . . . <GS P> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 0x1D 0x57 . . . . . . . . . . . . . . . . . . . . . . . . . <GS W> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 0x1D 0x59 . . . . . . . . . . . . . . . . . . . . . . . . . <GS Y> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 0x1D 0x5A . . . . . . . . . . . . . . . . . . . . . . . . . <GS Z> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 0x1D 0x5E . . . . . . . . . . . . . . . . . . . . . . . . . <GS ^> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 0x1D 0x66 . . . . . . . . . . . . . . . . . . . . . . . . . <GS f> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 0x1D 0x68 . . . . . . . . . . . . . . . . . . . . . . . . . <GS h> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 0x1D 0x6B . . . . . . . . . . . . . . . . . . . . . . . . . <GS k> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 0x1D 0x72 . . . . . . . . . . . . . . . . . . . . . . . . . <GS r> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 0x1D 0x77 . . . . . . . . . . . . . . . . . . . . . . . . . <GS w> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 0x1D 0x7C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 0x1D 0xE3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 0x1D 0xE5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 0x1D 0xF0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 10 │ ESC/POS™ emulation COMMANDS LISTED BY FUNCTION PRINT COMMANDS 0x0A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .<LF> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Print and line feed 0x0D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <CR> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Print and carriage return 0x1B 0x4A . . . . . . . . . . . . . . . . . . . . . . . . . <ESC J> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Print and paper feed 0x1B 0x64 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC d> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Print and feed paper n lines 0x1B 0xFF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Receive the graphic page from the communication port LINE SPACING COMMANDS 0x1B 0x30 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC 0> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Select 1/8-inch line spacing 0x1B 0x32 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC 2> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Select 1/6-inch line spacing 0x1B 0x33 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC 3> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Set line spacing using minimum units CHARACTER COMMANDS 0x18 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <CAN> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Cancel current line transmitted 0x1B 0x20 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC SP> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Set right-side character spacing 0x1B 0x21 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC !> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Set printing mode 0x1B 0x25 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC %> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Select/cancel user-defined character set 0x1B 0x26 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC &> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Defines user-defined characters 0x1B 0x2D . . . . . . . . . . . . . . . . . . . . . . . . . <ESC -> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Turn underline mode on/off ESC/POS™ emulation │ 11 0x1B 0x34 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC 4> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Set/reset italic mode 0x1B 0x3F . . . . . . . . . . . . . . . . . . . . . . . . . <ESC ?> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Cancel user-defined characters 0x1B 0x45 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC E> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Turn emphasized mode on/off 0x1B 0x47 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC G> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Turn double-strike mode on/off 0x1B 0x4D . . . . . . . . . . . . . . . . . . . . . . . . . <ESC M> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Select character font 0x1B 0x52 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC R> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Select international character set 0x1B 0x56 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC V> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Set 90° rotated print mode 0x1B 0x74 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC t> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Select characters code table 0x1B 0x7B . . . . . . . . . . . . . . . . . . . . . . . . . <ESC {> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Set / cancel upside-down character printing 0x1B 0xC1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Set/cancel cpi mode 0x1C 0x25 . . . . . . . . . . . . . . . . . . . . . . . . . <FS %> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Select the font type 0x1D 0x21 . . . . . . . . . . . . . . . . . . . . . . . . . <GS !> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Select character size 0x1D 0x42 . . . . . . . . . . . . . . . . . . . . . . . . . <GS B> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Turn white/black reverse printing mode on/off 0x1D 0x59 . . . . . . . . . . . . . . . . . . . . . . . . . <GS Y> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Sets height in printing. PRINT POSITION COMMAND 0x08 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <BS> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Back space 0x09 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . <HT> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Horizontal tab 0x1B 0x24 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC $> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Set absolute printing position 0x1B 0x28 0x76 . . . . . . . . . . . . . . . . . . . . . <ESC (> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Set relative vertical print position 12 │ ESC/POS™ emulation 0x1B 0x44 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC D> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Set horizontal tab position 0x1B 0x57 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC W> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Prints a graphic line 0x1B 0x5C . . . . . . . . . . . . . . . . . . . . . . . . . <ESC \> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Set relative printing position 0x1B 0x61 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC a> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Select justification 0x1D 0x4C . . . . . . . . . . . . . . . . . . . . . . . . . <GS L> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Set left margin 0x1D 0x57 . . . . . . . . . . . . . . . . . . . . . . . . . <GS W> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Set printing area width BIT IMAGE COMMANDS 0x1B 0x2A . . . . . . . . . . . . . . . . . . . . . . . . . <ESC *> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Select image print mode 0x1D 0x2A . . . . . . . . . . . . . . . . . . . . . . . . . <GS *> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 Define downloaded bit image 0x1D 0x2F . . . . . . . . . . . . . . . . . . . . . . . . . <GS /> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Print dowloaded bit image STATUS COMMAND 0x10 0x04 . . . . . . . . . . . . . . . . . . . . . . . . . <DLE EOT> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Real-time status transmission 0x1B 0x76 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC v> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Transmit paper sensor status 0x1D 0x72 . . . . . . . . . . . . . . . . . . . . . . . . . <GS r> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Transmit status 0x1D 0xE3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Reading of length (cm) of printed paper 0x1D 0xE5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Reading number of power up BARCODE COMMANDS 0x1D 0x28 0x6B . . . . . . . . . . . . . . . . . . . . <GS (> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Print two-dimensional barcode ESC/POS™ emulation │ 13 0x1D 0x28 0x6B [fn 065] . . . . . . . . . . . . . . <GS (> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 Specify encoding scheme of QRcode barcode 0x1D 0x28 0x6B [fn 066] . . . . . . . . . . . . . . <GS (> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Specify dot size of the module of the QRcode barcode 0x1D 0x28 0x6B [fn 067] . . . . . . . . . . . . . . <GS (> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Specify QRcode barcode size 0x1D 0x28 0x6B [fn 069] . . . . . . . . . . . . . . <GS (> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Specify the error correction level of the QRcode barcode 0x1D 0x28 0x6B [fn 080] . . . . . . . . . . . . . . <GS (> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 Store the QRcode barcode data in the barcode save area 0x1D 0x28 0x6B [fn 081] . . . . . . . . . . . . . . <GS (> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 Prints the QRcode barcode data 0x1D 0x48 . . . . . . . . . . . . . . . . . . . . . . . . . <GS H> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Select printing position of Human Readable Interpretation (HRI) characters 0x1D 0x66 . . . . . . . . . . . . . . . . . . . . . . . . . <GS f> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 Select font for HRI characters 0x1D 0x68 . . . . . . . . . . . . . . . . . . . . . . . . . <GS h> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Set barcode height 0x1D 0x6B . . . . . . . . . . . . . . . . . . . . . . . . . <GS k> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Print barcode 0x1D 0x77 . . . . . . . . . . . . . . . . . . . . . . . . . <GS w> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 Set barcode width MACRO FUNCTIONS 0x1D 0x3A . . . . . . . . . . . . . . . . . . . . . . . . . <GS :> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Set start/end of macro definition 0x1D 0x5E . . . . . . . . . . . . . . . . . . . . . . . . . <GS ^> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 Execute macro MISCELLANEOUS COMMAND 0x1B 0x3D . . . . . . . . . . . . . . . . . . . . . . . . . <ESC => . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 Select peripherals device 0x1B 0x40 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC @> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Initialize printer 0x1B 0x63 0x35 . . . . . . . . . . . . . . . . . . . . . <ESC c> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Enable/Disable front panel keys 0x1B 0x78 . . . . . . . . . . . . . . . . . . . . . . . . . <ESC x> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 Selects speed/current mode 14 │ ESC/POS™ emulation 0x1B 0xFA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 Print graphic (384x682) 0x1B 0xFD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Receive graphic page from communication port 0x1D 0x49 . . . . . . . . . . . . . . . . . . . . . . . . . <GS I> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Transmit printer ID 0x1D 0x50 . . . . . . . . . . . . . . . . . . . . . . . . . <GS P> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Set horizontal and vertical motion units 0x1D 0x5A . . . . . . . . . . . . . . . . . . . . . . . . . <GS Z> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Receive n bytes from serial port 0x1D 0x7C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Set printing density 0x1D 0xF0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 Set printing speed ESC/POS™ emulation │ 15 PRINT COMMANDS 0x0A<LF> Print and line feed Valid for TG02H [Format] ASCIILF Hex0A Decimal10 [Range] [Description] Prints the data in the buffer and feeds one line based on the current line spacing. [Notes] • Sets the print position to the beginning of the line. • If the buffer is empty, the printing feeds of (character height + spacing gap) dot. (default 32 dot). [Default] [Reference] 0x1B 0x32, 0x1B 0x33, 0x0D [Example] 16 │ ESC/POS™ emulation 0x0D<CR> Print and carriage return Valid for TG02H [Format] ASCIICR Hex0D Decimal13 [Range] [Description] When autofeed is “CR enabled”, this command functions in the same way as 0x0A, otherwise it is disregarded. [Notes] Sets the print position to the beginning of the line. [Default] See “Autofeed in setup” parameter. [Reference]0x0A [Example] ESC/POS™ emulation │ 17 0x1B 0x4A <ESC J> Print and paper feed Valid for TG02H [Format] ASCII Hex Decimal [Range] 0 ≤ n ≤ 255 [Description] Prints the data in the print buffer and feeds the paper [ n * (vertical or horizontal motion unit)] inches. [Notes] • After printing has been completed, this command sets the print starting position to the beginning of the line. • The paper feed amount set by this command does not affect the values set by 0x1B 0x32 or 0x1B 0x33. • The horizontal and vertical motion units are specified by 0x1D 0x50. • 0x1D 0x50 can change the vertical (and horizontal) motion unit. However, the value cannot be less than the minimum vertical movement amount. • In standard mode, the vertical motion unit is used. • The maximum paper feed amount is 31.8 mm. [Default] [Reference] 0x1D 0x50 [Example] 18 │ ESC/POS™ emulation ESCJ n 1B4An 2774n 0x1B 0x64 <ESC d> Print and feed paper n lines Valid for TG02H [Format] ASCII Hex Decimal [Range] 0 ≤ n ≤ 255 [Description] Prints the data in the print buffer and feeds the paper n rows. [Notes] • n rows paper feed is equivalent to (n x char height + line spacing set). • Sets the print starting position at the beginning of the line. • This command does not affect the line spacing set by 0x1B 0x32 or 0x1B 0x33. • The maximum paper feed amount is 200 rows. Even if a paper feed amount of more than 200 rows is set, the printer feeds the paper only 200 rows. ESCd n 1B64 n 27 100n [Default] [Reference] 0x1B 0x32, 0x1B 0x33 [Example] ESC/POS™ emulation │ 19 0x1B 0xFF Receive the graphic page from the communication port Valid for TG02H [Format] ASCII Hex Decimal [Range] n = 1, 2 0 ≤ nL nH ≤ 255 [Description] Receive [nL + (nH × 256)] word from the communication port and save them in the flash bank specified by n as shown in the following table: n [Notes] ESC 0xFFn nL nH 1BFFn nL nH 27 255n nL nH FUNCTION 1 Save logo in the flash bank 1 2 Save logo in the flash bank 2 • The images are saved in FlashDisk as Pict1.bmp (bank 1) and Pict2.bmp (bank 2). • For serial communication, set parameter “RS232 handshaking” to “Hardware”. • The number of received data bytes is [nL + (nH × 256)] × 2. • Every word is received first as MSByte and then as LSByte. • If [nL + (nH × 256)] is more than 33280, the following data are processed as normal data. • In the horizontal dotline there are 24 words. • The flash bank for graphic print dimensions are: 384 horizontal dots (48 bytes/line) x 682 vertical dots (33280 bytes). [Default] [Reference] [Example] 20 │ ESC/POS™ emulation LINE SPACING COMMANDS 0x1B 0x30 <ESC 0> Select 1/8-inch line spacing Valid for TG02H [Format] ASCII Hex Decimal ESC0 1B30 2748 [Range] [Description] Selects 1/8-inch line spacing. [Notes] [Default] [Reference] 0x1B 0x32, 0x1B 0x33 [Example] ESC/POS™ emulation │ 21 0x1B 0x32 <ESC 2> Select 1/6-inch line spacing Valid for TG02H [Format] ASCII Hex Decimal ESC2 1B32 2750 [Range] [Description] Selects 1/6-inch line spacing. [Notes] [Default] [Reference] 0x1B 0x30, 0x1B 0x33 [Example] 22 │ ESC/POS™ emulation 0x1B 0x33 <ESC 3> Set line spacing using minimum units Valid for TG02H [Format] ASCII Hex Decimal [Range] 0 ≤ n ≤ 255 [Description] Sets line spacing to [ n * (vertical or horizontal motion unit)] inches. [Notes] • The horizontal and vertical motion unit are specified by 0x1D 0x50. Changing the horizontal or vertical motion unit does not affect the current line spacing. • The 0x1D 0x50 command can change the horizontal (and vertical) motion unit. However, the value cannot be less than the minimum vertical movement amount. • In standard mode, the vertical motion unit is used. • The maximum spacing is 32 mm. [Default] n = 64 (1/6 inch) [Reference] 0x1B 0x32, 0x1D 0x50 ESC3 n 1B33 n 2751n [Example] ESC/POS™ emulation │ 23 CHARACTER COMMANDS 0x18<CAN> Cancel current line transmitted Valid for TG02H [Format] [Range] ASCIICAN Hex18 Decimal24 [Description] Deletes current line transmitted. [Notes] • Sets the print position to the beginning of the line. • However, this command does not clear the receive buffer. [Default] [Reference] [Example] 24 │ ESC/POS™ emulation 0x1B 0x20 <ESC SP> Set right-side character spacing Valid for TG02H [Format] ASCII Hex Decimal [Range] 0 ≤ n ≤ 255 [Description] Sets the character spacing for the right side of the character to [n x horizontal or vertical motion units]. [Notes] • The right character spacing for double-width mode is twice the normal value. When the characters are enlarged, the right side character spacing is m (2 or 8) times the normal value. • The horizontal and vertical motion units are specified by 0x1D 0x50. Changing the horizontal or vertical motion units does not affect the current right side spacing. • The 0x1D 0x50 command can change the horizontal (and vertical) motion unit. However, the value cannot be less than the minimum horizontal movement amount. • The maximum right side character spacing is 32 mm. • In standard mode, the horizontal motion unit is used. [Default] n=0 [Reference] 0x1D 0x50 ESCSP n 1B20 n 2732n [Example] ESC/POS™ emulation │ 25 0x1B 0x21 <ESC !> Set printing mode Valid for TG02H [Format] ASCII Hex Decimal [Range] 0 ≤ n ≤ 255 [Description] Selects printing mode using n (see tables below): BIT ESC! n 1B21 n 2733n 12 cpi (default) 12/16 cpi 16/22 cpi Character font A elected 16 x 24 16 x 24 12 x 24 1 Character font B selected 16 x 24 12 x 24 9 x 24 - - Undefined - - - Undefined Off 00 0 Expanded mode not selected On 08 8 Expanded mode selected Off 00 0 Double-height mode not selected On 10 16 Double-height mode selected Off 00 0 Double-width mode not selected On 20 32 Double-width mode selected Off 00 0 Italic mode not selected On 40 64 Italic mode selected Off 00 0 Underline mode not selected On 80 128 Modo sottolineato selezionato OFF/ON HEX DECIMAL Off 00 0 On 01 1 - 2 0 3 4 5 6 7 [Notes] FUNCTION • The printer can underline all characters, but cannot underline the spaces set by 0x09, 0x1B 0x24, 0x1B 0x5C and 90°/270° rotated characters. • This command resets the left and right margin at default value (see 0x1D 0x4C, 0x1D 0x57). • 0x1B 0x45 can also be used to turn the emphasized mode on/off. However, the last-received setting command is the effective one. • 0x1B 0x2D can also be used to turn the underlining mode on/off. However, the last-received setting command is the effective one. • 0x1D 0x21 can also be used to select character height/width. However, the last-received setting command is the effective one. 26 │ ESC/POS™ emulation [Default] n=0 [Reference] 0x1B 0x2D, 0x1B 0x45, 0x1D 0x21 [Example] ESC/POS™ emulation │ 27 0x1B 0x25 <ESC %> Select/cancel user-defined character set Valid for TG02H [Format] ASCII Hex Decimal [Range] 0 ≤ n ≤ 255 [Description] Selects or cancels the user-defined character set. When the Least Significant Bit (LSB) of n is 0, the user-defined character set is cancelled. When the LSB of n is 1, the user-defined character set is selected. [Notes] • Only the LSB of n is applicable. • When the user-defined character set is canceled, the internal character set is automatically selected. ESC% n 1B25 n 2737n [Default]n=0 [Reference] 0x1B 0x26, 0x1B 0x3F [Example] 28 │ ESC/POS™ emulation 0x1B 0x26 <ESC &> Defines user-defined characters Valid for TG02H [Format] ASCII Hex Decimal [Range] y=3 32 ≤ c1 ≤ c2 ≤ 126 0 ≤ x ≤ 16 (Font (18 x 24)) 0 ≤ x ≤ 13 (Font (13 x 24)) 0 ≤ x ≤ 10 (Font 10 x 24) 0 ≤ d1 … d (y × xk) ≤ 255 k = c2 – c1 + 1 [Description] Defines user-defined characters. Y specifies the number of bytes in the vertical direction. C1 specifies the beginning character code for the definition, and C2 specifies the final code. X specifies the number of dots in the horizontal direction. [Notes] • The allowable character code range is from ASCII 0x20 (32) to 0x7E (126) (95 characters). • It is possible to define multiple characters for consecutive character codes. If only one character is desired, use c1 = c2. • if c2 < c1, the command is not executed. • d is the dot data for the characters. The dot pattern is in the horizontal direction starting from the left. Any remaining dots on the right remain blank. • The data to define a user-defined character is ( X × Y) bytes. • To print a dot, set the corresponding bit to 1; to not have it print, set to 0. • This command can define different user-defined character patterns for each font. To select the font, use 0x1B 0x21. • The user-defined character definitions are cleared when: 0x1B 0x40 or 0x1D 0x2A are executed or the printer is reset or the power shut off. [Default] Internal character set. ESC& y c1 c2 1B26 y c1 c2 2737y c1c2 [Reference] ESC/POS™ emulation │ 29 [Example] 18 dots (11 cpi) 14 dots (15 cpi) p1 p2 30 │ ESC/POS™ emulation MSB LSB 0x1B 0x2D <ESC -> Turn underline mode on/off Valid for TG02H [Format] ASCII Hex Decimal [Range] 0≤n≤2 48 ≤ n ≤ 50 [Description] Turns underline mode on or off, based on the following values of n: n = 0, 48 n = 1, 49 n = 2, 50 [Notes] • The printer can underline all characters, but cannot underline the space and right-side character spacing (command 0x09). • The printer cannot underline 90°/270° rotated characters and white/black inverted characters. • When underline mode is turned off by setting the value of n to 0 or 48, the data which follows is not underlined. • Underline mode can also be turned on or off by using 0x1B 0x21. Note, however, that the last received command is the effective one. [Default] n=0 [Reference] 0x1B 0x21 ESC- n 1B2Dn 2745n Turns off underline mode Turns on underline mode (1-dot thick) Turns on underline mode (2-dot thick) [Example] ESC/POS™ emulation │ 31 0x1B 0x34 <ESC 4> Set/reset italic mode Valid for TG02H [Format] ASCII Hex Decimal [Range] 0 ≤ n ≤ 1, 48 ≤ n ≤ 49 [Description] Turns italic mode on or off, based on the following values of n: n [Notes] ESC 1B 27 4 n 34 n 52n FUNCTION 0, 48 Turns off italic mode 1, 49 Turns on italic mode • The printer can print any character in italic mode. • When italic mode is turned off by setting the value of n to 0 or 48, the data which follows is printed in normal mode. • Italic mode can also be turned on or off using 0x1B 0x21. Note, however, that the last received command is the effective one. [Default] n=0 [Reference] 0x1B 0x21 [Example] 32 │ ESC/POS™ emulation 0x1B 0x3F <ESC ?> Cancel user-defined characters Valid for TG02H [Format] ASCII Hex Decimal [Range] 32 ≤ n ≤ 126 [Description] Cancels user-defined characters. [Notes] • This command cancels the pattern defined for the character code specified by n. • This command deletes the pattern defined for the specified character code in the font selected by 0x1B 0x21. • If the user-defined character has not been defined for the specified character code, the printer ignores this command. ESC? n 1B3Fn 2763n [Default] [Reference] 0x1B 0x26, 0x1B 0x25 [Example] ESC/POS™ emulation │ 33 0x1B 0x45 <ESC E> Turn emphasized mode on/off Valid for TG02H [Format] ASCII Hex Decimal [Range] 0 ≤ n ≤ 255 [Description] Turns expanded mode on/off. • When the LSB of n is 0, the expanded mode is off. • When the LSB of n is 1, the expanded mode is on. [Notes] • Only the LSB of n is effective. • 0x1B 0x21 also turns on and off the expanded mode. However, the last received command is the effective one. [Default] n=0 [Reference] 0x1B 0x21 [Example] 34 │ ESC/POS™ emulation ESCE n 1B45 n 2769n 0x1B 0x47 <ESC G> Turn double-strike mode on/off Valid for TG02H [Format] ASCII Hex Decimal [Range] 0 ≤ n ≤ 255 [Description] Turns double-strike mode on or off. • When the LSB of n is 0, the double-strike mode is off. • When the LSB of n is 1, the double-strike mode is on. [Notes] • Only the LSB of n is effective. • Printer output is the same in double-strike and emphasized mode. [Default] n=0 [Reference] 0x1B 0x45 ESCG n 1B47 n 2771n [Example] ESC/POS™ emulation │ 35 0x1B 0x4D <ESC M> Select character font Valid for TG02H [Format] ASCII Hex Decimal [Range] n = 0, 1, 48, 49 [Description] Selects characters font. n FUNCTION 0, 48 Character font A selected 1, 49 Character font B selected [Notes] [Reference] ESCM n 1B4Dn 2777n 0x1B 0xC1 [Example] 36 │ ESC/POS™ emulation 0x1B 0x52 <ESC R> Select international character set Valid for TG02H [Format] ASCII Hex Decimal [Range] 0 ≤ n ≤ 10 [Description] Select the international character set n according to the table below: ESCR n 1B52 n 2782n HEX n 23 24 40 5B 5C 5D 5E 60 7B 7C 7D 7E CHARACTER SET 0 U.S.A. # $ @ [ \ ] ^ ` { | } ~ 1 France # $ à ° ç § ^ ` é ù è “ 2 Germany # $ § Ä Ö Ü ^ ` ä ö ü b 3 United Kingdom £ $ @ [ \ ] ^ ` { | } ~ 4 Denmark I # $ @ Æ Æ Å ^ ` æ f å ~ 5 Sweden # ¤ É Ä Ö Å Ü é ä ö å ü 6 Italy # $ @ ° \ é ^ ù à ò è ì 7 Spain I Pt $ @ i Ñ ¿ ^ ` “ ñ } ~ 8 Japan # $ @ [ ¥ ] ^ ` { | } ~ 9 Norwey # ¤ É Æ Æ Å Ü é æ f å ü 10 Denmark II # $ É Æ Æ Å Ü é æ f å ü [Notes] [Default] n=0 [Reference] [Example] ESC/POS™ emulation │ 37 0x1B 0x56 <ESC V> Set 90° rotated print mode Valid for TG02H [Format] ASCII Hex Decimal [Range] 0≤n≤1 48 ≤ n ≤ 49 [Description] Turns 90° rotation mode on/off. n is used as follows: ESCV n 1B56 n 2786n n [Notes] FUNCTION 0, 48 Disable 90° rotation mode 1, 49 Enable 90° rotation mode • When underlined mode is turned on, the printer does not underline 90° rotated characters. All the same it’s possible select the underline mode. • Double-width and double-height commands in 90° rotation mode enlarge characters in the opposite directions from double-height and double-width commands in normal mode. [Default] n=0 [Reference] 0x1B 0x21, 0x1B 0x2D [Example] 38 │ ESC/POS™ emulation 0x1B 0x74 <ESC t> Select characters code table Valid for TG02H [Format] ASCII Hex Decimal [Range] 1 ≤ n ≤ 53, n = 255 [Description] Select a page n from the character code table, as follows: ESCt n 1B74 n 27 116n n PAGE 0 PC437 - U.S.A., Standard Europe 1 Katakana 2 PC850 - Multilingual 3 PC860 - Portuguese 4 PC863 - Canadian/French 5 PC865 - Nordic 11 PC851 - Greek on request 12 PC853 - Turkish on request 13 PC857 - Turkish on request 14 PC737 - Greek on request 15 ISO8859-7 - Greek on request 16 WPC1252 17 PC866 - Cyrillic 2 18 PC852 - Latin 2 19 PC858 for Euro symbol at position 213 20 KU42 - Thai on request 21 TIS11 - Thai on request 26 TIS18 - Thai on request 30 TCVN_3 - Vientamese on request 31 TCVN_3 - Vientamese on request 32 PC720 - Arabic on request 33 WPC775 - Baltic Rim on request 34 PC855 - Cyrillic on request 35 PC861 - Icelandic on request 36 PC862 - Hebrew 37 PC864 - Arabic 38 PC869 - Greek on request on request ESC/POS™ emulation │ 39 n PAGE 39 ISO8859-2 - Latin 2 on request 40 ISO8859-15 - Latin 9 on request 41 PC1098 - Farci on request 42 PC1118 - Lithuanian on request 43 PC1119 - Lithuanian on request 44 PC1125 - Ukranian on request 45 WPC1250 - Latin 2 46 WPC1251 - Cyrillic 47 WPC1253 - Greek 48 WPC1254 - Turkish 49 WPC1255 - Hebrew 50 WPC1256 - Arabic 51 WPC1257 - Baltic Rim 52 WPC1258 - Vientamese 53 KZ1048 - Kazakhstan 255 Space page on request [Notes] • The tables are selectable only if the code pages are present on the machine. By selecting a code page not present on the machine, the code page remains the one currently in use. [Default] n=0 [Reference] [Example] For printing Euro symbol (€), the command sequence is: 1B, 74, 13, D5 40 │ ESC/POS™ emulation 0x1B 0x7B <ESC {> Set / cancel upside-down character printing Valid for TG02H [Format] ASCII Hex Decimal [Range] 0 ≤ n ≤ 255 [Description] Turns upside-down printing mode on or off. • When the LSB of n is 0, the upside-down printing mode is off. • When the LSB of n is 1, the upside-down printing mode is on. [Notes] • Only the LSB of n is effective. • This command is valid only if entered at the beginning of a line. • In upside-down printing mode, the printer rotates the line to be printed 180° and then prints it. [Default] n=0 ESC{ n 1B7Bn 27 123n [Reference] Upside-down printing Off ABCDEFG 123456 Upside-down printing On ↑ ABCDEFG 123456 [Example] Printing direction ESC/POS™ emulation │ 41 0x1B 0xC1 Set/cancel cpi mode Valid for TG02H [Format] ASCII Hex Decimal [Range] 0≤n≤2 48 ≤ n ≤ 50 [Description] Sets cpi mode based on the following values of n: ESC 0xC1n 1BC1n 27 193n n FUNCTION 0, 48 Font A=12 cpi Font B=16 cpi 1, 49 Font A=16 cpi Font B=22 cpi 2, 50 Font A=12 cpi Font B=12 cpi [Notes] [Default] n=2 [Reference] 0x1B 0x21, 0x1D 0x21 [Example] 42 │ ESC/POS™ emulation 0x1C 0x25 <FS %> Select the font type Valid for TG02H [Format] ASCII Hex Decimal [Range] n= 0, 1, 2 [Description] Select the font type. FS % n 1C25 n 2837n n [Notes] FONT TYPE 0 International 1 Chinese GB18030 2 Korean PC949 • This command can be used only for the models with Extended Chinese (GB18030-2000) or Korean (PC949). • The selection made by this command is stored in the RAM memory. Turn off the machine reverts to the default value, that can be set with the parameter “FONT TYPE” in the setup. • After selecting the font type “INTERNATIONAL” it must be selected the desired character code table using the command 0x1B 0x74. [Default] [Reference] 0x1B 0x74, See the command manual “Chinese fonts management”. [Example] ESC/POS™ emulation │ 43 0x1D 0x21 <GS !> Select character size Valid for TG02H [Format] ASCII Hex Decimal [Range] 0≤n≤7 16 ≤ n ≤ 23 32 ≤ n ≤ 39 48 ≤ n ≤ 55 64 ≤ n ≤ 71 80 ≤ n ≤ 87 96 ≤ n ≤ 103 112 ≤ n ≤ 119 [Description] Selects character height and width, as follows: • Bits 0 to 3: to select character height (see table 2). • Bits 4 to 7: to select character width (see table 1). 12/16 Cpi, 16/22 Cpi GS! n 1D21 n 2933n Table 1 Select character width HEX DECIMAL 00 0 10 WIDTH Table 2 Select character height HEX DECIMAL HEIGHT 1 (normal) 00 0 1 (normal) 16 2 (width = 2x) 01 1 2 (height = 2x) 20 32 3 (width = 3x) 02 2 3 (height = 3x) 30 48 4 (width = 4x) 03 3 4 (height = 4x) 40 64 5 (width = 5x) 04 4 5 (height = 5x) 50 80 6 (width = 6x) 05 5 6 (height = 6x) 60 96 7 (width = 7x) 06 6 7 (height = 7x) 70 112 8 (width = 8x) 07 7 8 (height = 8x) 12 Cpi Table 1 Select character width HEX DECIMAL 00 0 10 HEX DECIMAL 1 (normal) 00 0 1 (normal) 16 2 (width = 2x) 01 1 2 (height = 2x) 20 32 3 (width = 3x) 02 2 3 (height = 3x) 30 48 4 (width = 4x) 03 3 4 (height = 4x) 44 │ ESC/POS™ emulation WIDTH Table 2 Select character height HEIGHT [Notes] • If n falls outside the defined range, this command is ignored. • 0x1B 0x21 can also be used to select character size. However, the setting of the last received command is the effective one. [Default] n=0 [Reference] 0x1B 0x21, 0x1B 0xC1 [Example] ESC/POS™ emulation │ 45 0x1D 0x42 <GS B> Turn white/black reverse printing mode on/off Valid for TG02H [Format] ASCII Hex Decimal [Range] 0 ≤ n ≤ 255 [Description] Turns white/black reverse printing mode on or off. • When the LSB of n is 0, white/black reverse printing is turned off. • When the LSB of n is 1, white/black reverse printing is turned on. [Notes] • Only the LSB di n is effective. • This command is available for both built-in and user-defined characters. • This command does not affect bit image, downloaded bit image, barcode, HRI characters and spacing skipped by 0x09, 0x1B 0x24 and 0x1B 0x5C. • This command does not affect white space between lines. • White/black reverse mode has a higher priority than underline mode. Even if underline mode is on, it will be disabled (but not cancelled) when white/black reverse mode is selected. [Default] n=0 [Reference] [Example] 46 │ ESC/POS™ emulation GSB n 1D42 n 2966n 0x1D 0x59 <GS Y> Sets height in printing. Valid for TG02H [Format] ASCII Hex Decimal [Description] Sets height during printing based on following values of n: n GSY n 1D59 n 2989n PRINTING MODE 0 height is set to 1 ≠0 height is set to 2 [Notes] When n ≠ 0 (default value) each dotline is twice replicated [Default] n≠0 [Reference] [Example] ESC/POS™ emulation │ 47 PRINT POSITION COMMAND 0x08<BS> Back space Valid for TG02H [Format] ASCIIBS Hex08 Decimal8 [Range] [Description] Moves print position to previous character. [Notes] • Can be used to put two characters at the same position. [Default] [Reference] [Example] 48 │ ESC/POS™ emulation 0x09<HT> Horizontal tab Valid for TG02H [Format] ASCIIHT Hex09 Decimal9 [Range] [Description] Moves the print position to the next horizontal tab position. [Notes] • Ignored unless the next horizontal tab position has been set. • If the command is received when the printing position is at the right margin, the printer executes print buffer full printing and horizontal tab processing from the beginning of the next line. • Horizontal tab positions are set using 0x1B 0x44. [Default] [Reference] 0x1B 0x44 [Example] ESC/POS™ emulation │ 49 0x1B 0x24 <ESC $> Set absolute printing position Valid for TG02H [Format] ASCII Hex Decimal [Range] 0 ≤ nL ≤ 255 0 ≤ nH ≤ 255 [Description] Sets the distance from the beginning of the line to the position at which subsequent characters are to be printed. The distance from the beginning of the line to the print position is [(nL + nH * 256) * (vertical or horizontal motion unit)] inches. [Notes] ESC $ nL nH 1B 24 nL nH 2736nL nH • Settings outside the specified printable area are ignored. • The horizontal and vertical motion unit are specified by 0x1D 0x50. • 0x1D 0x50 can change the horizontal (and vertical) motion unit. However, the value cannot be less than the minimum horizontal movement amount. • In standard mode, the horizontal motion unit (x) is used. • If the setting is outside the printing area width, it sets the absolute print position, but the left or right margin is set at default value. [Default] [Reference] 0x1B 0x5C, 0x1D 0x50 [Example] 50 │ ESC/POS™ emulation 0x1B 0x28 0x76 <ESC (> Set relative vertical print position Valid for TG02H [Format] ASCII Hex Decimal [Range] 0 ≤ nL ≤ 255 0 ≤ nH ≤ 255 [Description] Sets the print vertical position based on the current position by using the horizontal or vertical motion unit. This command sets the distance from the current position to [(nL + nH × 256) × (horizontal or vertical motion unit)]. [Notes] • When the starting position is specified by N motion unit to the bottom: nL + nH × 256 = N • When the starting position is specified by N motion unit to the top (negative direction), use the complement of 65536: nL + nH × 256 = 65536 - N • The horizontal and vertical motion unit are specified by 0x1D 0x50. • The 0x1D 0x50 command can change the horizontal (and vertical) motion unit. However, the value cannot be less than the minimum horizontal movement amount. • In standard mode, the vertical motion unit is used. ESC( v nL nH 1B2876nLnH 2740118nLnH [Default] [Reference] 0x1D 0x50 [Example] ESC/POS™ emulation │ 51 0x1B 0x44 <ESC D> Set horizontal tab position Valid for TG02H [Format] ASCII Hex Decimal [Range] 1 ≤ n ≤ 255 0 ≤ k ≤ 32 [Description] Sets horizontal tab positions • n specifies the column number for setting a horizontal tab position calculated from the beginning of the line. • k indicates the total number of horizontal tab positions to be set. [Notes] [Default] ESC D n1...nk 1B 44 n1...nk 2768n1...nk NUL 00 0 • The horizontal tab position is stored as a value of [character width x n] measured from the beginning of the line. The character width includes the right-side character spacing and double-width characters are set with twice the width of normal characters. • This command cancels previous tab settings. • When setting n = 8, the print position is moved to column 9 sending 0x09. • Up to 32 tab positions ( k = 32) can be set. Data exceeding 32 tab positions is processed as normal data. • Send [ n ] k in ascending order and place a 0 NUL code at the end. When [ n ] k is less than or equal to the preceding value [ n ] k-1, the setting is complete and the data which follows is processed as normal data. • 0x1B 0x44 0x00 cancels all horizontal tab positions. • The previously specified horizontal tab position does not change, even if the character width is modified. Default tab positions are set at intervals of 8 characters (columns 9, 17, 25, …) for Font A when the right-side character spacing is 0. [Reference]0x09 [Example] 52 │ ESC/POS™ emulation 0x1B 0x57 <ESC W> Prints a graphic line Valid for TG02H [Format] ASCII Hex Decimal [Range] 0 ≤ n ≤ 255 [Description] Receives 48 byte from serial port and prints them in graphic mode. [Notes] When underline mode is turned on, the printer cannot underline 90° rotated characters. All the same it’s possible select the underline mode. [Default] n=0 [Reference] 0x1B 0x45 [Example] To print a dotted graphic line, transmit 48 bytes with value 240 (0xF0) after the command 0x1B 0x57. To print a continuous graphic line, transmit 48 bytes with value 255 (0xFF). ESCW 1B 57 2787 ESC/POS™ emulation │ 53 0x1B 0x5C <ESC \> Set relative printing position Valid for TG02H [Format] ASCII Hex Decimal [Range] 0 ≤ nL ≤ 255 0 ≤ nH ≤ 255 [Description] Sets the print starting position based on the current position by using the horizontal or vertical motion unit. Sets the distance from the current position to [(nL+ nH * 256) * (horizontal or vertical motion unit)]. ESC\ nL nH 1B5CnL nH 2792nLnH [Notes] • It’s possible to print further on the right margin set for every font. In this case the printing continues up to the maximum border of the printer mechanism and then begins a new row. • When the starting position is specified by N motion units to the right: nL + nH * 256 = N When the starting position is specified by n motion units to the left (negative direction), use the complement of 65536: nL + nH * 256 = 65536 – N • If setting exceeds the printing area width, the left or right margin is set to the default value. • The horizontal and vertical motion unit are specified by 0x1D 0x50. • 0x1D 0x50 can change the horizontal (and vertical) motion units. However, the value cannot be less than the minimum horizontal movement amount. • In standard mode, the horizontal motion unit is used. • Setting the right value, it’s possible to print characters over the right edge. [Default] [Reference] 0x1B 0x24, 0x1D 0x50 [Example] 54 │ ESC/POS™ emulation 0x1B 0x61 <ESC a> Select justification Valid for TG02H [Format] ASCII Hex Decimal [Range] 0≤n≤2 48 ≤ n ≤ 50 [Description] Aligns all data in one line to the specified position. n selects the type of justification as follows: ESCa n 1B61 n 2797n n JUSTIFICATION 0, 48 Flush left 1, 49 Centered 2, 50 Flush right [Notes] • This command is only enabled when inserted at the beginning of a line. • Lines are justified within the specified printing area. • Spaces set by 0x09, 0x1B 0x24 and 0x1B 0x5C will be justified according to the previously-entered mode. [Default] n=0 [Reference] [Example] Flush left ABC ABCD ABCDE Centered ABC ABCD ABCDE Flush right ABC ABCD ABCDE ESC/POS™ emulation │ 55 0x1D 0x4C <GS L> Set left margin Valid for TG02H [Format] ASCII Hex Decimal [Range] 0 ≤ nL, nH ≤ 255 [Description] Sets the left margin. The left margin is set to [(nL + nH × 256) × (horizontal motion unit)] inches. GSL nL nH 1D4CnL nH 2976nLnH Printable area [Notes] Left margin Printing area width • This command is enabled only if set at the beginning of the line. • If the setting exceeds the printable area, the maximum value of the printable area is used. • If the left margin + printing area width is greater than the printable area, the printing area width is set at maximum value. • The horizontal and vertical motion unit are specified by 0x1D 0x50. Changing the horizontal or vertical motion unit does not affect the current left margin. • The 0x1D 0x50 command can change the horizontal (and vertical) motion unit. • However, the value cannot be less than the minimum horizontal movement amount and it must be in even units of the minimum horizontal movement amount. [Default] If font A: If font B: [Reference] 0x1D 0x50, 0x1D 0x57 [Example] 56 │ ESC/POS™ emulation nL = nH = 0 nL = 14 nH = 0 0x1D 0x57 <GS W> Set printing area width Valid for TG02H [Format] ASCII Hex Decimal [Range] 0 ≤ nL, nH ≤ 255 0 ≤ nL + nH × 256) ≤ 384 [Description] Sets the printing area width to the area specified by nL and nH. • The left margin is set to [(nL + nH × 256) × (horizontal motion unit)] inches. GSW nL nH 1D57 nL nH 29 87 nL nH Printable area [Notes] Left margin Printing area width • This command is only enabled if set at the beginning of the line. • If the right margin is greater than the printable area, the printing area width is set at maximum value. • If the printing area width = 0, it is set at the maximum value. • The horizontal and vertical motion units are specified by 0x1D 0x50. Changing the horizontal or vertical motion unit does not affect the current left margin. • The 0x1D 0x50 command can change the horizontal (and vertical) motion unit. • However, the value cannot be less than the minimum horizontal movement amount and it must be in even units of the minimum horizontal movement amount. [Default] Se font A: Se font B: nL = 192 nL = 164 [Reference] 0x1D 0x4C, 0x1D 0x50 nH = 1 nH = 1 [Example] ESC/POS™ emulation │ 57 BIT IMAGE COMMANDS 0x1B 0x2A <ESC *> Select image print mode Valid for TG02H [Format] ASCII Hex Decimal [Range] m = 0, 1, 32, 33 0 ≤ nL ≤ 255 0 ≤ nH ≤ 3 0 ≤ d ≤ 255 [Description] Selects a bit image mode using m for the number of dots specified by nL and nH, as follows: m [Notes] ESC* m nL nH d1...dk 1B2A m nL nHd1...dk 2742m nLnHd1...dk MODE VERTICAL DIRECTION N. DOTS DPI HORIZONTAL DIRECTION (*1) DPI N. DATA (k) 0 8 dot single density 8 67 100 nL + nH x 256 1 8 dot double density 8 67 200 nL + nH x 256 32 24 dot single density 24 200 100 (nL + nH x 256) x 3 33 24 dot double density 24 200 200 (nL + nH x 256) x 3 • The nL and nH commands indicate the number of dots of the bit image in the horizontal direction. The number of dots is calculated using: nL + nH * 256. • If the bit image data input exceeds the number of dots to be printed on a line, the excess data is ignored. • d indicates the bit image data. Set a corresponding bit to 1 to print a dot, or to 0 to not print the dot. • If the value of m is outside the specified range, nL and data following it are processed as normal data. • If the width of the printing area set by 0x1D 0x4C and 0x1D 0x57 is less than the width required by the data set using 0x1B 0x2A , the excess data are ignored. • To print the bit image use 0x0A 0x0D, 0x1B 0x4A or 0x1B 0x64. • After printing a bit image, the printer returns to normal data processing mode. • This command is not affected by the emphasized, double-strike, underline (etc.) print modes, except for the upside-down mode. 58 │ ESC/POS™ emulation • The relationship between the image data and the dots to be printed is as follows: 8-dot bit image 24-dot bit image MSB d1 d2 d3 Bitimage data LSB Print data d1 d4 d7 d2 d5 d8 d3 d6 d9 MSB Bitimage data LSB Print data [Default] [Reference] [Example] ESC/POS™ emulation │ 59 0x1D 0x2A <GS *> Define downloaded bit image Valid for TG02H [Format] ASCII Hex Decimal [Range] 1 ≤ x ≤ 255 1 ≤ y ≤ 48 x × y ≤ 1536 0 ≤ d ≤ 255 [Description] Defines a downloaded bit image using the number of dots specified by x and y. x specifies the number of dots in the horizontal direction. y specifies the number of dots in the vertical direction. [Notes] • The number of dots in the horizontal direction is x × 8, in the vertical direction it is y × 8. • If x × y is out of the specified range, this command is disabled. • The d indicates bit-image data. Data (d) specifies a bit printed to 1 and not printed to 0. • The downloaded bit image definition is cleared when: 1) 0x1B 0x40 is executed. 2) 0x1B 0x26 is executed. Printer is reset or the power is turned off. • The following figure shows the relationship between the downloaded bit image and the printed data. GS 1D 29 * 2A 42 x x x y y y d1...d(x × y × 8) d1...d(x × y × 8) d1...d(x × y × 8) x × 8 dots d1 dy+1 MSB y × 8 dots dy × 2+1 d2 LSB dy dy × 2 dx × y × 8 [Reference] [Example] 60 │ ESC/POS™ emulation 0x1D 0x2F <GS /> Print dowloaded bit image Valid for TG02H [Format] ASCII Hex Decimal GS/ m 1D2F m 2947m [Range] [Description] [Notes] Prints a downloaded bit image using the mode specified by m. m selects a mode from the table below: m MODE 0,48 Normal 1, 49 Double-width 2, 50 Double-height 3, 51 Quadruple • This command is ignored if a downloaded bit image has not been defined. • In standard mode, this command is effective only when there is no data in the print buffer. • This command has no effect in the print modes (emphasized, underline, character size, or white/ black reverse printing), except for upside-down printing mode. • If the downloaded bit-image to be printed exceeds the printable area, the excess data is not printed. • If the printing area width set by 0x1D 0x4C and 0x1D 0x57 is less than the bit image horizontal size, the following processing is performed: 1) The printing area width is extended toward the right side up to hold the bit image. In this case, printing does not exceed the printable area. 2) If the printing area width cannot be extended toward the right side, because there’s no more printing area, the left margin is reduced to accommodate the bit image. [Default] [Reference] 0x1D 0x2A [Example] ESC/POS™ emulation │ 61 STATUS COMMAND 0x10 0x04 <DLE EOT> Real-time status transmission Valid for TG02H [Format] ASCII Hex Decimal [Range] 1≤n≤4 n = 17 n = 20 n = 21 [Description] Transmits the selected printer status specified by n in real time according to the following parameters: n = 1 n = 2 n = 3 n = 4 n = 17 n = 20 n = 21 [Notes] • Immediately executed even when the data buffer is full. • This status is transmitted whenever data sequence 0x10 0x04 is received. DLEEOTn 1004n 164 n transmit printer status transmit off-line status transmit error status transmit paper roll sensor status transmit print status transmit FULL STATUS transmit printer ID [Default] [Reference] See tables below. [Example] n=1: Printer status BIT OFF/ON 0 Off 00 0 Not used. Fixed to Off 1 On 02 2 Not used. Fixed to On 2 Off 00 0 Not used. Fixed to Off Off 00 0 On-line. On 08 8 Off-line. 4 On 10 16 Not used. Fixed to On 5 - - - RESERVED 3 62 │ ESC/POS™ emulation HEX DECIMAL FUNCTION 6 7 00 0 Paper drag motor off On 40 64 Paper drag motor on - - - RESERVED n=2: Off-line status BIT OFF/ON 0 Off 00 0 Not used. Fixed to Off 1 On 02 2 Not used. Fixed to On Off 00 0 Cover closed On 04 4 Cover opened Off 00 0 Paper isn’t feeded by FEED. key On 08 8 Paper is feeded by FEED. key On 10 16 Not used. Fixed to On Off 00 0 Paper present On 20 32 Printing stop due to paper end Off 00 0 No error On 40 64 Error Off 00 0 Not used. Fixed to Off 2 3 4 5 6 7 Off HEX DECIMAL FUNCTION n=3: Error status BIT OFF/ON 0 Off 00 0 Not used. Fixed to Off 1 On 02 2 Not used. Fixed to On 2 - - - RESERVED 3 Off 00 0 Not used. Fixed to Off 4 On 10 16 Not used. Fixed to On Off 00 0 No unrecoverable error. On 20 32 Unrecoverable error Off 00 0 No auto-recoverable error On 40 64 Auto-recoverable error Off 00 0 Not used. Fixed to Off 5 6 7 HEX DECIMAL FUNCTION ESC/POS™ emulation │ 63 n=4: Paper roll sensor status BIT OFF/ON 0 Off 00 0 Not used. Fixed to Off 1 On 02 2 Not used. Fixed to On Off 00 0 Paper present.. On 0C 12 Near paper end. On 10 16 Not used. Fixed to On Off 00 0 Paper present On 60 96 Paper not present Off 00 0 Not used. Fixed to Off 2,3 4 5, 6 7 HEX DECIMAL FUNCTION n=17: Print status BIT OFF/ON 0 Off 00 0 Not used. Fixed to Off 1 On 02 2 Not used. Fixed to On Off 00 0 Paper drag motor off On 04 4 Paper drag motor on 3 - - - RESERVED 4 On 10 16 Not used. Fixed to On Off 00 0 Paper present On 20 32 Paper absent 6 - - - RESERVED 7 Off 00 0 Not used. Fixed to Off 2 5 HEX n=20: FULL status (6 bytes) 1° Byte = 0x10 (DLE) 2° Byte = 0x0F 3° Byte = Paper status BIT DECIMAL FUNCTION OFF/ON HEX DECIMAL OFF 00 0 Paper present ON 01 1 Paper not present 0 64 │ ESC/POS™ emulation FUNCTION 1 - - - RESERVED OFF 00 0 Paper present ON 04 4 Near paper end 3 - - - RESERVED 4 - - - RESERVED 5 - - - RESERVED 6 - - - RESERVED 7 - - - RESERVED HEX DECIMAL 2 4° byte = User status BIT 0,1 2 3 4 5 6 7 OFF/ON FUNCTION Off 00 0 Cover closed On 03 3 Cover opened Off 00 0 No spooling On 04 4 Spooling Off 00 0 Drag paper motor off On 08 8 Drag paper motor on - - - RESERVED Off 00 0 LF key released On 20 32 LF key pressed Off 00 0 FF key released On 40 64 FF key pressed - - - RESERVED 5° byte = Recoverable error status BIT 0 1 2 OFF/ON HEX DECIMAL FUNCTION Off 00 0 Head temperature ok. On 01 1 Head temperature error Off 00 0 No COM error On 02 2 RS232 COM error - - - RESERVED ESC/POS™ emulation │ 65 Off 00 0 Power supply voltage ok On 08 8 Power supply voltage error - - - RESERVED Off 00 0 Acknowledge command On 20 32 Not acknowledge command error 6 - - - RESERVED 7 - - - RESERVED 3 4 5 6° byte = Unrecoverable error status BIT OFF/ON 0 - - - RESERVED Off 00 0 Flash memory ok On 02 2 Flash memory error 2 - - - RESERVED 3 - - - RESERVED 4 - - - RESERVED 5 - - - RESERVED 6 - - - RESERVED 7 - - - RESERVED 1 HEX n=21: transmit printer ID 66 │ ESC/POS™ emulation DECIMAL FUNCTION 1° byte = (refer to command 0x1D 0x49) 0x1B 0x76 <ESC v> Transmit paper sensor status Valid for TG02H [Format] ASCII Hex Decimal ESCv 1B76 27118 [Range] [Description] When this command is received, transmit the current status of the paper sensor. [Notes] This command is executed immediately, even when the data buffer is full (Busy). The status to be transmitted is shown in the table below: BIT OFF/ON HEX DECIMAL 0 - - - Undefined 1 - - - Undefined Off 00 0 Paper end sensor: paper present On 0C 12 Paper end sensor: paper not present 4 Off 00 0 Not used. Fixed to Off 5 - - - Undefined 6 - - - Undefined 7 Off 00 0 Not used. Fixed to Off 2,3 FUNCTION [Default] [Reference] 0x10 0x04 [Example] ESC/POS™ emulation │ 67 0x1D 0x72 <GS r> Transmit status Valid for TG02H [Format] ASCII Hex Decimal [Range] n = 1, 49 [Description] Transmit the status specified by n as follows: n FUNCTION 1, 49 Transmit paper sensor status (as for 0x1B 0x76) Paper sensor status (n = 1, 49) BIT OFF/ON HEX DECIMAL 0 - - - Undefined 1 - - - Undefined Off 00 0 Paper end sensor: paper present On 0C 12 Paper end sensor: paper not present 4 Off 00 0 Not used. Fix to Off 5 - - - Undefined 6 - - - Undefined 7 Off 00 0 Not used. Fix to Off 2,3 [Notes] GSr n 1D72 n 29 114n This command is executed when the data is processed in the data buffer. Therefore, there may be a time lag between receiving the command and transmitting the status, depending on data buffer status. [Default] [Reference] FUNCTION 0x10 0x04, 0x1B 0x76 [Example] 68 │ ESC/POS™ emulation 0x1D 0xE3 Reading of length (cm) of printed paper Valid for TG02H [Format] ASCII Hex Decimal GS0xE3 1DE3 29227 [Range] [Description] Reading of length (cm) of printed paper. [Notes] The command return a string pointing out how much paper is printed, for example if the printer has print about 2515,5 m, it will be: ‘251550cm’. [Default] [Reference] [Example] ESC/POS™ emulation │ 69 0x1D 0xE5 Reading number of power up Valid for TG02H [Format] ASCII Hex Decimal GS0xE5 1DE5 29229 [Range] [Description] Reading number of power up of the printer. [Notes] • The command return a string pointing out the number of turning on of the printer, for example if the printer is turned on 512 times, it will be: ‘512on’. [Default] [Reference] [Example] 70 │ ESC/POS™ emulation BARCODE COMMANDS 0x1D 0x28 0x6B <GS (> Print two-dimensional barcode Valid for TG02H [Format] ASCII Hex Decimal GS( k pL pH cn fn 1D28 6BpL pHcn fn 2940107 pLpHcnfn [Range] [Description] Processes the data concerning two-dimensional barcode. • Barcode type is specified by cn • Function is specified by fn cn fn FUNCTION 49 65 Function 065 QRcode: Specify encoding scheme 49 66 Function 066 QRcode: Specify dot size of the module 49 67 Function 067 QRcode: Specify size of barcode 49 69 Function 069 QRcode: Specify the error correction level 49 80 Function 080 QRcode: Store the received data in the barcode save area 49 81 Function 081 QRcode: Print the barcode data [Notes] [Default] [Reference] [Example] ESC/POS™ emulation │ 71 0x1D 0x28 0x6B [fn 065] <GS (> Specify encoding scheme of QRcode barcode Valid for TG02H [Format] ASCII Hex Decimal [Range] (pL+pH × 256) = 3 cn = 49 fn = 65 0≤n≤1 [Description] Specifies encoding type of QRcode barcode. n [Notes] [Default] GS( k pL pH cn fn n 1D28 6BpL pHcn fn n 2940107 pLpHcnfn n (pL = 3, pH = 0) ENCODING SCHEME 0 QRcode 1 MicroQR • QRcode: Encode all extended ASCII characters data up to a maximum length of 7089 numeric digits, 4296 alphabetic characters or 2953 bytes of data. • pL and pH specify the number of successive bytes to be sent • MicroQR (a miniature version of the QRcode barcode for short message): Encode all numbers from 0 to 9 up to a maximum length of 35 characters. n=0 [Reference] [Example] 72 │ ESC/POS™ emulation 0x1D 0x28 0x6B [fn 066] <GS (> Specify dot size of the module of the QRcode barcode Valid for TG02H [Format] ASCII Hex Decimal [Range] (pL+pH × 256) = 3 cn = 49 fn = 66 2 ≤ n ≤ 24 [Description] Specifies numbers of dot for each pixel of QRcode barcode. [Notes] • pL and pH specify the number of successive bytes to be sent [Default] n=0 GS( k pL pH cn fn n 1D28 6BpL pHcn fn n 2940107 pLpHcnfn n (pL = 3, pH = 0) [Reference] [Example] ESC/POS™ emulation │ 73 0x1D 0x28 0x6B [fn 067] <GS (> Specify QRcode barcode size Valid for TG02H [Format] ASCII Hex Decimal [Range] (pL+pH × 256) = 3 cn = 49 fn = 67 0 ≤ n ≤ 40 [Description] Specifies QRcode barcode eversion, as follows: GS( k pL pH cn fn n 1D28 6BpL pHcn fn n 2940107 pLpHcnfn n (pL = 3, pH = 0) n VERSION n VERSION n VERSION 0 AUTO 14 V14 28 V28 1 V1 15 V15 29 V29 2 V2 16 V16 30 V30 3 V3 17 V17 31 V31 4 V4 18 V18 32 V32 5 V5 19 V19 33 V33 6 V6 20 V20 34 V34 7 V7 21 V21 35 V35 8 V8 22 V22 36 V36 9 V9 23 V23 37 V37 10 V10 24 V24 38 V38 11 V11 25 V25 39 V39 12 V12 26 V26 40 V40 13 V13 27 V27 [Notes] • pL and pH specify the number of successive bytes to be sent [Default] n=0 [Reference] [Example] 74 │ ESC/POS™ emulation 0x1D 0x28 0x6B [fn 069] <GS (> Specify the error correction level of the QRcode barcode Valid for TG02H [Format] ASCII Hex Decimal [Range] (pL+pH × 256) = 3 cn = 49 fn = 69 0≤n≤4 [Description] Specifies the ECC level (Error Correction Capacity) of QRcode barcode. GS( k pL pH cn fn n 1D28 6BpL pHcn fn n 2940107 pLpHcnfn n (pL = 3, pH = 0) n ECC level 0 AUTO 1 ECC = approx 20% of barcode Recovery Capacity = approx 7% 2 ECC = approx 37% of barcode Recovery Capacity = approx 15% 3 ECC = approx 50% of barcode Recovery Capacity = approx 25% 4 ECC = approx 65% of barcode Recovery Capacity = approx 30% [Notes] • pL and pH specify the number of successive bytes to be sent [Default] n=0 [Reference] [Example] ESC/POS™ emulation │ 75 0x1D 0x28 0x6B [fn 080] <GS (> Store the QRcode barcode data in the barcode save area Valid for TG02H [Format] ASCII Hex Decimal GS( k pL pH cn fn m d1...dk 1D28 6BpL pHcn fn m d1...dk 2940107 pLpHcnfn m d1...dk [Range] cn = 49 fn = 80 m = 49 0 ≤ d ≤ 255 k = (pL + pH × 256) - 3 • QRcode barcode only with binary characters (8 bit): 4 ≤ (pL + pH × 256) ≤ 2957 (0 ≤ pL ≤ 255, 0≤ pH ≤ 11) • QRcode barcode only with alphanumeric characters: 4 ≤ (pL + pH × 256) ≤ 4300 (0 ≤ pL ≤ 255, 0≤ pH ≤ 16) • QRcode barcode only with numeric characters: 4 ≤ (pL + pH × 256) ≤ 7093 (0 ≤ pL ≤ 255, 0≤ pH ≤ 27) [Description] Store the QRcode barcode data (d1...dk) in the barcode save area. [Notes] • Data stored in the barcode save area by this function are processed by Function 081. The data in the barcode save area are reserved after processing Function 081. • pL and pH specify the number of successive bytes to be sent • k bytes of d1...dk are processed as barcode data. • Specify only the data code word of the barcode with this function. [Default] [Reference] [Example] 76 │ ESC/POS™ emulation 0x1D 0x28 0x6B [fn 081] <GS (> Prints the QRcode barcode data Valid for TG02H [Format] ASCII Hex Decimal [Range] (pL+pH × 256) = 3 cn = 49 fn = 81 m = 49 [Description] Prints the QRcode barcode in the current position. [Notes] • pL and pH specify the number of successive bytes to be sent GS( k pL pH cn fn m 1D28 6BpL pHcn fn m 2940107 pLpHcnfn m (pL = 3, pH = 0) [Default] [Reference] [Example] ESC/POS™ emulation │ 77 0x1D 0x48 <GS H> Select printing position of Human Readable Interpretation (HRI) characters Valid for TG02H [Format] ASCII Hex Decimal [Range] 0≤n≤3 48 ≤ n ≤ 51 [Description] Selects the printing position of HRI characters when printing barcodes. n selects the printing positions as follows: GSH n 1D48 n 2972n n FUNCTION 0, 48 Not printed 1, 49 Above the barcode 2, 50 Below the barcode 3, 51 Both above and below the barcode [Notes] [Default] n=0 [Reference] 0x1D 0x6B [Example] 78 │ ESC/POS™ emulation 0x1D 0x66 <GS f> Select font for HRI characters Valid for TG02H [Format] ASCII Hex Decimal [Range] n = 0, 1, 48, 49 [Description] Selects a font for the HRI characters used when printing a barcode. n selects a font from the following table: GSf n 1D66 n 29 102n n FONT 0, 48 Font A 1, 49 Font B [Notes] HRI characters are printed at the position specified by 0x1D 0x48. [Default] n=0 [Reference] 0x1D 0x48, 0x1D 0x6B [Example] ESC/POS™ emulation │ 79 0x1D 0x68 <GS h> Set barcode height Valid for TG02H [Format] ASCII Hex Decimal [Range] 1 ≤ n ≤ 255 [Description] Sets the height of the barcode. n specifies the number of vertical dots. GSh n 1D68 n 29 104n [Notes] [Default] n = 162 ( 20.25 mm ) [Reference] 0x1D 0x6B [Example] 80 │ ESC/POS™ emulation 0x1D 0x6B <GS k> Print barcode Valid for TG02H [Format 1] ASCII Hex Decimal GS 1D 29 k 6B 107 m m m NUL 00 0 [d1..dk] [d1..dk] [d1..dk] [Format 2] ASCII Hex Decimal GS 1D 29 k 6B 107 m m m n n n [d1..dn] [d1..dn] [d1..dn] [Range] Format 1: 0≤m≤8 m = 20 Format 2: 65 ≤ m ≤73 m = 90 [Description] Select a barcode system and prints the barcode. m selects a barcode system as follows: Format 1: BARCODE SYSTEM m NUMBER OF CHARACTERS REMARKS 0 UPC-A 11≤ k ≤12 48≤ d ≤ 57 1 UPC-E 11≤ k ≤12 48≤ d ≤ 57 2 EAN13 ( JAN) 12≤ k ≤13 48≤ d ≤ 57 3 EAN8 ( JAN) 7≤ k ≤8 48≤ d ≤ 57 4 CODE39 1≤ k 48 ≤ d ≤ 57, 65 ≤ d ≤ 90, 32, 36, 37, 43, 45, 46, 47 5 ITF 1≤ k (even number) 48 ≤ d ≤ 57 6 CODABAR 1≤ k 48 ≤ d ≤ 57, 65 ≤ d1 ≤ 68, 36,43, 45, 46, 47, 58 7 CODE93 1≤ k ≤255 1≤ d ≤ 127 8 CODE128 2≤ k ≤255 1≤ d ≤ 127 20 CODE32 8≤ k ≤9 48≤ d ≤ 57 ESC/POS™ emulation │ 81 Format 2: BARCODE SYSTEM m [Notes] NUMBER OF CHARACTERS REMARKS 65 UPC-A 11≤ n ≤12 48≤ d ≤ 57 66 UPC-E 11≤ n ≤12 48≤ d ≤ 57 67 EAN13 ( JAN) 12≤ n ≤13 48≤ d ≤ 57 68 EAN8 ( JAN) 7≤ n ≤8 48≤ d ≤ 57 69 CODE39 1≤ n ≤ 255 48 ≤ d ≤ 57, 65 ≤ d ≤ 90, 32, 36, 37, 43, 45, 46, 47 70 ITF 1≤ n ≤255 48≤ d ≤ 57 71 CODABAR 1≤ n ≤ 255 48 ≤ d ≤ 57, 65 ≤ d1 ≤ 68, 36, 43, 45, 46, 47, 58 72 CODE93 1≤ n ≤255 0≤ d ≤ 127 73 CODE128 2≤ n ≤255 0≤ d ≤ 127 90 CODE32 8≤ n ≤9 48≤ d ≤ 57 • If d is outside of the specified range, the printer prints the following message: “BARCODE GENERATOR IS NOT OK!” and processes the data which follows as normal data. • If the horizontal size exceeds the printing area, the printer only feeds the paper. • This command feeds as much paper as is required to print the barcode, regardless of the line spacing specified by 0x1B 0x32 or 0x1B 0x33. • After printing the barcode, this command sets the print position to the beginning of the line. • This command is not affected by print modes (emphasized, double-strike, underline or character size), except for upside-down and justification mode. Format 1: • This command ends with a NUL code. • When the barcode system used is UPC-A or UPC-E, the printer prints the barcode data after receiving 11 (without check digit) or 12 (with check digit) bytes barcode data. • When the barcode system used is EAN13, the printer prints the barcode data after receiving 12 (without check digit) or 13 (with check digit) bytes barcode data. • When the barcode system used is EAN8, the printer prints the barcode data after receiving 7 (without check digit) or 8 (with check digit) bytes barcode data. • The number of data for ITF barcode must be even numbers. When an odd number of data is input, the printer ignores the last received data. Format 2: • If n is outside of the specified range, the printer stops command processing and processes the following data as normal data. When CODE93 is used the printer: • prints an HRI character (o) as a start character at the beginning of the HRI character string • prints an HRI character (o) as a stop character at the end of the HRI character string. • The printer prints an HRI character (n) as a control character (00H to 1FH and 7FH). 82 │ ESC/POS™ emulation When CODE128 is used: • When using CODE128 in this printer, please note the following regarding data transmission: • The top part of the barcode data string must be a code set selection character (CODE A, CODE B or CODE C) which selects the first code set. • Special characters are defined by combining two characters “{“ and one character. ASCII character “{” is defined by transmitting “{“ twice, consecutively. DATA TRANSMISSION SPECIFIC CHARACTER ASCII HEX DECIMAL SHIFT {S 7B, 53 123, 83 CODE A {A 7B, 41 123, 65 CODE B {B 7B, 42 123, 66 CODE C {C 7B, 43 123, 67 FNC1 {1 7B, 31 123, 49 FNC2 {2 7B, 32 123, 50 FNC3 {3 7B, 33 123, 51 FNC4 {4 7B, 34 123, 52 ‘{‘ {{ 7B, 7B 123, 123 When UPC-E is used, introducing the barcode characters, the printer prints: TRANSMITTED DATA PRINTED DATA d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 0 0-9 0-9 0 0 0 0 0 0-9 0-9 0-9 d2 d3 d9 d10 d11 0 0 0-9 0-9 1 0 0 0 0 0-9 0-9 0-9 d2 d3 d9 d10 d11 1 0 0-9 0-9 2 0 0 0 0 0-9 0-9 0-9 d2 d3 d9 d10 d11 2 0 0-9 0-9 3-9 0 0 0 0 0 0-9 0-9 d2 d3 d4 d10 d11 3 0 0-9 0-9 0-9 1-9 0 0 0 0 0 0-9 d2 d3 d4 d5 d11 4 0 0-9 0-9 0-9 0-9 1-9 0 0 0 0 5-9 d2 d3 d4 d5 d6 d11 [Default] [Reference] 0x1D 0x48, 0x1D 0x66, 0x1D 0x68, 0x1D 0x77 [Example] Format 1: Example of Barcode 39 printing 1D 6B 04 54 45 53 54 00 Format 2: Example of Barcode 39 printing 1D 6B 45 04 54 45 53 54 ESC/POS™ emulation │ 83 0x1D 0x77 <GS w> Set barcode width Valid for TG02H [Format] ASCII Hex Decimal [Range] 0x1 ≤ n ≤ 0x6 0x81 ≤ n ≤ 0x86 [Description] Sets the horizontal size of the barcode. n specifies the barcode width (referred to the narrow bar) as follows: GSw n 1D77 n 29 119n n MODULE WIDTH (mm) 0x1, 0x81 0.125 0x2, 0x82 0.25 0x3, 0x83 0.375 0x4, 0x84 0.5 0x5, 0x85 0.625 0x6, 0x86 0.75 If barcode ‘“ CODE128 the wide and narrow bar ratio is the following: n If n < 0x80 If n > 0x80 [Notes] [Default] n=3 [Reference] 0x1D 0x6B [Example] 84 │ ESC/POS™ emulation WIDE/NARROW BAR RATIO 0x1, 0x2, 0x3, 0x4, 0x5, 0x6 3:1 0x81 3:1 0x82 2,5:1 0x83 2,33:1 0x84 2,25:1 0x85 3:1 0x86 3:1 MACRO FUNCTIONS 0x1D 0x3A <GS :> Set start/end of macro definition Valid for TG02H [Format] ASCII Hex Decimal GS: 1D3A 2958 [Range] [Description] Starts or ends macro definition. [Notes] • Macro definition starts when this command is received during normal operation. • When 0x1D 0x5E is received during macro definition, the printer ends macro definition and clears all definitions. • Macros are not defined when power is turned on to the machine. • Macro content is not cancelled by the 0x1B 0x40 command. Therefore, 0x1B 0x40 may be included in the content of macro definitions. • If the printer receives 0x1D 0x3A a second time after previously receiving 0x1D 0x3A, the printer remains in macro undefined status. • The contents of the macro can be defined up to 2048 bytes. If the macro definition exceeds 2048 bytes, excess data is not stored. [Default] [Reference] 0x1D 0x5E [Example] ESC/POS™ emulation │ 85 0x1D 0x5E <GS ^> Execute macro Valid for TG02H [Format] ASCII Hex Decimal [Range] 0 ≤ r, t ≤ 255 0≤m≤1 [Description] Executes a macro. • r specifies the number of times to execute the macro. • t specifies the waiting time for executing the macro. The waiting time is t × 100 msec. for each macro execution. • m specifies macro executing mode: When the LSB of m = 0, the macro is executed r times continuously at the interval specified by t. When the LSB of m = 1, after waiting for the period specifi ed by t, the LED indicator blinks and the printer waits for the FEED button to be pressed. After the button is pressed, the printer executes the macro once. The printer repeats the operation r times. [Notes] • This command has an interval of (t × 100 msec.) after a macro is executed by t. • If this command is received while a macro is being defined, the macro definition is aborted and the definition is cleared. • If the macro is not defined or if r is 0, nothing is executed. • When the macro is executed by pressing the FEED button (m=1), the paper cannot be fed using the FEED button. [Default] [Reference] 0x1D 0x3A [Example] 86 │ ESC/POS™ emulation GS^ r t m 1D5Er t m 2994r t m MISCELLANEOUS COMMAND 0x1B 0x3D <ESC => Select peripherals device Valid for TG02H [Format] ASCII Hex Decimal [Range] 1≤n≤3 [Description] Select the device to which the host computer sends data, using n as follows: n = 1, n = 3 n = 2 [Notes] • When the printer is disabled, it ignores all transmitted data until the printer is enabled through this command. • When the pass-trough function is enabled, all transmitted data are send to the second serial port. [Default] n=1 ESC= n 1B3Dn 2761n Printer Enable Printer Disabled [Reference] [Example] ESC/POS™ emulation │ 87 0x1B 0x40 <ESC @> Initialize printer Valid for TG02H [Format] ASCII Hex Decimal [email protected] 1B40 2764 [Range] [Description] Clears the data in the print buffer and resets the printer mode to that in effect when power was turned on. [Notes] • The data in the receiver buffer is not cleared. • The macro definitions are not cleared. [Default] [Reference] [Example] 88 │ ESC/POS™ emulation 0x1B 0x63 0x35 <ESC c> Enable/Disable front panel keys Valid for TG02H [Format] ASCII Hex Decimal [Range] n = 0, 1 [Description] Enables/disables the keys of the front panel: ESCc 5 n 1B6335n 279953n n FUNCTION 0 Disables front panel keys 1 Enables front panel keys [Notes] [Default] n=1 [Reference] [Example] ESC/POS™ emulation │ 89 0x1B 0x78 <ESC x> Selects speed/current mode Valid for TG02H [Format] ASCII Hex Decimal [Range] 0≤n≤2 [Description] Selects printing speed/current mode. N selects the printing speed as follows: n SPEED/CURRENT 0 Low speed, low current 1 Normal mode, medium current 2 High speed, high current [Notes] [Default] ESCx n 1B78 n 27 120n n=0 [Reference] [Example] 90 │ ESC/POS™ emulation 0x1B 0xFA Print graphic (384x682) Valid for TG02H [Format] ASCII Hex Decimal [Range] 0≤n≤2 0 ≤ xH, xL, yH, yL ≤ 255 [Description] Prints graphic logo from flash or current graphic page located in ram. n selects the graphic source as follows: ESC 0xFA n xHxL yHyL 1BFAn xHxL yHyL 27 250n xHxL yHyL n [Notes] FUNCTION 0 Print graphic page from ram (used at the moment) 1 Print logo 1 from flash 2 Print logo 2 from flash Printable maximum vertical dimension is 682. xL + xH × 256 specifies the starting dotline (1 ÷ 682). yL + yH × 256 specifies the number of lines to print. • If (xL + (xH × 256)) > 682 the printer does not execute the command. • If ( xL + ( xH × 256 ) + yL +( yH × 256 ))> 682 the printer prints only 682 - xL + ( xH × 256 ) +1 dotline. [Default] [Reference] [Example] ESC/POS™ emulation │ 91 0x1B 0xFD Receive graphic page from communication port Valid for TG02H [Format] ASCII Hex Decimal [Range] 0 ≤ nL, nH ≤ 255 [Description] Receives [nL + (nH × 256)] words from the port and puts them into the ram bank. [Notes] • The number of data bytes received is [nL + (nH × 256)] × 2. • Each word is first received as MSByte and then as LSByte. • If [nL + (nH × 256)] is greater than 32768, the data which follows is processed as normal data. •The flash bank dimensions for the graphic print are 384 horizontal dots (48 bytes/dot line) × 682 verticals dots (33280 bytes). ESC 0xFDnL nH 1B FDnL nH 27 253nL nH [Default] [Reference] 0x1B 0xFA, 0x1B 0xFC, 0x1B 0xFE [Example] 92 │ ESC/POS™ emulation 0x1D 0x49 <GS I> Transmit printer ID Valid for TG02H [Format] ASCII Hex Decimal [Range] 1≤n≤3 49 ≤ n ≤ 51 n = 255 [Description] Transmits the printer ID specified by n follows: GSI n 1D49 n 2973n n [Notes] PRINTER ID SPECIFICATION 1, 49 Printer model ID 0x86 (resend the command with n=255) 2, 50 Type ID See table below 3, 51 ROM version ID Depends on ROM version (4 character) 255 Printer model ID (2 bytes) 0x02 0x17 TG02H n = 2, 50 Type ID BIT OFF/ON HEX DECIMAL FUNCTION 0 Off 00 0 2-byte character codes not supported 1 Off 02 2 Not used. Fixed to On 2 Off 00 0 Not used. Fixed to Off 3 - - - Undefined 4 Off 00 0 Not used. Fixed to Off 5 - - - Undefined 6 - - - Undefined 7 Off 00 0 Not used. Fixed to Off This command is executed when the data is processed in the data buffer. Therefore, there could be a time lag between command reception and data transmission, depending on data buffer status. [Default] [Reference] [Example] ESC/POS™ emulation │ 93 0x1D 0x50 <GS P> Set horizontal and vertical motion units Valid for TG02H [Format] ASCII Hex Decimal [Range] 0 ≤ nL, nH ≤ 255 [Description] Sets the horizontal and vertical motion units to 1/x inch and 1/y inch respectively. When x is set to 0, the default setting value is used. When y is set to 0, the default setting value is used. [Notes] • The horizontal direction is perpendicular to the paper feed direction. • In standard mode, the following commands use x or y, regardless of character rotation (upside-down or 90° clockwise rotation): Commands using x: 0x1B 0x20, 0x1B 0x24, 0x1B 0x5C, 0x1D 0x4C, 0x1D 0x57 Commands using y: 0x1B 0x33, 0x1B 0x4A • This command does not affect the previously specified values. • The calculated result from combining this command with others is truncated to the minimum value of the mechanical pitch or an exact multiple of that value. [Default] x = 204, y = 408 [Reference] 0x1B 0x20, 0x1B 0x24, 0x1B 0x5C, 0x1B 0x33, 0x1B 0x4A, 0x1D 0x4C, 0x1D 0x57 [Example] 94 │ ESC/POS™ emulation GSP x y 1D50 x y 2980x y 0x1D 0x5A <GS Z> Receive n bytes from serial port Valid for TG02H [Format] ASCII Hex Decimal [Description] Receives n bytes from serial port and prints them in graphic mode [Notes] Max value of n is 58. GSZ n 1D5A n 27 90 n [Default] [Reference] [Example] ESC/POS™ emulation │ 95 0x1D 0x7C Set printing density Valid for TG02H [Format] ASCII Hex Decimal [Range] 0≤n≤8 48 ≤ n ≤ 56 [Description] Sets printing density. n specifies printing density as follows: GS| n 1D7Cn 29 124n n PRINTING DENSITY 0, 48 - 50% 1, 49 - 37.5% 2, 50 - 25% 3, 51 - 12.5% 4, 52 0% 5, 53 + 12.5% 6, 54 + 25% 7, 55 + 37.5% 8,56 + 50% [Notes] • Printing density reverts to the default value when the printer is reset or turned off. [Default] n=4 [Reference] 0x1D 0x7C [Example] 96 │ ESC/POS™ emulation 0x1D 0xF0 Set printing speed Valid for TG02H [Format] ASCII Hex Decimal [Range] 0≤n≤2 [Description] Sets printing speed. n specifies the printing speed as follows: GS 0xF0n 1DF0 n 29 240n n PRINTING SPEED 0 High quality 1 Normal 2 High speed [Notes] Printing speed reverts to the default value when the printer is reset or turned off. [Default] n=1 [Reference] [Esempio] ESC/POS™ emulation │ 97 98 │ ESC/POS™ emulation Rev.1.00 Part Number : 77200000003000 CUSTOM S.p.A. World Headquarters Via Berettine, 2/B - 43010 Fontevivo, Parma ITALY Tel. +39 0521 680111 - Fax +39 0521 610701 [email protected] - www.custom.biz All rights reserved www.custom.biz
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
advertisement