Communication Protocol Manual - Impresoras Fiscales

36
Fiscal printer Communication Protocol Manual TM-U950/PF TM-U675/PF TM-U220AF URL: www.epson.com.ve E-mail: [email protected] .ve Todos los derechos reservados. Ninguna parte de este documento podrá ser reproducida, almacenada en un sistema que permita su recuperación posterior o transmitida en cualquier forma o por cualquier medio sin previa autorización escrita de EPSON VENEZUELA S.A. Si bien se han tomado todas las precauciones del caso en la preparación de este libro, EPSON Venezuela S.A. no asume ninguna responsabilidad por errores u omisiones; tampoco se asume ninguna responsabilidad por daños y perjuicios resultantes del uso de la información contenida en el presente manual.

Transcript of Communication Protocol Manual - Impresoras Fiscales

Fiscal printer

Communication Protocol Manual

TM-U950/PF TM-U675/PF TM-U220AF

URL: www.epson.com.ve E-mail: [email protected] Todos los derechos reservados. Ninguna parte de este documento podrá ser reproducida, almacenada en un sistema que permita su recuperación posterior o transmitida en cualquier forma o por cualquier medio sin previa autorización escrita de EPSON VENEZUELA S.A. Si bien se han tomado todas las precauciones del caso en la preparación de este libro, EPSON Venezuela S.A. no asume ninguna responsabilidad por errores u omisiones; tampoco se asume ninguna responsabilidad por daños y perjuicios resultantes del uso de la información contenida en el presente manual.

Terminology Base taxable (BI): it is the value of a certain article, on which the associate tax is calculated. Fiscal controller: badge of printed circuit with microprocessor, memory and other devices that restricts and controls the printed information in a fiscal voucher. Fiscal voucher (CF): bills, receipt, ticket. Document emitted by the fiscal printer to be given to the buyer as record of any generating operation of revenues and relative to the user's activity. Non fiscal Document: it is used to generate in the fiscal printer detailed reports of sales, frequent clients' coupons, etc. The non fiscal documents can contain multiple lines of “fiscal text.” Fiscal state & printer State: fields of alphanumeric information that are included in each one of the answers that the fiscal printer emits after receiving a command. They reflect the state of fiscal controller and printer. Fiscal cabinet: box that gives mechanical confining and the fiscal controller's assembly. Host: point of sale device (POS) contains the application that interacts with the fiscal printer. Interface with the host: refers to the electric interface that uses the host to communicate with the fiscal controller. This based on the protocol RS-232. Printer: EPSON impression terminal for sale point, used by the fiscal controller to print the documents. Fiscal Printer: equipment conformed by a fiscal controller and a printer, connected as a peripheral of a sale point, and which only entrance of data is a normalized interface RS-232. This device allows to generate vouchers of sales that fulfill current normative. Fiscal identification: chart of information that identify the fiscal controller's proprietor (social reason, commercial domicile, RIF, NIT, etc.). Tax to the Added Value (IVA): tax for the final user of a thing or service, and it is generally a percentage of the taxable base. Fiscal Journal: period lapsed from the emission of the last Z report. Work memory: Portion of the fiscal controller's volatile memory that allows multiple writing accesses / reading. In this memory they register the daily totals. Fiscal memory: portion of the fiscal controller's volatile memory, of sequential access, where descriptive data of the fiscal transactions are stored. Fiscal band (seal): a mechanical way to connect the fiscal cabinet to the printer, in such way that the not autorized access is impeded to the fiscal controller's internal components. Fiscal protocol: includes a group of commands and communication rules that should be considered by the account of the host to communicate with the fiscal printer. ‘Z' Report (closes): document emitted by the fiscal printer where they register the relative data to the sales carried out during the fiscal journal. When this operation is carried out the daily totals stored in the work memory are written in the fiscal memory. It is executed by the Z daily close command.

‘X' Report (closes): document where is reflected the value of the operations carried out from the emission of the last Z report or of the last X report. partially shows the sales carried out in a fiscal day and it is usually used to change cashier's in the sale point. Report (voucher) of audit: document emitted by the fiscal printer that shows the content of the information stored in the fiscal memory during the selected period. Fiscal text: it is restricted to characters ASCII from 0x20 to 0x7F and a limited quantity of values on necessary 0x7F to generate special characters (á, é, í, or, etc). the character 0x1B is excluded. This limitation assures that the application that uses the fiscal printer cannot generate data of graphics. To define the letter type the characters 0xF0 to 0xFF, worth only to be applied in some fields of the documents. Inside the defined fields for merchandise description and text in general, the word “TOTAL” becomes “TOT..”, with the purpose of fulfilling the current normative. General totals: refers to the total amount of the sold products and the charged taxes, the total of the emitted vouchers, etc., along the operation of the fiscal printer. Daily totals: refers to the total amount of the sold products and the charged taxes, the total of the emitted vouchers, etc., during the fiscal day. INTRODUCTION The fiscal printer is a device that allows to register and control the information that is printed in a sale voucher (bills). The value of the transactions is stored in a registration located in a fiscal memory, which can be revised countably with posteriority by the authorities and/or the user. (Memory work, Control Program, fiscal memory and Epson printer)

The fiscal printer consists of an impression terminal EPSON and a fiscal controller. Functions of the EPSON fiscal printer The fiscal printer provides the following functions: · Restricts the information printed on the sale voucher, and validates the received data of agreement with the transaction that is being carried out. · Assures that the precise information is printed for each fiscal transaction. · Assures that coincident information is printed in the voucher and the audit tape. · Accumulate the total amount of the value of the billed products and the charged taxes. · Register the quantity of vouchers emitted during the day.

· Numbers and it identifies the fiscal vouchers and other documents. · Generate reports to extract the information registered in the fiscal memory. · Control the temporary sequence of the closings of the fiscal day. · Impede any not authorized activity that tries to interfere with some of the previously indicated functions. The devices of security of the fiscal printer are classified in two categories: hardware and software. The cabinet and the fiscal seal provide the hardware security. The software security is given by means of a wide group of commands that the host uses for interaction with the fiscal printer. The contained firmware in the fiscal controller doesn't allow the shortcut to the impression device, the fiscal memory or the work memory. The fiscal controller's Firmware resides in PROM (non volatile memory). When activating the fiscal printer several tests are carried out to verify the integrity of: Firmware PROM. Clock of real time. Fiscal memory. Tests of vouchers. Firmware The Firmware resides in a memory CMOS PROM 16Kbytes. If the checkup verification fails, the fiscal printer doesn't allow to generate any document type. Proves of the clock of real time The clock of real time is verified (RTC) to check that it is operating, and the condition of the battery is also verified used for to support the same one. If the tension of the battery is below a minimum value, in such a way that the good operation of the device. the fiscal printer is not guaranteed it is blocked and it doesn't allow to generate any type of vouchers. Proves of the fiscal memory Is carried out a verification of the integrity of the fiscal memory that includes the sequence of dates, the taxpayer's data, etc. If the last closing Z was carried out the device more than 24 hours ago it doesn't allow to generate fiscal vouchers until so much is not carried out a new closing Z. Proves of vouchers If an open fiscal voucher exists and you doesn't execute the command “to CLOSE FISCAL VOUCHER”, it is canceled and the following line is printed: * * ELECTRIC INTERRUPTION * * * * * * * * * * DOCUMENT CANCELED * * * * * * * * If an open fiscal voucher exists and the energy cut took place after executing the command “to CLOSE FISCAL VOUCHER” the document is completed and the following line is inserted: * * ELECTRIC INTERRUPTION * * If a Z report open and printed partially, it is canceled and the line is printed “CANCELED FOR INTERRUP. ELECTRIC”, and then you proceeds to print the report again from the beginning. This process repeats the necessary times until generating a Z report of complete. Types of documents

Once has been filled the identification chart with the information related with the proprietor of the device (social reason, domicile, RIF, NIT) and the value corresponding to the rate of I.V.A. effective, the device will be able to emit the following documents: Non fiscal documents: they are used documents that are not verifying of sales to take place. Fiscal vouchers: they are documents that have the fiscal logo (MH) and they serve as vouchers of a transaction (bill). Report fiscal: the commands that produce the fiscal reports are used in general to store the daily totals in the fiscal memory, and according to the necessities of the authorities for the countable revision of the fiscal printer. The fiscal reports can be: Close (reports) X: it is a partial report that it is generally emitted when concluding the cashier's shift. Close (daily report) Z: it is the fiscal closing that overturns the TOTAL of the billing from the day to the fiscal memory. Therefore, the duration of the fiscal memory is independent of the quantity of transactions that are carried out in the day. IMPORTANT: it can be carried out more than a fiscal closing per day, but this procedure shortens the useful life of the fiscal memory, being the user's responsibility the decrease of the duration of the same one.

Fiscal Memory Report per day: informs the data stored in the fiscal memory, from the initial date to the final one in detailed form. Fiscal Memory Report per month: informs the data stored in the fiscal memory, for the months understood between the initial date and the final one. Fiscal Memory Report by number of Z: informs the data stored in the fiscal memory, from the number of closing initial until the number of final closing. Documents Summary Note: consult the individual commands where it will find a detailed description. a) Non fiscal Documents They are used to produce documents that are not verifying of sales, as example, payment voucher with credit cards or detailed reports of inventory. The associate commands are the following ones: a.1) Open non fiscal document (ABRIR_DNF): It is the first step to carry out so that the fiscal printer accepts lines of “fiscal text”. This command will be rejected if it is open a fiscal voucher or a non fiscal document. The document is identified as "NOT FISCAL DOCUMENT " and the one is printed headed of the same one. a.2) Print non fiscal text (TEXTO_DNF): The fiscal printer accepts all the lines of “fiscal text” that are required to produce the document. This command is valid only if there is an open DNF. They apply the limitations to the word “TOTAL.” a.3) Close non fiscal document (CERRAR_DNF): It is the last step to carry out a non fiscal document. This command will be rejected if there is not an open DNF( Non fiscal document). The line of the document is printed and is carried out the advance and the cut of the same one. b) Fiscal Vouchers

Six commands exist to produce fiscal vouchers. Except for the first one (ABRIR_CF), all will be rejected if a fiscal voucher is not open. b.1) Open fiscal voucher (ABRIR_CF): It is the first command that should be executed if wants himself to carry out a fiscal voucher (bills). This command will be rejected if a CF or any other document is open. The accountant of the fiscal documents is increased. The one is printed headed of the voucher. b.2) Print fiscal text (TEXTO_CF): The fiscal printer accepts until a maximum of three (3) lines of “fiscal text” to supplement the description of a product. b.3) Print article (ITEM_CF): This command has fields for the description, quantity, appraises tax and unitary price of the article to bill. The additional description of a product should be carried out by means of the command “TEXTO_CF” prior to the application of this command. b.4) Subtotal (SUB_CF): The answer that sends the fiscal printer after receiving this command contains the value of the sales accumulated for each taxable base during the emission of the fiscal voucher that is emitting. This command can be used during the emission of the voucher to verify that the information sent by the host is registering correctly in the fiscal printer. b.5) Pay / Cancel / Discount (DESCUENTO_CF): This command allows: b.5.1. - Carry out a payment that once closed the fiscal voucher was printed in the following way:

Payment: pppppppp.pp Change: ccccccc.cc

This command can be omitted. You can use to carry out several payments, but “the amount doesn't accumulate” the last one amount entered it substitutes to the previous one. The parameter ‘T ' should be sent. b.5.2. - Cancel the fiscal voucher that is emitting. The parameter ‘C ' should be sent. b.5.3. - Carry out global discounts on the amount total of the invoice before the taxes. The parameter ‘D ' should be sent. This command is alone valid after the command “ITEM_CF.” The article commands won't be admitted after this command has been accepted. b.6) Close fiscal voucher (CERRAR_CF): It is the last step that should be carried out to elaborate a fiscal voucher. The carried out payments are printed, the one is calculated returned, it is made the advance and the cut of the line of the voucher. The sale totals accumulate in the work memory. If the voucher has been canceled by means of the command “DESCUENTO_CF” this step should not be executed. c) Audit Report The audit reports allow to take a control of the transactions carried out by means of the fiscal printer. These documents reflect the information contained in the fiscal memory. The available audit reports are the following ones: Z report (closing of fiscal day). Memory fiscal Report . It consults requested by dates.

Memory fiscal Report . It consults for report number. X report (closes by cashier's change). Interface host-fiscal Printer The connection between the host and the fiscal printer is carried out through a serial cable with the following disposition:

The serial connector DB25 is in the later part of the printer. The value of the communication speed is of 9600 bauds. The format of it dates it it is 8 bits, without parity, one or more stop bits. Protocol of fiscal communication The communication between the host and the fiscal printer is bi-directional. The protocol is of the type “teacher / slave” and it is based on the following principles: • The host (“teacher”) it begins all the communications. • The fiscal printer (“slave”) will never send a not requested message. • The format of the messages exchanged between the host and the fiscal printer is the following one:

Field Fields Command Description STX Text beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command number [0x30 - 0xAF] - Field separator [0x1C] Field 1 Field of data .. .. - Field separator [0x1C] Field n Field of data ETX Text end [0x03] BCC BCC [nnnn]

The commands sent by the host like the answers of the fiscal printer, they are framed by the control codes ASCII of “text beginning” (STX) (0x02) and of “text end” (ETX) (0x03). The characters of block verification (BCC <nnnn>) they should be correspondents at the end of the plot of data. The BCC <nnnn> it is the simple sum of all the characters from the beginning (STX) until the end of data (ETX), and it is represented by means of 4 characters hexadecimals. The commands sent by the host to the fiscal printer should have a sequence number in the range from 0x20 to 0x7F (hexadecimal) or from 32 at 127 (decimal). The answers of the fiscal printer will have a number of coincident sequence. It is not necessary that the sequence numbers are correlative, but they will be different from the number of sequence of the previous command. For each command sent by the host, this will receive an answer of the fiscal printer before the next one is sent. The host should analyze the answer to each command to guarantee that it has not happened any error with the handling of the fiscal printer. IMPORTANT: the answers should always be analyzed, because it is the only form of guaranteeing that the sequence of commands sent from the HOST to the fiscal printer is executed completely. IMPORTANT: The fields denoted as “not used Field” they can be omitted. To make this compatible protocol with previous versions it will be marked as null by means of a (1) character 127 decimal. Answers of the fiscal printer The answers of the fiscal printer are adjusted to the general definition of the suitable format for the commands sent by the host.

Field Fields Answer Description

STX Text beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command number [0x30 - 0xAF] - Field separator [0x1C] Field 1 Field of data - Field separator [0x1C] Field 2 Fiscal State [nnnn] - Field separator [0x1C] Field 3 Field of data .. .. - Field separator [0x1C] Field n Field of data ETX Text end [0x03] BCC BCC [nnnn]

Some commands take a long time to conclude. In these cases the fiscal printer sends a continuation code or device periodically processing, in order to indicate that there is still a command of this type in development. If the host receives a character (0x12) from the fiscal printer it will continue awaiting a complete answer, increasing in 800 ms the maximum time that one expects the arrival of the answer. If the time of wait the host is exceeded it will consider that the interface is not functional and a communication error should be declared. The answer sent by the fiscal printer for a command, it can be of two types: • Positive ·: indicating that the command was executed with success. Each instruction sent by the host has

an answer with an exclusive format as for the number and meaning of the fields that she contains. In the descriptions of the individual commands it will find a detailed definition of the associate answer.

• Negative: indicating that it happened an execution flaw related with the command. When receiving a “ERROR” as answer the host will take the pertinent measures to recover the control of the process (to cancel the voucher, to verify the totals, etc.). The fields that are included in an answer “positive” for a certain command they are not present in the event of error.

To be able to determine if a command was executed with success the answer it should be expected and to verify, before anything that the plot of data that you/they compose it doesn't contain the string “ERROR.” The general format for an answer “negative” sent by the fiscal printer (case of error) it is the following one:

Field Fields Answer Description (Errror Case)

STX Text beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command number [0x30 - 0xAF] - Field separator [0x1C] Field 1 Printer state [nnnn] - Field separator [0x1C] Field 2 Fiscal state [nnnn] - Field separator [0x1C] Field 3 Error number - Field separator [0x1C] Field 4 “ERROR” + error Number ETX Text end [0x03] BCC BCC [nnnn]

IMPORTANT: it will always analyze the answer to a command to know if it was executed in a correct or incorrect way.

Error number When the printer sends an answer “negative”, the number of associate error defines the error condition and it can be useful to determine the origin of the problem. In the titled annex “Map of errors” the meaning of each error number is detailed. Reset As measure of security and to guarantee the total control of the device on the part of the Host, the fiscal controller can be restarted via software (taken to reset condition). For this alone it should be sent to the printer the following sequence of data: ...(0x07)(0x08)(0x09)(0x0A)(0x0B)(0x0C)(0x0D)(0x0E)(0x0F)(0x10)(0x11)(0x12)(0x13)(0x14)(0x15)(0x16)(0x17)... This sequence can be a correspondent to the fiscal printer in any moment, provided this on-line one. It is not necessary to send the data STX, ETX or BCC defined in the protocol of fiscal communication. State indicators In each answer (positive or negative) sent by the fiscal controller, two fields of data are included denoted as “State Printer” and “Fiscal State”. each one of these fields this conformed by four (4) bytes that represent same quantity of numbers hexadecimals. If these numbers hexadecimales become to their equivalent ones in binary, each bit represents a condition of a state in particular of the operation of the device. IMPORTANT: The “State Printer” and the “Fiscal State” they indicate a group of conditions. Each one of the bits defined by the states represents a condition evaluated until in the moment to produce the answer. For this reason, in the event of error can that some of the bits of the answer is not representative. Example: If not sends himself a command been worth to the fiscal printer, this it doesn't process it and it is sent an error like answer. In this case the bit of the “State Printer” that indicates the paper presence it is not representative, therefore it is possible that the printer has or non paper. For the treatment of errors it is recommended to verify the presence of the string “ERROR” in the answer plot and it consults the “Map of errors”. it is not advisable to use the “State Printer” and the “Fiscal State” to determine if it has happened an error. Fiscal state After a command, the printer sends an answer that contains the fiscal state (four bytes) that it can be analyzed to know if the instruction was executed correctly. When the fiscal state is converted from hexadecimal to a binary word, has indicators of bits field with the following meaning (the bit 0 are that of smaller importance):

STATE OF THE FISCAL BIT STATE DESCRIPTION 0 1 - Confirmation error fiscal memory.

- Together with the Bit 7 indicate that the fiscal memory this full one. 1 1 - Error Confirmation Work memory. 2 1 - Not used. 3 1 - Not reconized command. 4 1 - Field of data Invalidates. 5 1 - Not command valid for fiscal state. 6 1 - Overflow of total. 7 1 - Full fiscal memory. 8 1 - Almost full fiscal memory. 9 1 - Not used.

10 1 - Not used. 11 1 - it is necessary to make a closing of the fiscal day.

- They have been sent the maximum number of articles in a fiscal voucher and it owes himself to close.

12 1 - Open fiscal voucher. 13 1 - Document not fiscal open. 14 1 - Not used. 15 1 - Logical OR of the bits 0-8 and 11 to Use for QUICK control

State of the printer If the answer to a command the state of the printer is included (four bytes) that it can be analyzed to determine if the command was executed correctly in time of impression. When the state of the printer is converted from hexadecimal to a binary word, has indicators of bits field with the following meaning (the bit 0 are that of smaller importance):

STATE OF THE PRINTER BIT STATE DESCRIPTION 0 1 - Not used 1 1 - Not used 2 1 - Error and/or printer flaw. 3 1 - printer outside of line. 4 1 - Not used 5 1 - Not used 6 1 - Not used 7 1 - Not used 8 1 - Not used 9 1 - Not used. 10 1 - Not used. 11 1 - Not used 12 1 - Not used 13 1 - Not used 14 1 - printer without Paper to be printed 15 1 - logical OR of the bits 0-6,14. to Use for quick control

If it happens an error in the impression terminal the bit 15 of the “State Printer” it allows to determine if it happened before or after the execution of the command. Because the fiscal printer is a device that should register information, for certain situations the first fiscal controller it registers and then it prints, and in other first one the state of the impression terminal is verified. Commands of fiscal control (Status_IF (0x38), TMU220AF, TMU950/PF, TMU675/PF) This command is used to evaluate the fiscal controller's state. It also allows to define the behavior from the device to the signs coming from the paper sensors. Will be able to be executed later and before any other command.

STATUS IF (0X38) COMMAND

Field Description STX Data beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command number [0x38]

- Field separator [0x1C] Field 1 ‘N ' = the accountants' data

‘E' = value of sales exempt ‘A ' = value of taxable base a + taxes ‘B ' = value of taxable base b + taxes ‘C ' = value of taxable base c + taxes ‘D ' = value of discounts + taxes ‘R ' = value of refunds + taxes ' F ' = near end receipt paper ‘J ' = near end audit paper. ‘S ' = it disables the autocutter. ‘U' = it Verifies if there is paper in the slip of the printer. This field is not optional. If it is not included or the value is outside of some of the options the answer doesn't contain the fields corresponding to the accumulators.

ETX End of data [0x03] BCC BCC [nnnn]

ANSWER TO THE COMMAND STATUS IF (0X38) WITH ‘N’ PARAMETER

Field Description STX Data beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command number [0x38] - Field separator [0x1C] Field 1 Printer state <0000> - Field separator [0x1C] Field 2 Fiscal state <0000> - Field separator [0x1C] Field 3 Last value of Sequence - Field separator [0x1C] Field 4 Code of the current status of the printer - Field separator [0x1C] Field 5 last code executed command - Field separator [0x1C] Field 6 Date in the IF <AAMMDD> - Field separator [0x1C] Field 7 Hour in the IF <HHMMSS> - Field separator [0x1C] Field 8 # Fiscal voucher of the fiscal period - Field separator [0x1C] Field 9 #DNF of the fiscal period - Field separator [0x1C] Field 10 #Accumulated fiscal voucher - Field separator [0x1C] Field 11 #Accumulated DNF - Field separator [0x1C] Field 12 #finish Z report ETX End of data [0x03] BCC BCC [nnnn]

Detail from the answer to the command Status_IF with the parameter “N”:

Field 3: It contains the sequence value stored in the fiscal memory that will be used to validate the next command. It can send himself the command STATUS to fix a sequence value in the fiscal printer. Field 4: It contains a code hexadecimal of two bytes that indicates the current state of the printer: • 00 = printer ready to open a voucher, to open a non fiscal document, to make a Z report or a fiscal

memory report. • 01 = fiscal voucher in course. Waiting for an article, close/cancel the voucher. Alone commands related to

the fiscal voucher were admitted. • 02 = No fiscal document in course. Waiting for text line, to close the document. Alone commands related

to non fiscal documents were admitted. • 03 = active SLIP. Alone commands related to non fiscal documents or commands were admitted for the

format of checks. • 04 = one more day from the last Z report. is necessary a Z report. to be able to carry out a sale will be

made a Z report previously. • 05 = First descriptive lines of a printed fiscal voucher. • 08 = equip blocked awaiting closing impression Z. This happens alone in the event of taking place an error

during the impression of a closing Z. for example, if the paper finishes when a closing Z. is printing a RESET it should be made to the device.

• 10 = critical error. Error in BCC RAM. It is necessary the intervention of the technical service. • 11 = error criticizes. Error in BCC ROM. It is necessary the intervention of the technical service. • 12 = critical error. Error of format of DATE in RAM. It is necessary the intervention of the technical service. • 13 = critical error. Error of format of data when carrying out a Z. is necessary the intervention of the

technical service. • 14 = critical error. Limit fiscal memory. It is necessary the intervention of the technical service. To verify that any error has not taken place criticize, it can be proven that the most significant byte is similar to zero (“0” = 0x30). If this byte is not zero the device it presents an criticize error of hardware or it dates it contained in the work memory (RAM) or fiscal memory (ROM) it is rotten. You must have to call technical service. Field 5: It contains a code hexadecimal of two bytes that indicates which was the last command processed with success. Field 6: date in the fiscal printer. Format <AAMMDD> Field 7: Hour in the fiscal printer. Format <HHMMSS> Field 8: Fiscal vouchers emitted in the period. Field 9: non fiscal documents emitted in the period. Field 10: Accumulated fiscal vouchers. Field 11: non fiscal documents accumulated. Field 12: It is the #of the last report made Z.

ANSWER TO THE COMMAND STATUS IF (0X38) WITH ‘E’ PARAMETER

Field Description STX Data beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command number [0x38] - Field separator [0x1C] Field 1 Printer state <0000> - Field separator [0x1C] Field 2 Fiscal state <0000> - Field separator [0x1C] Field 3 Last value of Sequence - Field separator [0x1C] Field 4 Code of the current status of the printer - Field separator [0x1C]

Field 5 last code command executed - Field separator [0x1C] Field 6 Date in the IF <AAMMDD> - Field separator [0x1C] Field 7 Hour in the IF <HHMMSS> - Field separator [0x1C] Field 8 Exempt sales ETX End of data [0x03] BCC BCC [nnnn]

ANSWER TO THE COMMAND STATUS IF (0X38) WITH ‘A, B,C, D,R’ PARAMETER

Field Description

STX Data beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command number [0x38] - Field separator [0x1C] Field 1 Printer state <0000> - Field separator [0x1C] Field 2 Fiscal state <0000> - Field separator [0x1C] Field 3 Last value of Sequence - Field separator [0x1C] Field 4 Code of the current status of the printer - Field separator [0x1C] Field 5 last code command executed - Field separator [0x1C] Field 6 Date in the IF <AAMMDD> - Field separator [0x1C] Field 7 Hour in the IF <HHMMSS> - Field separator [0x1C] Field 8 Sales According to the parameter = base A, B, C, Discounts, Refunds. - Field separator [0x1C] Field 9 Taxes According to the parameter = imp A, B, C, Discounts, Refunds. ETX End of data [0x03] BCC BCC [nnnn]

ANSWER TO THE COMMAND STATUS IF (0X38) WITH ‘F’, “S’ and “U’ PARAMETER

Field Description STX Data beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command number [0x38] - Field separator [0x1C] Field 1 Printer state <0000> - Field separator [0x1C] Field 2 Fiscal state <0000> ETX End of data [0x03] BCC BCC [nnnn]

With the parameters “F” and “J” it is possible to block to the printer until the cashier places another paper roll. If sends this command and the sensor of near end is active the printer is blocked and it doesn't allow to execute any impression command. The parameter “S” it only disables the autocutter for the next automatic court of paper. The command qualifier “OR” it is used to verify if it exists or non paper in the unit of slip of the printer. Of not existing paper in the printer you an impression error returns (0x29). Z report - X Reports (0x39) (TMU220AF, TMU950/PF, TMU675/PF) This command prints a report with the totals stored in the work memory. The amount can be of the daily totals (Z reports) or of the partial totals accumulated from the emission of the last X report. When carrying out a Z report the amount stored in the work memory they are taken to the fiscal memory. It is necessary to carry out at least a closing of the fiscal day (Z Reports) every 24 hours. The device won't allow to emit fiscal vouchers if a closing of the previous fiscal day doesn't exist. IMPORTANT: it can be carried out more than a Z report per day, but this procedure shortens the useful life of the fiscal memory, being the programmer's responsibility and/or user the decrease in the capacity of storage of the same one.

Command X/Z Reports (0x39) Field Description

STX Data beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command number [0x39] - Field separator [0x1C] Field 1 ‘Z ' = (0x5A) = Reports “Z.”

‘X ' = (0x58) = Reports “X” - Field separator [0x1C] Field 2 ‘S ' = (0x53) = the X report is not printed ETX End of data [0x03] BCC BCC [nnnn]

Answer to the Command X/Z Reports (0x39)

Field Description

STX Data beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command [0x39] - Field separator [0x1C] Field 1 Printer state <hhhh> - Field separator [0x1C] Field 2 Fiscal state <hhhh> - Field separator [0x1C] Field 3 Exempt Sales:<nnnnnnnnnn.nn> - Field separator [0x1C] Field 4 Sales standard taxable base: <nnnnnnnnnn.nn> - Field separator [0x1C] Field 5 Tax value bases standard: <nnnnnnnnnn.nn> - Field separator [0x1C] Field 6 Value of discount operations: <nnnnnn.nn> - Field separator [0x1C]

Field 7 Tax value associated to discounts: <nnnnnn.nn> - Field separator [0x1C] Field 8 Value of operations of refunds: <nnnnnn.nn> - Field separator [0x1C] Field 9 Tax value associated to refunds: <nnnnnn.nn> - Field separator [0x1C] Field 10 Date of the Z report: <AAMMDD> - Field separator [0x1C] Field 11 Sales extra taxable base B: <nnnnnnnnnn.nn> - Field separator [0x1C] Field 12 Tax value bases taxable extra B: <nnnnnnnnnn.nn> - Field separator [0x1C] Field 13 Sales extra taxable Base C: <nnnnnnnnnn.nn> - Field separator [0x1C] Field 14 Tax value bases taxable extra C: <nnnnnnnnnn.nn> ETX End of data [0x03] BCC BCC [nnnn]

Report fiscal memory Consults for date (0x3A) (TMU220AF, TMU950/PF, TMU675/PF) This command allows to generate a report that it includes the different daily closings that have been stored in the fiscal memory during the selected period of dates. This command uses extended time for its finalization. The report can be detailed or a monthly summary. Additionally, using the qualifier of the command with the option ‘C ' the answer to the command contains the range of daily closings associated to the period of dates. This command makes a verification of the content of the fiscal memory. Their execution can take several minutes.

Command Report fiscal memory - Date (0x3A) Field Description

STX Data beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command [0x3A] - Field separator [0x1C] Field 1 Date beginning selection AAMMDD - Field separator [0x1C] Field 2 Date of end selection AAMMDD - Field separator [0x1C] Field 3 Report qualifier.

‘D ' = (0x44) = reports per day. ‘M ' = (0x4D) = detailed per month. ‘R ' = (0x52) = reports with a summary of daily sales. ‘C ' = (0x43) = range of reports Z inside the requested date

ETX End of data [0x03] BCC BCC [nnnn]

Answer to the command Report fiscal memory - Date (0x3A) – Report Qualifier different from ‘C '

Field Description

STX Data beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command [0x3A] - Field separator [0x1C] Field 1 Printer state <hhhh> - Field separator [0x1C] Field 2 Fiscal state <hhhh> ETX End of data [0x03] BCC BCC [nnnn]

Answer to the command Report fiscal memory - Date (0x3A) – Report Qualifier similar from ‘C '

Field Description

STX Data beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command [0x3A] - Field separator [0x1C] Field 1 Printer state <hhhh> - Field separator [0x1C] Field 2 Fiscal state <hhhh> - Field separator [0x1C] Field 3 First Z report inside the date range: <nnnn>. - Field separator [0x1C] Field 4 Last Z report inside the date range: <nnnn>. ETX End of data [0x03] BCC BCC [nnnn]

Report fiscal memory Consult for Reports # (0x3B) (TMU220AF, TMU950/PF, TMU675/PF) This command allows to generate a report conformed by a sequence of daily closings. This command uses extended time for its finalization. Additionally using the qualifier of the command with the option ‘C ' an answer is obtained without impression, that which is useful to generate a report of sales or to carry out audit in electronic form.

Command Report fiscal memory - Z of # (0x3B) –

Field Description STX Data beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command [0x3B] - Field separator [0x1C] Field 1 Number of Z of beginning selection - Field separator [0x1C] Field 2 Number of Z of end selection - Field separator [0x1C] Field 3 Report qualifier.

‘C ' = (0x43) = exit to the PC of the Z REPORT requested. ETX End of data [0x03] BCC BCC [nnnn]

Answer to the command Report fiscal memory – Z of # (0x3B) –

Report Qualifier different from ‘C '

Field Description STX Data beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command [0x3B] - Field separator [0x1C] Field 1 Printer state <hhhh> - Field separator [0x1C] Field 2 Fiscal state <hhhh> ETX End of data [0x03] BCC BCC [nnnn]

Answer to the command Report fiscal memory – Z of # (0x3B) –

Report Qualifier similar from ‘C '

Field Description STX Data beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command [0x3B] - Field separator [0x1C] Field 1 Printer state <hhhh> - Field separator [0x1C] Field 2 Fiscal state <hhhh> - Field separator [0x1C] Field 3 Exempt Sales:<nnnnnnnnnn.nn> - Field separator [0x1C] Field 4 Sales standard taxable base: <nnnnnnnnnn.nn> - Field separator [0x1C] Field 5 Tax value bases standard: <nnnnnnnnnn.nn> - Field separator [0x1C] Field 6 Value of discount operations: <nnnnnn.nn> - Field separator [0x1C] Field 7 Tax value associated to discounts: <nnnnnn.nn> - Field separator [0x1C] Field 8 Value of operations of refunds: <nnnnnn.nn> - Field separator [0x1C] Field 9 Tax value associated to refunds: <nnnnnn.nn> - Field separator [0x1C] Field 10 Date of the Z report: <AAMMDD> - Field separator [0x1C] Field 11 Sales taxable base extra B: <nnnnnnnnnn.nn> - Field separator [0x1C] Field 12 Tax value bases taxable extra B: <nnnnnnnnnn.nn> - Field separator [0x1C] Field 13 Sales taxable Base extra C: <nnnnnnnnnn.nn> - Field separator [0x1C] Field 14 Tax value bases taxable extra C: <nnnnnnnnnn.nn> ETX End of data [0x03] BCC BCC [nnnn]

Commands to generate fiscal vouchers Open fiscal voucher (0x40) (TMU220AF, TMU950/PF, TMU675/PF) This command is the first step to produce a fiscal voucher. The one is printed headed, the number, and the date and the hour of emission of the fiscal voucher. This information registers in the work memory. The command will be rejected if there is an open fiscal voucher, if the fiscal memory is full, if there is an error in the work memory, or if it is necessary to carry out a day closing (Z Reports). This command can be used to generate refund vouchers (credit notes), for this you the qualifier of the command (field #5) it should be similar to ‘D '. If is being carried out a “Voucher of Refund” or “Note of Credit” they are allowed all the commands that apply for a normal fiscal voucher, except the command “Payments, Cancel, Discount.” IMPORTANT: the refund voucher (credit note) it is considered a fiscal voucher, reason why the accountant corresponding to the quantity of emitted vouchers will be increased when carrying out refund tickets. IMPORTANT: when closing a refund voucher the corresponding amount are store in the accumulators of refunds and of taxes associated to refunds.

Command to Open fiscal voucher (0x40) Field Description

STX Data beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command [0x40] - Field separator [0x1C] Field 1 Social Reason 1 - Field separator [0x1C] Field 2 The buyer's RIF - Field separator [0x1C] Field 3 Number of the voucher in refund - Field separator [0x1C] Field 4 Printer (device) fiscal Serial that carry out the voucher in refund - Field separator [0x1C] Field 5 date of the voucher in refund - Field separator [0x1C] Field 6 Hour of the voucher in refund - Field separator [0x1C] Field 7 ‘D ' = (0x44) = is carried out a refund voucher (credit note).

In any other case is carried out a normal fiscal voucher. - Field separator [0x1C] Field 8 Not used field - Field separator [0x1C] Field 9 Not used field ETX End of data [0x03] BCC BCC [nnnn]

Answer to the command to Open fiscal voucher (0x40)

Field Description

STX Data beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command [0x40] - Field separator [0x1C] Field 1 Printer state <hhhh> - Field separator [0x1C] Field 2 Fiscal state <hhhh> ETX End of data [0x03] BCC BCC [nnnn]

Print text in fiscal voucher (0x41) (TMU220AF, TMU950/PF, TMU675/PF) The command will be rejected if there is not an open fiscal voucher. The text can only be “fiscal text”, and should have a limited maximum longitude so that you cannot print anything in the columns that are usually occupied by fields of amount of articles of lines. They cannot be printed more than 3 lines of fiscal text. If you makes a partial closing of a fiscal voucher previously it will be allowed to execute the command 0x41. It should be executed the command again “to close fiscal voucher” to conclude the voucher. If the field 2 is same “S” the text is not printed in the audit tape.

Comand Print Fiscal Text Field Description

STX Data beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command [0x41] - Field separator [0x1C] Field 1 Fiscal txet to print - Field separator [0x1C] Field 2 “S” = the text is not printed in the audit tape ETX End of data [0x03] BCC BCC [nnnn]

Answer Comand Print Fiscal Text

Field Description STX Data beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command [0x41] - Field separator [0x1C] Field 1 Printer state <hhhh> - Field separator [0x1C] Field 2 Fiscal state <hhhh> ETX End of data [0x03] BCC BCC [nnnn]

To print article in fiscal voucher (0x42) (TMU220AF, TMU950/PF, TMU675/PF) The command won't be accepted if there is not an open fiscal voucher. It will be rejected if the amount accumulation generates an it overflows of total. The text is limited to “fiscal text” (the impression effects can be used, alone for the description of the article). The command generates the impression of a line article, and the accumulation amount in the totals of transactions and the sum of the units or sold bundles.

The sign to the qualifier's of line article right indicates the effect that has the amount of the article on the total of the transaction. The field “amount of the article” it doesn't include the “amount of the tax.” The description field, together with the command of text impression (0x41), it provides of flexibility to describe an article in uppercase or minuscule letters. In case the name of the product contains the TOTAL word or its variants as T O T A L, T0Tal, etc., the fiscal printer automatically will replace the two letter last letters for two points. The field of quantity will multiply for the field of amount of the article and they will give the total of the line article as a result. The maximum total amounts of a line it is 99.999.999,99 and if statement is overcome amount the fiscal controller informs that it will happen an overflow of the internal accumulator. The field of tax rate determines in what internal accumulator sinks this amount for the tax calculation in the moment to total the transaction. This field should not lack and one can work with anyone of the rates registered in the inspection process. If sends to the fiscal printer a not allowed rate the command it is rejected. The command qualifier allows to determine how it affects the article to the totals of the transactions. If the line article is qualified as amount negative (command qualifier = ‘m '), the sign will be placed less (0x2D) at the end of the impression of the amount. The command is rejected if the one amounts corresponding to the article, it is superior to the amount accumulated in the work memory for this tax rate. Command to Print article in fiscal voucher (0x42)

Field Description STX Data beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command [0x42] - Field separator [0x1C] Field 1 Description of up to 20 characters - Field separator [0x1C] Field 2 Quantity <nnnn.nnn>

- Field separator [0x1C] Field 3 amount of the item <nnnnnnnn.nn> - Field separator [0x1C] Field 4 Tax Rate <. nnnn> - Field separator [0x1C] Field 5 Qualifier of line item:

'M' = 0x4D) = amount added merchandise (Adds) 'm' = (0x6D) = item annulment

- Field separator [0x1C] Field 6 Not used field - Field separator [0x1C] Field 7 Not used field - Field separator [0x1C] Field 8 Not used field ETX End of data [0x03] BCC BCC [nnnn]

Answer Command to Print article in fiscal voucher (0x42)

Field Description

STX Data beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command [0x42] - Field separator [0x1C] Field 1 Printer state <hhhh> - Field separator [0x1C] Field 2 Fiscal state <hhhh> - Field separator [0x1C] Field 3 Numer of sales items ETX End of data [0x03] BCC BCC [nnnn]

Subtotal in fiscal voucher (0x43) (TMU220AF, TMU950/PF, TMU675/PF) This command will be rejected if there is not an open fiscal voucher. This command is useful to verify that the amount accumulated in the fiscal printer, through the process of billing, agrees with those taken by the software in the host. After this command additional commands of article impression can be emitted.

Subtotal in fiscal voucher (0x43) Field Description

STX Data beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command [0x43] - Field separator [0x1C] Field 1 Not used field - Field separator [0x1C] Field 2 Not used field ETX End of data [0x03] BCC BCC [nnnn]

Answer to the Subtotal in fiscal voucher (0x43) Field Description

STX Data beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command [0x43] - Field separator [0x1C] Field 1 Printer state <hhhh> - Field separator [0x1C] Field 2 Fiscal state <hhhh> - Field separator [0x1C] Field 3 Not used field - Field separator [0x1C] Field 4 Not used field - Field separator [0x1C] Field 5 Sale exempts - Field separator [0x1C] Field 6 Sale standard bases taxable - Field separator [0x1C] Field 7 Rate taxable standard - Field separator [0x1C] Field 8 Tax bases taxable standard

- Field separator [0x1C] Field 9 Sale bases taxable extra B - Field separator [0x1C] Field 10 Rate taxable extra B - Field separator [0x1C] Field 11 Tax bases taxable extra B - Field separator [0x1C] Field 12 Sale bases taxable extra C - Field separator [0x1C] Field 13 Rate taxable extra C - Field separator [0x1C] Field 14 Tax bases taxable extra C - Field separator [0x1C] Field 15 Not used field ETX End of data [0x03] BCC BCC [nnnn]

Pay / Cancel / Discount in Fiscal voucher (0x44) (TMU220AF,TMU950/PF, TMU675/PF) This command will be rejected if there is not an open fiscal voucher, if the accumulated amounts generates an overflow of total. This command is used to print information of the total and of the payment of the transaction. After this command, additional commands of impression of article line cannot be emitted. After sending a payment, the global fixed discounts are not accepted. In the sale transaction the payment command should be emitted before closing the fiscal voucher. The command qualifier 'C' (0x43), it will annul the voucher. The following line is printed: * CANCELED BY THE USER * * * * * * * * * DOCUMENT CANCELED * * * * * * * * The discount carried out with this command and the examining ‘D ' (0x44), it is of global type and it applies in a proportional way on all the articles of the voucher. The examining ‘P ' (0x50) in this command it is used to carry out a promotion discount to a certain article. It doesn't apply in the current version of the TMU-950/PF.

Command Payment / Cancel / Discount in fiscal voucher (0x44) Field Description

STX Data beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command [0x44] - Field separator [0x1C] Field 1 Description of 20 characters - Field separator [0x1C] Field 2 amount of payment (nnnnnnnn) - Field separator [0x1C] Field 3 Command qualifier

'C' = (0x43) = it cancels the voucher 'T' = (0x54) = it cares paid 'D' = (0x44) = global discount. ‘P ' = (0x50) = promotion discount

- Field separator [0x1C] Field 4 Tax Rate <. nnnn> on the one that applies the promotion ETX End of data [0x03] BCC BCC <nnnn>

Answer to the Command Payment / Cancel / Discount in fiscal voucher (0x44)

Field Description STX Data beginning [0x02] Sec Sequence number [0x20 - 0x7F)] Command Command [0x44] - Field separator [0x1C] Field 1 State of the Printer (data hex. ASCII) - Field separator [0x1C] Field 2 Fiscal state <hhhh> - Field separator [0x1C] Field 3 Not used field - Field separator [0x1C] Field 4 Not used field - Field separator [0x1C] Field 5 Not used field ETX End of data [0x03] BCC BCC <nnnn>

Close fiscal voucher (0x45) (TMU220AF, TMU950/PF, TMU675/PF) The command is rejected if there is not an open fiscal voucher, or if the accumulative amount originates an overflow of the total. This command is used to close the fiscal voucher, to accumulate total in memory of work, to print the total amount and the taxes, the fiscal logo and the serial of the machine. If the command qualifier sends “A” in the field 1, then the total is printed and useful additional lines of fiscal text are allowed to detail the payment means. It should be executed the command again “to close fiscal voucher” so that the device carries out the paper cut. If the command qualifier is “E”, the voucher ends, intersects the paper and the first descriptive lines of the next voucher are printed. After closing the document this alone way one will be able to emit a fiscal voucher or a non fiscal document for the slip, to be able to emit another document type in the receipt paper will intersect the paper.

Command to Close fiscal voucher (0x45) Field Description

STX Beginning of data (0x02) Sec Sequence number (0x20 to 0x7F) Command Command [0x45] - Field separator [0x1C] Field 1 Command qualifier

“A” = it indicates partial closing of the voucher “E” = it indicates economic closing. It is printed headed of the next one voucher.

ETX End of data [0x03] BCC BCC <nnnn>

Answer Command to Close fiscal voucher (0x45)

Field Description STX Beginning of data (0x02) Sec Sequence number (0x20 to 0x7F) Command Command [0x45] - Field separator [0x1C] Field 1 State of the Printer (data hex. ASCII) - Field separator [0x1C] Field 2 Fiscal state <hhhh> - Field separator [0x1C] Field 3 Number of the recently emitted fiscal voucher ETX End of data [0x03] BCC BCC <nnnn>

COMMANDS TO GENERATE NON FISCAL DOCUMENTS To open non fiscal document (0x48) (TMU220AF, TMU950/PF,TMU675/PF) This command should be used to begin to print a non fiscal document. It is printed in the one headed and the number of the document. The command will be rejected if there are not a fiscal voucher or a non fiscal document open.

Command to Open non fiscal document (0x48) Field Description

STX Beginning of data (0x02) Sec Sequence number (0x20 to 0x7F) Command Command [0x48] ETX End of data [0x03] BCC BCC <nnnn>

Answer to the Command to Open non fiscal document (0x48)

Field Description STX Beginning of data (0x02) Sec Sequence number (0x20 to 0x7F) Command Command [0x48] - Field separator [0x1C] Field 1 State of the Printer <hhhh> - Field separator [0x1C] Field 2 Fiscal state <hhhh> ETX End of data [0x03] BCC BCC <nnnn>

Print text in document # fiscal (0x49) (TMU220AF,TMU950/PF,TMU675/PF) The command will be rejected if it is not open a non fiscal document. The text will be restricted to the group of defined characters as “fiscal text.”

Command to Print text in a non fiscal document (0x49)

Field Description STX Beginning of data (0x02) Sec Sequence number (0x20 to 0x7F) Command Command [0x49] - Field separator [0x1C] Field 1 Up to 40 characters of fiscal text ETX End of data [0x03] BCC BCC <nnnn>

Answer to the Command to Print text in a non fiscal document (0x49) Field Description

STX Beginning of data (0x02) Sec Sequence number (0x20 to 0x7F) Command Command [0x49] - Field separator [0x1C] Field 1 State of the Printer <hhhh> - Field separator [0x1C] Field 2 Fiscal state <hhhh> ETX End of data [0x03] BCC BCC <nnnn>

Close non fiscal document (0x4A) (TMU220AF, TMU950/PF, TMU675/PF) The command will be rejected if it is not open a non fiscal document. This command is used to close the non fiscal document. If the command qualifier is “E”, the document ends, intersects the paper and the first descriptive lines of the next fiscal voucher are printed. After closing the document this alone way one will be able to emit a fiscal voucher, otherwise will intersect the paper.

Command to Close non fiscal document (0x4A) Field Description

STX Beginning of data (0x02) Sec Sequence number (0x20 to 0x7F) Command Command [0x4A] - Field separator [0x1C] Field 1 Command qualifier

“E” = it indicates economic closing. It is printed headed of the next one voucher.

ETX End of data [0x03] BCC BCC <nnnn>

Answer to the Command to Close non fiscal document (0x4A)

Field Description STX Beginning of data (0x02) Sec Sequence number (0x20 to 0x7F) Command Command [0x4A] - Field separator [0x1C] Field 1 State of the Printer (data hex. ASCII)

- Field separator [0x1C] Field 2 Fiscal state <hhhh> - Field separator [0x1C] Field 3 Number of the recently emitted non fiscal document ETX End of data [0x03] BCC BCC <nnnn>

COMMANDS OF CONTROL OF THE PRINTER Cut paper (0x4B) (TMU220AF, TMU950/PF, TMU675/PF) This command is used to cut the receipt paper. The fiscal vouchers, the non fiscal documents and the reports with cut automatically when concluding the respective commands.

Command to Cut paper (0x4B) Field Description

STX Beginning of data (0x02) Sec Sequence number (0x20 to 0x7F) Command Command [0x4B] ETX End of data [0x03] BCC BCC <nnnn>

Answer to the Command to Cut paper (0x4B) Field Description

STX Beginning of data (0x02) Sec Sequence number (0x20 to 0x7F) Command Command [0x4B] - Field separator [0x1C] Field 1 State of the Printer <hhhh> - Field separator [0x1C] Field 2 Fiscal state <hhhh> ETX End of data [0x03] BCC BCC <nnnn>

Advance paper (0x50) (TMU220AF, TMU950/PF, TMU675/PF) This command ago to advance the receipt paper.

Command to Advance paper (0x50) Field Description

STX Beginning of data (0x02) Sec Sequence number (0x20 to 0x7F) Command Command [0x50] ETX End of data [0x03] BCC BCC <nnnn>

Answer to Command Advance paper (0x50) Field Description

STX Beginning of data (0x02) Sec Sequence number (0x20 to 0x7F) Command Command [0x50] - Field separator [0x1C] Field 1 State of the Printer <hhhh> - Field separator [0x1C] Field 2 Fiscal state <hhhh> ETX End of data [0x03] BCC BCC <nnnn>

Activate slip (0xA0) (TMU950/PF, TMU675/PF) This command activates the operation of the Slip. It should be executed before any other command related with related with the handling of the Slip.

Command to Activate slip (0xA0) Field Description

STX Beginning of data (0x02) Sec Sequence number (0x20 to 0x7F) Command Command [0xA0] ETX End of data [0x03] BCC BCC <nnnn>

Answer to the Command to Activate slip (0xA0) Field Description

STX Beginning of data (0x02) Sec Sequence number (0x20 to 0x7F) Command Command [0xA0] - Field separator [0x1C] Field 1 State of the Printer <hhhh> - Field separator [0x1C] Field 2 Fiscal state <hhhh> ETX End of data [0x03] BCC BCC <nnnn>

Disables slip (0xA1) (TMU950/PF, TMU675/PF) This command disables the operation of the Slip.

Command to Disables slip (0xA1) Field Description

STX Beginning of data (0x02) Sec Sequence number (0x20 to 0x7F) Command Command [0xA1] ETX End of data [0x03] BCC BCC <nnnn>

Answer to the Command to Disables slip (0xA1) Field Description

STX Beginning of data (0x02) Sec Sequence number (0x20 to 0x7F) Command Command [0xA1] - Field separator [0x1C] Field 1 State of the Printer <hhhh> - Field separator [0x1C] Field 2 Fiscal state <hhhh> ETX End of data [0x03] BCC BCC <nnnn>

Format checks (0xAA) (TMU950/PF, TMU675/PF) This command prints for the Slip in the format of a check.

Command Format it checks (0xAA) Field Description

STX Data beginning [0x02] Sec Sequence number [0x20 to 0x7F)] Command Command [0xAA] - Field separator [0x1C] Field 1 Amount of the Check (text field) - Field separator [0x1C] Field 2 Beneficiary - Field separator [0x1C] Field 3 Emission date

- Field separator [0x1C] Field 4 ‘AND ' = the sentence is printed “NOT ENDORSABLE”

‘R ' = the sentence is printed “NOT ENDORSABLE” in boldface - Field separator [0x1C] Field 5 ‘1 ' => + a line among the superior amount and the beneficiary

‘2 ' => -- a line among the superior amount and the beneficiary ‘3 ' => + a line among the superior amount and the beneficiary ‘4 ' => + two lines among the superior amount and the beneficiary ... ‘7 ' => + five lines among the superior amount and the beneficiary

- Field separator [0x1C] Field 6 ‘1 ' => + a line among “the quantity” and the date

‘2 ' => -- a line among “the quantity” and the date ‘3 ' => + a line among “the quantity” and the date ‘4 ' => + two lines among “the quantity” and the date ... ‘7 ' => + five lines among “the quantity” and the date

- Field separator [0x1C] Field 7 - Field separator [0x1C] Field 8 ‘1 ' => + a line among “not endorsable” and the superior amount

‘2 ' =>--a line among “not endorsable” and the superior amount ‘3 ' => + a line among “not endorsable” and the superior amount ‘4 ' => + two lines among “not endorsable” and the superior amount ...

‘7 ' => + five lines among “not endorsable” and the superior amount ETX End of data [0x03] BCC BCC [nnnn]

Answer to the command Format checks (0xAA) Field Description

STX Beginning of data (0x02) Sec Sequence number (0x20 to 0x7F) Command Command [0xAA] - Field separator [0x1C] Field 1 State of the Printer (data hex. ASCII) - Field separator [0x1C] Field 2 Fiscal state <hhhh> ETX End of data [0x03] BCC BCC <nnnn>

Format endorsement (0xAB) (TMU950/PF, TMU675/PF) This command prints for the Slip the endorsement for a check.

Command Format endorsement (0xAB) Field Description

STX Data beginning [0x02] Sec Sequence number (0x20 to 0x7F) Command Command (0xAB) - Field separator [0x1C] Field 1 IF field 4 = “A“=> Account Type for the deposit (33)

IF field 4 = “B “=> Beneficiary of the deposit (28) IF field 4 = “C “=> Names of the bank (28) e.o.c. => Names for the endorsement

- Field separator [0x1C] Field 2 IF field 4 = “A“=> Account Number for the deposit (35)

IF field 4 = “B “=> additional Line (40) IF field 4 = “C “=> additional Line (40) e.o.c => Identification of Identity (ID)

- Field separator [0x1C] Field 3 IF field 4 = “A“=> Additional Line (40)

IF field 4 = “B “=>Additional Line (40) IF field 4 = “C “=>Additional Line (40) e.o.c => Telephone for the endorsement

- Field separator [0x1C] Field 4 “A” = endorsement is printed for bank – information of the account

“B” = endorsement is printed for bank - the client's information “C” = endorsement is printed for bank - information of the bank e.o.c => Normal Endorse(names, identification, telephone)

ETX End of data [0x03] BCC BCC [nnnn]

Answer to the command Format endorsement (0xAB) Field Description

STX Beginning of data (0x02) Sec Sequence number (0x20 to 0x7F) Command Command [0xAB] - Field separator [0x1C] Field 1 State of the Printer (data hex. ASCII) - Field separator [0x1C] Field 2 Fiscal state <hhhh> ETX End of data [0x03] BCC BCC <nnnn>

GENERAL COMMANDS Settle down date and hour (0x58) (TMU220AF, TMU950/PF, TMU675/PF) This command settles down the date and hour of the clock of the fiscal controller's real time, which is stamped in all the fiscal documents and in all the entrances of the fiscal memory. This command will be rejected in the following cases: 1. if there are daily totals in the work memory. 2. if the new date is smaller to the last one stored in the fiscal memory. 3. if the new date is bigger in more than one day to the last date stored in the fiscal memory. IMPORTANT: It should be kept in mind that alone one can make a hour change and/or it dates between two Z reports consecutives.

Command Settle down date and hour (0x58) Field Description

STX Data beginning [0x02] Sec Sequence number (0x20 to 0x7F) Command Command (0x58) - Field separator [0x1C] Field 1 Format of Date AAMMDD (Year, Month, Day) - Field separator [0x1C] Field 2 Format of Hour HHMMSS (Hour, Minutes, Seconds) ETX End of data [0x03] BCC BCC [nnnn]

Answer to the command Settle down date and hour (0x58)

Field Description STX Beginning of data (0x02) Sec Sequence number (0x20 to 0x7F) Command Command (0x58) - Field separator [0x1C] Field 1 State of the Printer <hhhh> - Field separator [0x1C] Field 2 Fiscal state <hhhh> ETX End of data [0x03] BCC BCC <nnnn>

Obtain date and hour (0x59) (TMU220AF, TMU950/PF, TMU675/PF)

This command returns the date and hour of the clock of the fiscal controller's real time.

Command Obtain date and hour (0x59) Field Description

STX Data beginning [0x02] Sec Sequence number (0x20 to 0x7F) Command Command (0x59) ETX End of data [0x03] BCC BCC [nnnn]

Answer to the command Obtain date and hour (0x59)

Field Description STX Beginning of data (0x02) Sec Sequence number (0x20 to 0x7F) Command Command (0x59) - Field separator [0x1C] Field 1 State of the Printer <hhhh> - Field separator [0x1C] Field 2 Fiscal state <hhhh> - Field separator [0x1C] Field 3 Format of Date AAMMDD (Year, Month, Day) - Field separator [0x1C] Field 4 Format of Hour HHMMSS (Hour, Minutes, Seconds) ETX End of data [0x03] BCC BCC <nnnn>

Headed (0x5D) / Foot of page (0x5E) (TMU220AF, TMU950/PF, TMU675/PF) This command stores a line of fixed data that appears in the one headed or foot of page of the fiscal vouchers. It is allowed until a maximum of 5 line for the one headed and for the foot of page.

Command Headed (0x5D) / Foot of page (0x5E) Field Description

STX Data beginning [0x02] Sec Sequence number (0x20 to 0x7F) Command Command (0x5D) / (0x5E) - Field separator [0x1C] Field 1 Number of line of fixed data - Field separator [0x1C] Field 2 Fiscal text of up to 40 characters. ETX End of data [0x03] BCC BCC [nnnn]

Answer to the command Headed (0x5D) / Foot of page (0x5E)

Field Description STX Beginning of data (0x02) Sec Sequence number (0x20 to 0x7F)

Command Command (0x5D) / (0x5E) - Field separator [0x1C] Field 1 State of the Printer <hhhh> - Field separator [0x1C] Field 2 Fiscal state <hhhh> ETX End of data [0x03] BCC BCC <nnnn>

Open drawer 1 (0x7B) / Open drawer 2 (0x7C) (TMU220AF,TMU950/PF,TMU675/PF) This command is used to open the cash drawer(s) connected to the port of the fiscal printer.

Command Open drawer 1 (0x7B) / Open drawer 2 (0x7C) Field Description

STX Data beginning [0x02] Sec Sequence number (0x20 to 0x7F) Command Command (0x7B) / (0x7C) ETX End of data [0x03] BCC BCC [nnnn]

Answer to the command Open drawer 1 (0x7B) / Open drawer 2 (0x7C)

Field Description STX Beginning of data (0x02) Sec Sequence number (0x20 to 0x7F) Command Command (0x7B) / (0x7C) - Field separator [0x1C] Field 1 State of the Printer <hhhh> - Field separator [0x1C] Field 2 Fiscal state <hhhh> ETX End of data [0x03] BCC BCC <nnnn>

APPENDIX A - DESCRIPTION OF THE INTERFACE WITH THE HOST �

HOST INTERFACE RS-232C DB-25 FEMALE PIN SIGN I / O

1 Taking of Earth of Wing - 2 Transmission of Data O 3 Reception of Data I 7 Taking of Earth of Sign -

20 DTR O COVER Protection earth

When DTR is in state "SPACE" it indicates that the Fiscal Printer can recover the data. When it is in state "MARKS" it indicates that the Fiscal Printer cannot receive data. APPENDIX B- CHARACTERS OF IMPRESSION MODALITY

The characters of selection of Modality of Impression can be inserted at the "beginning" of a line of fiscal text to generate an effect. Their range is from 0xF0 to 0xFF. You can use any combination of the bits 0 and 1, but it should be kept in mind that in some sectors the impression is not allowed with the Stood out way (wide double) or Centered. They are defined the following values: BIT CONDITION FUNCTION HEXADECIMAL VALUE DECIMAL VALUE Bit 0 = 1 Stood out 0xF1 241 Bit 1 = 1 Centered 0xF2 242 Bit 3 = 0 Red 0xF8 248 Bit 0,1,2,3 = 0 Normal 0xF0 240 You can use any combination between 0xF0 and 0xFF. For example, the value 0xF3 will give stood out characters and centered; while the value 0xFA will print the text in red and centered (in those cases where the impression terminal has the impression option in two colors). APPENDIX C- EXAMPLE OF FISCAL COMMUNICATION PROTOCOL 1. SIMPLE FISCAL VOUCHER 11:12:34 AM ###Ticket Begins ### 02 (STX) 21 40(@) 1C <Field> 7F(•) 1C <Field> 7F(•) 1C <Field> 7F(•) 1C <Field> 7F(•) 1C <Field> 7F(•) 1C <Field> 7F(•) 1C <Field> 7F(•) 1C <Field> 7F(•) 1C <Field> 7F(•) 03 (ETX) (CHECK SUM = 0x05D9) 30(0) 35(5) 44(D) 39(9) 11:12:38 AM Answer of the PF 02 (STX) 21 40(@) 1C <Field> 31(1) 30(0) 30(0) 30(0) 1C <Field> 30(0) 30(0) 30(0) 30(0) 03 (ETX) (CHECK SUM = 0x021F) 30(0) 32(2) 31(1) 46(F) 11:12:59 AM === Inform one ITEM to invoice === 02 (STX) 21 42(B) 1C <Field> 4D(M) 61(a) 6E(n) 7A(z) 61(a) 6E(n) 61(a) 73(s) 1C <Field> 31(1) 30(0) 30(0) 30(0) 1C <Field> 31(1) 32(2) 33(3) 34(4) 35(5) 36(6) 37(7) 38(8) 31(1) 32(2) 1C <Field> 31(1) 35(5) 35(5) 30(0) 1C <Field> 4D(M) 03 (ETX) (CHECK SUM = 0x080D) 30(0) 38(8) 30(0) 44(D) 11:12:59 AM Answer of the PF 02 (STX) 21 42(B) 1C <Field> 31(1) 30(0) 30(0) 30(0) 1C <Field> 30(0) 30(0) 30(0) 30(0) 1C <Field> 30(0) 30(0) 31(1) 03 (ETX) (CHECK SUM = 0x02CE) 30(0) 32(2) 43(C) 45(E) 11:13:03 AM *** Ticket Close*** 02 (STX) 21 45(E) 03 (ETX) (CHECK SUM = 0x006B) 30(0) 30(0) 36(6) 42(B)

11:13:06 AM Answer of the PF 02 (STX) 21 45(E) 1C <Field> 31(1) 30(0) 30(0) 30(0) 1C <Field> 30(0) 30(0) 30(0) 30(0) 1C <Field> 30(0) 30(0) 30(0) 32(2) 03 (ETX) (CHECK SUM = 0x0302) 30(0) 33(3) 30(0) 32(2) APPENDIX D-MAP OF ERRORS MAP OF ERRORS TMU950AF DECIMAL HEXA DESCRIPTION 0 00 ERRORS IN FIELDS OF DATA 1 01 ERROR FIELD 1 2 02 ERROR FIELD 2 3 03 ERROR FIELD 3 4 04 ERROR FIELD 4 5 05 ERROR FIELD 5 n n ERROR FIELD n (n <20) 19 13 ERROR FIELD 19 20 14 ERRORS BUS I2C 21 15 I2C LINES 22 16 BCC RAM 23 17 BCC ROM 0 24 18 BCC ROM 4 30 1E ERROR COMMAND 31 1F ERROR WHEN VERIFYING COMMAND 32 20 SEQUENCE 40 28 ERRORS OF IMPRESSION 41 29 ERROR WHEN PRINTING 70 46 ERROR OF TOTAL 71 47 OVERFLOW OF TOTAL 90 5A ERRORS CRITICIZE 91 5B LIMIT FISCAL MEMORY 92 5C ERROR IN THE VALUES OF THE RAM 95 5F ERROR IN PLOT OF DATA (BCC) 96 60 THE PLOT INCLUDES AN ESC 97 61 ERROR IN FORMAT OF DATA WHEN CARRYING OUT A Z 98 62 ERROR DEVICE WITHOUT INVESTIGATING 99 63 ERROR IN SUBTOTAL 100 64 OPEN_CF 101 65 THEY ARE NECESSARY THE CLIENT'S DATA 104 68 IT IS NECESSARY A Z REPORT 110 6E TEXT_CF 111 6F MAX. QUANTITY OF YOU LINE OF NON FISCAL TEXT 120 78 ITEM_CF 121 79 IT NOT APPRAISES BEEN WORTH 124 7C OVERFLOW QUANTITY X AMOUNT 125 7D AMOUNT MAX X ARTICULATE 130 82 CLOSE_CF 131 83 SUBTOTAL ZERO 140 8C DISCOUNTS 141 8D ERROR OF IT OVERFLOWS AMOUNT MAX. FOR DISCOUNTS 143 8F EMITTING A PAYMENT IN A REFUND 144 90 DISCOUNTS IN A REFUND 145 91 A PREVIOUS DISCOUNT HAS ALREADY BEEN MADE 150 96 REPORT OF FISCAL MEMORY

151 97 WAS NOT THE REQUESTED REPORT 152 98 WAS NOT THE REQUESTED REPORT 153 99 THE DEVICE NOT THIS CERTIFICATE 160 A0 CLOCK 161 A1 PERIOD NOT BEEN WORTH. IT FAILS REGARDING THE RAM 162 A2 PERIOD NOT BEEN WORTH. IT FAILS REGARDING THE ROM 170 AA ADDRESS 171 AB ERROR WHEN WRITING ADDRESS 180 B4 SLIP 181 B5 ERROR IN SLIP CHECKS 182 B6 ERROR IN SLIP ENDORSEMENT 183 B7 NOT COMMAND BEEN WORTH. ACTIVE SLIP 190 BE IT CUTS PAPER 191 BF ERROR IN COMMAND