Protocol and Command Manual - Panama
Protocol and Command Manual - Panama
Protocol and Command Manual - Panama
Rev 1.2
14/09/2011
Rev 1.2
14/09/2011
INDICE
1.
Setup ............................................................................................................................. 5
1.2.
1.2.1.
Control Characters............................................................................................... 5
1.2.2.
1.2.3.
2.
3.
Cashier........................................................................................................................ 12
3.2.
Means of payment...................................................................................................... 13
3.3.
Time ............................................................................................................................ 13
3.4.
Date............................................................................................................................. 14
3.5.
3.5.1.
3.5.2.
3.6.
4.
Flags ........................................................................................................................... 16
Cashiers ...................................................................................................................... 20
4.1.1.
4.1.2.
4.2.
4.3.
4.4.
4.5.
Comment .................................................................................................................... 22
4.6.
4.7.
4.8.
Subtotal ...................................................................................................................... 24
4.9.
Discount ...................................................................................................................... 25
4.10.
Invoice Cancellation............................................................................................... 26
4.10.1.
4.10.2.
4.11.
4.11.2.
4.12.
5.
Rev 1.2
14/09/2011
6.
7.
8.
9.
5.1.
5.2.
5.3.
5.4.
Comment .................................................................................................................... 32
5.5.
5.6.
5.7.
Closure ........................................................................................................................ 34
6.2.
6.3.
6.4.
6.5.
Comment .................................................................................................................... 38
6.6.
6.7.
6.8.
7.2.
7.3.
7.4.
7.5.
8.2.
8.3.
8.4.
Rev 1.2
14/09/2011
9.1.
Status S1 .................................................................................................................... 48
9.2.
Status S2 .................................................................................................................... 50
9.3.
Status S3 .................................................................................................................... 51
9.4.
Status S4 .................................................................................................................... 52
9.5.
Status S5 .................................................................................................................... 53
9.6.
Status S6 .................................................................................................................... 54
9.7.
Status S7 .................................................................................................................... 55
10.
10.1.
10.2.
10.2.1.
10.2.2.
10.3.
11.
10.3.1.
10.3.2.
10.3.3.
11.1.
Check ...................................................................................................................... 65
11.1.1.
11.1.2.
11.1.3.
11.1.4.
Print Endorsement............................................................................................. 67
11.2.
Validation Commands............................................................................................ 69
11.2.1.
Validation Mode.................................................................................................. 69
11.2.2.
11.2.3.
11.3.
12.
11.3.1.
11.3.2.
11.3.3.
Rev 1.2
14/09/2011
1.1. Setup
The communication process is through the printer RS232 port as follows:
02h
05h
03h
04h
06h ( Acknowledgement)
15h (No Acknowledgement)
17h
(XOR) from data beginning (not including STX) to ETX,
(not including ETX).
Rev 1.2
14/09/2011
Frame description:
Examples:
Command S1:
STX
S1
ETX
LRC
03h
61h
XOR
LRC: Result of XOR calculation
02h
53h 31h
53h XOR 31h
Result: 62h
Rev 1.2
14/09/2011
STX
I0X
ETX
LRC
03h
22h
XOR
LRC: Result of XOR calculation
02h
PC
ENQ
Fiscal Printer
STX-STATUS-ETX-LRC
Rev 1.2
14/09/2011
STS1
01x x x x x 1
01 x x x x 1 x
01 x x x 1 x x
01 x x 1 x x x
01 x 1 x x x x
01 1 x x x x x
In Fiscal Transaction
In Non Fiscal Transaction
Buffer Full
Memory Full
Fiscal Memory Near Full
Fiscal Mode
STS2
011100xx
011011xx
011001xx
011000xx
010111xx
010110xx
010101xx
010100xx
01xxxx1x
01xxxxx1
01000000
Rev 1.2
14/09/2011
Single Command
PC
Fiscal Printer
ACK
NAK
(communication error)
DTR off
The return of a NAK indicates that the command was not valid.
In case a command is sent while the printer is busy, it doesnt return any
value. This condition can be checked with DTR signal of the printer.
Read Command
PC
STX-CMD-DATA-ETX-LRC
Fiscal Printer
ACK
STX-CMD-DATA-ETX-LRC
Rev 1.2
14/09/2011
Fiscal Printer
ACK
ACK
STX- DATA0-ETB-LCR
STX- DATAn-ETB-LCR
EOT
STX
DATA
10
ETX
LRC
Rev 1.2
14/09/2011
Invoice
Credit Note
Debit Note
X Report
X2 Report
Z2 Report
11
Rev 1.2
14/09/2011
Fiscal Printer use parameters to define its operation and behavior, some of
this parameters can be modified without prerequisites but in other cases, are
necessary some previous procedures.
3.1. Cashier
This command allows defining the information related to a cashier. This
command must be executed before use the command Start Cashier. The frequent
use of this command can cause damage in the work memory therefore use it only
when necessary.
Characters position in
1
2 3
the command line
Structure of the
STX P C
Command
6 ~ 10
11 ~ 26
27
28
Password
Name of Cashier
ETX
LRC
CLK #
12
Rev 1.2
14/09/2011
CLK# (ASCII)
00 31
Secret code (ASCII)
5 Digits
Name of Cashier (ASCII)
16 Characters
Characters position in
1
2 3
4
5
the command line
Structure of the Command STX P E # Mean
Description
Mean of payment number
Description
Mean of payment description
6 ~ 19
20
21
ETX
LRC
Type (ASCII)
01 16
Name of mean of payment (ASCII)
14 Characters
3.3. Time
This command is used for programming the printer time. This command only
is allowed when sales has not been executed since last daily report (Z Report).
This command has a daily report (Z Report) as prerequisite.
Characters position in the command line
Structure of the Command
1
2 3
STX P F
13
4 5
HH
6 7
MM
8 9
SS
10
11
ETX LRC
Rev 1.2
14/09/2011
3.4. Date
This command is used for programming the printer Date. This command only
is allowed when sales has not been executed since last daily report (Z Report).
Date cannot be set in a previous last Daily Report date. This command has a daily
report (Z Report) as prerequisite.
6 7
MM
8 9
YY
10
11
ETX LRC
10 11 12 13
Rate 2
14
15 16 17 18
Rate 3
Type
Value
Type
Value
Description
Extern (item price = taxable base), Excluded Tax
Description
The Value must be 2 integers and 2 fixed decimals
19
ETX LRC
Type (ASCII)
0,1 (any of these)
Value (ASCII)
4 Digits
20
Rev 1.2
14/09/2011
Description
Header
Footer
Description
Text to show at Display (See
Note*)
5
LN
6 ~ 45
Message
46
47
ETX LRC
LN (ASCII)
01 08
91 98
Message (ASCII)
40 Characters
Note: You can change header and footer right after issuing a daily report (Z
report)
15
Rev 1.2
14/09/2011
3.6. Flags
This command allows defining the value of the flags used in the machine.
5
Flag
Description
Number of flag to define
# Flag
0
1
2
4
5
6
7
8
9
10
11
12
6
7
Flag Value
Flag(ASCII)
00 50
8
9
ETX LRC
13
14
15
16
17
18
19
20
23
24
25
26
27
28
29
30
31
32
Rev 1.2
14/09/2011
02 = Maximum value per closure of receipt, per accumulated of rate 999 thousand
03 = Maximum value per closure of receipt, per accumulated of rate 99 thousand
00 = Maximum value per Report, accumulated amounts, rates, credit notes and debit notes 999
millions
01 = Maximum value per Report, accumulated amounts, rates, credit notes and debit notes 9
millions
02 = Maximum value per Report, accumulated amounts, rates, credit notes and debit notes 999
thousand
03 = Maximum value per Report, accumulated amounts, rates, credit notes and debit notes 9
thousand
00 = The payment method which chargess the change (again) is the means 1 (cash)
01.. 16 = Assigns the number of the payment to which charge the change
00 = Amount of credit and debit notes are assigned according to the mean of payment used
01.. 16 = Assigns the number of the main of payment in which are charged amounts of credit
notes and debit notes
00 = Amount of funds are added to the mean of payment used
01.. 16 = Assigns the number of the main of payment in which are charged amounts of funds
00 = Amount of withdraws are added to the mean of payment used
01.. 16 = Assigns the number of the main of payment in which are charged amounts of withdraws
00 = In display is shown "The Factory HKA"
01 = In display is shown commercial message settled by client
00 = Commercial message rotates in display
01 = Commercial message is shown static in display
Internal use
00 = After an electric failure, printer continues with a receipt if it is open
01 = After an electric failure, a receipt is annulated if it is open
00 = Open automatically the cash-drawer when a receipt is payed
01 = Doesnt open automatically the cash-drawer when a receipt is payed
00 = If the change is zero, is not shown at display
01 = Always shows the change at display
00 = Currency is " b/. "
01 = Currency is "$ "
Internal Use
00 = Doesnt show number of items in receipts
01 = Shows quantity of printed lines as PLU, without taking in count quantity
02 = Shows quantity of items as integers
03 = Shows quantity of items as decimals
00 = Restart the display for every transaction and shows amounts of PLU and discounts or surcharges
01 = Doesnt restart the display for every transaction and it shows amounts of PLU, discounts and
surcharges
02 = Restart the display for every transaction and doesnt show amounts of PLU and discounts or
surcharges
03 = Doesnt restart the display for every transaction and doesnt show amounts of PLU and discounts
or surcharges
00 = Prints barcode without related number
01 = Prints the barcode with the related number below of the code
00 = S2 command returns values related to the actual sale
01 = S2 command returns values related to accumulated sales of the day (X)
Internal Use
17
34
35
36
37
38
39
40
41
42
43
Rev 1.2
14/09/2011
Note**: The frequent use of this command can cause damage in the work
memory therefore use it only when necessary.
18
Comment (**)
Section 4.3
Product Registration
Section 4.4
PLU Correction
Section 4.5
Yes
No
SubTotal
Section 4.6
Yes
No
Surcharge
Discount
Section 4.7
Yes
No
Register
another
PLU
Yes
No
Notes:
Void Item
Section
4.8.1
commands
No
are
Void Invoice
Section 4.8.2
Barcode
Section 4.10
Yes
Means of payment
Section 4.6
19
Yes
Void of document
Rev 1.2
14/09/2011
Rev 1.2
14/09/2011
4.1. Cashiers
1
STX
3~7
# Password
2
5
8
9
ETX LRC
# Password (ASCII)
00000 - 99999
Description
Password of cashier (ASCII)
20
1
STX
2
6
3
4
ETX LRC
Rev 1.2
14/09/2011
4 ~ 25
STX
RUC
Description
45
46
ETX LRC
Data (ASCII)
Maximum 20 characters
RUC
4 ~ 25
STX
Description
26
27
Data (ASCII)
40 characters fixed
sCmd
21
4 ~ 44
STX
SCmd0
Rev 1.2
14/09/2011
45
46
Data (ASCII)
Lines of additional information of client in
header maximum of 40 characters
4.5. Comment
Description
Message on Invoice
1
STX
2
@
3 ~ 22
Message
23
ETX
24
LRC
Message (ASCII)
20 Characters
Example:
|Coke
|##On Sale##
B/. 1,50 |
|
22
Rev 1.2
14/09/2011
Characters position
in the command
1
2
line
Structure of the
STX CMD
Command
3 ~ 12
13 ~ 20
Price
Quantity
Description
Tax Free Item (20h) / (32)
Tax Rate 1 Item (21h) / (33)
Tax Rate 2 Item (22h) / (34)
Tax Rate 3 Item (23h) / (35)
Description
The price: 8 Integers and 2 fixed Decimals
Description
The quantity: 5 Integers and 3 fixed Decimals (See Note*)
Description
Description of Product (See Note**)
21 ~ 137
138
139
CMD (ASCII)
Space Character
!
#
Price (ASCII)
10 Digits
Quantity (ASCII)
8 Digits
Description (ASCII)
116 Characters
23
Rev 1.2
14/09/2011
|COKE
|CORREC
|COKE
1
STX
2
k
3
4
ETX LRC
B/. 1,50 |
|
- B/. 1,50 |
4.8. Subtotal
This command allows print or show in the display the subtotal amount of the
sales. This command must be executed before doing a discount of the subtotal.
1
2
3
4
STX CMD ETX LRC
CMD (ASCII)
3
4
Printed Subtotal
|COKE
|HAMBURGUER
|SUBTOTAL
B/. 1.50 |
B/. 1.50 |
B/. 3.00 |
24
Rev 1.2
14/09/2011
4.9. Discount
This command executes a discount over last item registered or over
subtotal. To make a discount over subtotal, the command Subtotal must be
executed previously, and the amount of discount applies proportionally over all the
products. Discounts can be applied in two modes, by percentage or by amount.
4 ~7
STX
CMD
Sign
Percentage
Description
Descriptor for discount or surcharge
Description
Discount
Description
The Percentage: 2 Integers and 2 Decimals
Item tax 1
Bs 1.50
Item tax 2
Bs 3.50
---------------------------------------------------SUBTOTAL
Bs 5.00
Discount (10,00%)
- Bs 0.50
1.35 (1.50*(100-10)/100)
3.15 (3.50*(100-10)/100)
25
ETX LRC
CMD (ASCII)
p
Sign (ASCII)
-
Percentage (ASCII)
4 Digits
Item tax 1
Item tax 2
Rev 1.2
14/09/2011
Discount by amount:
1
STX
CMD Sign
Description
Descriptor for discount and surcharges
Description
Discount
Description
Quantity: 7 Integers and 2 Decimals
4.10.
4 ~ 12
13
14
Quantity
ETX
LRC
CMD (ASCII)
q
Sign (ASCII)
-
Percentage (ASCII)
9 Digits
Invoice Cancellation
4.10.1.
Characters position
1
2
3 ~ 12
in the command line
Structure of the
STX CMD
Price
Command
Description
Tax-Free Item (A0h) (Note*)
Rate 1 Item (A1h)
Rate 2 Item (A2h)
Rate 3 Item (A3h)
Description
The price is 8 Integers and 2 Fixed Decimals
Description
26
13 ~ 20
Quantity
21 ~ 137
138
139
CMD (ASCII)
Space Character (A0h)
Price (ASCII)
10 Digits
Quantity (ASCII)
Rev 1.2
14/09/2011
8 Digits
Description (ASCII)
116 Characters
Note*: The character for devolution of an item with Tax-Free rate is (A0h),
that can be printed as a space character, but mentioned character is totally
different to the space character (20h), which is used to register a product with
Tax-Free rate.
Note**: The maximum value for quantity is 99999.999
Note***: 116 characters for description in three lines (two lines with 40
characters and one line with 37 characters),
4.10.2.
Cancellation of an invoice
This command allows cancel an invoice. This command can be used before
send total or partial payment.
4.11.
1
STX
2
7
3
3
ETX LRC
Means of payment
4.11.1.
This command allows close an invoice and assigns the total amount to a
mean of payment. Executing this command will open the drawer of money.
27
1
STX
2
1
Description
Number of the mean of payment
3
4
# Mean
Rev 1.2
14/09/2011
5
6
ETX LRC
# Mean (ASCII)
01 16
Efectivo
Cheque
Tarjeta
Ticket
4.11.2.
01-04
05-08
09-12
13-16
# Mean
Description
Number of Mean of Payment
Description
The amount of payment is 10 Integers and 2 Decimals
28
4 ~ 16
17
18
Mean of Payment
ETX
LRC
# Mean (ASCII)
01 16
Amount of Payment (ASCII)
12 Digits
4.12.
Rev 1.2
14/09/2011
Barcode Command
3 ~ 14
15
16
STX
CMD
Code
ETX
LRC
Description
Barcode is printed in the invoice as description of the product
Barcode is printed in the footer of the invoice
Description
Number code associated with barcode
CMD (ASCII)
Y
y
Code (ASCII)
32 Characters
The type of barcode for fiscal printer is chosen with the Flag 43 by the next
values:
Value
00
01
02
Features
EAN 13 (12 Numeric Characters)
ITF (1 to 32 Numeric Characters)
CODE 128 (1 to 32 Alphanumeric Characters)
The code number associated with barcode is shown in receipt under the
barcode if Flag 30 is programmed with 01 value.
29
Rev 1.2
14/09/2011
The following is a general diagram to issuance a Credit Note; it shows all the
possible operations for building this document.
30
Rev 1.2
14/09/2011
4 ~ 23
24
25
STX
RUC
ETX
LRC
Description
Data (ASCII)
Maximum 20 characters
RUC
Characters position in
1
the command line
Structure of the Command STX
4 ~ 23
24
25
sCmd
ETX
LRC
Description
Data (ASCII)
40 characters fixed
sCmd
31
Description
Rev 1.2
14/09/2011
4 ~ 25
26
27
sCmd
ETX
LRC
Data (ASCII)
22 characters fixed
Example: AABBCC1234567-00000001
sCmd
Description
sCmd0
1-9
4 ~ 44
45
46
SCmd0
Data
ETX
LRC
Data (ASCII)
Lines of additional information of client in
header Maximum 40 characters
5.4. Comment
This command allows input additional commercial messages in description of
a product.
Characters position in
1
the command line
Structure of the Command STX
3 ~22
23
24
Message
ETX
LRC
Description
Data (ASCII)
20 characters
32
Rev 1.2
14/09/2011
B/. 1,50 |
|
NOTA DE CREDITO
It is possible to register until ($ B/.) 9999999.99 by transaction.
It is possible to register until ($ B/.) 9999999.99 by day.
When limit amount is exceeded, the command to register a product is
rejected.
If the maximum amount that the printer can accumulate is exceeded the
printer reject all the sale commands, in this case it is necessary to issue a Z report
to continue sales operations.
Characters position in
the command line
Structure of the
Command
4 ~ 13
14 ~ 21
STX
Tax
Price
Quantity
Description
22 ~ 138
33
140
Rate (ASCII)
0
1
2
3
139
Rev 1.2
14/09/2011
Price (ASCII)
10 Digits
Quantity (ASCII)
8 Digits
Quantity (ASCII)
116 Characters
4 ~ 13
14 ~ 21
22 ~ 138
Tax rate
Price
Quantity
Description
Description
Free tax Item
Tax rate 1 Item
Tax rate 2 Item
Tax rate 3 Item
Description
The price is 8 Integers y 2 fixed Decimals
Description
The quantity is 5 Integers y 3 fixed Decimals
Description
Description of the Product
139
140
ETX LRC
Rate (ASCII)
0
1
2
3
Price (ASCII)
10 Digits
Quantity (ASCII)
8 Digits
Quantity (ASCII)
116 Characters
5.7. Closure
Direct Payment
This command allows assign a total amount of devolution for one mean of
STX f
3 ~4
# Mean of payment
ETX
LRC
Description
Number of mean of Payment
Rev 1.2
14/09/2011
# Mean (ASCII)
01 16
Partial payment
This command allows put some of the total devolution amount by different
means of payment. When the document is totally paid, then drawer is opened
automatically.
STX 2
# Mean
5 ~ 16
Amount of payment
Description
Indicator del Partial Method of Payment
Description
The amount of payment is de 10 Integers and 2 Decimals
17
18
ETX LRC
# Mean (ASCII)
01 16
Amount of Payment (ASCII)
12 Digits
35
36
Rev 1.2
14/09/2011
Rev 1.2
14/09/2011
4 ~ 23
24
25
STX
RUC
ETX
LRC
Description
Data (ASCII)
Maximum 20 characters
RUC
Characters position in
1
the command line
Structure of the Command STX
4 ~ 23
24
25
sCmd
ETX
LRC
Description
Data (ASCII)
40 characters fixed
sCmd
37
Characters position in
1
the command line
Structure of the Command STX
Description
Rev 1.2
14/09/2011
4 ~ 25
26
27
sCmd
ETX
LRC
Data (ASCII)
22 characters fixed
Example: AABBCC1234567-00000001
sCmd
Description
sCmd0
1-9
4 ~ 43
44
45
SCmd0
Data
ETX
LRC
Data (ASCII)
Lines of additional information of client in
header Maximum 40 characters
6.5. Comment
This command allows input additional commercial messages in description of
a product.
Characters position in
1
the command line
Structure of the Command STX
3 ~22
23
24
Message
ETX
LRC
Description
Data (ASCII)
20 characters
38
Rev 1.2
14/09/2011
B/. 1,50 |
|
NOTA DE DEBITO
It is possible to register until ($ B/.) 9999999.99 by transaction.
It is possible to register until ($ B/.) 9999999.99 by day.
When limit amount is exceeded, the command to register a product is
rejected.
If the maximum amount that the printer can accumulate is exceeded the
printer reject all the sale commands, in this case it is necessary to issue a Z report
to continue sales operations.
Characters position in
1
2
3 4 ~ 13 14 ~ 21 22 ~ 138 139 140
the command line
Structure of the
STX 0x60 Tax Price Quantity Description ETX LRC
Command
Description
Rate (ASCII)
0
1
39
Rev 1.2
14/09/2011
2
3
Price (ASCII)
10 Digits
Quantity (ASCII)
8 Digits
Quantity (ASCII)
116 Characters
Description
The price is 8 Integers y 2 fixed Decimals
Description
The quantity is 5 Integers y 3 fixed Decimals
Description
Description of the Product
Description
Free tax Item
Tax rate 1 Item
Tax rate 2 Item
Tax rate 3 Item
Description
The price is 8 Integers y 2 fixed Decimals
Description
The quantity is 5 Integers y 3 fixed Decimals
Description
Description of the Product
40
14 ~ 21
22 ~ 138
Quantity
Description
139
140
ETX LRC
Rate (ASCII)
0
1
2
3
Price (ASCII)
10 Digits
Quantity (ASCII)
8 Digits
Quantity (ASCII)
116 Characters
Rev 1.2
14/09/2011
Direct Payment
This command allows assign a total amount of Debit Note for one mean of
payment. When this command is executed, the cash-drawer is opened
automatically.
Characters position in the
command line
Structure of the Command
STX f
3 ~4
# Mean of payment
ETX
LRC
Description
Number of mean of Payment
# Mean (ASCII)
01 16
Partial payment
This command allows put some of the total amount of credit note by different
means of payment. When the document is totally paid, then drawer is opened
automatically.
Characters position in the
command line
Structure of the Command
STX 2
# Mean
5 ~ 16
Amount of payment
Description
Indicator del Partial Method of Payment
Description
The amount of payment is de 10 Integers and 2 Decimals
41
17
18
ETX LRC
# Mean (ASCII)
01 16
Amount of Payment (ASCII)
12 Digits
Rev 1.2
14/09/2011
42
Rev 1.2
14/09/2011
N O F I S C A L
STX
STS1 STS2
5 ~ 44
45
46
Message
ETX
LRC
Description
Prints a line with text Normal and waits for another command
Prints a line with bold text and waits for another command (**)
Prints a line with expanded text and waits for another command (**)
Prints a line with double and bold text and waits for another command (**)
Prints a line with text centered and waits for another command (**)
Prints a line with text centered and bold and waits for another command (**)
Cierra el Documento No Fiscal (Corta el papel si tiene esa funcin la impresora)
Description
Text
STS 1
STS 2
(ASCII)
(ASCII)
0
0
0
*
0
>
0
$
0
!
0
1
0
Message (ASCII)
40 Characters
43
Rev 1.2
14/09/2011
2
3
4
CMD ETX LRC
Description
Prints a non-fiscal document, with the message Opening
Allows the opening of the cash desk (invoice must have 1 product registered)
CMD (ASCII)
0
w
This command allows report funds and withdraws of cash or another mean
of payment in the cash desk.
Characters position in the
command line
Structure of the Command
STX 9 PR
# Mean
6 ~ 17
18
19
Amount of payment
ETX
LRC
Description
To withdraw
Fund of cash
Description
Number of Mean of payment
Description
The amount of payments is 10 Integers y 2 Decimals
PR (ASCII)
0
1
# Mean (ASCII)
01 - 16
Amount (ASCII)
12 Digits
44
Rev 1.2
14/09/2011
Taxes rates
Name of cashiers
System Flags
Symbols
Messages
45
Rev 1.2
14/09/2011
The following is the general diagram to handle the fiscal printer display.
Fiscal Printer
Show Time
and Date
(Section 8.1)
Display Handle
Show
Commercial
Message
(Section 8.2)
Show
Message
(Section 8.3)
Program of
Commercial
Messages
(Section 8.4)
Rev 1.2
14/09/2011
STX c
Description
Upper line of Display
Lower Line of Display
Description
Message on Display
4 ~ 23
Line
Message
24
25
ETX LRC
Line (ASCII)
U
L
Message (ASCII)
20 Characters
Characters position in
1
2 3
the command line
Structure of the Command STX P I
Description
Commercial message on Display
4 ~ 53
54
55
Message
ETX
LRC
Message (ASCII)
50 Characters
47
Rev 1.2
14/09/2011
Fiscal Printer
S1
Printer
Parameters
(Section 9.1)
S2
Current
Invoice
Status
(Section 9.2)
Status Report
S3
Tax Rate and
flags
programming
(Section 9.3)
S4
Mean of
payment
description
(Section 9.4)
S5
Electronic
Journal
Status
(Section 9.5)
S6
Indicator of
Paper
(See Note*)
(Section 9.6)
S7
MICR
characters
(See Note*)
(Section 9.7)
9.1. Status S1
This command allows read from host (PC) the status of the fiscal printer,
related to parameters of the printer like serial number, tax identification number
and invoice information. This command can be executed in any condition.
Characters position in the command line 1
2 3
4
5
Structure of the Command
STX S 1 ETX LRC
48
Characters position
Structure of the Command
1
STX
100
Data
101 102
ETX LRC
Type
ASCII
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
ITEM
Command S1
Number of assigned cashier
Separator
Total of daily sales(17 bytes)
Separator
Number of last invoice
Separator
Quantity of invoices during day
Separator
Number of last credit note
Separator
Quantity of credit notes during day
Separator
Number of last debit note
Separator
Quantity of debit notes during day
Separator
Number of non-fiscal document
Separator
Quantity of non-fiscal documents
Separator
Daily closure counter
Separator
Fiscal memory reports counter
Separator
RUC
Separator
DV
Separator
Serial number of the machine.
Separator
Actual time in the printer
Separator
Actual date in the printer
49
Rev 1.2
14/09/2011
Rev 1.2
14/09/2011
9.2. Status S2
This command allows read from host (PC) the status of the invoice in
transaction. If this command is executed without an invoice open the obtained
values will be zero.
Characters position in the command line 1
2 3
4
5
Structure of the Command
STX S 2 ETX LRC
Characters position
Structure of the Command
1
79
2
77 78
STX Data ETX LRC
76
76
77
77
Type
ITEM
ASCII Command S2
20h
Separator (space)
ASCII Taxable bases Sub-Total (13 bytes)
0Ah
Separator
20h (space character)
ASCII Tax Subtotal
0Ah
Separator
20h
(space character)
ASCII Data Dummy
0Ah
Separator
20h
**See Note S2**
ASCII Separator
0Ah
Separator (space)
ASCII Amount payable
0Ah
Separator
ASCII Number of realized payments
0Ah
Separator
Condition
0 = No transaction
ASCII 1 = In invoice payment
2 = Credit Note
3 = Debit Note
0Ah
Separator
50
Rev 1.2
14/09/2011
Note: Depending of value programmed in the flag 28, this data have
different meanings. If flag 28 value is 0, this data in the report is data dummy.
Otherwise flag 28 value is 1, this data is the quantity of products of the invoice in
transaction. For further information please read the fiscal printer flag manual.
9.3. Status S3
This command allows reading from host (PC) the status of the fiscal printer,
related to taxes rates and status flag. This command can be executed in any
condition.
Characters position in the command line 1
2 3
4
5
Structure of the Command
STX S 3 ETX LRC
Characters position
Structure of the Command
1
STX
122
Data
123 124
ETX LRC
Since
2
4
5
9
10
11
15
16
17
21
22
122
Until
3
4
8
9
10
14
15
16
20
21
121
122
Length
2
1
4
1
1
4
1
1
4
1
100
1
Type
ASCII
ASCII
ASCII
0Ah
ASCII
ASCII
0Ah
ASCII
ASCII
0Ah
ASCII
0Ah
ITEM
Command
Rate type 1
Rate value 1
Separator
Rate type 2
Rate value 2
Separator
Rate type 3
Rate value 3
Separator
System Flags 1-50 (Every Flag has 2 characters)
Separator
51
Rev 1.2
14/09/2011
9.4. Status S4
This command allows reading from host (PC) the status of the fiscal printer,
related to the mean of Payment. It is possible to execute this command in any
condition.
1
STX
178
Data
Type
ASCII
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
ITEM
Command S4
Mean of Payment 1
Separator
Mean of Payment 2
Separator
Mean of Payment 3
Separator
Mean of Payment 4
Separator
Mean of Payment 5
Separator
Mean of Payment 6
Separator
Mean of Payment 7
Separator
Mean of Payment 8
Separator
Mean of Payment 9
Separator
Mean of Payment 10
52
179 180
ETX LRC
Type
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
Rev 1.2
14/09/2011
ITEM
Separator
Mean of Payment 11
Separator
Mean of Payment 12
Separator
Mean of Payment 13
Separator
Mean of Payment 14
Separator
Mean of Payment 15
Separator
Mean of Payment 16
Separator
9.5. Status S5
This command allows read from host (PC) the status of the fiscal printer,
related to the status of the Electronic Journal. This command can be executed in
any condition.
Characters position
Structure of the Command
1
STX
53
47
Data
48
49
ETX LRC
Rev 1.2
14/09/2011
Type
ASCII
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
ITEM
"S5"
RUC
separator 0x0A
DV
Separator 0x0A
Serial
separator 0x0A
Number of Electronic Journal
separator 0x0A
Memory Capacity (MB)
separator 0x0A
Free Memory Space (MB)
separator 0x0A
Quantity of registered documents.
9.6. Status S6
2
S
3
6
4
ETX
5
LRC
To
1
2
3
4
SIZE
2
1
1
1
Type
ASCII
ASCII
ASCII
ASCII
ITEM
"S6"
Indicator of paper in Print Device for Billing
Indicator of paper in Print Device for Slip/Check Printer
Indicator of paper in Print Device for Validation
54
Rev 1.2
14/09/2011
9.7. Status S7
From
To
0
2
1
38
SIZE
2
39
Type
ASCII
ASCII
4
ETX
ITEM
"S7"
MICR Characters
55
5
LRC
Rev 1.2
14/09/2011
The following is the general diagram for requesting reports from the fiscal
printer.
This is the sequence for requesting and reading X Report and Z Report.
PC
Fiscal Printer
STX+U++ETX+LRC
ENQ
ACK
STX- DATAn-ETB-LCR
ACK
EOT
Fiscal Printer
Report
Daily Report
(Section 9.1)
Fiscal Memory
Report
(Section 9.2)
Print of
documents from
Electronic
Journal
(Section 9.3)
X Report
Z Report
Report by Date
Report by
Number
56
- Invoice
- Credit Note
- Non Fiscal Documents.
- Reports
Memory Status
Rev 1.2
14/09/2011
X & Z Report
This command allows generate daily reports with non-fiscal value (X), and
daily reports with fiscal value (Z). The information of the daily report (Z Report) is
stored in the fiscal memory in the time of printing.
The accumulated values can be used to do weekly sale reports, monthly,
etc.
1
2
3
4
5
6
STX CMD Type Mode ETX LRC
Description
Indicator to print specified report
Indicator to erase specified report
Indicator to send report to PC
Description
Report of Transaction of the day
Report of accumulated Total (X2 Z2 according to
the case)
Description
Partial cut of the daily sales
Daily closure of operations
10.2.
CMD (ASCII)
I
X
U
Type (ASCII)
0
1
Mode (ASCII)
X
Z
10.2.1.
This command allows print an Audit report that is defined between two dates
5
10
Characters position
1
2
3
4
in the command line
Start Date
Structure of the
STX CMD 2 Mode Day Month Year
Command
57
11
16
Final Date
Day
Month Year
17
18
ETX LRC
10.2.2.
Rev 1.2
14/09/2011
CMD (ASCII)
I
U
Mode (ASCII)
A
S
M
This command allows print an Audit Report that is defined between two
numbers of daily reports (Z Report).
Characters
position in the
command line
Structure of the
Command
10
11
12
13
Z counter
(Start)
Z counter
(Final)
Description
Issue a printed report
Send information report to PC
Description
Includes all the information of the reports
Is a summary of reports
Is a monthly summary of the reports
16
17
ETX LRC
CMD (ASCII)
I
U
Mode (ASCII)
A
S
M
1
STX
58
143
Data
18
144 145
ETX LRC
Type
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
ASCII
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
0Ah
ASCII
ITEM
Number of last Z Report
separator 0x0A
Date of last Z Report
separator 0x0A
Time of last Z report
separator 0x0A
Free-Taxes Accumulated
separator 0x0A
Amount of Tax Rate1 Accumulated
separator 0x0A
Amount of Tax Rate 2 Accumulated
separator 0x0A
Amount of Tax Rate 3 Accumulated
separator 0x0A
Total Sales (without tax)
separator 0x0A
Total amount of Credit Note (without tax)
separator 0x0A
Total amount of Debit Note (without tax)
separator 0x0A
Number of last invoice
separator 0x0A
Date of last invoice
separator 0x0A
Time of last invoice
separator 0x0A
Number of last credit note
separator 0x0A
Number of last debit note
separator 0x0A
Number of last Non fiscal document
59
Rev 1.2
14/09/2011
Rev 1.2
14/09/2011
PC
STX+U++ETX+LRC
Printer
ACK
ENQ
ACK
STX- DATAn-ETB-LCR
(See Note)
EOT
Note: The indicated segment will be repeated (n-1) times, where n means
the value of quantity of reports to be loaded in the machine. For example, if there
are ten Z reports, the segment will be repeated 9 times and then will follow the
shown scheme.
10.3.
60
Rev 1.2
14/09/2011
10
Start
11
17
End
18
19
ETX
LRC
The field Mode is related to type of document, when this field is indicated
with a capital letter the request is by range of number and when the fields is
indicated with a minuscule letter, the request is by range of dates. The range will
be indicated by Start and End.
Mode (ASCII)
F
C
D
T
X
Z
Y
E
S
A
N
*
For a request by range of date (format 0YYMMDD both for start and for
end), Mode may be:
61
Rev 1.2
14/09/2011
Mode (ASCII)
f
c
d
t
x
z
r
w
y
e
s
a
n
@
Note: For the special case of printing last document stored in Electronic
Journal, Mode will be U and both Start and End will be 0000000, as follow:
Characters position
1
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
19
in the command line
Structure of the
STX R U 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ETX LRC
Command
10.3.2.
Characters
position in the command line
Characters position
in the command
1
2
3
4 24
line
62
25
26
STX R K
CIP
DATO
VALOR
DESCRIPCION
CIP
STRING
Number of CIP
10.3.3.
ETX
Rev 1.2
14/09/2011
LRC
With this command the printer generates a ticket with the following
information corresponding to the general status of the Electronic Journal:
63
64
Rev 1.2
14/09/2011
Rev 1.2
14/09/2011
Check
11.1.1.
Slip Mode
This command enables slip printer functions. This is the first command
required for any of the following functions
.
Characters position in the command line 1
2 3
4
5
Structure of the Command
STX : ST ETX LRC
Description
Slip activation
Slip deactivation
11.1.2.
ST
1
0
This command sends to the slip printer data that will be printed in the
check.
Characters position
1
2 3 4 5 6 7 8
19 20
69 70
119 120 121
in the command line
Structure of the
Client
STX < F1 F2 F3 F4 F5 Quantity
Date Data EXT LRC
Command
Data
F1
F2
F3
F4
F5
Description
(Number of Lines between Check Top and Quantity)
(Number of Lines between Quantity and No Endosable)
(Number of Lines between No Endosable and Name)
(Number of Lines between Name and Quantity)
(Number of Lines between Quantity and Date)
65
F1 -> F5 (ASCII)
0 -> 9
0 -> 9
0 -> 9
0 -> 9
0 -> 9
11.1.3.
Rev 1.2
14/09/2011
(ASCII)
10 Characters
50 Characters
50 Characters
STX = F1
66
33
Line
34
35
ETX
LRC
Rev 1.2
14/09/2011
F1 (ASCII)
1 -> 9
(ASCII)
30 Characters
30 Characters
30 Characters
30 Characters
30 Characters
30 Characters
30 Characters
30 Characters
30 Characters
Note: Text in quotes for the previous command description line is written
automatically by the fiscal printer. Every Command Line must have 30 characters,
if it is necessary, blank space characters can be used to complete this quantity of
characters.
11.1.4.
Print Endorsement
Description
F1 (Number of Lines between Top and N: )
F1 (ASCII)
0 -> 9
Note: This command always must be sent after all the endorsement
commands. (See 10.1.3- Check Format (Endorsement))
67
Rev 1.2
14/09/2011
NOTE: While fiscal printer is issuing an invoice, it is possible to use check printer.
68
Rev 1.2
14/09/2011
Validation Commands
11.2.1.
Validation Mode
Description
Activate Validation
Deactivate Validation
11.2.2.
ST
1
0
Print Validation
Characters position in the
command line
Structure of the Command
STX >
Description
52
Text
53
54
ETX LRC
(ASCII)
50 Characters
Text
11.2.3.
MICR Reading
69
11.3.
11.3.1.
Description
Activate Validation
Disabling Validation
ST
1
0
70
Rev 1.2
14/09/2011
Rev 1.2
14/09/2011
Lines of Information
1
2
STX =
33
34
ETX
Line
Description
(ASCII)
30 Characters
30 Characters
30 Characters
30 Characters
Line Between 4 and 5 are automatically set a dividing line
Line 5 (Line Additional) **optional
30 Characters
Line 6 (Line Additional) **optional
30 Characters
Line 7 (Line Additional) **optional
30 Characters
Line 8 (Line Additional) **optional
30 Characters
Line 9 (Line Additional) **optional
30 Characters
Line 1
Line 2
Line 3
Line 4
11.3.3.
Type
Y ETX LRC
Type
R
N
Gift coupon
POS Note
Description
Number of Lines added to left margin
Description
Number of Lines added to up margin
71
X (ASCII)
0 -> 9
Y (ASCII)
0 -> 9
35
LRC
Rev 1.2
14/09/2011
# ERROR
Name
ERROR_I2C
3
4
5
ERROR_COM2
ERROR_COM3
ERROR_CRC
ERROR_COMANDO
ERROR_JOB
ERROR_BUFFER_VA
ERROR_FECHA
ERROR_NO_PLU_DA
TA
10
11
ERROR_ESTADO
12
13
15
ERROR_RESET
ERROR_RAM_CLEAR
ERROR_FM_LECTUR
A
ERROR_FM_NUEVA
16
ERROR_TOTALES
14
17
# ERROR
18
19
ERROR_TASA
Nombre
ERROR_EJ_CRC
ERROR_EJ
20
ERROR_WORK_V
21
ERROR_WORK_C
Description
Writing or Reading error of fiscal memory or
work memory
Communication Error or timeout with COM2
Communication Error or timeout with COM3
Wrong CRC
When a command has a wrong format (out of
range, command doesnt exist, or any error
during fiscalization)
Internal Error of the printer
Error in printer buffer
Date error
PLU or discount wasnt found
Printer in its state cant receive actual
command
Error during execution of RESET
Error during RAM CLEAR
Fiscal Memory read only
Fiscal Memory new
Max Amounts allowed for receipts or
accumulators for daily report (Z report) have
been exceeded
Tax rate error
Descripcin
EJ Reading memory
EJ Error
Work Memory error to read data related to
sales of day (data error or failure in work
memory)
Work memory error to read data related to
system settings, because of wrong data or
72
Rev 1.2
14/09/2011
22
ERROR_WORK_D
23
24
ERROR_RAM
ERROR_EJ_REG
ERROR_EJ_NO_CAR
D
26
ERROR_INDICEZ
27
28
29
30
31
ERROR_FM_G
ERROR_FM_C
ERROR_FM_B
ERROR_FM_FULL
ERROR_FM
25
73