S oftware M anual
Transcription
S oftware M anual
Command Software for Thermal Printers Elektronik und Feinwerktechnik GmbH Module und Geräte zum Eingeben, Auswerten, Anzeigen und Ausdrucken analoger und digitaler Daten. GeB E-System-78 Standard Software with GeB E O P D- Menue® GeB E Document No.: SoMAN-E-485-V1.5 Stand: 25.08.2004 Gedruckt: 04.06.2007 German: MAN-D-484 Software Manual Applicable to the following controllers that are equipped with the GeB E System 78: G CT-4378 (1) G CT-4379 (2) G CT-4382V2.0 (3) G CT-4479 (4) G CT-4482 (7) G CT-6283V2.0 (5) G CT-6284V2.0 (6) (x) refers to individual controllers in the text. The GeB E logo is a registered trademark of GeB E Elektronik und Feinwerktechnik GmbH. All other brands named in this brochure are properties of the respective companies.Errors and changes reserved. The technical data given are non-committal information and do not represent any assurance of certain features. Our terms of payment and delivery apply. Copyright © 2007 GeB E Elektronik und Feinwerktechnik GmbH. All rights reserved. GeB E Elektronik und Feinwerktechnik GmbH Beethovenstr. 15 • 82110 Germering • Germany • www.oem-printer.com Phone:0049 (0) 89/894141-0 • Fax:0049 (0) 89/8402168 • email: [email protected] GeB E E+F GmbH • www.oem-printer.com• GeB E Do c.No. So MAN-E-485-V1.5 • GeB E-System-78 • Page 1 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual About this manual This manual covers the command software for GeB E thermal printer controllers that are based on the µ-controller chip GeB E System 78. After the table of contents and the history of changes, you can find marketing information describing the main features of the control software, followed by a table showing all control commands. For the technical user, a detailed description of the control commands with their effect on the hardware and examples for applications follows. The image below shows a typical thermal printer system and mechanism controller that is based on the GeB E System 78 which is operated with this standard software from GeB E. This is not an actual system, however, it shows all the possibilities that have been implemented in part with different controllers. Flash-Master für Programm Update PC BarcodeScanner Rot/ Gr ün Gelb F EED / E NT E R GeBE S P I -B U S S ET CONSOLE USB Brid ge Datenfunk über Bluetooth O F F/ NE X T Reader Interface Uh r Cen tron ic s Tongeber A l a rm Control ler mi t N EC 78 - S y s te m Blu e tooth Pow ermanagement Id le/Sleep /O ff Lades tr o m r eg l er 8-28V DC HP Magnetcard Rea der RS232 Printermechanism 8- 6 4 kByte EEPROM CUTTER TREIBER W ic kler T r ei b er LadeNetzgerät 12V DC A ut o Batteri eKontakt bis 28V Blockplan System NEC78 Stand: 24.02.2004 gb File: Prod: Man:474 SoMAN: NEC78 System V0.1 Netz 230 V LadeNetzgerät 9V DC Ri ca.5! Netz 230 V Akkupack 4 NiMH 1 oder 2 L i-Ionen NiMH Akku oder Power Batterie 4x Minion (AA) über Kontaktfedern D C /D C Wandler Netzgerät 6,5V DC Bordnetz 10 -- 36 V DC Netz 230 V GeB E E le ktronik und Feinwerktechnik GmbH • www.oe m-printer.com GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. So MAN-E-485-V1.5 • GeB E-System-78 • P age 2 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual Inhalt 0 History of Changes in this Document 6 1 Basic Information about the Software Concept GeB E System 78 7 1.1 Introduction 1.2 List of Possible Conditionings of the Controller 1.2.1 Which Functions of the C ontroller are Alterable? 1.2.2 How Can Hard and Software Be C onditioned? 1.2.3 Which Components C an Be Controlled? 1.2.4 Which Commands C onduce the Printout? 1.2.5 Which Commands C onduce the Diagnosis? 2.1 Initialization Values after a Reset - (Software DIP Switches) 2.1.1 Standard Entries in the TINIT 3 Conditioning of Interfaces 3.1 General Information 3.1.1 Format of the Serial Interface 3.1.2 Setting Interface Parameters of the Serial Interface 3.2 Infrared Interfaces 3.2.1 General Information 3.2.2 IrDA Protocol I R LPT (printer service) I R C O M M 9 wire (optional) 3.2.3 GeB E-IR Protocol (Bidirectional) 3.2.4 H P - IR Protocol (Unidirectional), only G CT-4378/79-FLAS H 3.2.4.1 Operation 3.3 U S B 12 3.3.1 Operation 3.4 Bluetooth 3.4.1 Operation 4 Control Characters, Control Commands for Printing 7 8 8 8 8 8 9 9 9 10 10 10 11 12 12 12 12 12 12 12 12 12 13 13 14 4.1 Character Sets, Characters/Line 4.1.1 GeB E Standard C haracter Set: Similar to IB M II Code Table 850 4.1.2 O ptionally Available Character Sets 4.2 Command Set 4.2.1 Nomenclature 4.2.2 Table of Nomenclature Symbols 14 14 14 15 15 15 4.2.3 Table of C ommands 4.3 Detailed Description of the General Commands 4.3.1 Print Commands 4.3.2 Positioning (Horizontally and Vertically) Positioning (Horizontally and Vertically) C ontinued 4.3.3 Formatting of C haracters 16 18 18 18 19 19 4.2.2.1 Example of Nomenclature 4.3.3.1 Selecting the Character Size 4.3.3.2 Character Format: B lack, Gray, White on B lack, Spacing 4.3.3.3 Print Mode Text / Data M ode and B lackening Adjustment 15 19 19 20 4.3.4 Graphic Commands 21 4.3.5 Special Commands 22 4.3.6 Character Set for the Different Bar C odes 23 4.3.7. Code Width of Different Bar Codes 4.4 Form Control: Form Feed, TOF (Top of Form) 4.4.1 Control by Paper Length 4.4.2 C ontrol with Markers (Forms and Labels) 4.4.3 Label Printing with Peeler 4.4.4 Controlling Form and Label Printing 24 24 24 24 24 25 4.3.4.1 Bar Code - Character Set, Code Width 4.3.5.1 Cutter 4.3.5.2 Available Bar S izes for Bar Code Printing 4.3.6.1 Code-39 4.3.6.2 Code 2 of 5 interleaved 4.3.6.3 EAN13 4.3.6.4 EAN 8 4.4.4.1 P aper End Sensor as Form Control Sensor 4.4.4.2 Inserting P aper in Form M ode 4.4.4.3 Arrangement of the Sensors at the Printer (Drawing) 4.4.4.4 Arrangement of the Control M arkers on the Label Rolls 21 22 23 23 23 23 23 25 25 26 26 GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. So MAN-E-485-V1.5 • GeB E-System-78 • P age 3 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 4.4.4.5 Table of Form Control Commands 4.4.4.6 Inserting Paper in Standard Mode 5 Error and Status Messages During Printing 27 27 28 5.1 Automatic Status Report 5.1.1 Status Messages of the Printer through the Serial Interface 28 28 5.1.2 Summary of Error Messages in a Table 5.2 Statistics [ 5.2.1 Statistical Value Readout from the EE P R O M 28 30 30 5.1.1.1 P eriodical Output of the C urrent Status 6 LED Control 6.1 Behavior of the Dual LED 28 31 31 7 Initialization Commands: R E S ET and E RASE Data Buffer 32 8 Synchronization with External Events 32 9 Power Management 33 9.1 Limiting the Peak Current During Printing 9.1.1 Power C onsumption, Print Dynamics and Print Q uality 9.1.2 Status Display 9.1.3 Estimating the Battery Status 9.2 Power-Down Modes [ 9.2.1 Idle Mode[ 9.2.2 SLEEP Mode[ 9.2.3 POWE R -OFF Mode [ 9.3 Power-Down / Power-Off Waiting Period 9.3.1 Attention: Switch to POWE R -DOWN Mode only from Idle Mode! 9.3.2 Initialization from the P OWE R -DOWN Mode 9.4 Power-Down Mode Settings - Extended Command 9.4.1 Attention! O perating Voltage Feedback During POWE R -DOWN Mode Through the Interfaces. 9.5 Reactivation from POW E R -DOWN 9.5.1 Reactivation with the Feed Key 9.5.2 Reactivation through Data Line TxD of the Serial R S232/TTL Interface 9.5.3 Reactivation through RTS (CTS) of the Serial R S232/TTL Interface 9.5.4 Reactivation through the IR Interface 9.5.5 Reactivation through Dummy Characters through the Bluetooth Interface 9.5.6 Reactivation through Dummy Characters through the US B Interface 9.5.7 Reactivation from the Sleep Mode through Centronics / Select-In 9.5.8 Reactivation from the POWE R -DOWN Mode through Centronics / Select-In 9.5.8.1 Attention: /Strobe=Low Sets Busy to High 33 33 34 34 34 34 34 34 35 35 35 37 37 37 37 38 38 38 38 38 38 38 39 9.5.9 Note: Reactivation from a POWE R -DO WN Mode Through C entronics/Select-In Under Microsoft Windows® 39 9.5.10 Reactivation by Connecting the C harger 39 10 Battery Charging C ircuit (Software Control) General Information 10.1 Start of the Charging Process with a Formatting Charge 10.1.1 Indication and Inquitry of the C harge Status 10.2 NiM H Charging C ircuit (Standard Component) 10.2.1 No Separate C urrent Limiting of the Charging Circuit 10.2.2 ATTENTIO N: O nly use the matching GeB E charger! 10.2.3 End C riteria for Fast C harging of NiM H Batteries 10.2.4 Limiting the C harging Time through a Timer 10.2.5 Minus Delta-U Recognition (Voltage Reversal at the End of Charge) 10.2.6 Maximum Voltage at the Battery 10.2.7 Delta T / Delta t Recognition (Change of Temperature) 10.2.8 Maximum T Recognition (Maximum Temperature at the Battery) 10.2.9 Restart of Charging Process with Connected C harger 10.2.10 Description of the NiM H C harging Commands 40 40 40 40 40 40 40 40 41 41 41 41 41 42 GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • Seite 4 von 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 11 Li-Ion Battery Charging Circuit (Option) 11.1 Attention! Special Hardware is Required for Li-Ion Batteries! 11.1.1 M aximum U Recognition 11.1.4 End-of-Charge through Timer 11.1.5 Example for Setting the C harging Command 11.2 Standard Settings for GeB E Battery Types 11.3 Battery Test 11.3.1 Battery Test C ommand 12 Batch Files (Text Files) 43 43 43 44 44 44 45 45 46 12.1 The Concept of Batch Files (Text Files) 12.1.1 Batch File Block 1: T0 ...T9 12.1.2 Batch File Block 2: TINIT, TA, TQ, TR , TS 46 46 46 12.1.3 Storage S pace for Batch Files 12.1.4 Help with Unknown Interface Parameters 12.2 Commands for Managing Batch Files 12.2.1 Print Batch File, Send Batch File Information to the Host 12.2.2 Readout of the Available Memory S pace in the EE P R O M 12.2.4 Programming and Erasing of Batch Files 12.3 Error Codes for Processing Batch Files 47 47 47 48 48 49 49 12.1.2.1 TINIT 12.1.2.2 Example: Basic Setting of the Controllers 12.1.2.3 TA, TQ, TR, TS 13 Error Diagnostics 46 46 47 50 13.1 General Information about Error Diagnostics 13.1.1 Self Test, Batch File T0 [ 13.1.2 Test Printout, Batch File T1 13.1.3 Turn Off Printer, Batch File T2 13.1.4 Hex-Dump Mode 50 50 50 50 50 13.1.5 Adjusting the Hex-Dump Mode to the Printer Mechanism through Batch File TA of the C ontroller 13.2 Assistance with Errors during the Programming of Batch Files in the EE P R OM[ 51 51 13.1.4.1 M anual Starting and Stopping of the Hex-Dump Mode 14 OPD- Menue® 14.1 Normal Operation 14.2 Settings Menu 14.3 Menu Guide (Example) 15 Periphery [ 15.1 Real Time Clock with Alarm Register 15.1.1 C lock, Summary of Functions 15.1.1.1 Alarm Register 50 52 52 52 53 55 55 55 55 15.1.2 C ommands to the C lock 55 15.1.3 C ommands for Setting and Reading the C lock Through the Interfaces 55 15.1.2.1 Setting the C lock through the O P D Menu 15.1.3.1 Setting the Clock and its Alarm Register 55 56 15.2 Periphery - Buzzer Control 57 15.1.3.3 Printing Date and Time 15.3 Periphery - Magnetic Card Reader 15.4 Periphery - Second Serial Interface 15.4.1 The AUX UART 15.4.2 Configuration of the UART 57 58 60 60 60 15.1.3.2 R eading the C lock: Date and Time 57 GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • Seite 5 von 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 0 History of Changes in this Document Version V0.1 V0.5 V0.6 V0.7 V0.71 V0.72 V0.73 V0.74 Date 02/14/2003 10/26/03 11/10/03 11/28/03 12/10/03 12/18/03 02/24/04 03/25/2004 V0.75 V1.0 04/15/2004 08/25/2004 V1.1 02/20/2005 V1.2 V1.3. May 2005 08/31/2005 V1.4 V1.5 1.6.07 4.6.07 Change First prespecification Preliminary version Preliminary, commands G CT-6283 integrated, corrections. Further adjustments Preliminary version First revision, corrections i.e. Revision to GeB E System 78 gb, cyrillic character set. new Supplementation of chapters 3, 14, and 15; change of sequence (periphery separately at the end); inserted missing cutter command (chapter 4.2.3 and 4.3.5) Correction of the controller name in ' GeB E System 78', and first "final" edition New: "E5" Status report in chapter 12.3; new: character set3 and character set3 cyrillic Chap.3: Hardware Handshake and Xon/Xoff Protocol; chap. 41.1 Character set 4 inserted; chap. 5.1.1.1 Status LED table; chap.6.1 <ESC> "j" "n"; added to chap.6.2; chap. 10.2.9 commands: p6, p13, p15 changed values; chap. 11.3 n:=<Segment-On repetition> and <ESC> "X" n; added to chap. 12.1.3; chap.12.1.4 <ESC> "0" "x"; chap.12.3 modified menu guide; added to chap.15.1.3.3 revsision, correction Added to chap.3.1.1; chap. 4.1.2 "cyr3"; chap. 4.3.3.3; 4.3.4; 4.4.4.4; 6.2; 8; 12.2.3, and 15.1.3.1 command changes; chap.14.3 revised. Change 13.1.2 Added page reference chapter 6 GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 6 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 1 Basic Information about the Software Concept GeB E System 78 1.1 Introduction The primary function of this software manual regarding the standard GeB E System 78 (a software version for operating GeB E thermal printer mechanism controllers) is, to give the user technical knowledge for understanding and implementing the functions that are accessable, so that the controller can be put to optimal use in any application. Through the controlling host , driver software control sequences instruct the printer to print text, graphics, or bar code in an appealing layout on thermal paper. The software has a series of print commands available. Conditioning Commands help to adapt the printer to multiple application parameters. They set the way that the asynchronous data entries such as interfaces (serial, I R, S PI,programming interface), sensors (keys, paper end sensor P E, remaining paper sensor N P E, paper removal sensor AUX, temperature sensor at the print head, temperature sensor at the battery), selection signals (through jumpers and DI P switches) and wake-up signals (alarm register of the clock) affect different functions from the outside. Some of these commands can be affected and used through the GeB E-OPD Menue® by operating the keys and with feedback from the printer (see operating manual S MAN-471). Some of the controllers are equipped with extensive power management hardware , allowing very efficient printing with the energy that is available. Especially, if a printer is portable and battery operated, the IDLE mode as well as the power down modes SLE E P mode, and P OWE R -OFF mode play an important roll. The controller is adjusted to these functions with adjusting measures in the hardware, but also with conditioning commands that affect the firmware. In addition, there are commands for changing the maximum power consumption during printing that can be used to adapt the printer to the capacity of the system power supply. Parameters for the charge control can be adjusted for Ni M H as well as for LiION battery cells. For some applications, the current status and error messages that can be sent through the interfaces may be quite important. They report, for example, that the paper supply is running low (N P E), or that operating parameters like the print head temperature of the operating voltage moved outside the recommended limits. Also, so-called synchronizing characters can be inserted into the data stream that is to be processed. When these characters reach the end of the print buffer as part of the stream of commands processed by the controller (all previous commands have been executed), they trigger a message through the interface, so all superordinate actions of the host can be synchronized with the printing progress. All these adjustments are either made through hardware settings (at the factory or through switches and jumpers), through software changes during the initialization phase of the controller after a hardware reset (e.g. during power-on), or "on the fly" through adequate integration of conditioning commands in the data stream during operation. The highly flexible GeB E controller functions are largely achieved through the concept of processing commands in programmable batch files (text files) . These batch files can be retrieved for processing through a key stroke, power-on R E S ET, through the interface with special commands in the data stream, or through the final command from a different batch file. Nearly all commands that can be sent through the interface to the controller can also be written into a batch file (E E P R O M). Whenever this batch file is retrieved, the control commands retained are integrated in the data stream, as if they were coming from the interface. This way, text, graphics (logos), as well as adjustments, messaging and hardware control commands that are in batch files can be processed by the controller via command. Batch files can be kept in two memory blocks of the controller: They can be stored in the fixed R O M (flash) of the µ-processor chip by the manufacturer. This can be done through the batch file TINIT, which performs the basic conditioning of the controller after a hardware R E S ET. On the other hand, the user can store the batch files in a serial E E P R O M, i.e. the user has the option to load batch files that were programmed through the interface into the E E P R O M. This allows him for example, to overrule the TI M IT in the flash with his own initialization batch file, thereby setting and starting the controller with a custom condition. Depending on the size of the E E P R O M , personal logos of the user or comments may be filed in it as well, and printed out on command. The same technology is used for setting the operating parameters through the GeB E -O PD- Menue® that is controlled with the operating keys on the console (OFF/N EXT ; FE E D/ENTE R). U sing the printer as a feedback display, the user can change the operating parameters of the printer. The firmware program behind the menu manipulates a batch file stored in the E E P R O M out of which the conditions of the operating parameters are performed. This menu can also be used for setting the clock. If the appropriate batch file is available, instructions for operating the menu can be accessed. Furthermore, the printer can be controlled in a H EX dump mode from the menu (or through other manipulations). In this mode, the data stream is no longer interpreted for its command content, but only the hexadecimal content of the complete GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. So MAN-E-485-V1.5 • GeB E-System-78 • page 7 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual data stream is printed. This mode can be very helpful for diagnostic tasks, mainly during service at the print system. The S ELF TE ST feature, which can be accessed with the F E ED button during power-on, can also be very useful. In order to give a quick idea, which parameters can be conditioned by the user, which print commmands are processed, and which additional functions are provided by the software of the controllers for the user to solve his print job, the following chapter has a list of all the options in note form. 1.2 List of Possible Conditionings of the Controller 1.2.1 Which Functions of the Controller are Alterable? • Interface parameters: baud rate, data bits, parity, stop bit • Choice of interface: R S232, TTL (U S B, Bluetooth, GeB E- R F), Centronics through S P I B U S GeB E I R, H P I R, IrDA-IrLTP, • Print formats: character set, font and sizes, blackening, spacing • Clock: setting, reading through interface, printing, setting alarm register • Power-down performance: SLE E P mode, POWE R -OFF mode, time before auto power-down • Power consumption during printing: app. 700 mA to Imax, print speed, print quality • Charging circuit: charging time, disconnection thresholds for voltage and temperature 1.2.2 How Can Hard and Software Be Conditioned? • Commands through the interfaces •"Batch files: in the flash, in the E E P R O M, for example after a R E SET • Signal lines: keys, jumpers, DI P switches •"Adjusting through GeB E O PD Menu®: with two keys and printout as feedback 1.2.3 Which Components C an Be Controlled? • Printer mechanism control: print head, paper transport motor • Periphery on the controller: LE Ds, buzzer, rewinder, cutter • Writing, reading, erasing: E E P R O M, clock, second serial interface, S P I- B U S interface, magnetic card reader, bar code scanner • Analyzing sensor data: P E, N P E, AUX, temperature at print head and battery, analogIN (10BitADC) • Message about pressing of the "SET" key to the host • Message to the host after synchronizing command was reached • Analysis of statistics: length of printed paper with current head, length of printed paper after the last paper exchange, number of cuts performed by the cutter 1.2.4 Which Commands C onduce the Printout? • Data flow for commands and print data: input buffer, print buffer, parser • Selection of the character set: multiple character sets, custom character sets • Print orientation: text or data mode • Print resolution: Printed images can be stretched or compressed (special software) • Positioning: horizontal, vertical • Character format: size, blackening, gray, white on black, character spacing, length of line • Graphics printing: bar graphics, P CL-5 compression • Printing of WE B pages • Bar code: choice: EAN13, EAN8, 3 of 5, code 39, thickness of basic bar • Print formats for date and time • Retrieval of text and graphics files in batch files • Hexdump mode • Test printout of batch files T0 and T1 through keys G eB E E+F G mbH • www.oem-printer.com • GeB E Doc.No. So MAN-E-485-V1.5 • GeB E-System-78 • page 8 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 1.2.5 Which Commands C onduce the Diagnosis? • Self test: Hold down FE E D key during power-on • Status messages: Can be accessed by command • H EX DU M P mode: access through the GeB E O PD Menu® • Statistics printout: statistical values can be accessed by command 2 Presets of the Hardware/Software Note: If the DI P switches 2 and 3 closed, wh i le 1 and 4 are open, the Ge B E-O P D Menue® wi l l be active, and the DI P switches wi l l be di s abled. 2.1 Initialization Values after a Reset - (Software DI P Switches) The flash memory of the µ-processor contains an initialization batch file "TIN IT" that holds the commands for initializing the controller. If the printer is required to e.g. print with double height and inverse in data mode, the corresponding commands are set into the text file TINIT. After a R E S ET, the controller will first process these commands. Virtually all commands can be entered in a batch file. The controller will interpret the retrieval of a text file, as if data and commands are sent through an additional "virtual" interface. A batch file can contain the command for retrieving another batch file at its end. If an optional E E P R O M is available, the user can change the TINIT through an interface. Please also refer to the chapter E E P R O M in Commands for Working with Batch Files on page 47. After a hardware R E SET, the standard settings are activated first. Next, the TIN IT is processed. If the TINIT is in the E E P R O M , the one in the flash is ignored. 2.1.1 Standard Entries in the TINIT Comm. (ASCII) <ES C>"Y"n <E S C> "[" $40$18 <E S C> "e" $05 Comm. (hex) 1B 59 1E 1B 5B 40 18 1B 45 05 <E S C> "r" "1" .... <E S C> "]" $0 1B 5D 00 00 $0 Function Set blackening of the paper to a medium value of 25 Power consumption to 64 pixels, medium print dynamics and print quality Power-down after 5 seconds regardless of the buffer status, if enabled charging circuit configurated for NI M H cells Activate the transmitter of the serial interface The firmware analyses the settings of the jumper and the DI P switches. Afterwards, the TINIT filed in the flash, or preferably the one in the E E P R O M is processed. If the line feed key is still held down at the end of TINIT, batch file T0 will be retrieved next. T0 is mainly intended for the printing of a batch file containing text (potentially in conjunction with a logo) as a kind of self test with "advertising". For general possibilities and information on the handling of batch files, please refer to Batch Files (Text Files) on page 46. GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. So MAN-E-485-V1.5 • GeB E-System-78 • P age 9 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 3 Conditioning of Interfaces 3.1 General Information While the data formats are automatically controlled with the serial interfaces with protocol (U SB, Bluetooth, GeB E-I R, H P -I R, IrDA), the baud rate of the serial R S232 can be adjusted by command or through the GeB E -OP D- M enue®. The serial interface transmits print data to the printer and the feedback of status information back from the printer. These data flows are controlled through a simultaneous hardware and software handshake. Due to the available baud rates, a handshake is not carried out after each character, since the controller is able to manage all characters in the buffer memory without any timing issues. The input buffer has a 255 byte memory. Since many hosts cannot imediately stop the data stream, a handshake is carried out before the input buffer is completely filled. Whenever the memory is full except for 223 characters, the controller will switch the CTS line to stop and send the control code <Xoff> through the serial data line to the host in order to stop the data stream from the host to the controller. Afterwards, when the buffer has been emptied except for 32 characters, the controller will deblock the CTS line (level change) and send the control character <XON> through the serial data line to inform the host that more data can be transmitted. For the data transmission from the printer controller to the host, the handshake method is not used at all, because the controller only transmits short sequences with a data rate that is relatively low for the host. Therefore, it can be assumed that this data is directly received by the host without loss. Hardware Handshake During the hardware handshake, the transmitting data source (host or printer controller) will usually recognize from the voltage levels on the hardware lines, whether the opposite side is ready to receive data or not. In this case, however, the feedback line is not observed during the transmission from the printer controller to the host. Whenever data accrues, it is immediately sent to the host through the serial line. During data reception, the printer controller controls the handshake line CTS (clear to sent) in connection with the monitoring of the complete input buffer. The signal is practically controlled simultaneously with the software handshake (<XON>/<XOff> protocol) that is performed through the data line. Xon/Xoff - Protocol Parallel to the hardware handshake, the data transmission from the host to the controller is also controlled through the Xon/Xoff protocol. Which one of the two procedures is used to control the data stream is decided through the options and the settings of the host software. 3.1.1 Format of the Serial Interface The illustration shows the bit pattern of a serial character. One character consists of: start bit: 1 data bits: 7 or 8 parity bit: odd, even, non Image: Data Format of the Serial R S232 Interface stop bits: 1 or 2 Attention! When the printer is operated at an extremely slow speed (<5mm/sec.), special settings may be necesary. Please contact our technical support for information in this case. Achtung Achtung : die Standard-Konfiguration hat 1 Stopbit : die Standard-Konfiguration hat kein Parity-Bit "1" (Mark) Start LSB M SB Pa r Stop Start "0" (Space) Bit 0 1 2 1 Zeichen : Signallage 3 4 5 6 7 (1 Start, 8 Data, 1 Parity, 1 Stop) Pegel TTL-Schnittstelle Pegel V.24 (RS-232) Schnittstelle "1" (Mark) +5V (TTL-Pegel) -3V ... -12V "0" (Space) 0V (TTL-Pegel) +3V ... +12V GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 10 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 3.1.2 Setting Interface Parameters of the Serial Interface Also refer to Format of the Serial Interface on page 10 Drucker mit einem 11.05 Mhz Quarz unterstützen 1200 Baud nicht Command(ASCII) <ES C> "]" [baud rate] [mode flags] Command (hex) 1B 5D n m Function Configuration of the serial interface The controller switches to the new baud rate as soon as the preceeding characters have been decoded and transferred to the printer mechanism. This may lead to a delay for the execution of the baud rate command, causing the old setting to remain active for some time. Therefore, it is important to use this command only, when the controller is not busy. This is the case after a reset, or it can be inquired with the feedback of a synchronizing command (see Chronological Synchronization with Other Devices). Authorized values for [baud rate] (binary): 1 : 1,200 Bd , 2: 2,400 Bd , 4 : 4,800 Bd , 9: 9,600 Bd , 19 : 19,200 Bd 38 : 38,400 Bd , 57 : 57,600 Bd , 76 : 76,800 Bd , 115 : 115,2 KB aud Authorized values for [mode flags] (binary): 0xxx xxxx b 1xxx xxxx b transmitter of the serial interface turned on (default) transmitter of the serial interface turned off x1xx xxxx b x0xx xxxx b framing/overrun error output turned on framing/overrun error output turned off (default) xx00 xxxx b xx01 xxxx b xx10 xxxx b xx11 xxxx b non parity zero parity odd parity even parity xxxx 0xxx b xxxx 1xxx b xxxx x0xx b xxxx x1xx b xxxx xx0x b xxxx xx1x b xxxx xxx0 b (default) xxxx xxx1 b 7 data bits 8 data bits (default) 1 stop bit (default) 2 stop bits mode flags disabled mode flags enabled (default) Handshake output C TS blocked only when buffer is full (default) Handshake output C TS blocked directly at end of paper If the second highest bit in the mode flag is set, the following will apply: When a parity or a framing error occurs, a "?" will be printed in place of the defective character. In case of an overrun error, a "!" is printed in place of the defective character, followed by an "X" sent through the serial interface. The standard version has the printing of "?" as a result of a framing error disabled. After a R E S ET, the DI P switches are scanned, and the baud rate is set accordingly. If a different setting is to be selected automatically after the R ESET, it has to be entered in the TINIT. The transmitter of the serial interface will also be disabled at first in order to prevent messages from being sent in a baud rate other than the one selected. The command <ESC> "]" $00 $00 will then turn on the transmitter of the serial interface without changing the current parameter settings. This command is filed at the end of the TINIT in the flash. If the EE P R O M TINIT is used, this command must be behind the baud rate command. Through bit 7 of the M ODE flags, the output of messages through the serial interface can be disabled completely. GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 11 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 3.2 Infrared Interfaces 3.2.1 General Information It is important to consider that infrared transmissions only work "line of sight". The radiation angle is about +/-15 degrees. The transfer distance, which also strongly depends on the efficiency of the opposite side, is about 1.0 meter. It can be expanded to < 3 meters by installing a booster-I R LED. Some devices will signal an I R communication through an LED. 3.2.2 IrDA Protocol I R LPT (printer service) I R CO M M 9 wire (optional) Refer to: www.irda.org 3.2.3 GeB E-I R Protocol (Bidirectional) For master-slave connections (dot to dot), the completely disclosed GeB E -I R prococol provides the user with a simple and affordable option to integrate an I R protocol in his system. In contrast to the IrDA protocol, the GeB E -I R protocol has no software layers that could be used for the communication in networks or for controlling the hardware. The GeB E -I R protocol comes close to the software layer IrC O M M of the IrDA standard. Commands for controlling printer-specific functions are also included. See protocol description: G eB E document no.: 394- MAN-D-I R -Protokoll. 3.2.4 H P - I R Protocol (Unidirectional), only G CT-4378/79-FLAS H See protocol description: GeB E document no.: 417- MAN-E -H P-I R. While the GeB E -I R protocol and the IrDA protocol act bidirectionally, the H P -I R protocol only works unidirectionally, i.e. the printer recieves print data, but it cannot send messages back (e.g. buffer full). For this reason, the timing of the data transmission is tuned, so the printer is guaranteed to always be able to print out the data received through the H P -I R interface without the loss of any data. The transmission speed is limited to app. 800 baud. 3.2.4.1 Operation In the setting "IrDA "or "GeB E I R", the I R receiver will even be active in the sleep mode, so the device will not have to be switched on explicitly for printing. The power consumption of the printer is only about 25µA in this mode. However, the printer should still be turned off during long periods of inactivity. In the setting "H P-I R", the I R receiver is turned off during the sleep mode. Therefore, the device has to be reactivated explicitly for printing. The power consumption of the printer is only about 18µA in this mode. However, the printer should still be turned off during long periods of inactivity. 3.3 U S B The G PT-437x-FLAS H- U S B meets the U S B specification V1.1 for full-speed devices. The printer is compatible with the U SB V2.0 bus systems. The U S B device class is equivalent to a "Vendor Specific Device". Therefore, transmission can be done with virtual C O M port drivers. The printer will operate like a serial printer. The virtual C O M port drivers are available for the operating systems Windows 98/98SE/M E/2000, and XP, and possibly WinC E from the third quarter of 2004. For Linux V2.40 and up, there is a direct Kernel support. Therefore, a VC P driver is not required. Standard GeB E printer drivers can be used. G eB E E+F G mbH• www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 12 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 3.3.1 Operation Before the first operation, the matching virtual C O M port driver and the printer driver have to be installed. The C O M settings of the virtual C O M port have to be set in accordance with the printer settings (recommended: 115,200, n, 8, 1, XON/XOF F). If sleep mode is selected for the printer, it will go into sleep mode after the set time period. However, the U S B interface will remain active, directly supplied from the U S B bus. A new print job with the standard drivers will reactivate the printer without any loss of data. In a U S B suspend mode, the internal U S B interface is also turned off. The printer will 'go to sleep' after the set sleep time period. USB Specification V1.1 ( V2.0 compatible) Device Type Vendor Spcific Device Speed Full Speed Printer Power Consumption No Printing USB active /Printer active USB active /Printer sleep USB suspend / Printer sleep Ce Das Das Pin min. Typ. 30 mA 25 mA 300 µA max. Ge En Stan Ged 3.4 Bluetooth® The G PT-437x-FLAS H- BT meets the BT specification V1.1 class 2, attaining a transmission range of about 10 -15 m. If you require a longer transimission range, please contact us. The printer can be operated with a customary BT dongle that comes with a virtual C O M port driver. A remote R S232 station is also available. 3.4.1 Operation The printer responds to an inquiry scan with its name "G PT-4378/79-FLASH" and its BT address. However, it can also be addressed directly, without a scan, with its BT address. A "BT connect" activates the printer. The printer will maintain a connection until it goes into sleep mode. The online power consumption of the printer with an active BT link is about 35 mA. The sleep mode disconnects an active connection and activates the BT sniff mode. In this mode, the printer scans its environment for possible calls every 1.25 seconds. During these inquiry scans, it remains visible and responsive. It will then take about 2-3 seconds to establish a connection. The power consumption in this mode is about 1.5 mA. When the printer is reactivated through the feed button, the BT tranceiver will remain in sniff mode. After the set time period, the printer will go back into sleep mode. If you are not planning to operate the printer for several days, switch it off with the OFF/NEXT key. After the power is turned on, it will take a minimum of 10 seconds for the printer to become ready to recieve data. 18-2 Tim Zeit Tack Tba Tbs Tds Tho Tsb Tstr The printer does not ask the master for any authentication. Should your transmitter require a P IN number, type in "0000". Please always set your printer to 115,200, n, 8,1. Bluetooth® Specification V1.1 RF transmit level 4 dBm (class 2) Range app. 10 -15 m Profiles SPP Serial Port Profile Printer Power Consumption no Printing Active Link/Data traffic at 115 kbps Active Link Idle Sniff Mode (1.25 sec. scan) Power off Au Ein min. 50 mA 25mA 18mA 1 mA 0 µA Typ. 62 mA 35 mA 25 mA 1.5 mA 0.5µA max. 85 mA 45 mA 30 mA 2.5 mA 0.9 µA ( 3 An Dru GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 13 of 60 GeBE Command Software for Thermal Printers • GeB E-System-78 • Software M anual 4 Control Characters, Control Commands for Printing 4.1 Character Sets, Characters/Line The flash memory of in the standard controller contains four character sets that can be selected by command. Other character sets available on request. The Euro character is located at 16 hex. 4.1.1 G eB E Standard C haracter Set: Similar to I B M II Code Table 850 4.1.2 Optionally Available Character Sets 1 12 4 16 13 17 2 21 3 27 24 32 27 34 42 54 28 37 32 32 49 64 832 Dots/Line 640 Dots/Line 576 Dots/Line 448 Dots/Line 16 x24 12 x24 14x 22 11 x22 9x 22 7x 16 16 x11 16 x24 14 x 22 11 x22 384 Dots/Line IBM II IBM II IBM II IBM II IBM II IBM II IBM II 90° Cyr Cyr Cyr Font No. 192 Dots/Line Character Set Type Dots (horiz. x vert.) Characters/Line The following character sets are currently available and can be programmed into the FLASH memory of the µ-processor in exchange for other character Optional Character Set: Cyrillic sets. Please contact us with your inquiry. B asis: IB M C odetable 850 On request, GeB E can also create other character sets. 36 40 52 48 53 69 40 45 59 52 58 75 64 71 92 82 91 118 12 24 28 36 40 52 13 27 32 40 45 59 17 34 40 52 58 75 GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 14 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 4.2 Command Set 4.2.1 Nomenclature The following terms are used in the tables below: All codes and parameters of one command are composed from single bytes (byte:= 8 bits). They are either AS C II characters, hexadecimal values, or placeholders for numerical values or bit strings. By varying these placeholders or numerical values, the effect of a command can be modified according to the definitions and permitted values. In order to arrange the handling of commands clearly without ambiguity, the symbols in the command tables are used in accordance with the following rules: • Hexadecimal values are marked with a $ symbol. • Control codes of the AS C II character set are put in <> . • Binary form of the flags represents one byte in [ ]. • 8 bits in a bit configuration are followed by a b. • Printable characters or character strings of the AS C II character set are in "". • Symbols for names or character strings are written in ( ). • A set of value ranges of any kind is put in {"}. • Variable parameters are symbolized by small letters (l, m, n ...). • In a 2-byte parameter, the leading ´high byte´ is marked with an h (high), while the following ´low byte´ is marked with an l (low) . 4.2.2 Table of Nomenclature Symbols Symbol $ <> Meaning hexadecimal value AS C II control code Example $0A <LF> [] 8 flag bits [FLAG] printable characters "E" "" () {"} m, n nh , nl <ES C>"F"lh, ll Meaning 1 byte command: line feed 001x 1111 b b marks a bit configuration from M S B to LS B letter E Value decimal 10 $0A $2F or $3F AS C II character $45 character string (NAME) "AB C" $41 $42 $43 set of values {RAN G E O F VA{$00, .. ,$FF} all decimal values LUES} all hex values between between 0 and 255 $00 and $FF n can take any decione byte each n:= {0, .. , 100} variable byte mal value between 0 and 100 2-byte value nh:= $03 $03E8 decimal 1000 nl:= $E8 command <ES C> paper feed by feed by 1000 lines paper feed by lh,ll lines "F"$03$E8 $03E8 lines 4.2.2.1 Example of Nomenclature The command "Paper feed by X lines" has the general form: <E S C>"F"lh, ll. , lh := {0, .... ,9} ; ll := {0, ... ,255}. The value range for the parameters is limited. The command <E S C> "F" $03 $E8 means, for example, that the paper is to be transported forward by exactly 1,000 lines (at 8 dots/mm, this represents 125 mm). Calculation: $03E8:= decimal 1,000; ( $03E8:= decimal (3x256 + 14x16 + 8x1) = decimal 1,000). GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. So MAN-E-485-V1.5 • GeB E-System-78 • Page15 of 59 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 4.2.3 Table of Commands Command (AS CII) <C R > <C R> <LF> <LF> <LF> <C R> <FF> <ES C> "@" <ES C> "A" <E S C> "a" [FLAG G S] <ES C> "B" <ES C> "b" p1 ....p8 <ES C> "C" n <ES C> "c" n <ES C> "c" $01 n <ES C> "D" n <ES C> "d" <E S C> "e" n [Flags] <E S C> "F" lh ll <E S C> "g" n g1....gn <ES C> "H" n <ES C> "h" n <ES C> "I" n <ES C> "j" n <E S C> "k" <ES C> "L" n <E S C> "l"ph p l <ES C> "M" n <ES C> "m" n <ES C> "m" n o <E S C> "N" ph p l <E S C> "n" n (Data) <ES C> "o" <ES C> "P" n <ES C> "p" m n <E S C> "R" ph p l Function Print command with one line paper feed Print command with one line paper feed Print command with one line paper feed Print command with one line paper feed Form FE ED up to the selected length or marker (TO F) Initialize the printer through a R E S ET pulse Erase the data in the print buffer Print clock, choose format Control buzzer Print bar code (EAN8, EAN13, C ODE 39, 2of5 interleaved) 0: full cut / 1: half cut / 2: initialize cutter Set clock and alarm Value Range n:="{$07, $05, $04} Clock alarm on/off n:="{$00, $01} Print text mode / data mode n:="{0,1} Read clock through serial interface Sleep mode Paper feed by lh x 2 5 6 + ll l i nes. Pixel graphics P CL5 , print graphics line with length of n bytes Change character height from 0: normal height to 7: n:={0,1, ...,7} eightfold height Set virtual width of the printer mechanism Print black on white / white on black n:="{0,1} Control LED 2 (option LED) n:="{0,1} Send back current status Print with/without underline n:="{0,1} Set page length ph:={1, .,4"}; p l :={1, .. ,4"} Print black / gray n:="{0,1} Set graphics mode (select coding) n:={$00 , .. , $05} Offset to the right for graphics Absolute TAB to dot position p = 256 x ph + p l . Send back data string through the serial interface Set beginning of page Select character set no. n n:={1, .. ,4"} Select light barrier, distance to print head m:={1, .. ,4"}; n:={1, .. ,4"} R elative TAB forward/reverse by p dots; p = 256 x ph + pl Page 18 18 18 18 27 32 32 57 57 23 22 55, 56 56 20 56 36 18 21 to 22 19 18 19 31 28 19 27 19 21 21 19 47 27 19 27 19 GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E-485-V1.5 • GeB E-System-78 • P age 16 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual Table of Commands (Continued) <ES C> "r" p1 ... p15 Set up battery circuit <ES C> "S" n <E S C> "s" n .... <ES C> "T" "x" Increase horizontal spacing Load batch file or TINIT Print batch file no."x" <ES C> "T" "A" <E S C> "u" n .... <ES C> "V" "X" Switch to hexdump mode Erase batch file or TINIT Send synchronizing character "X" serially <ES C> "v" "0" <ES C> "v" "1" <ES C> "v" "2" <ES C> "v" "3" <ES C> "v" "4" <ES C> "v".... <ES C> "v" "5" "T" Read out the total number of cuts by cutter Read out the total performance of mechanism Read out the total operating time Read out paper length since last paper exchange R ead out the last 10 error messages Read batch file from flash or serial EE P R O M Read the available memory space for text files T0-T9 in the E E P R O M R ead the available memory space for TINIT in the EEPROM Read the size of the E E P R O M memory Read batch file x from the serial EE P R O M Read batch file x from the flash Print with normal width / double width Set blackening of paper individually (n= 10 ...75) LED power saving mode - select table Save errors on/off Hexdump mode Set power consumption and print quality Set baud rate and interface parameters Battery test Define minimum length n for marker recognition R everse paper feed by lh x 256 + ll lines. Wait until label has been removed plus n x 25 ms <ES C> "v" "5" "U" <ES C> "v" "6" <ES C> "v" "7" <ES C> "v" "8" <ES C> "W" n <ES C> "Y" n <ES C> "y" "n" <ES C> "x" n <E S C> "z" <ES C> "[" n m <ES C> "]" n <ES C> "{" ... <ES C> "}" n <E S C> "\" lh l l <ES C> "_" n 42+ 43+ 44 19 x:= { 0 ...9, A, Q, R, S) 49 x:= { 0 ...9, A, Q, R, S) 47+ 51 51 x:= { 0 ...9, A, Q, R, S) 49 17, 37 30 30 30 30 30 48 48 48 n:="{0,1} n:="{0,1} n:={1, .. ,4"} n:={1, .. ,4"} 48 48 48 19 20 31 30 51 33 11 45 27 18 27 GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E-485-V1.5 • GeB E-System-78 • P age 17 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 4.3 Detailed Description of the General C ommands 4.3.1 Print C ommands Command (ASCII) <C R> Command (hex) 0D <LF> 0A <C R> <LF> 0D 0A <LF> <C R> 0A 0D Number of characters that are sent without print initiation character >maximum number of characters per line Function Print command with one line paper feed. An immediately following <LF> will be ignored. Print command with one line paper feed. An immediately following <C R> will be ignored. Print command with one line paper feed Print command with one line paper feed When the line is full, the exceeding characters will trigger a new line. The number of characters per line is determined by the selected font and the effective print width. With the command <E S C> "h" n, the effective print width can be reduced to a smaller value than the one that the maximum print width allowed by the printer mechanism. For the standard font #1 with 16 horizontal times 24 vertical characters and an effective print width of 384 pixels, the result would be: 384 pixels/line / 16 pixels/character = 24 characters/line <ES C> "h" n 1B 68 n Set the effective print width of the printer mechnaism in bytes n:= {16 ...max. print width of the mechanism}. This command only works for text printing. It can be used to change the maximum number of characters per line. It is printed with left-side justification. <ES C> "V" "X" B 56 "X" Print and report synchronizing character "X" through the serial interface. If the line buffer is not empty, this command will also initiate the printing of the current line. String length exceeds a certain number of characters Besides the code for printable characters, a large number of control codes can be written into the 256-bytes character buffer without triggering the printout of the next line. This could result in a blockage of the printer. Therefore, the printing of a line will be initiated, when the data string for its construction reaches a number of bytes that matches the printer mechanism, even if the description of the line is incomplete. 4.3.2 Positioning (Horizontally and Vertically) Comm. (ASC II) Comm. (hex) Function <E S C> "F" lh ll 1B 46 lh ll Forward paper feed by l lines: = (lh x 256 + ll) lines. This command can only be given at the beginning of a line and will be ignored otherwise. The transport is limited to 2,400 dot lines per command (equals 300 mm with 8 dots/mm). <E S C> "\" lh ll 1B 5C lh ll Reverse paper feed by l = lh x 256 + ll lines. Limited to 2,400 dot lines (equals 300 mm with 8 dots/mm). This command can only be given at the beginning of a line and will be ignored otherwise. Eight dot lines will be added to each reverse paper feed. Afterwards, the printer will feed the paper forward for eight dot lines in order to eliminate the gear play. ATTENTION! The paper must not be transported so far, that its end leaves the transport roll. Otherwise, the rubber roll will not be able to transport the ejected paper forward again. This command should not be used in combination with a paper rewinder, since the rewinder pulls forward, while the paper is transported backwards. GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E-485-V1.5 • GeB E-System-78 • P age 18 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual Positioning (Horizontally and Vertically) Continued <E S C>"N" ph pl <E S C> "R" ph pl 1B 4E ph pl 1B 52 ph pl Absolute TAB from the left to the horizontal pixel position p = 256 x ph + pl (p = 0 ...up to width of mechanism n -1, in pixels). This command allows the exact positioning to the dot to a print start position within one line. If the requested positioning goes beyond the available span of one line, the command will be ignored. The print attributes are not affected. Relative TAB forward/reverse by p pixels; p = 256 x ph + pl p is defined as an integer number with plus or minus sign as follows: phl:= .... FFFD FFF E FFFF 0000 0001 0002 0003 ... p := -3 -2 -1 0 +1 +2 +3 ... If the requested positioning goes beyond the available span of one line, the command will be ignored. The print attributes are not affected. 4.3.3 Formatting of C haracters 4.3.3.1 Selecting the Character Size Comm. (ASC II) Comm. (hex) Function <ES C> "P" "n" 1B 50 n Select character set no. n. n: = {1, 2, ..., number of character sets} The controller masks value n with $0F. Therefore, it can also be put in as an AS C II character "1", "2", "3", ... All fonts can be mixed within the same line. <ES C> "H" "n" 1B 48 n Print n + 1 -fold height. n := {AS C II character "1", "2", "3", ...,"7"} "0":= normal height; "1":= double height; "2":= triple height; ....... "7":= eightfold height, This command can be mixed with another height within the same line. <ES C> "W" "1" 1B 57 31 Print double width. This command will be valid until cancelled. This command can be mixed with normal width within the same line. <ES C> "W" "0" 1B 57 30 Print normal width. This command can be mixed with double width within the same line. It will be valid until cancelled. Default setting after a R ES ET. 4.3.3.2 Character Format: Black, Gray, White on Black, S pacing Comm. (ASC II) <ES C> "I" "0" Comm. (hex) Function 1B 49 30 Print black/gray on white. This command will be valid until cancelled. Print black/gray on white will be in effect after R ES ET. <ES C> "I" "1" 1B 49 31 Print white in black/gray. This command will be valid until cancelled. <ES C> "L" "0" 1B 4C 30 Print without underline. This command will be valid until cancelled. Print without underline will be in effect after R ES ET. <ES C> "L" "1" 1B 4C 31 Print with underline. This command will be valid until cancelled. <ES C> "M" "0" 1B 4D 30 Print black. This command will be valid until cancelled. Print black will be in effect after R E SET. <ES C> "M" "1" 1B 4D 31 Print gray. This command will be valid until cancelled. Does not work with graphic commands. <E S C> "S" n 1B 52 n Increase horizontal spacing ( 0 ! n ! 15; default = 0) All subsequent characters will be printed with an additional space of n pixels (spaced characters). This command can be given and cancelled multiple times within one line. Print with a spacing of n:=0 will also be in effect after R ES ET. GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • page 19 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 4.3.3.3 Print Mode Text / Data M ode and Blackening Adjustment Comm. (ASC II) Comm. (hex) Function <ES C> "D" "n" 1B 44 "n" Print in text mode ("n"="0") or in data mode ("n"="1"). In data mode, the writing is turned 180°, in order to make the printout readable, when the paper-strip is hanging from the printer. The chronological sequence of printed lines therefore appears from the bottom to the top. Text Mode Print Head <E S C> "Y" n Papiertransportrichtung This is a printout in text mode. The paper spools toward the top, like it does on a typewriter. The current line is printed below the previous line. Data Mode Print Head This command does not work for graphics. This command can be given at any position within a line, as long as the line has not been completed. It will affect the complete line. This command will be valid until revoked with the corresponding command. After R ES ET, the status predefined by switch 4 will go into effect. Adjust the blackening of the paper individually. n is a factor between 10 (lighter) and 100 (darker). In general, 25 is the default value. Values outside the range will not change the current setting. After each R E S ET, a value that is adjusted to the respective printer mechanism is set. If different values are required permanently, they can be achieved by setting this command in the batch file TIN IT-F (at the factory) or in the TINIT-E (by the user, if an EE P R O M is installed). GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 20 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 4.3.4 Graphic C ommands The data structure of the graphic data of these modes corresponds to the commands of the P CL specification from version 3 on . They are compatible with the M S Windows compression procedure. The processing of compressed data takes about as much time as pure bit map printing. As a result of the smaller amount of data that has to be transmitted, there is a clear advantage in speed compared to the process without compression (about a 1:3 ratio). Comm. (ASCII) <ES C> "m" n Comm. (hex) Function 1B 6D n Set the current graphic mode n=$00: unencoded n=$01: run length encoded n=$02: TIFF (4.0) encoded n=$03: delta row encoded n=$04: X-byte offset with the additional second parameter o n=$05: reset delta row seed row (see below) This command will be valid until cancelled. 0 is the default value after a RESET. <ES C> "m" n o 1B 6D "n"o X-byte offset with the additional second parameter o With the command <ESC> "m" $04 o, graphics can be shifted to the right. In order to produce a left margin of 80 pixels (10 mm at 8 dots/mm), the command <ESC>"m" $04 $0A would be given. Graphics that go beyond the right margin will be cut off. 1B 6D "n"o <ES C> "m" n 1B 6D 05 <ES C> "g" n g1 ...gn 1B 67 n g1 ...gn Reset delta row seed row The command <ESC> "m" $05 erases the seed row of the delta row graphics. The seed row is the current line that was printed last. The new line information is compared to the seed row. After the new line is printed, it will become the seed row. The command for erasing the seed row should always be given at the beginning of graphics that contain delta row commands. This will not be necessary, if the first graphic line is not delta row graphics. Pixel graphics (Print one horizontal graphics line.): Mixing with text If the graphics command is given, and the current text line has not been completed by <CR> or <LF>, text and graphics will be mixed (except with delta row encoded). The graphics begin in the top dot line of the text line. If the graphics are longer than the current text, the new text will begin with its top line in the line that immediately follows the graphics. 0 : Unencoded n := length of graphics in bytes, g1 ...gn := graphic bytes to be printed In text mode, beginning from left to right, dot 0 is the MSB in the first byte, th the dot furthest to the right is the LSB in the n byte. A 1 in the respective th bit position represents a black dot in the line. After the n byte, the printer automatically returns to the character mode. It will ignore all commands while processing these n bytes. The command: <E S C> "g" n g1 ...g n is synonymous with the old command : <E S C>" G" g1 ...g n, if n = n max . The graphics mode "0" for unencoded is the default setting. GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 21 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual Graphic Commands (continued) Comm. (ASC II) <ES C> "g" n [DATA] Comm. (hex) Function 1B 67 n 1 : R un length encoded g1....gn n := number of bytes following Run length interprets graphic information in byte pairs. Each first byte is the repetition count byte for the second byte. A 0 for the repetition count byte means that the following graphic byte will be printed once without being repeated. A 1 means that the graphic byte will be printed twice. The repetition count byte has a value range of 0 - 255, which translates into a print factor of 1 to 256. The second byte contains the graphic information that is to be printed. In text mode, from left to right, the dot on the very right is the LS bit. A 1 in the respective bit position represents a black dot in the line. After completing the line, the printer will automatically return to the character mode. 2 : TIFF (4.0) Encoded n := length of the following bytes TIFF interprets graphic information as TIFF "pack bits". TIFF combines features of unencoded and run length encoding. The graphic information is preceded by a control byte. The control byte indicates (sign bit), whether the following byte is a graphic byte that is to be repeated (up to 127 times), or whether a number of bytes follow (up to 127) that are to be printed as bit map. A positive control byte expects bit map information, a negative control byte (complement on two) respects a repeat byte. 3 : Delta Row n := length of the following graphic bytes Delta row will pick out the bytes from a line that are different from the bytes in the preceding line, and transfer only these differences. If only one bit differs, just the respective byte has to be transferred. The delta data consists of a command byte and 1 to 8 replacement bytes. The command byte contains two pieces of information, the number of replacement bytes (bit 7 ,6, and 5), and the relative left offset of the last byte that was changed (bit 4, 3, 2, 1, and 0). Value 31 as offset expects a following additional offset byte. Value 255 of this additional offset byte expects another one and so on. The offset values are added up. In text mode, from left to right, the dot on the very right is the LS bit. A 1 in the respective bit position of a replacement byte represents a black dot in the line. After completing the line, the printer will automatically return to the character mode. During the printing of this line, the printer will ignore all other commands. M ixing of text and graphics is not possible with delta row. 4.3.5 Special C ommands 4.3.5.1 Cutter Comm. (ASC II) Comm. (hex) <ES C> "C" "n" 1B 43 n Function n = 0 : full cut The paper is cut off completely. n = 1 : half cut Leaves a small uncut section in the center. n = 2 : initialize cutter This command is entered in the TINIT, when a cutter is used. After a R ES ET, the controller will check, if the cutter is in the home position. If not, the cutter is moved to the home position. Without the cutter component, no error message is sent. If the cutter is not in the home position and cannot reach it within about 2 seconds, the error message "C" for blocked cutter is sent, and the printing process is stopped. GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 22 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 4.3.5.2 Bar Code - Character Set, Code Width If there is still data in the current line that has not been printed, while the bar code command is to be processed, the printer will print this data and start with the bar code in a new line. Bar codes are printed with or without plain text, however, it is not placed according to the norm. Comm. (ASC II) <ES C> "b" [type] [size] Xh Xl Yh Yl [quantity] [string] Comm. (hex) 1B 62 [type] [size] Xh Xl Yh Yl n [string] Function Print bar code. Type "A" - code-39 with plain text; "a" - dito w/o plain text "B" - code-2 of 5-interleaved with plain text;"b" - dito w/o plain text "C" - EAN 13 with plain text; "c" - dito w/o plain text "D" - EAN 8 with plain text; "d" - dito w/o plain text "E" - code-39 with check digit after "e" - dito w/o plain text module 43, with plain text; Size = width of bars and spaces (0 ...7) X = Xh * 256 + Xl Start position of the code in pixels as distance from left margin. Y = Yh * 256 + Yl Height of the bar code in pixels not including plain text. Y is internally rounded to whole millimeters, e.g.: Y = 406 is printed as 50.0 mm. (Y =< 100 mm = 800 pixels). n = number of bar code characters ( n =< 30). String = characters that represent the bar code information (not all characters are allowed; see below). 4.3.5.3 Available Bar Sizes for Bar Code Printing By selecting the bar width according to the table below, the bar code can be printed in different sizes. Size (hex) 0 1 2 3 4 5 6 7 Width[Pixels] row Element Nar- Width[Pixels] row Element 2 2 3 4 5 6 7 8 Nar- Width[Pixels] Element 0,250 0,250 0,375 0,500 0,625 0,750 0,875 1,000 Wide Width[Pixels] Element 5 6 7 9 12 14 16 18 Wide 0,625 0,750 0,875 1,125 1,500 1,750 2,000 2,250 4.3.6 C haracter Set for the Different Bar Codes 4.3.6.1 Code-39 1234567890AB C DEF G HIJKL M NO P Q R STUVWXY Z$/-.+%<Space> 4.3.6.2 Code 2 of 5 interleaved 1234567890 (The number of characters n has to be even). 4.3.6.3 EAN13 1234567890 (Other characters will only result in the printing of the text information, but not the bar code itself. The check sum, which is the 13th character, is calculated and added by the printer). 4.3.6.4 EAN 8 1234567890 (Other characters will only result in the printing of the text information, but not the bar code itself. The check sum, which is the 8th character, is calculated and added by the printer). GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 23 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 4.3.7. Code Width of Different Bar Codes Code-39: 6*wide + 14*narrow + n*(3*wide+7*narrow) Special characters may slightly differ from this formula. Code 2 of 5 interleaved: 1*wide + 6*narrow + n*(2*wide+3*narrow) EAN13: narrow element * 95 EAN 8: narrow element * 95 The printing of bar code will be ignored, if: •"a wrong type or an unknown size was given, • the number n given was either too large, or it did not correspond with the type. A white area will be ´printed´ instead of a bar code, if: • the right line margin or the maximum height of 100mm is exceeded, • characters were put in that do not correspond with the character set of the code. If the bar code is ignored, the characters of the string will be printed as plain text, as long as a type with plain text has been selected. Ignored bar code without plain text will not initiate printing. 4.4 Form Control: Form Feed, TOF (Top of Form) The printer controller has multiple commands for form control available. There are different types of form control: • control by paper length • control with markers (forms and labels) 4.4.1 Control by Paper Length The length of the receipt is entered through the command <E S C> "l" xh xl. The paper length is then measured through the feed of the printer mechanism starting from the position determined by this command. A sensor for paper positioning is not in use in this case. Strictly speaking, this is not a type of form control. Therefore, a start position can be predetermined at any place on the paper, and there cannot be any positioned form printing on the paper roll. If less paper is printed on than the length predetermined by the command, the final form feed command will trigger the final printing, and a paper feed will be processed, until the page length counter reports the reaching of the receipt length. At this point, the printer stops feeding paper, and the receipt may be cut off with a cut command. If the length of printed paper exceeds the predetermined receipt length, the paper length counter will automatically remain at the receipt length limit "max.", until an FF is processed. It will then start to measure the predetermined paper length of the following receipt. 4.4.2 Control with Markers (Forms and Labels) M arkers on the paper are recognized by a sensor (light barrier). This type of control can be done with preprinted, infrared light absorbing markers on the print side of the paper, or with holes that have been pre-punched into the paper. Marker control allows the use of preprinted paper, which makes it easier to put the printer in the correct print position on the forms. A marker, a gap, or a hole is recognized, whenever a P E of at least 3 mm length is reported. The control for label printing works the same way, in order to be able to position the print headas close to the edge of the label as possible at the start of printing . The gap between two labels is used as the marker in this case. Different sensors may be used to measure the paper position. Which sensor is used for form control is determined by the two lower bits in the flag byte of the command <E S C> "p" [distance][flags]. 4.4.3 Label Printing with Peeler (See arrangement of the sensors at the printer (drawing) on page 26) If the printer mechanism is equipped with a peeler, it can print labels, but also present t hem with the support of a paper rewinder. The paper rewinder pulls the carrier paper around the peeler, causing the label to separate from the carrier paper and to proceed straight. The paper transport is preset by the form feed command to stop at a position, where a small area of the label remains attached to the carrier paper at the edge of the peeler, presenting the label to the user without haGeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 24 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual ving it fall off. The user can remove the label at this point. The command ( E S C _ n ) has the printer waiting before it prints the next label, until the label in the peeler has been removed. The AU X sensor is installed at the peeler's edge. It registers the label and signals to the controller, when it has been removed. 4.4.4 C ontrolling Form and Label Printing In order to process and control the procedures introduced above, several different commands are required. They are described in the table on page 27. Three possible sensors are available for control: • paper end sensor (P E sensor) at the entry of the printer mechanism • near paper end sensor (N P E sensor), sensor connection J13 on the controller board, is normally used for recognizing the paper supply coming to an end • auxiliary sensor (AU X sensor), sensor connection J15 on the controller board, is normally used for recognizing the removal of a peeled-off label, or for recognizing a successful paper cutting process All three sensors can be used for form control. If the two lowest bits of the byte n:= [flags] are both 0, none of the light barriers is selected as a control light barrier for the form feed, and a form control will not be activated. 4.4.4.1 P aper End Sensor as Form Control Sensor Most of the time, the internal reflexion light barrier (P E sensor) at the paper entry of the printer mechanism is selected to control the form feed. The distance from this light barrier to the print comb is about 10 mm. For label printing with gap control, the paper must be transported forward about 10 mm, after the gap has been recognized by the light sensor, in order for the upper edge of the label to be positioned directly under the print comb. This is automatically processed by the command <E S C>"p"$14[XXXX XX01], if the control has located the gap (see page 27 with the commands). Since this sensor is also required to recognize the paper end during the form control, the marker (or the gap between labels on carrier paper) may not exceed a length of 7 mm. If no paper is detected within 60 dot lines (7.5 mm), while the motor is running (marker end, end of gap), paper end will be recognized, the printer will stop, and the message P E will be initiated. It has to be pointed out that in this form mode, P E can only be recognized, while the motor is running. Therefore, paper that has been removed, when the motor is idol, will not initiate a P E message, if the form control is turned on. 4.4.4.2 Inserting Paper in Form Mode Since the printer can only recognize a P E in the form mode, when the paper is moving, an auto paper load as in the standard mode is not possible. The paper has to be inserted manually. If bit 2 of m:= [light barrier flags] is set, the printer will switch back from form mode to standard mode with the print head open (recognition through sensor switch "head open"). This allows an auto load even in form mode, when the head is open. When the head is closed, the printer returns to the form mode. Any markers during the auto load feeding will be ignored. After the auto paper load and the closing of the head, batch file T10, which is only available in the flash, will be processed, regardless, whether the printer is positioned on a marker or not. This file contains a short feed followed by an FF. The short feed allows the printer to determine, whether a P E occured, and to stop further printing or form feeding if applicable. The opening and closing of the print head during operation does not trigger a form feed. GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 25 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 4.4.4.3 Arrangement of the Sensors at the Printer (Drawing) Printer Take away AUX-Sensor Gap Label Head Label P aper end Peeler PE-Sensor Liner rewinder 4.4.4.4 Arrangement of the Control M arkers on the Label R olls Form marker G PT-6262 for the straight paper path The marker is located on the side of the paper that is 13 mm N O T p r i nted on. 3 - 7,5 mm 5 mm Form marker G PT-6223 /6224 for the bended paper path The marker is located on the printable side of the paper. 10.5 mm 3 - 7,5 mm 5 mm Form marker G PT-4352 G PT-4378 G PT-4379 The marker may not be printed on. The beginning of the form does not correspond with the marker, but depends on the position of the light barrier. The marker is located on the printable side of the paper. 16.2 mm 3 - 7,5 mm 5 mm Form marker G PT-4443 G PT-4454 The marker may not be printed on. The beginning of the form does not correspond with the marker, but depends on the position of the light barrier. The marker is located on the printable side of the paper. 16.9 mm 3 - 7,5 mm The marker may not be printed on. The beginning of the form does not correspond with the marker, but depends on the position of the light barrier. 5.3 mm GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 26 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 4.4.4.5 Table of Form Control Commands Table of Form Control Commands Comm. (ASCII) Comm. (hex) Function <ESC> "l" [high feed] [low feed] 1B 6C xh xl <FF> 0C <ESC> "o" 1B 6F <ESC> "_" n 1B 5F <ESC> "p" [distance] [flags] 1B 70 m n <ESC> "}" [marker length in lines] 1B 7D n Length:= ( xh(256) + xl) x 0.125 mm sets the page length in mm. This is the form feed length, if no light barriers are used. It is also used as the maximum feed length (as a criterion for termination), when the light barrier is used as a marker sensor. If no marker is reached and no gap is recognized within the set length, the feed will be stopped. When this command is processed by the printer controller, the beginning of the page will be set automatically , as if it contained the command <E S C> "o" . Form feed: Print command and line feed, until the TO F marker is recognized or the preset page length is reached. For an FF, the printer will feed, until either a marker (if the appropriate sensor is activated) or the preset page length is reached. If, at the time of the FF, the marker has already appeared or the page length has been reached, the internal FF counter is set to the new page length. Therefore, an FF either causes a feeding to the next marker, or (if no marker appears) a feeding by a whole page length. A reverse transport is taken into account, when the page length is calculated, even if it goes beyond the form limits. In the standard version, a form feed in the form mode can be triggered by pressing the OFF/N EXT key. This key function branches to batch file T1 in the flash, which contains an F F.The user has the option to alter this function by changing the T1 in the E E P R O M . Set beginning of page to current cursor position. This command sets the internal position counter to zero. Wait until label is removed, plus n x 25 ms This command is usually given after a form feed command. This command refers to the AUX light barrier, which has to be installed at the front of the printer in order to recognize the removal of an adhesive label from the peeler edge. This command will only clear the printer, after the label has been removed, and the light barrier reports "AUX- P E". P lease note that AUX is a light barrier that uses transmitted light . P arameter m - [distance] - represents the distance between the light barrier and the print comb in 1/2 mm increments. (distance between internal light barrier and print comb = 10 mm; m: = $14:= 20) M eanings of the values n for light barrier selection - [flags]:= n xxxx xx00 b no light barrier, default (form control) xxxx xx01 b internal paper end light barrier (marker control) xxxx xx10 b N P E light barrier (reflex type) xxxx xx11 b AUX light barrier (forked type) The remaining bits should be set to zero. A form feed will initiate a search for the marker. When it is detected, the paper will automatically be fed by the distance m in order to place it at an exactly defined position on the form. Set marker length n in print lines: (1 line := 1/8 mm ) The default setting after a reset is 3 mm (24 lines). The maximum length is 7 mm (56 lines). P lease note: This command does NOT send the length of the marker, but the length that the light barrier detects as "black" (or a value sufficiently below this length). At the edges of the marker, the light barrier is likely to report "paper still present" (depending on the marker and the paper used). 4.4.4.6 Inserting Paper in Standard Mode In standard mode (no form control), paper end (P E) recognition through the internal light sensor is organized as follows: In order to make the P E function insensitive to disturbaces, the P E message and the stopping of the printer are not triggered, until it has been positively recognized three times in 25 ms intervals. GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 27 of 60 27 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 5 Error and Status Messages During Printing 5.1 Automatic Status Report Status information that is reported back through the interfaces is very helpful for the safe operation of the printers. The serial interfaces (R S232, TTL, U S B, Ir, Bluetooth) are able to transmit the most extensive information back (parallel interface is limited). The status messages describe: R E SET form, head lifted, paper end; operational error at the cutter or at the power supply, operating temperature, charging process, and battery status, etc. Operational characteristics are also collected in the E E P R O M: the amount of printed paper by the head, operating time, number of cuts, and primarily the amount of paper used since the last paper roll exchange. 5.1.1 Status Messages of the Printer through the Serial Interface When a status changes or an error occurs, a single AS C II character is sent through the serial interface in most cases. This can be analysed by the host. After an error has been cleared, the appropriate small letter is transmitted, followed by an "X", if no additional error presents itself. 5.1.1.1 Periodical Output of the Current Status With this command, the current printer status can be inquired through the serial interface. Comm. (ASC II) <ES C> "k" n Comm. (hex) 1B 6B n Function Send all current (error) status messages back. The controller sends all current status messages back sequentially. If no messages are available at this time, a "X" is sent back. This command will not be processed immediately. Since it is treated like a printable character, its processing will not start, before all previously sent characters have been processed in the parser. For this special case, an automatic repeat of error messages can be acivated. n = "0" : repeat function is turned off n = (1, ... ,254):=( $01, ... ,$F E) The current printer status is sent to the host in intervals of app. 1/10s x n. n = (255):= ($FF). one-time inquiry with no effect on the preset repeat time. GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 28 of 60 0 - X OF F all characters Buffer Full - 1 X ON Buffer Empty "p" "P" Paper End - "E5" "l" "f" Fast Charge Trickle C harge - - E E-Time-out "F" - "E3" "E4" E E- Overflow - - "E2" EE - P assword "L" - "E1" E E-invalid Battery C harging - "?" "E0" P arity Error E E- O K 0 )* "m" "M" Vp too High 0 )* "u" "U" Vp too Low 0 "t" "T" 0 "k" "K" Temp. Low Temp. High )* 0 C utter Blocked )* "c" "C" Aux Sensor 1 1 "z" "g" "Z" "G" Near Paper-End Sensor 1 "h" )* 1 1 OK "H" Errors: Head Lifted Synchronizing Feedback 1 )* "X" End of Error 1 0 1 "R" After Watchdog Reset 1 1 1 1 1 1 1 0 0 1 1 0 0 0 1 1 1 Parallel "R" Serial After Reset Faultless Operation M essages 0 1:1/ S 1:1/ S 3:1 LED on 15:1 / L 1:1/ S 1:1/ S 1:1/ S 1:1/ S 1:1/ S 3:1 1:1/ S 1:1/ S 3:1 / L R ED R ED R ED R ED R ED R ED R ED R ED R ED R ED R ED R ED R ED R ED Dual LED 1:31/ M green Dual LED 1:31/ M green 3:1 / L 0 1:1/ S 0 1:1/ S 0 1:1/ S 0 1:1/ S 0 0 0 1 1:1/ S 0 green 0 Dual LED on 0 0 green 0 Dual-LED on GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 29 of 60 LED on 3:1 / L 1:1/ S 1:1/ S 1:1/ S 1:1/ S 1:1/ S 3:1 1:1/ S 1:1/ S R ED R ED R ED R ED R ED R ED R ED Dual LED off Dual-LED off On-Off / Flashing Frequency: fast: "S" app. 0.66Hz, medium: "M" app. 0.33Hz, slow: "L" app. 0.16Hz. Parameter "n" refers to the command <ESC> "y" "n" with n:={0, ... ,5}; n:=4 n:=3 n:=5 (1), (2), (3) (1), (2), (3) (1), (2), (3) (1), (2), (3), (4) Status LED green /red is mentioned separately Where ever the LEDs do not work the same for all controllers, Applies to all conthe numbers of those controllers are stated that don't have trollers, except: the fun ction assigned to this cell: Controller assignment: GCT-4378 (1) GCT-4379 (2) GCT4382 (3) GCT-4479 (4) GCT-6283 (5) GCT-6284 (6) F := charge start L := charge start EE P R O M not found f := charge end l := charge end E E P R O M byte programming time exceeded. Batch file memory overflow Wrong password for EE P R R O M access Invalid batch file no. E E P R O M command completed without error Error message "M " typ. from Vp>7.8V. Error is typ. cleared from Vp<7.6V. Parity or framing error/ no interruption of printing Theoretical message, since the voltage limit is below the reset threshold Print head temperature too high Print head temperature too low Error recovery through feed or reset Warning without interruption of printing. After paper has been inserted, the printer will wait for about 2s before printing to give enough time for the mechanism to be closed properly. Some printer mechanisms do not have this sensor (AP S)! Processing synchronizing commands; each transmitted character Buffer has space for 22 more characters <DC3> = $13 Buffer emptied by 22 characters <DC1> = $11 also after hardware, software and watchdog reset Crashing program Level on the status lines only short-term during phase of initialization; message: <XO N> "R" "X" (or error)> See: LE D Control on page 35 Comments Command Software for Thermal Printers • GeB E-System-78 • Software M anual Command Software for Thermal Printers • GeB E-System-78 • Software M anual 5.2 Statistics These functions can be used to compile a load profile for the printer in order to determine an appropriate service interval. This way, the printer can be serviced after effective loads. To monitor the system, for example, service-relevant data can be reported through the internet. If the length of the paper roll is known, a paper amount control can be set in the host through the function E S C"v" "3" (read out length of paper used since last paper exchange). 5.2.1 Statistical Value Readout from the E E P R O M Statistical variables are stored as 16 2-byte strings in the E E P R O M, so the permitted number of writing cycles is not exceeded. The values of all 16 strings are added up. This results in a total value range of 65535 * 16 = 1,048,560, which equals app. 100 km of paper length or 12 years of permanent operation. )* Handshake output CTS normally reacts only to the fill level of the input buffer. However, it can be programmed to go to "block interface" (log. 0), when an error status occurs. See Configuration of Serial Interface on page 33. Comm. (ASC II) ES C "v" "0" ES C "v" "1" ES C "v" "2" ES C "v" "3" ES C "v" "4" ES C "x" "n" Comm. (hex) Function 1B 76 30 Cutter readout. Readout format: The numbers are transferred as 4 bytes of 2 hex digits in hex format to the host. Example: 0000B3A9; therefore 45,814 cuts. 1B 76 31 Total printer mechanism output readout in 1/10 meters. Readout format: The numbers are transferred as 4 bytes of 2 hex digits in hex format to the host. Example: 000001A9 equals 425 or 42.5 m paper length. The counter reading in the EE P R O M is incremented every 800 dot lines during forward and reverse feeding. 1B 76 32 Operating time readout in app. 1/10 hours. Readout format: The numbers are transferred as 4 bytes of 2 hex digits in hex format to the host. Example: 000001A9 equals 425 or 42.5 hours of operation. 1B 76 33 P aper length readout since the last paper roll change in 1/10 meters. The numbers are transferred as 4 bytes of 2 hex digits in hex format to the host. Example: 009C equals 156 or 15.6 m paper length. The counter reading in the EE P R O M is incremented every 800 dot lines during forward feeding. A reverse transport decrements only the current reading in the main memory. The EE P R O M value is updated, when this counter exceeds the EE P R O M status by more than 800 dot lines. A paper end resets the counter to zero. 1B 76 34 Last 10 error messages readout. Readout format: The controller sends back the last 10 error messages sequentially, followed by 10 bytes corresponding to the last 10 errors. If less than 10 errors have been stored, the remaining values are filled with binary zeros. 1B 78 n Activate/Deactivate storing of warnings in the EE P R O M error memory. n = "0 " on (default) n = "1 " off Warnings are all error messages that do not interrupt the printing: "Z" ten percent paper "G" AUX paper "?" parity error GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 30 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 6 LED Control The green status-power LED is set to power saving mode by default, meaning that the LED will flash quickly in long intervals during faultless operation. By command, the LE D can also be turned permanently ON or OFF to signal faultless operation. See LE D table page 29 Comm. (ASC II) <ES C> "y" "n" Comm. (hex) 1B 79 n <E S C> "j" [flash 1B 6A n mode] Function LED display power saving mode. (default: n=1, second table) Indication of current status through the status LED according to the selected table. Controls the red LED of dual LED The lower 2 bits of parameter n [flash mode] control the flash speed. Values of the lower 2 bits (binary): xxxxxx00 : app. 6,0 s xxxxxx01 : app. 3,0 s xxxxxx10 : app. 1.5 s xxxxxx11 : app. 0.75 s The upper 5 bits of n set the pulse/pause ratio. Bit 2 must always be set during flashing. Value of the upper 5 bits (binary): 000000xx : LED permanently off 000011xx : 1/31 .... 111111xx : 31/31 LED permanently on For n = $00: LE D permanently off, for n = $FF: LED permanently on. A programmable TTL output can also be configured with this function, for example to control a cashier drawer. <ESC> "J" "n" 1B 4A n Creates an active BUSY signal for a period of j * 8.1ms 6.2 Periphery Control of the Buzzer An optional installable buzzer can be controlled by the host via command. The mark-space ratio of the individual sounds is 1:1. Befehl (ASCII) <ESC>"B"m,n Befehl (hex) Funktion m: Zeitdauer des Tones in Schritten von 10 ms, n:= Anzahl Wiederholungen , Tastverhältnis 1:1; m,n:= {1, ... ,255} GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 31 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 6.1 Behavior of the Dual LED 7 Initialization Commands: R E S ET and E RAS E Data Buffer All data and commands of the 'print data stream' are processed sequentially. The printer does not perform an interpretation of commands, when data enters the input buffer. The data is only processed at the output of the fast FIFO input buffer, where the so-called parser interprets the data for printing. This means for example for the R E SET command <E S C>"@" that it is not immediately processed upon arrival at the input of the interface, but only after all data has been processed by the parser that is ahead of it in the input buffer. The reason for this is that GeB E gave preference to a significantly higher print speed, since the direct interpretation of data at the interface input would greatly slow down the speed of the processor. For the same reason, the input buffer is fairly small. In case of an error that could be cleared with a R E S ET command, unprocessed data in the buffer would be the reason that this command can only be processed after the error has been cleared. This circumstance has to be considered when choosing a strategy for error recovery. The program transports the data that has to be interpreted from the input buffer to the line buffer. From there, it is finally printed, when the print command reaches the output of the input FIF O, and is interpreted as print start for the completely interpreted print line. However, if the command <E S C> "A" was planted in the print data stream, the data that has already been written into the line buffer is erased. The commands <E S C> "@"and <E S C> "A" that are desribed below can primarilly be used to increase the reliability of the data transfer to the printer, and therefore to eliminate interruption in a Comm. (ASC II) <ES C> "@" Comm. (hex) 1B 40 Function R ES ET: Initializes the printer just like after power-on Between the receiving and the processing of this command, the data in the input buffer has to be processed. No further print data from the host may follow this command, before it determines the processing of the R ES ET to be completed due to a feedback signal through the serial interface. Otherwise, data that was sent during the processing of R ES ET would be lost, since the input buffer is also erased in the R E S ET sequence. <ES C> "A" 1B 41 Erase data (that has not been printed) in the line buffer. rough environment with strong disturbances. 8 Synchronization with External Events With the command <ESC> "V" "X", the print process can be synchronized with superior or peripheral devices. As an example, an action is to be performed in the superior system, only after text that was sent to the printer has been completely printed. However, since the printer has an input buffer, the user would not know, when this is the case. If the synchronizing command is given subsequently to the text that is to be printed, the printer will report this point of time by sending the character "X" back to the host. Instead of "X", all available characters may be used in the synchronizing command, so the progress of complex program sequences can be indicated through different characters. It is recommended not to use characters that are sent as error messages by the controller. Comm. (ASC II) <ESC> "V" "X" Comm. (hex) Function 1B 56 x Print and report the default synchronizing character "X" through the serial interface. "X" = all available characters If the line buffer is not empty, this command will also initiate the printing of the current line. GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. So MAN-E-485-V1.5 • GeB E-System-78 • Page 32 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 9 Power Management 9.1 Limiting the Peak C urrent During Printing The current peaks during printing can be limited by command from a maximum value, as a result of the maximum number of pixels that are heated simultaneously, down to a minimmum value, as a result of at least 8 pixels being heated simultaneously. This means, that if a lot of pixels are heated sequentially in a horizontal line, the print speed is reduced significantly. If the power voltage Vp is high, the pixel voltage will be higher as well, since the current limiting is not realized through current measuring, but by limiting the number of pixels that are heated simultaneously. Comm. (ASCII) <ES C> "[" n m Comm. (hex) 1B 5B n m Function Set the maximum number of pixels that can be printed simultaneously (indirectly: max. power consumption) and the print quality: <E S C>"[" [max. number of black pixels] [max. segment size in bytes] First parameter n:= [max. number of black pixels] determines, how many black pixels are printed simultaneously. The minimum is 8, the maximum is 128, default is 64 or $40. As soon as the number of black pixels in one line segment has reached this value, the rest of the print line is filled with zeros, and current is applied to the line. In the next cycle, the pixels that have been printed are filled with zeros, and then more pixels (maximum n) are heated, etc. Recommended values for n are : 8, 16, 32, 64, 96, and 128. The maximum current I depends on the operating voltage Vp and the dot resistance R dot:I = (Vp x number of pixels / Rdot) + IVcc + Imotor. Example: for 64 pixels = at Vp = 5V and Rdot= 123 Ohm app. 3A at Vp = 7.2V and Rdot= 123 Ohm app. 4.7 A. Second parameter m:= [max. segment size in bytes] Minimum is 1, maximum is the print width in mm, for example 48 for the G PT-4382. This parameter determines the print speed dynamics: H igh dynamics means, the printer prints each line as fast as the maximum current allows. Therefore, an empty line is printed faster than a full line. If the dynamics is disabled, each line is printed, as if it were completely black. The parameter m determines,how many bytes are printed simultaneuously (even, if they contain only zeros, and no dots are printed). If a 1 is selected, the printer will divide the line in segments of 8 pixels width. If m includes all bytes arranged in one line (for 8 pixels/mm the total effective print width in m mm), the print line can also be heated in one cycle, if the maximum number of pixels n of the first parameter is not exceeded. An even printout can be obtained with <ES C> "[" [32] [4], for example, because the maximum number of printed pixels n:=32 represents the number of pixels in the m:= 4 bytes that are printed simultaneously. High dynamics are the result of <ES C> "[" [32] [48]: If no more than 32 dots with 48 bytes max. are printed in one line segment, this can be done in one print cycle. However, if a completely black line is printed, multiple cycles of just 4 bytes each are required. The print time of each line is different, depending on the blackening. Recommended values for m are : • for maximum print dynamics: m= max. segment size in bytes. • for even printing: m= same number of pixels in the heated segment as in the heating parameter (for example N:= [64], m:= [8]), always considering the maximum peak current for Vp. GeB E E+F GmbH • www.oem-printer.com • GeB E Do c.No. So MAN-E-485-V1.5 • GeB E- System-78 • P age 33 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 9.1.1 Power Consumption, Print Dynamics and Print Quality This commands sets the maximum permitted peak current indirectly through the number of pixels, the known dot resistance, and the maximum possible supply voltage Vp. The maximum number of dots to be printed is controlled in a way that the given peak current limit is not exceeded. This allows the power consumption of the printer to be adjusted to the capacities of a superior supply system. In addition, the print dynamics can be adjusted through the other parameter m, also affecting the print quality. 9.1.2 Status Display The "low current" status LED can be turned off by command or switched to a power saving mode. Please refer to the command <E S C> "y" "n" in the chapter LED Control on page 31. 9.1.3 Estimating the Battery Status Through the battery test command <ES C> "{"l m n, which causes the controller to give a feedback to the host on some parameters that concern the battery status, the host can analyse the battery status, if necessary. Please refer to chapter Battery Test on page 45. 9.2 Power-Down Modes Especially for battery operated, portable devices, the power consumption of the printer plays a decisive roll for its energy efficiency and its operational reliability. For this reason, GeB E put a lot of effort in this area during the designing of the controllers, resulting in the power-down modes. There are three power-down modes, however, not all three come into operation in the controllers with the GeB E System 78. Please refer to the information on controller features in the respective operating manual or hardware manual: • Idle mode • SLE E P mode • P OWE R -OF F mode 9.2.1 Idle Mode Whenever the controller has no more hardware tasks to work on (the print buffer does not contain any more data for printing), it will automatically switch to idle mode. In this mode, the system uses about 5mA current, but it is completely functional, accepting external signals (like I R Q, or data through the interface) without delay. The handshake signals also remain in effect. 9.2.2 SLE E P Mode Besides the idle mode working automatically, the controller can be specifically controlled to switch from idle mode to SLE E P mode after a preset waiting period. The SLE E P mode lowers the power consumption to a value that is considerably lower than the self-discharge rate of a NiM H battery (< 15µA typical with R S232 interface). Consequently, the user has the option to do without a POWE R -OFF switch by only using SLE E P mode. In SLE E P mode, the power supply of the system remains turned on, so the contents of the register are preserved. The R S232 interface outputs of the controllers are switched to a high-ohm status. The inputs stay susceptible to signals. After reactivation, the controller can continue to work with the selected parameter settings, if it was programmed accordingly through the power-down command, or it will go through a hardware R E SET. 9.2.3 P OWE R -OFF Mode In P OWE R -OFF mode, the controller turns itself off completely after a time period that can be set by command. The power consumption will then usually sink to typ. <1µA. After reactivation from P OWE R -OFF mode, the controller always goes through the complete P OWE R -ON R E S ET initialization, losing all previously changed settings that are different from P OWE R -ON R E S ET settings. From POWE R- OFF, the controller can be reactivated through the F E ED key, the RTS line, or by connecting the charger. GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. So MAN-E-485-V1.5 • GeB E-System-78 • Page 34 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 9.3 Power-Down / Power-Off Waiting Period After a preset waiting period, the controller can switch from the idle mode to power-down mode. The command <E S C> "e" n either allows the complete blocking of power-down, or the setting of this waiting period. This command will not effect the other power-down parameters. 9.3.1 Attention: Switch to P OWE R -DOWN Mode only from Idle Mode! The transition to the P OWE R-DOWN mode only works from the idle mode, so this mode has to be switched to first. If there are print data left in the print buffer, while a paper end message is generated, the printing can not be completed. Consequently, the data will remain in the buffer, and the idle mode can not be entered. Therefore, a P OWE R -DOWN will not be possible. 9.3.2 Initialization from the POWE R -DOWN Mode After the controller has been reactivated from P OWE R -DOWN mode, it will go through an initialization phase. It can either go through its standard initialization, just like after P OWE R- ON R E SET, or, coming from a SLE E P mode, preserve the parameter settings as they were set before the SLE E P mode. This decision can be made with the P OWE R -DOWN command (see page36). If there is no more data in the line buffer that has to be processed, the controller will switch from the idle mode to the selected POWE R-DOWN mode (sleep or power-off mode), after the preset "waiting period before power-down" has elapsed. The extended command <E S C> "e" n [flags], which is described in detail on page 36, allows the following selections: • blocking of power-down • setting the waiting period • hardware preselection applies / is ignored • type of power-down mode • behavior after reactivation from the sleep mode: initialize, or continue to work with the settings that applied before the sleep mode was entere GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. So MAN-E-485-V1.5 • GeB E-System-78 • Page 35 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 9.4 Power-Down Mode Settings - Extended Command Comm. (ASC II) <ES C> "e" n [flags] Comm. (hex) Function 1B 65 n Power-down modes [flags] P arameter n sets the "waiting period before power-down". The assessment of this number as seconds, minutes, or hours is determined by bits 3 and 4 in the byte [flags]. Parameter n is interpreted as a signed byte value: Parameter 0 1 - 127 255-1 Time T PWD infinit 1 - 127 1 - 127 Mode power-down off power-down after 1 - 127 (time units) power-down after 1 - 127 (time units), if there is no more data in the line buffer Attention: Some errors such as paper end block the printout. In this case, the line buffer will not become empty. These situations should be considered for the application strategy. The individual bits in the byte [flags] have the following effect: Permitted values for bits in the byte [flags] : xxxx x0xx b bit2:=0: The hardware (jumpers, bridges) determines the type of power-down mode (power-off or sleep mode), if the power-off option is available: xxxx x1xx b bit2:=1: bit0 (>>> see below) determines the type of power-down mode. xxxx xx0x b bit1:=0 (only effective in sleep mode): After being reactivated, the printer continues to work with the settings that were applied before the sleep mode, i.e. there is no initialization. xxxx xx1x b bit1:=1 (only effective in sleep mode): The printer is initialized after each reactivation, just like after a power-on reset. Attention: When the controller is reactivated from the power-off mode, it always goes through an initialization. xxxx xxx0 b bit0:=0 (only effective, if bit2:=1): Regardless of the power-down jumper, the controller will always switch to the power-off mode after the waiting period (if the power-off option is available). xxxx xxx1 b bit0:=1 (only effective, if bit2:=1): Regardless of the power-down jumper, the controller will always switch to the sleep mode after the waiting period. Time as ses sment xxx0 0xxx b xxx0 1xxx b xxx1 0xxx b by bit 3 and bit 4: the power-down /power-off time applies in seconds the power-down /power-off time applies in minutes the power-down /power-off time applies in hours GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. So MAN-E-485-V1.5 • GeB E-System-78 • page 36 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 9.4.1 Attention! Operating Voltage Feedback During P OWE R -DOWN Mode Through the Interfaces. The possibility that voltage is fed back through the interfaces during the P OWE R -OFF mode (even the smallest currents can cause errors in controllers that are in power-down mode) has to be considered. Power feedback cannot occur with the serial R S232 version, but it is possible under certain circumstances with the serial TTL or the parallel interface. Therefore, high power levels at the controller input have to be avoided, whenever P OWE R -OF F mode is used, and they have to be taken into account for component options and for the connection of adapters in conjunction with the parallel Centronics or the serial TTL interface. Due to the high number of connections, the chances of this occuring are much higher, if a parallel interface is used. Therefore, the POWE R -OFF mode with a parallel interface is initiated as follows: 1. G ive power-off command, if required. 2. /Sel_In: Set to low 3. All data lines: Set to low levels 4. /Strobe: Set to low level If problems should occur in spite of these measures, a fixed resistance can be installed on the controller board at the factory. This resistance drains the internal operating voltage Vcc of the controller, helping to lower it below the R E S ET threshold, should Vcc be "pulled up illegally" by a power feedback through the connected interface. Please contact the technical service department at GeB E. 9.5 Reactivation from P OWE R-DOWN In contrast to the idle mode, which is always active, the controller has to be reactivated from the sleep mode or the power-off mode through the following methods, before it can receive data again. • Pressing the feed key • Sending a dummy character through the serial (R S232/TTL) interface (TxD) • Level change at the handshake line CTS (serial) (R S232/TTL) • Sending a dummy character through the infrared interface • A Bluetooth "connect" • Sending a dummy character through U S B • G ive /strobe pulse (parallel interface adapter) • Sending a dummy character through the parallel interface • Applying a charging voltage After reactivation, the controller will go through an initialization phase of about 30 ms. During this time, no data may be sent to the controller, since they would be rejected. The data may be sent only, after the controller has reported ready (handshake signals are set for possible data reception, <Xon> and/or "R" for R E SET have been sent back through the serial data line). If the P OWE R -OFF mode was selected, the controller initializes itself after each reactivation, going through a regular P OWE R -ON R E S ET. Part of the standard initialization of the controller is the command <E S C> "e" $05 $02 (see page 36) that determines the conditions for the next power-down. In the standard setup, the controller will switch from idle mode to power-down mode about 5 seconds after the last activity as a result of the power-down command given in this form. Which power-down mode the controller is switching to, is determined through the P OWE R-DOWN jumper (special component). 9.5.1 Reactivation with the Feed Key For reactivation, the feed key only needs to be pressed briefly - even for the power-off mode, 3ms are sufficient. If the key is held down longer than about 2 seconds, the printer will start with a test printout, after it has been reactivated from any type of power-down mode. The content of the test printout is predefined with the batch file T0. See Batch Files (Text Files) on page 46. GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. So MAN-E-485-V1.5 • GeB E-System-78 • Page 37 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 9.5.2 Reactivation through Data Line TxD of the Serial R S232/TTL Interface The most secure way to reactivate the printer controller from sleep mode is by sending printable, individual dummy characters in > 50ms intervals,until the printer controller changes the control line CTS or sends the software handshake character <XOn>. 9.5.3 Reactivation through RTS (CTS) of the Serial R S232/TTL Interface In order to put the controller down, RTS has to be at < 0V (logic 1; (inverted logic for R S232 levels). For reactivation, RTS has to increase to > 5V for at least 3 ms, before it may be set back. Attention: When the printer is in a power-down mode, the host will receive the status message "printer not ready to receive" through the handshake line RTS, since the interface drivers are turned off. For a reactivation with dummy characters, this message has to be ignored by the host. It may be helpful to use the <XON>/<XOff> protocol, since the controller will not send an <XOff> while in power down, and therefore, will not interrupt the data stream. The host determines the state of the printer and is aware of it. However, if a continous string of characters is used for reactivation, and the user characters are attached without any delay, incorrect characters and/or framing errors have to be expected. After the transmission of the dummy character and the feedback of the initialization being completed (< Xon> / "R"), there has to be a pause of at least one character period, so the receiver of the printer can synchronize with the beginning of the first user character (at 9,600 baud, 8 bit, no parity, 1 stop bit, the character time is about 1.05ms). 9.5.4 Reactivation through the I R Interface Since the I R receiver has to be active, a reactivation with I R reception is only possible from the SLE E P mode. The request packages that are sent by an IrDA or GeB E-I R protocol at the beginning of a data transfer replace the transfer of a dummy character. 9.5.5 Reactivation through Dummy C haracters through the Bluetooth Interface When the printer is in idle or sleep mode, it will seem "active" on the Bluetooth network to the outside. A "connect " will reactivate the printer on time , so the transmission of a dummy character will not be necessary. 9.5.6 Reactivation through Dummy C haracters through the U S B Interface When the printer is in sleep mode, dummy characters have to be sent for about 10 ms without interruption in order to bridge the power-on time. The standard Windows driver transmits dummy characters before the start of each document. 9.5.7 Reactivation from the Sleep Mode through Centronics / Select-In The first character (positive flank at /Strobe) reactivates the controller. If a reinitialization was selected to be performed after the reactivation (default setting), this character will be rejected. For this reason, the reactivating character that is transmitted before the print data should be a dummy character ($00). 9.5.8 Reactivation from the P OWE R -DOWN Mode through Centronics / Select-In In contrast to the SLE E P mode, where the power supply is active, controlling though the POWE R DOWN M ODE with a connected interface may result in power feedback through the interface to the controller. In order to put the controller to sleep and to prevent a power feedback of internal supply voltage Vcc through the data lines at the same time, a dummy character ($00) has to be sent. Afterwards,"Select In" has to be set to low. Optimally, /Strobe should also be permanently set to low. GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. So MAN-E-485-V1.5 • GeB E-System-78 • Page 38 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 9.5.8.1 Attention: /Strobe=Low Sets Busy to High /Strobe=low sets the busy exit directly to high (hardware!). For reactivation "Select In" has to be on high for at least 3 ms, before it may be reset again. 9.5.9 Note: Reactivation from a P OWE R -DOWN Mode Through Centronics/Select-In Under M icrosoft Windows® As a select signal from the controller, the host gets its own /auto-LF signal reported back (Connect the appropriate jumper to the serial interface.). Without an active select signal, M icrosoft Windows® would not dedicate the printer as connected and create a time-out message after a certain observation period. 9.5.10 Reactivation by C onnecting the Charger Applying or disconnecting the charging voltage will reactivate the controller. If the printer detects a charging voltage after being reactivated, it will stay turned on in order to be able to monitor the remaining charging process. GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. So MAN-E-485-V1.5 • GeB E-System-78 • Page 39 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 10 Battery Charging Circuit (Software Control) G eneral Information For applications with battery operation, the controller has a charging circuit supported by the processor. The behavior of this charging circuit and its monitoring can be controlled through the charge command (see page 42 ). 10.1 Start of the Charging Process with a Formatting Charge The battery charging equipment consists of a hardware component and the charge regulating software that is filed in the µ-processor. When the charging voltage is applied, the hardware will first check the charging status of the battery. If the battery is found to be overdischarged, the charging cycle will start out with a battery-saving formatting charge (the charge indicator remains off). Once the battery voltage required for fast charge is reached, the controller takes control over the charging process and activates the fast charge. 10.1.1 Indication and Inquitry of the C harge Status Each status that the charging circuit is in is indicated by the status LED through different flash patterns. When the status is requested by command, feedbacks are sent through the serial interface. See chapter Error and Status Messages During Printing on Page 28. Also refer to Battery Test on page 45. See hardware manuals of the individual devices. 10.2 Ni M H Charging C ircuit (Standard Component) A detailed description of the controlling charge command can be found on page 42. 10.2.1 No Separate C urrent Limiting of the Charging C ircuit The charging is managed by the processor of the controller. A few special controller versions have a charging current control on the board that allows charging from a fixed voltage (power supply unit 8 - 28 V) or from car batteries (12V or 24 V). Some controllers (mainly low-cost) from GeB E are equipped with a NiM H charging circuit without a limit to the charging current. The charging current is limited through the appropriate GeB E charger, therefore: 10.2.2 ATTENTION: Only use the matching GeB E charger! A fixed voltage power supply unit without defined current limits must never be used for charging NiM H batteries. Always use the appropriate GeB E power supply unit, or contact us for more information. The standard charging parameters filed in the flash memory are tuned to certain types of batteries. Please refer to the hardware manual. 10.2.3 End Criteria for Fast Charging of Ni M H Batteries The controller will finish fast charging and switch to trickle charging, as soon as one of the following conditions is met: • end-of-charge through timer • minus delta- U recognition • maximum U recognition • delta-T recognition • maximum T recognition 10.2.4 Limiting the C harging Time through a Timer If the charging currents are very low, the necessary end-of-charge cannot always be achieved by recognizing the drop of the cell voltage (minus delta- U). Some modern Ni- M H batteries allow a timer-controlled charge with charging currents up to 1/3 C. For a battery with 1,200 mAh, a charging t ime of about 3-4 hours would be reasonable. In the charging command described below, GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. So MAN-E-485-V1.5 • GeB E-System-78 • Page 40 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual parameter 15 determines the battery voltage that is to be achieved by charging, before the preset charging time starts and limits the charging, should other charging criteria not come into effect . Therefore, it represents a margin of safety that should be kept as small as possible. Attention: The timer-controlled charge limit is a solution that serves as a secondary battery protection, since the charging status of the battery is unknown at the beginning of the charging process, and charge-end criteria may not be recognized by the software. 10.2.5 M inus Delta-U Recognition (Voltage Reversal at the End of C harge) When a NiM H battery is fully charged (end of charge), the battery voltage will start dropping again, even though the charging current is still being supplied. This voltage drop is interpreted as the end of charge. The charging current may not go below 300 mA for the voltage drop to be clearly recognizable. The charging voltage is recorded with the 10-bit A/D converter that is integrated in the µ-processor. In order to eliminate the fluctuation of individual readings, multiple readings are averaged and added up to a 16-bit value. The interval between individual measurements is 2 seconds. The number of values that are formed this way can be predetermined in parameter P3. It is used to define the time delta-t, through which the drop is supposed to be dedicated. 10.2.6 Maximum Voltage at the Battery This criterion is acquired by measuring the cell voltage. It protects the battery against destruction. The value specified for the battery in use should be selected here. 10.2.7 Delta T / Delta t Recognition (Change of Temperature) If the battery temperature T rises faster throughout the time t than specified in the parameter, (the charging energy is completely converted to heat), the battery is recognized as full. This criterion only comes into effect, when a preset battery voltage is exceeded. 10.2.8 M aximum T Recognition (M aximum Temperature at the Battery) This criterion protects the battery against destruction. The value specified for the battery in use should be selected here. Sending the charge command <ES C> "r" p1 ...p15 will restart the charging process. Since this command is part of the standardTINIT, charging is restarted with each reset, if charging voltage is applied. The charging process will also be restarted, whenever the voltage drops below a defined minimum value (typ. for 1.2V / cell of the standard battery pack). 10.2.9 Restart of Charging Process with Connected Charger Even, when the charger is connected, the printer may continue to work. Interim printing operation will not interfer with the complete charging. When the battery voltage drops below a minimum value set through the battery charge command, the charging process will start again. GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. So MAN-E-485-V1.5 • GeB E-System-78 • Page 41 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 10.2.10 Description of the Ni M H C harging Commands Comm. (ASC II) <E S C> "r" p1 ...p15 Comm. (hex) Function 1B 72 This command sets up the type of charging process. If the command is given, while the charging voltage is applied, the charging p1 ... p15 process will be restarted. p1 := "1" p2 : p3: p4: p5: . p6: p7: p8: p9: p10: battery type: P1:="1": Ni- M H charge (standard) (battery type: P1:="2": Li-Ion charge). All other values are not permitted or turn off the charging. Timer controlled charge: 1 equals : 1/10h, i.e. 1 := 6 min, but 250 := 25 hours; default is 40:= 4h. The charging time starts, when the charging voltage is applied and the command is received, for example from the TIN IT during reset, or when the battery voltage drops below the value defined through p13. Number of values that are used for the subtraction of the voltage delta-U. Default is p3=60. This results in a measuring time of 60 x 2 s: = 2 min. The lower the charging current, the higher this value should be. Number of recognitions with delta- U as a negative result, before the end-of-charge is determined from that. Default is p4=1. Indicates the voltage difference, from which the delta- U is recognized as a valid negative delta- U. 1 LSbit equals 0.671 mV Default is p5=18 x 0.565V = 10mV. Maximum voltage value. 1 LSbit equals : 39.782 mV Default is p6=169. This results in a maximum voltage value of 169 x 39.782mV = 6.72V .For 4 cells, this is equivalent to a voltage of 1.68V/cell. If the battery voltage (Vp) exceeds this maximum voltage value as many times as stated in p7, the charging will be stopped. Repetition counter for the exceeding of the maximum voltage value set with p6. The maximum voltage value has to exceed the value determined with p6 P7 times in a row, in order for the end of charge to be recognized and the charging to be stopped. Default is p7=1. p8 is like p3 for the measurement of the temperature change. p8 is the number of values determined in multiple measurements within 2 s in order to determine the temperature change. Default is p8=60. This results in a delta-T recognition measurement time of 60 x 2 s = 2 min. p9 is like p4 for the measurement of the temperature change. p9 is the number of delta-T recognitions (with p8:=60 within 2 min.), before delta-T is recognized as valid. Default is p9=1. p10 is like p5 for delta-temperature difference. 1 LSbit equals about 0.01° C. Default is p10=64. p10:=64 means that the acquisition interval is recognized as a temperature change at the end-of-charge, if the difference in temperature of 0.64° C (p10:=64) predefined by p10 is exceeded within the time determined by p8 (8:= 60 e.g. results in 2 min). GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. So MAN-E-485-V1.5 • GeB E-System-78 • Page 42 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual p11: p12: p13: Maximum temperature value. Corresponds to p6 for temperature. The temperature is measured with an NTC resistor that is soldered into the battery pack. p11 provides the maximum temperature value. If this is exceeded p12-times at the battery cells during charging, fast charging will be stopped. For a 6.8K NTC, this estimation formula applies: p11:=(60° C - T ma x ° C) / 0.6° C The default setting is p11:=25, corresponding to Tmax ca. 45° C. Caution: High temperatures result in small and therefore inaccurate readings. Corresponds to p7 for temperature. p12 is the value for the repetition counter, at which an exceeding of the temperature is recognized. Default p12=1. p13 determines the charging start voltage for dropping voltage. 1 LSbit theoretically corresponds to 39.782 mV. Standard is p13:=133. This corresponds to 133 x 39.782mV = 5.29V. For 4 cells, this corresponds to 1.2V/cell. p14: p15: Trickle charge ratio. After the end of the fast charge, this value determines the medium value of the trickle charge, if the charger remains turned on. 1 LSbit corresponds to a ratio of 2s active time to 512s inacti ve time. Default is p14:=10. This means, that during a period of 512 s, the 300 mA charging current is turned on for 10 x 2s= 20s. 20s equal 3.9% of 512s. Therefore, the trickle charge current will be about 12 mA, corresponding to 3.9% of the permanent medium current. p15 determines the minimum battery voltage. Below this value, a charging time limit (shut-down after a preset charging time) and the minus delta-U recognition will not be active. Default is p15=140. Therefore, the value for 4 cells will be 1 40 x 39.782mV = 5.57V beträgt. 11 Li-Ion Battery Charging Circuit (Option) First, see Battery Charging Circuit (Software Control) General Information on page 40. 11.1 Attention! Special Hardware is Required for Li-Ion Batteries! For some controllers, the hardware can be set up for one or two Li-Ion cells (see hardware manual). During the charging of Li-Ion batteries, the controller stops the fast charge and switches to trickle charge, as soon as one of the following conditions is met: • maximum U recognition (a predefined cell voltage is exceeded) • end-of-charge through timer • maximum T recognition (specification of a maximum battery temperature) 11.1.1 Maximum U Recognition When the cell voltage reaches a value of 4.1 V during the charging process, the Li-Ion battery is recognized as full. This voltage is determined through a charging circuit that is specifically adjusted for charging Li-Ion batteries. 11.1.2 Maximum T Recognition (Maximum Battery Temperature) This criterion protects the battery against destruction. The value specified for the battery in use should be selected here. GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. So MAN-E-485-V1.5 • GeB E-System-78 • Page 43 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 11.1.3 Description of the Li-ION C harge Command Comm. (ASC II) Comm. (hex) Function <E S C> "r" 1B 72 This command sets up the type of charging process. p1......p4 p1 .... p4 If the command is given, while the charging voltage is applied, the charging process will be restarted. p1 :="2" battery type: P1:="2": Li-Ion charge (option) (battery type: P1:="1": Ni- M H charge (standard)) All other values are not permitted or turn off the charging process. p2 : Timer controlled charge: 1 equals : 1/10h, i.e. 1 := 6 min., but 250 := 25 hours; default is 40:= 4h. The charging time starts, when the charging voltage is applied and the command is received, for example from the TINIT during reset, or when the battery voltage drops below the value defined through p13. p3: M aximum temperature value. The temperature is measured with an NTC resistor that is soldered into the battery pack. p3 provides the maximum temperature value. If this is exceeded p4-times at the battery cells during charging, fast charging will be stopped. For a 6.8K NTC , this estimation formula applies: p3:=(60° C - Tmax ° C) / 0.6° C. Default setting is p3:=255 (without protection, if the Li-Ion battery does not have an NTC for temperature control). Caution: H igh temperatures result in small and therefore inaccurate readings. Please contact us with your questions. p4: Repetition counter for Tmax exceedings. The maximum temperature has to exceed the value p3 p4-ti mes in a row in order to stop the charging process. Default is p4=1. 11.1.4 End-of-Charge through Timer This criterion protects the battery against destruction. The value specified for the battery in use should be selected here. The time value should be set about 5% higher than the maximum charging time. 11.1.5 Example for Setting the Charging C ommand Comment Recommended Setting GeBE Battery Type NI-MH GNA-4,8V-0,7Ah-NiMH GNA-4,8V-1,2Ah-NiMH GNA-4,8V-1,5Ah-NiMH GNA-4,8V-1,5Ah-NiMH GNA-4,8V-2,2Ah-NiMH p1 "1" "1" "1" "1" "1" Li-Ion (Option) GNA-3,6V-0,8Ah-Li-Ion "2" 40 255 p2 20 40 37 19 32 p3 60 60 60 60 60 p4 p5 p6 3 80 169 3 80 169 3 118 169 3 118 169 3 5 169 1 - - p7 1 16 16 16 16 p8 60 60 60 60 60 - - p9 p10 p11 p12 3 117 86 2 3 47 86 2 3 24 63 2 3 78 63 2 3 47 63 2 - - - - p13 133 133 131 131 144 p14 10 10 10 5 0 p15 140 140 140 140 147 - - - L C charge (500 mA) L C charge (500 mA) L C charge (500 mA) H Q charge (700 mA) H Q charge (700 mA) Battery does not have a temperature sensor. 11.2 Standard Settings for GeB E Battery Types In some controllers that have a battery charging circuit, the charging process for 4x Ni- M H cells is preset in the batch file TINIT. Parameter changes or the switch to charging of Li-Ion batteries has to be performed at the factory in the flash of the µ-processor, or in the E E P R O M through the appropriate command. Please contact the GeB E service department for more information. Fast and trickle charge are indicated through distinguishing flash patterns of the status LED. Please refer to Status Messages on page 34. GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. So MAN-E-485-V1.5 • GeB E-System-78 • Page 44 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 11.3 Battery Test Generally, the exact determination of the remaining battery capacity in mobile systems can only be achieved through extensive measuring. It also represents information that is not really important to the user. For the printer system, it is crucial to know, how high the currents may become during printing, in order to enable failure-free operation. The internal resistance of the battery determines, which currents can still be withdrawn, without the voltage dropping below the permitted terminal voltage range for operating the system. The printer module has an interrogation command <E S C>"{"l m n, that can specifically put load on the battery through the activated print head for test measurements. The readings collected by the controller are reported back subsequent to the interrogation command through the serial interface. With this information and the knowledge about the battery in use, in combination with the experience the host collected in charging and end-of-charge cycles (small user program), the remaining print capacity can be estimated the best. 11.3.1 Battery Test Command Comm. ASCII) <ES C> "{"l m n Comm. Function (hex) 1B 7B l Battery test command mn l:= number of black pixel bytes determines, how many pixels are to be set for the load. Only full bytes can be turned on: 1 corresponds to 8 pixels, 2 corresponds to 16 pixels, etc. The maximum value of 24 therefore corresponds to 192 pixels that are turned on simultaneously. l:= m:= sets the segment-on time. This value multiplied with 1/4 µs is the period of time <number the individual pixels remain turned on. The minimum value is 52, which corresponds to of black a time of 52 x 0.25 µs = 13 µs. pixel n:= determines the segment-on repetition rate bytes> The segment-on time is repeated n times with a shifted bit pattern. This increases the testing times for the battery without creating the load with the same pixels. With this method, a blackening of the paper from the measuring can be avoided. m:= Example: <seg<ES C> "{" [7] [80] [24] ment-on time> Feedback values through the serial interface: ---- ---- ---- ----- "S" [hex value loaded voltage Vp] [hex value unloaded voltage Vp] n:= <segment-on repetition> This value is specified with a resolution of 39.782 mV per digit. Example: The feedback is a character string with 5 AS C II characters, for example: "S""9""D""A""3" with the following meaning: "S": header, marks the feedback string The following characters are interpreted as hex numbers in groups of two: $9D : represents the battery voltage measured with load Vp (charged) := 157 x 0.039782 V := 6.246 volt $A3: represents the battery voltage measured without load Vp:= 163 x 0.039782 V := 6.484 volt From the predetermined load and the voltage drop that is reported back, it can be determined, how high the remaining capacity of the power source is, without this load causing a drop below the permitted operating voltage. Please contact the GeB E service for advice. <ESC> "X" 1B 58 n Read out AD converter. (internal test function) This value is returned as an 8-bit value. Channel : n 0 : Vp / 1 : head temperature / 2 : analog in / 3 : PE / 4 : near paper-end / 5 : head up / 6 : battery temperature / 7: AUX sensor GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. So MAN-E-485-V1.5 • GeB E-System-78 • Page 45 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 12 Batch Files (Text Files) 12.1 The Concept of Batch Files (Text Files) In the program memory of the µ-processor (flash memory), the user can manage batch files (Tx) that can be retrieved by command. Practically all commands that the printer understands can be filed there in data strings of a macro, and retrieved through the command <E S C>"t" [No]: = "Print batch file [No.]". In place of this command, the command sequence from the batch file will be processed during the processing of the print buffer, as if it had been written into the print buffer through the interface. In the flash memory, batch file memories with special functions (like TIN IT, where the commands for the initialization of the controller are filed) are available. As an option, the controller can be equipped with a serial E E P R O M , which can also store batch files, filed by the user himself. E E P R O M s with memory sizes of 1 / 2 / 4/ 8 / 16 / 32, or 64 KB can be used. The standard is 8 KB. The software checks, if an E E P R O M is available, as well as its size and content, and automatically adapts to it. If there are no batch files stored in the E E P R O M, the standard batch files from the flash will be used. However, if there are batch files in the E E P R O M that are filed under the same names, they will take precedence over the batch files in the flash. Two separate blocks of batch files exist: • Block 1 contains the batch files T0 through T9. • Block 2 contains the batch files TIN IT, TA, TQ, TR, and TS. 12.1.1 Batch File Block 1: T0 ...T9 T0 through T9 can contain user-specific macros, logos, etc., but they also have special functions: T0: The printout of batch file T0 can be initiated through the command "Print batch file no. 0" or after R E SET. If during R E S ET, the feed key is held down for a longer period of time, the printing of this batch file will start after about two seconds. By default, information about the printer is filed in T0. In addition, the printout of a service text or of the company logo may be triggered. T1: Is retrieved during operation through the command <E S C>"t""1": = [Print batch file no. 1], or through the SET key, which is available as an option. A self test with character set, printer specifications, etc. can be placed in this batch file. At the end of the command sequence of a batch file, the retrieval of another batch file can be placed. T2-T9: Initially, these batch files have no special functions assigned to them. Batch files TIN IT and T0 through T9 can be changed by the user in the E E P R O M at any time. Loading commands are available for this purpose. 12.1.2 Batch File Block 2: TINIT, TA, TQ, TR, TS 12.1.2.1 TIN IT TINIT: Works as initialization macro. After a power-on R E SET, watchdog R E SET, or software R E SET, TINIT is called at the end of the software initialization, so the commands for changing the parameters that are stored in it are sent to the printer. If the TINIT is filed in the E E P R O M, the commands stored in it take precedence over all previously set parameters. Since the TINIT in the E E P R O M can be written by the user himself, it enables him to determine the printer initialization. If for example the printer is supposed to print in data mode with double height and bold, the corresponding commands are entered in the batch file TINIT. After the R E S ET, the controller will first process these commands, thereby changing its initialization. 12.1.2.2 Example: Basic Setting of the Controllers The basic settings that are put into effect in the initialization program of the controllers (they are not entered in the TINIT) correspond to the following instructions for some controllers: <E S C> "A"; <E S C> "D" "0"; <E S C> "H" "0"; <E S C> "I" "0"; <E S C> "L" "0"; <E S C> "M" "0"; <E S C> "N" 0 0; <E S C> "P" 1; <E S C> "S"0; <E S C> "W" "0". If these settings are to be changed after a R E S ET, the appropriate commands have to be added to the TINIT (by the user in the E E P R O M). GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. So MAN-E-485-V1.5 • GeB E-System-78 • Page 46 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 12.1.2.3 TA, TQ, TR , TS These batch files work like the batch files T0-9, but they can neither be erased nor rewritten. Contents are firmware status, serial numbers, etc. TA: Contains commands that initiate the H EX-dump mode, and can only be programmed by GeB E. TQ, TR, TS: These batch files are filed in the flash memory of the µ-controller chip. They can only be programmed at the factory (for firmware status, serial number, etc. ), and are not meant for general use. TQ contains the firmware nomenclature: for example "GeB E G E -3055". 12.1.3 Storage Space for Batch Files The GeB E batch file concept represents a type of file system within the printer memory. The E E P R O M is managed by adding newly entered or overwriting batch files to the occupied storage spaces. Erasing single batch files is not possible. Batch files can be programmed independently, but they can only be erased by block (block 1 or block 2). Block 2 in the E E P R O M can be protected against erasing via software (please inquire). In this case, a quarter of the total memory is available for block 2 at any time. Otherwise, 200 bytes are assigned to block 2 from a 1K E E P R O M , and 456 bytes from all larger types. For the programmable batch files, the following capacities remain: From a 32 KB E E P R O M , 24,424 = $5f68 bytes are available, from an 8 KB E E P R O M, 5,992 = $1768 bytes are still available. For the filing of graphic data in a batch file, it is recommended to use P CL compression, because it allows much larger graphics to be stored (ap. 1:3), especially, if they contain a lot of zeros ($00) in the pure pixel image. If the OP-Menue® is used, the space for block 2 is reduced by 228 bytes. If the OPD menu is used, the space for block 2 is reduced by 228 bytes. 12.1.4 Help with Unknown Interface Parameters If a controller gets "out of control" during communications due to program errors or other initialization problems, it can be addressed as follows: The special setting of the solder bridge combination Br1, Br2, Br3 closed and Br4 open allows a by-pass of the TINIT. With this setting, it is always started off serially with 9,600 bauds, 8 data bits, 1 stop bit, and no parity bit. This way, communication with the controller is still possible and the E E P R O M can be reprogrammed, even if the interface parameters are unknown. 12.2 C ommands for M anaging Batch Files 12.2.1 Print Batch File, Send Batch File Information to the Host Comm. (ASC II) <ES C> "T" "x" Comm. (hex) 1B 54 <x> <E S C> "n" [NUM BER] [DATA] 1B 6E n, y1 ..yn Function Print batch file no. "x". "x":= { 0 ... 9, A, Q, R, S}. For the controller, processing is transparent, as if the data of the batch file were coming in through an interface. Send string through the serial interface to the host: This command is entered in a batch file with the data. It can be used, for example, to inquire serial numbers entered in TS. Example: The serial number 1234567890 is entered in the batch file TS with the transmission command as < E S C> n [10] [1234567890]. With the command <E S C>"T" "S", the batch file TS is retrieved, and the command < ES C> n [10] [1234567890] it contains is processed by sending the text string "1234567890" (serial number) back to the host. This command is similar to the command "Send synchronizing character", except that it does not wait for the synchronization, and a complete string can be sent out through the serial interface. <ESC> "O" "x" 1B 4F <x> x := 1 x := 2 Print UBat,TBat, and firmware Print parameters GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. So MAN-E-485-V1.5 • GeB E-System-78 • Page 47 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 12.2.2 Readout of the Available Memory Space in the E E P R O M With a command, the user can check, if there is enough memory space available in the E E P R O M before programming. If a batch file is reprogrammed under the same name, the original content will not be erased, but remains in the memory unused. Erasing in the E E P R O M can only be done through the command <E S C> "u"... . See page 49. Comm. (ASC II) Comm. (hex) Function <ES C> "v" "5" "T" 1B 76 35 54 <ES C> "v" "5" "U" 1B 76 35 55 <ES C> "v" "6" 1B 76 36 Readout of available memory space for T0 - T9. Readout format: The numbers are transferred to the host as 2 bytes of 2 hex digits each in hex format. Please note: Zeros in batch files are stored as <zero> <number of zeros>. A file is completed with two consecutive zeros. Therefore, the actual storage requirement of a file may differ from its length: Several consecutive zeros decrease the required space, while single zeros increase it. Readout of available memory space for TINIT. Readout format:The numbers are transferred in hex format to the host as 2 bytes of 2 hex digits each. Readout of EE P R O M size. Readout format:The numbers are transferred in hex format to the host as 2 bytes of 2 hex digits each. 12.2.3 Readout of Batch Files With this command, the content of any batch file can be read out through the serial interface. Please note: This command should NOT be given, if the <XON>/<XOff> protocol is used. <X ON>/<XOff> characters that are in the file (e.g. in graphics) are transferred uncoded. When the <XON>/<XOff> protocol is activated, the printer buffer should not be in the <XOff > state, before this command is sent, and no other data should be sent to the printer, while batch files are being read out, in order to prevent an <XOff> character from entering the data stream. Otherwise, the <XON>/<XOff> characters that were generated by the printer may be interpreted as part of the file. Comm. (ASC II) <ES C> "v" "7" "m" [DU M MY] <ES C> "v" "8" "m" [DU M MY] Comm. (hex) Function 1B 76 37 Readout of EE P R O M file m:= {"0","1", ....,"9","@"} "m" "@" :=name for TINIT n The dummy byte n can have any value (essential for programming reasons). After this command, the data in the file is transmitted through the serial interface: The controller sends the length values lh and ll as 4 AS C II characters that are encoded as 2 hex nibble, and that define the file length. 1B 76 38 "m" n The command for reading out batch files must not be part of a batch file itself. In this case, as a response to an unvalid batch file no., or if an EEP R O M file is not programmed, the letter sequence "XX XX" will be sent instead of the 4 hex digits. Readout of the FLASH file m:= {"0","1", ....,"9","Q", "R", "S","@"} (same function as ES C "v" "7") For description see above. Attention: If batch files were filed several times in a row under the same file name, only the file that was stored last can be read. The access to previously stored contents is lost. The files that are filed in the FLAS H of the µ-processor, however, can be read at any time with the command E S C "v" "7" <Nr> D U M M Y, even if a batch file with the same name was programmed in the E E P R O M . GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 48 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 12. 2 .4 Progra mm ing and E rasing B at ch Files The programming and erasing of batch files requires passwords. If desired, different passwords can be set for erasing and programming, and also for block 1 and block 2. At this time, the passwords "PROG" and "ERAS" are used. Comm. (ASC II) <ES C> "s" (no.) "P R O G" [high no.] [low no.] (data) Comm. (hex) 1B 73 n 50 52 4F 47 xh xl n1 ....nx <ES C> "s" " @" "P R O G " [high no.] [low no.] (data) 1B 73 40 50 52 4F 47 xh xl <n1 ....nx> <ES C> "u" "T" 1B 75 54 "E RAS" 45 52 41 53 <ES C> "u" "U" 1B 75 55 "E RAS" 45 52 41 53 Function Program the batch files with (no.):={"0", ...,"9"} [no.]: = name of the batch file to be loaded, for example "9" for T9. "P R O G" is the password/protection from accidental erasing. A batch file can be programmed several times in a row without erasing the previous version. Always the last version is active. Reorganization of the memory, however, does not occur. With the next programming, the memory space that was used for the previous programming is lost until the next erasing. 255 x [xh] + [xl] is the number of data bytes to be loaded (without the command sequence). (Data) is a data string that contains the number of data bytes calculated from xh and xl. The writing speed is about 200 bytes/s. Program the batch file TINIT : For a description, see <ES C> "s"(no) ..... Attention: By default, the TIN IT contains important parameters for setting the serial interface, the battery charge, the power-down, etc., that are not automatically adopted, when the E E P R O M is programmed. Therefore, the user should copy the old parameters (from the FLAS H, or from a TINIT that GeB E had previously programmed in the EE P R O M), when he creates a new batch file TINIT, and program them into the E E P R O M, supplemented by the required commands. Commands regarding the interface parameters should be inserted before the command <ESC> "]" $00 $00 to release the transmitter. This way, messages after the reset will already be sent with the new settings. Erase batch files 0 - 9. Batch files T0 - T9 can only be erased together. All batch files are erased, even the ones that were programmed earlier. "E RAS" is the password/protection from accidental erasing. Erase the TINIT file. All batch files are erased, even the ones that were programmed earlier. "E RAS" is the password/protection from accidental erasing. 12.3 Error Codes for Processing Batch Files Whenever errors occur during the processing of text files, for example during erasing or reprogramming, error messages are transmitted through the serial interface. Report Serial Comments "E0" "E1" "E2" "E3" "E4" EE P R O M command completed without error Invalid batch file no. Wrong password for ereasing or programming batch files Batch file memory overflow Maximum time for programming one EE P R O M byte was exceeded (time out). EE P R O M not found Future Use "E5" "E6", ... , "E9" GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 49 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 13 Error Diagnostics 13.1 General Information about Error Diagnostics Error diagnotics are no substitute for a complete functional test, like the one that is performed before each delivery at the GeB E test department. However, the diagnostic aids described below often prove to be helpful, especially for the initial operation of a printer, or, when a driver program has been written, and the respective commands are being sent to the printer. Also see "Error Detection" in the operating manual of your device. The following diagnostic help is available: • Self test printout during power-on after R E S ET through the F E ED key • Hex-dump mode • Error detection for standard errors (see hardware manual) • Battery test; refer to the Battery Test chapter on page 45 • Error messages while starting batch files: Please refer to Error Codes for Processing Batch Files on page 49. 13.1.1 Self Test, Batch File T0 By triggering a self test printout, when the power supply is turned on, the correct functioning of the addressed interface can not be tested. However, if the self test runs error-free, one can assume that the internal µP system is running faultlessly and the printer should be able to print data, if it was able to receive it through the respective interface. For the self test printout, batch file T0 is processed and printed, if the feed key is held down for longer than 2 s during the reactivation process. T0 can also be filed in the E E P R O M and be changed by the user. Refer to Commands for M anaging Batch Files on page 47. 13.1.2 Test Printout, Batch File T1 If the OFF/NEXT key (test key) is pressed during operation, batch file T1 will be processed. The µP flash contains the formfeed command for the formula modus. Additionally the character set and other information may be stored in this batch file, for example the retrieval of the batch file containing the software version number. 13.1.3 Turn Off Printer, Batch File T2 By holding down the OFF/NEXT key for more than 3 seconds during operation, the processing of batch file T2 is initiated. In the batch file T3 located in the µ- P flash, the command for power-off is stored (after one second). Therefore, the OFF/N EXT key can be used as the OF F button for the printer (controller with power-off mode). 13.1.4 Hex-Dump Mode The hex-dump mode represents a tool that allows certain diagnostics regarding sent data without having it interpreted by the software of the printer controller. The diagnostics let the user draw conclusions on whether the recieved command sequences are in accordance with the commands intended. In hex-dump mode, the bytes transmitted from the host system to the printer are printed as hexadecimal values and AS C II characters, in order to recognize independently from interpretations happening in the parser, which data sequences are received by the printer. This allows the detection of communication errors, which can be very helpful for servicing the printer. For command retrieval, refer to page 51. 13.1.4.1 M anual Starting and Stopping of the Hex-Dump M ode The printer will switch to the hex-dump mode, when the feed key is held down for at least 3 seconds during power-on and no paper is detected at the entrance to the printer (open lid for the plastic housing). While the printer is in H E X-dump mode, a power-down (sleep mode or power-off mode) is prevented. In order to leave this mode, the printer either has to be turned off completely (cut off power supply) or a hardware R E S ET has to be triggered. Some controllers leave the H EX-dump mode, if the paper is removed again, after it was detected, and the feed key is held down for at least 3 seconds afterwards. After the H E X-dump mode, the printer is reinitialized by processing the TINIT. GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • page 50 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 13.1.5 Adjusting the Hex-Dump Mode to the Printer Mechanism through Batch File TA of the Controller Comm. (ASC II) Comm. (hex) <ES C> "T" "A" 1B 54 41 <ES C> "z" [number] "H EXDU M P" 1B 7A n 48 45 58 44 55 4D 50 Function Retrieval of the unalterable batch file TA. It contains the command <ES C> "z" [number] "H EXD U M P" for formatting the printout in hex-dump mode. With this command, the printout can be formatted in hex-dump mode. It is only available through the corresponding entry in the flash. In order to call the hex-dump mode, batch file "A" is retrieved. [number] states the number of represented bytes per line (default: n=12). The selected text format is retained. The password "H EXD U M P" represents protection against unintentional inputs. A printout may look like the following: 0000 30 31 32 33 34 35 36 37 38 39 3A 3B 0123456789; serial no. character code (hex.) AS C II characters For this representation, the following commands were filed in TA: (print in font 3 ) <E S C> "z" $0C "H EX DU M P" Attention: 13.2 Assistance with Errors during the Programming of Batch Files in the E EP RO M The solder bridge combination Br1, Br2, Br3 closed and Br4 open has the serial interface initiated with 9,600 baud, 8 data bits, 1 stop bit, and no parity bit instead of retrieving the TIN IT after a R E SET. This prevents potentially faulty interface initialization in the case of unknown values and flawed programming in the E E P R O M . The user can communicate with the controller, erase the E E P R O M contents, if necessary, and then reprogram. GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E-485-V1.5 • GeB E -System-78 •Page 51 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 14 O PD- Menue® All parameter sets can be easily changed with a few key strokes assisted by the OP D- Menues (OnPaperDisplay). They can be called at any time, and are quickly followed with the menu printout. The inconvenient accessing of the DI P switches and the programming through a terminal program are things of the past. The O PD Menu is operated with only two keys (OFF/NEXT and F EED/ENTE R) Description of the Key Functions The keys can have different functions depending on the status – normal operation or print settings menu. The time for which the button is held down is also evaluated. 14.1 Normal Operation Key FEED/ENTER Key OFF/NEXT Act ion pressed not pressed paper feed by one line held down > 2s not pressed continuous paper feed pressed during power-on < 1s not pressed reactivation, no paper feed held down during power-on, paper detected > 2s not pressed retrieval of T0 (self test) held down during power-on, no paper detected > 2s not pressed retrieval of hex-dump mode (T17) pressed in hex-dunp mode no paper not pressed hex-dump mode end (T18) not pressed key released after < 1s retrieval of T1 (= form feed) in normal paper mode not pressed key held down > 3s retrieval of T2 (= immediate PWDN) pressed pressed calls menu (menu_scan) 14.2 Settings Menu Key FEED/ENTER pressed Key OFF/NEXT not pressed Action Increases the parameter not pressed pressed Moves to the next menu item pressed pressed C loses menu and saves settings GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • page 52 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 14.3 Menu Guide (Example) Welcome to the OPD menu 1.0 5 Setup timeout after 10 minutes Actual printer settings: Ubat: 5.2V Tbat: 24° C (battery temperature, only displayed when battery is p r esent ) Firmware: G E-xxxx Density 25 Speed: med (64)/low Interface: R S232/US B/Blue C OM: 9600,n,8,Tx+ Sleep time: 5 sec Font #: 1 Char. format: D0,W0,H0,S0,48 ? Change actual settings Press ENTE R to change Press N EXT to skip Press NEXT+ENTE R to save and exit P R INTE R S ETU P: Press ENTE R to modify Press NEXT to store and continue Press NEXT+ENTE R to save and exit Density: 25 20, 25, 30, 35, 40, 45, 50, 90(2-ply) Speed/Quality: med 64/ low low (32)/med, med (64)/med, med (64)/low, high (96)/low (Values depend on type of printer). Interface: R S232/U S B/Blue R S232/U S B/Blue, IrDA, GeB E-I R , G eB E- C O M Baud rate: 9600 1200, 2400, 4800, 9600,19200, 38400, 57600, 115200. COM pa r amete r: n,8,Tx+ n, 7, Tx+ / o, 7, Tx+ / e, 7, Tx+ / n, 8, Tx+ / o, 8, Tx+ /e, 8, Tx+ /n, 7, Tx- / o, 7, Tx- / e, 7, Tx- / n, 8, Tx- / o, 8, Tx- / e, 8, TxSleep Time: 5 sec OFF, 5 sec, 30 sec, 1 min, 10 min, 1 h, 12 h, 32 h Font #: 1 1, 2, 3, 4 Text orientat: text mode (D0) Text mode (D0), data mode (D1) GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 53 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual C har. size : W0/H0 W0/H0, W0/H1, W0/H2, W0/H3, W1/H0, W1/H1, W1/H2, W1/H3 0,1,2,3,4,5,6,7 Char. spacing : 0 Print width : 48 mm, .... 32 mm 48 mm (Values depend on type of printer.) ? Return to default settings Press ENTE R to change Press N EXT to skip Press N EXT+ENTE R to save and exit NUR, wenn Uhr bestückt oder angeschlossen 17.03.03 17:33 ? C h a n ge da t e / t i m e P r es s E N T E R to c h a n ge P r es s N E X T to s k i p P r es s N E X T + E N T E R t o s a v e a n d ex i t R TC S E T U P : P r e s s E N T E R t o m od i f y P r es s N E X T to s t o r e a n d c o n t i n u e P r es s N E X T + E N T E R to s a v e a n d ex i t 00 .. 49 Year: 03 01 .. 12 Month: 11 01 .. 31 Date : 14 01 .. 07 Day : 7 00 .. 23 Ho u r : 13 00 .. 59 M in ute : 33 1 00 : 00 O N ? Change alarm Press ENTE R to change Press N EXT to skip Press N EXT + ENTE R to save and exit ALAR M S ETU P: Press ENTE R to modify Press N EXT to store and continue Press NEXT+ENTE R to save and exit 01 .. 07, * Day : 7 * : M e a n s p e r i od i c a l o p e r a t i o n , e.g when "day" is set, an alarm is triggered every day at the set time. 00 .. 23, * Hour : 13 00 .. 59, * Minute : ON , O F F Mode: 33 OFF GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 54 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 15 Periphery 15.1 Real Time C lock with Alarm Register 15.1.1 C lock, Summary of Functions For some controllers, an optional clock chip is available, or an external clock module is added through the S P I- B U S. The clock has a resolution of 1s, and can be set and read through commands. 15.1.1.1 Alarm Register Essential for the function within the printer concept is the alarm register function that is installed in the clock. It allows the printer to be activated at a preset time. 15.1.2 C ommands to the C lock Available commands concerning the clock are: • Set date/time • Set alarm • Read clock through the serial interface • Print data and/or time 15.1.2.1 Setting the Clock through the O P D- M enue® The clock can also be set manually with two keys through the settings menu. 15.1.3 Commands for Setting and Reading the C lock Through the Interfaces The clock can be set through the GeB E-O PD- Menue®, and it can be set and read with commands through the serial interface. Comm. (ASCII) <ESC> "c" 07 <seconds> <minutes> <hours> <week-day> <month-day> <month> <year> Comm. (hex) 1B 63 07 <seconds> <minutes> <hours> <week-day> <month-day> <month> <year> Function Set clock: range of values: <length>:= 07 (constant) <seconds> := {00, .. ,59} <minutes> := {00, .., 59} <hours> := {00, .., 23} <week-day> := {01, .., 07}; (Sunday = 1) <month-day> := {01, .., 31} <month> := {01, .., 12}; (January =1) <year> := {00, .., 99} The third byte (number of parameters following) as to be entered here with 7. *) The parameters <seconds> to <year> are binary coded decimal numbers (BCD values) with the lower 4 bits as a ones comlumn, the upper 4 bits as tens column. The hexadecimal value $23 corresponds to the decimal value 23, with 3 as the lower and 2 as the upper 4-bit value. GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E-485-V1.5 • GeB E -System-78 •Page 55 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 15.1.3.1 Setting the Clock and its Alarm Register Comm. (ASC II) <E S C> "c" 04 <P -seconds> <P -minutes> <P -hours> <batch file> Comm. (hex) 1B 63 04 <P -seconds> <P -minutes> <P -hours> <batch file> Function Set alarm time periodically: <length>: = 04 (constant) <period-seconds> := {00, .., 59} <period-minutes> := {00, .., 59} <period-hours> := {00, .., 23} <batch file> := {00, .., 07} This command automatically activates the alarm. It can be turned on or off with the command Activate/Stop alarm. Once the alarm time runs out, the current time is automatically read from the clock, and the period parameters are added and saved as the new alarm parameters in the alarm register of the clock. If instead of a valid value, the parameter is specified as 0xFF, there will be no verification. If for example, for < alarm-weekday> and < alarm-hours> 0xFF is entered, an alarm will be triggered each time the values for seconds and minutes correspond. <ESC> "c" 04 03 24 FF FF Special case: All values are set to 0xFF. An alarm is triggered every second. Parameters are stored in the alarm register of the clock. <ES C> "c" 01 00 1B 63 01 00 <ES C> "c" 01 01 1B 63 01 01 Activate alarm: This command activates the alarm by setting the M S B of the <alarm mode>. The alarm time, the period, and the batch file allocation are not affected. Stop alarm: This command turns the alarm off by erasing the M S B of the <alarm mode>. The alarm time, the period, and the batch file allocation are not affected. *) The parameters <seconds> to <year> are binary coded decimals (B C D values) with the lower 4 bits as the units position, and the upper 4 bits as the tens digit. The hexadecimal value $23 corresponds to the decimal value of 23, with the 3 as the lower and the 2 as the upper 4-bit value. 15.1.3.2 Reading the Clock: Date and Time Comm. (ASCII) <ESC> "d" Comm. (hex) 1B 64 Function The command R e a d C l o c k is given through the serial interface: The controller responds through the serial interface with 15 bytes of the following meaning: <seconds> <minutes> <hours> <weekday> <day of month> <month> <year> <alarm seconds> < alarm minutes> < alarm hours> < alarm weekday> <alarm mode> The parameters <seconds> to <year> are binary coded decimals (B C D values) with the lower 4 bits as the units position, and the upper 4 bits as the tens digit. The hexadecimal value $23 corresponds to the decimal value of 23, with the 3 as the lower and the 2 as the upper 4-bit value. <alarm mode> States whether the alarm is authorized (1) or blocked (0). The immediate output of the string through the serial interface is not interrupted by other status messages. The handshake line (RTS) that is controlled by the host is ignored. GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 56 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 15.1.3.3 Printing Date and Comm. (ASC II) <E S C> "a" [flag byte] Comm. (hex) 1B 61 [flagbyte] Function Print command for the clock. The individual bits of the flag bytes have the following meaning: d0 =1 := print seconds d1 =1 := print time d2 =1 := print date If, for example, d0 of the flag byte is set to 1, the seconds field is printed as follows: 03 If the date and the time are to be printed, and d1 and d2 of the flag byte are set, 2 spaces are printed in between. d3=1 := print week-day d4=0 := use English terms d4=1 := use German terms d5, d6 d7 user-defined The command for printing the clock is ignored, if the appropriate hardware (clock chip) is not recognized. This way, batch file T0 can always contain a command to print the clock data without causing problems, if the additional circuit board is not available. The print attributes that are currently in effect apply. The complete output format looks like this: 2 11.08.04 17:29.03 or 2 08/11/04 17:29.03 Leading zeros are not disabled. If d3 of the flag byte is set, the day of the week is printed, followed by a blank. If the bit is not set, none of these characters are printed. If d2 of the flag byte is set, the current date is printed in the following format: 22.08.04 or 08/22/04 If d1 of the flag byte is set, the time is printed in the following format: 17:29 If d0 of the flag byte is set, the seconds are printed in the following format: .03 Attention: This command does not contain an automatic line feed to allow the printing within one line (with subsequent text). GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 57 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 15.2 Periphery - M agnetic C ard Reader The magnetic strip can contain up to three tracks with serial data. The recording density and the number of bits per character differ from one track to the next in accordance with IS O 3554. They determine the maximum number of characters that can be saved on each track. For track 1, the maximum number is 79, for track 2 maximum 40, and for track 3 maximum 107 characters, including the start and stop characters. In accordance with the norm, track 1 and 2 are only read during operation. Track 3 is the only one that is also used for recording. Operation: After the swiping of the card, the LED lights up for about 2 seconds, if the card was read correctly. If an error occured, the LED will flash rapidly 6 times. While the LED is on, another reading process is not possible. After the LE D has gone out, the internal buffers are being prepaired for a new reading process, waiting for another card to be swiped. <ESC> M <No T1> <Status T1> <Data T1> <No T2> <Status T2> <Data T2> <No T3> <Status T3> <Data T3> <Checksum> No T1: Binary number of characters in track 1. The status byte is not included. If the track is empty, this byte is a binary ZERO. Status T1: Status byte of track 1. The ASCII characters '0' - '9' are used. '0': no error, data of track 1 valid. '5': no data in track 1. '6': buffer overflow (more than 79 characters) '7': no end character detected in track 1. '8': parity error occured in track 1. '9': LRC error occured in track 1. In case of an error, the number of characters (parameter <No T1>) is set to zero, and no data is transmitted. Code '5' means that this track does not exist. Data T1: Data of track 1 converted to ASCII. The number of characters corresponds to the parameter <No T1>. No T2: Binary number of characters in track 2. The status byte is not included. If the track is empty, this byte is a binary ZERO. Status T2: Status byte of track 2. The ASCII characters '0' - '9' are used. '0': no error, data of track 2 valid. '5': no data in track 2. '6': buffer overflow (more than 40 characters) '7': no end character detected in track 2. '8': parity error occured in track 2. '9': LRC error occured in track 2. In case of an error, the number of characters (parameter <No T2>) is set to zero, and no data is transmitted. Code '5' means that this track does not exist. AL P HA - Cha r acte r Track 2 and 3 P 543210 1 000000 0 000001 0 000010 1 000011 0 000100 1 000101 1 000110 0 000111 0 001000 1 001001 1 001010 0 001011 1 001100 0 001101 0 001110 1 001111 0 010000 1 010001 1 010010 0 010011 1 010100 0 010101 0 010110 1 010111 1 011000 0 011001 0 011010 1 011011 0 011100 1 011101 0 011110 0 011111 0 100000 1 100001 1 100010 0 100011 1 100100 0 100101 0 100110 1 100111 0 101010 1 101011 1 101000 0 101001 0 101100 1 101101 1 101110 0 101111 1 110000 0 110001 0 110010 1 110011 0 110100 1 110101 1 110110 0 110111 1 111010 0 111011 0 111000 1 111001 1 111100 0 111101 0 111110 1 111111 hex 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F space ! ,, # $ %(start) & ' ( ) * + , . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? (end) @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^( field) _ GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 58 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual Data T2: Data of track 3 converted to ASCII. The number of characters cor- N u m e r i c C h a r a c t e r T r a c k 1 P 3210 equals meaning responds to the parameter <No T2>. 1 0000 0 No T3: 0 0001 1 Binary number of characters in track 3. The status byte is not inclu- 0 0010 2 1 0011 3 ded. 0 0100 4 If the track is empty, this byte is a binary ZERO. 1 0101 5 Status T3: Status byte of track 3. The ASCII characters '0' - '9' are used. '0': no error, data of track 3 valid. '5': no data in track 3. '6': buffer overflow (more than 104 characters) '7': no end character detected in track 3. '8': parity error occured in track 3. '9': LRC error occured in track 3. In case of an error, the number of characters (parameter <No T3>) is set to zero, and no data is transmitted. Code '5' means that this track does not exist. 1 0 0 1 1 0 1 0 0 1 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 6 7 8 9 : ; < = ? control start sentinel control field seperator control end sentinel Data T3: Data of track 3 converted to ASCII. The number of characters corresponds to the parameter <No T3>. Checksum: The checksum consists of 2 bytes: <high checksum> <low checksum> and represents the addition of all data (except for the 2 leading bytes <ESC> M). EC Card Track Position 2 1-3 2 9-18 2 21-22 2 23-24 3 1-4 3 5-12 3 14-23 3 37-40 3 41 3 61-62 3 63-64 S- Card Track Position 2 x 3 1-4 3 9-24 Credit Card Track Position 1 2-17 1 19-44 1 46-47 1 48-49 2 1-16 2 18-19 2 20-21 Content identification 672 account number year of expiration month of expiration identification (0159, E C card) bank identification code account number remaining amount that can be withdrawn final digit of the year of the last withdrawal year of expiration month of expiration Content like E C card identification (0059, S-card) like E C card Content credit card number last name of the card holder year of expiration month of expiration credit card number year of expiration month of expiration GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 59 of 60 Command Software for Thermal Printers • GeB E-System-78 • Software M anual 15.3 Periphery - Second Serial Interface ( Planned !) 15.3.1 The AUX UART External peripheral devices with a low data output, such as a bar code scanner, can be connected to this serial interface. The AU X UART interface can be equipped with an R S232, a 3.3 V, or a 4.5 TTL interface. 15.3.2 Configuration of the UART <E S C> "Z" 00h < baud rate> <flag bytes> (Configuration and meaning of the parameters correspond to the setting of the serial interface in the NEC) The default setting is 96, n, 8, 1 Data from the host to the external device (for example bar code scanner) <E S C> "Z" <numberl><data><CsmHigh><CsmLow> Data: as described in the manual of the bar code reader - max. block size is 255 + 2 bytes checksum - the first byte represents the data length (without checksum / max. 0xff) Since the data is secured with its own checksum, an additional checksum is unnecessary. Data from external device (for example bar code reader) to the host <E S C> "Z" <number><data><CsmHigh><CsmLow> Data: see description above. GeB E E+F GmbH • www.oem-printer.com • GeB E Doc.No. SoMAN-E -485-V1.5 • GeB E -System-78 • P age 60 of 60