UI Communication Protocol FISCAL PRINTERS
UI Communication Protocol FISCAL PRINTERS
00BG Page 1
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
Version 1.00BG
INTRODUCTION
The fiscal device is controlled by application software with which it communicates over an RS232
asynchronous serial or another interface. It is intended to execute a predefined set of commands in a logical order
depending on the types of operations to be executed. The application software has no direct access to the resources
of the fiscal device, but it can retrieve data on the status of the fiscal device and the fiscal memory.
_
Fiscal printer programming interface Version1.00BG Page 2
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
A) INITIAL STATUS
In this status, the date and time must be set, the Fiscal Memory ID, the Unique Device ID and the country code
must be programmed. THESE OPERATIONS ARE CARRIED OUT ONLY BY THE MANUFACTURER
BEFORE THE HANDOVER TO THE CUSTOMER!
The following commands must be carried out in the specified order: 61 (3DH) and 91 (5BH).
B) STATUS AFTER THE SERIAL NUMBER AND FISCAL MEMORY ID ARE SET
In this status, the following operations must be performed:
Format the EJ using command 134 (86H).
Set the currency name, number of decimal places and number and values of the tax rates using
command 83 (53H).
After these operations are performed, the fiscal printer is ready to be handed over to its customer/user, i.e., in
this status, the devices are held at the manufacturer’s warehouse.
D) TRAINING MODE
The FP remains in this status until it is fiscally registered. Receipts can be issued, however, one must bear in
mind that even the customer receipts in this mode are marked as non-fiscal. A daily financial report with reset (Z-
report) can be created, but no record is made in the fiscal memory. An UIC is set, but it is not stored in the fiscal
memory and can be edited. Fiscal memory reports are not run. Memory resets, if any, are not recorded in the fiscal
memory. The clock can be set freely. In training mode, the fiscal printer CAN NOT BE USED at points of sale—
it is intended to be used for training purposes only.
_
Fiscal printer programming interface Version1.00BG Page 3
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
Invalid checksum of the UIC, Unique Fiscal Device ID, Fiscal Memory ID or any record containing
tax rates.
Unrecognised format of the fiscal memory unit.
If the fiscal memory power-on check detects more than three invalid checksums of a fiscal record in
a daily financial report. The fiscal records with invalid checksums are printed on power-on (unless
the device is in the open receipt status) and also at the respective area of the fiscal memory reports.
No communication with the tax terminal or an “unknown” tax terminal, i.e., with a serial number
other than the one stored in the fiscal memory.
No communication with the EJ or a read-only EJ from another printer.
The EJ is full (highly unlikely, considering the size of the EJ).
Red light:
Off:
The peripherals are operating normally.
Continuous:
No paper or open cover. Find and clear the fault.
Blinking, about 2 flashes per second:
The printing head is overheated. Wait—printing will continue after it cools down.
Intermittent blinking: 2 flashes followed by a pause.
No communication with the EJ. Try to power the printer off and then on again to reset the EJ. If the problem
persists, service intervention is required.
Switch Off On
1 Normal display mode “Transparent display” mode
2 Standard DATECS display operation Codepage 1251 display operation
3* 3-inch paper tape printing Narrow paper printing
4 No automatic cut Automatic paper cut after the receipt
5 Codepage 1251 is used for Cyrillic DOS codepage (856) is used for Cyrillic
6 Serial port baud rate setting
7 Serial port baud rate setting
8 Serial port baud rate setting
9** Not used Half Cut
10*** Not used Allows work with presenter
11 Not used
12 115200 bps modem communication 230400 bps modem communication
13 Not used
14 Not used
15 Not used
16 Not used
_
Fiscal printer programming interface Version1.00BG Page 4
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
*By default, printers not supporting 3-inch paper operation, do not accept switch 3 as a valid
setting. (switch 3 will remain off).
**Allows Half Cut and automatically stops work of the presenter even it is allowed.
***Allows work of presenter in printers SK1-21F and SK1-31F
_
Fiscal printer programming interface Version1.00BG Page 5
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
_
Fiscal printer programming interface Version1.00BG Page 6
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
POWER OUTAGE
The printer status at all times is reflected in its status bytes. When the printer is powered on after a power
outage, the application software, using commands 76 (4AH) and 103 (67H), needs to query the printer status.
The application software needs to decide how to proceed depending on the printer status. It is guaranteed that
the fiscal memory will not be damaged by a power outage and that the sums accumulated in the RAM will be valid.
If there has been a power outage during printing, then, after the printer is powered on, it will print a line with the
“*VOLTAGE DROP*” text in wide letters and will complete the printout.
EJ (ELECTRONIC JOURNAL)
The printer stores each line of the fiscal receipts, service receipts, service information documents during
initialisation, X- and Z-reports in the Electronic Journal (EJ). The EJ has a minimum capacity of 2 GB and, in
normal operation, should be able to store all data generated during the printer operation until the fiscal memory is
full. If it becomes damaged or full (in heavy-duty operation), the EJ can be replaced with an empty one, whereby the
old one must be stored under the terms and procedure defined in Ordinance N-18.
The following reports can be generated from the EJ:
Print a copy of a document by number, date and time or sequential number of a Z-report.
Download document(s) over the serial interface as text with layout as close as possible to the original
paper layout. This also can be selected by number, date and time or sequential number in a Z-report.
Information on the capacity of the EJ, used space in bytes, numbers of the first and last documents stored
in it and the first and last Z-reports.
SHA-1 checksum validity verifications for the documents from a complete Z-report, directly calculated by
the printer.
Verify the SHA-1 checksums for one or more Z-reports with the ones stored in the fiscal memory and
print a report with the verification result.
Two flags in the status bytes warn of a near end (10 MB free) and end (1 MB free) of the EJ. If the “End of the
EJ” flag is raised, the following commands are disabled: 38 (Open a service receipt), 42 (Free text in a service
receipt), 48 (Open a fiscal receipt), 49 (Enter a sale), 52 (Enter and display), 54 (Print fiscal text), 58 (PLU sale) and
84 (Print a barcode).
REPORT GENERATION
The reports are generated entirely by the fiscal printer after it receives the respective command from the PC. For
these reports, the application software can not make any changes to the report appearance, i.e., they look as they are
pre-defined in the FP. They are invoked using commands:
50 (32H): tax rate and decimal place change report.
69 (45H): daily financial report with or without reset.
108 (6CH): daily financial report with or without reset, with printed totals by PLU.
117 (75H): daily financial report with or without reset, with printed totals by department.
118 (76H): daily financial report with or without reset, with printed PLUs and departments.
79 (4FH)/95 (5FH): summary fiscal memory report, from–to date/from–to fiscal block number.
73 (49H)/94 (5EH): full fiscal memory report, from–to date/from–to fiscal block number.
119 (77H): print documents from the EJ.
_
Fiscal printer programming interface Version1.00BG Page 7
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
LOW-LEVEL PROTOCOL
A) PROTOCOL TYPE. - Master (Host) / Slave
The fiscal printer executes commands sent from the Host and returns a message depending on the result.
The fiscal printer can not initiate communication. Only messages resulting from the execution of received
commands are sent to the Host.
The messages in the protocol are either packed messages or single bytes.
The fiscal printer supports communication over RS 232 at baud rates of 1200, 2400, 4800, 9600, 19200, 38400,
57600 and 115200 b/s, 8N1. The baud rate is set by configuration bits 5, 6 and 7. LAN connection is also supported,
whereby the parameters are set using command 36 (24H).
B) MESSAGE SEQUENCE
The Host sends a packed message, containing the command to the printer.
The FP executes the requested operation and responds with a packed response message.
The Host needs to wait for the response from the printer before sending another message.
The protocol uses non-packed codes with a length of one byte to process any required pauses and error
statuses.
C) NON-PACKED MESSAGES, TIME-OUT
In normal operation, the Slave responds to all Host messages not later than 60 ms either with a packed message
or a one-byte code. The Host needs a 500 ms time-out to receive a response from the Slave. If it does not receive
any response within that time, it needs to resend the message with the same sequential number and the same
command. After several unsuccessful attempts, the Host needs to indicate that there is no connection to the fiscal
printer or there is a hardware error.
The non-packed messages consist of a single byte and are:
a) NAK 15H
This code is sent by the Slave, if it detects an error in the checksum or the format of the received message.
When the Host receives a NAK, it needs to resend a message with the same sequential number
b) SYN 16H
This code is sent by the Slave, when it receives a command requiring longer execution time. SYN is sent
every 60 ms, until the packed response message is ready
D) PACKED MESSAGES
a) Host to printer. (Send)
<01><LEN><SEQ><CMD><DATA><05><BCC><03>
b) Printer to Host. (Receive)
<01><LEN><SEQ><CMD><DATA><04><STATUS><05><BCC><03>
Where:
<01> Preamble
length: 1 byte
value: 01H
<LEN> Number of bytes from <01> (not included) to <05> (included) plus a fixed offset of 20H
length: 1 byte
value: 20H - FFH
<SEQ> Sequential number of the frame
length: 1 byte
value: 20H - 7FH
The fiscal printer enters the same <SEQ> in the response message. If the FP receives a
message with the same <SEQ> as the last received message, then it takes no action, just repeats
the last sent message.
<CMD> Command code
length: 1 byte
value: 20H - FFH
The FP enters the same <CMD> in the response message. If the printer receives a non-
existing code, it responds with a packed message with zero length of the data field and sets the
respective status bit.
<DATA> Data
length: 0–218 bytes for Host to Printer.
0–213 bytes for Printer to Host.
value: 20H–FFH and, additionally, 09H and 0AH.
The data area format and length are command-dependent. If the command has no data, then
the length of this field is zero. If there is a syntax error in the data, then the respective status bit
is set and a packed message with zero length of the data field is returned.
<04> Separator (for Printer-to-Host messages only)
length: 1 byte
value: 04H
_
Fiscal printer programming interface Version1.00BG Page 8
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
<STATUS> The field with the current status of the fiscal device
length: 6 bytes
value: 80H - FFH
<05> Postamble
length: 1 byte
value: 05H
<BCC> Checksum (0000H-FFFFH)
length: 4 bytes
value: 30H - 3FH
The sum includes from <01> (not included) to <05> (included). Each digit in these two
bytes is sent with an added 30H. For instance, the sum 1AE3H is composed as 31H, 3AH, 3EH,
33H.
<03> Terminator
length: 1 byte
value: 03H
_
Fiscal printer programming interface Version1.00BG Page 9
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
INITIALISATION
29H (41) Store the settings, the logo graphic and the switches in the flash memory.
2BH (43) Set the HEADER, FOOTER and print options.
3DH (61) Set the date and time.
42H (66) Set the allowable invoice number range.
48H (72) Fiscal registration.
53H (83) Set the multiplier, decimal digits, currency name and tax rates.
55H (85) Program the additional payment types.
57H (87) Set a department name.
5BH (91) Program the Unique Printer ID, FP ID and country code.
62H (98) Set the UIC.
65H (101) Set an operator password.
66H (102) Set an operator name.
6BH (107) Specify and record PLUs.
73H (115) Upload a logo graphic.
SALES
CLOSING TIME
45H (69) Daily financial report (with or without reset).
6CH (108) Extended daily financial report (with PLU printout).
75H (117) Extended daily financial report (with department printout).
76H (118) Extended daily financial report (with department and PLU printout).
REPORTS
22H (34) Report of the registered service agreements.
32H (50) Report of the changes in the tax rates and decimal digits made during the respective period.
49H (73) Detailed fiscal memory report (from-to number).
4FH (79) Summary fiscal memory report (from-to date).
5EH (94) Detailed fiscal memory report (from-to date).
5FH (95) Summary fiscal memory report (from-to number).
69H (105) Operator report.
6FH (111) PLU report.
INFORMATION TO HOST
22H (34) Last service agreement information.
25H (37) Read the NRA data.
3EH (62) Read the date and time.
40H (64) Last fiscal record information.
41H (65) Information on the sums for the day.
44H (68) Number of free records in the fiscal memory.
4AH (74) Obtain the status bytes.
4CH (76) Fiscal transaction status.
56H (86) Last fiscal memory record date.
58H (88) Information on the accumulated sums in a department.
5AH (90) Obtain diagnostic information.
61H (97) Obtain the tax rates.
_
Fiscal printer programming interface Version1.00BG Page 10
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
PRINTER COMMANDS
2CH (44) Paper feed.
2DH (45) Paper cut.
DISPLAY
21H (33) Clear the display.
23H (35) Show text (lower line).
2FH (47) Show text (upper line).
3FH (63) Show date and time.
64H (100) Display—full control.
OTHER
20H (32) Extended information on the last error.
26H (38) Open a service receipt.
27H (39) Close a service receipt.
2AH (42) Print free text in a service receipt.
46H (70) Service money deposit and withdrawal.
47H (71) Print diagnostic information.
50H (80) Beep.
59H (89) Program the production test area.
5AH (92) Print a divider line.
6AH (106) Open the drawer.
67H (119) EJ maintenance—read, print and information.
7AH (122) Open a rotated service receipt.
7BH (123) Print information on a rotated service receipt.
7CH (124) Close a rotated service receipt.
SERVICE COMMAND
79H (121) Read a firmware block.
80H (128) Service software RAM reset.
85H (133) Temporary disable printing for testing purposes.
86H (134) Service EJ maintenance.
87H (135) GPRS modem test.
90H (144) Initialise and read data from the tax terminal.
_
Fiscal printer programming interface Version1.00BG Page 11
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
Note: All examples assume operation of a fiscal printer configured for Bulgaria. Country-specific
clarifications are provided as appropriate.
_
Fiscal printer programming interface Version1.00BG Page 12
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
DHCP One character: "0" or "1". Enables or disables DHCP (Receiving automatic LAN settings
from the server).
MACAddr Up to 12 hexadecimal characters representing the MAC address of the device. Works only
if the service jumper is present!!!
Subcommand ‘6’ expects a daily report number and returns the daily report date and time. Returns ‘F’, if the
record has an invalid checksum. Returns ‘E’, if no such record exists.
Subcommand ‘7’ returns the date of fiscal registration or ‘F,’ if the printer is not placed into operation.
Subcommand ‘8’ returns PLU sales data by PLU codes in ascending order. The command is first sent once
using command string “8,F” and then, the required number of times using command string “8,N” until the printer
returns the ‘F’ response (no data) or we have read the required number of PLUs. The PLU name is always returned
encoded in codepage 1251.
This command is only used for compatibility with fiscal printers having an external terminal capable of
reading these data. It is not really necessary, because the information can be obtained by other means as well. Data
_
Fiscal printer programming interface Version1.00BG Page 13
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
identical to the ones received by this command are sent internally and automatically to the tax terminal to be
transmitted to the NRA as needed.
If S1.1 is raised, the command is not executed, because there is no open service receipt at this time.
29H (41) STORE THE SETTINGS AND THE SWITCHES IN THE FLASH MEMORY
Data field: [<Switches>]
Response: <ErrCode>
Switches 8 or 16 bytes with values of ‘0’ or ‘1’: the configuration “switches.”
ErrCode "P" - successful recording; "F" - unsuccessful recording of the settings.
The printer has no hardware switches and uses an area in the flash memory for this purpose. They are set using
this command. Additionally, the command stores the logo graphic, barcode length, print density and open-drawer
pulse length in the flash memory. After a RAM reset, their values are restored for the flash memory. If only 8 bytes
are submitted, the upper 8 remain unchanged.
If the command has no data, the old values of the “switches” are kept and the remaining data are stored.
The command stores the following data in the flash memory:
Header and footer (from command 43).
The text of the additional payment types (from command 85).
The logo graphic (from command 115).
The print options (from command 43).
The configuration switches.
After a RAM reset, their values are restored for the flash memory.
_
Fiscal printer programming interface Version1.00BG Page 14
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
The command allows optional font and line print attributes to be set:
Font Integer between 0 and 3:
0 32 dots (4 mm) height, higher letters
1 32 dots (4 mm) height, normal letters
2 24 dots (3 mm) height
3 16 dots (2 mm) height
Flags Between one and 3 letters: ‘B’, ‘H’ or ‘I’. Each may appear only once. Setting, respectively:
B Bold (strong)
H High (double height)
I Italic (oblique)
_
Fiscal printer programming interface Version1.00BG Page 15
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
‘T’ Enable/disable printing accumulated VAT for the receipt in a normal (not extended)
fiscal receipt.
‘X’ Enable/disable automatic generation of an open-drawer pulse for commands 53 (35H)
and 70 (46H).
‘W’ Sets the time to trigger the warning for unsent data on payment documents and not
updated data on the level measuring system. Printed as a service receipt (immediately
after closing a fiscal receipt), which is not stored in the electronic journal.
‘c’ Disable/enable the FEED button functionality (‘1’: disabled, ‘0’: enabled). After the
printer is powered on, the button functionality is always enabled.
‘d’ Disable/enable returning optional text in the command response when an error occurs
(‘0’: disabled, ‘1’: enabled).
‘P’ Enable / disable automatic roll-up of paper in a container after each document. After
turning on the printer, the printer does not pick up the paper in a container. (Printers
SK1-21F and SK1-31F)
‘O’ Set time to automatically retract paper in a container after each printed and waiting to
takeout document. (Printers SK1-21F and SK1-31F)
‘I’ Allows reading the values previously set using command 43. Following the letter ‘I’,
there is exactly one other character matching one of the above.
Text Text, up to 48 characters, where:
If <Item> is a digit between ‘0’ and ‘7’: the text on the respective line.
If <Item> = ‘A’: a single ‘0’ or ‘1’ character, where ‘0’ disables and ‘1’ enables “invoice”
type formatting. If enabled, 4 lines are printed for each sale: name, unit price, quantity and price
with tax group.
If <Item> = ‘B’: a number setting the barcode height in pixels.
If <Item> = ‘C’: a single ‘0’ or ‘1’ character, where ‘0’ disables and ‘1’ enables automatic
receipt cutting.
If <Item> = ‘D’: the print density (between 1 and 5).
If <Item> = ‘E’: returns Enable,Rate, where Enable is the disable/enable flag and Rate is
the currently programmed exchange rate.
If <Item> = ‘F’: returns the current printer font.
If <Item> = ‘L’: returns Enable,H, where H is the height of the logo graphic and Enable is
the disable/enable flag.
If <Item> = ‘N’: a single ‘0’ or ‘1’ character, where ‘0’ disables and ‘1’ enables printing the
department name at the top of each fiscal receipt.
If <Item> = ‘Q’: returns Enable,Lines,Seconds, where Enable controls whether printing is
suppressed and Lines and Seconds are the limit values to start printing, in number of lines and
seconds.
If <Item> = ‘R’: returns the additional character spacing when printing a rotated service
receipt, in pixels.
If <Item> = ‘SIM’: a single ‘0’ or ‘1’ character indicating the SIM holder to be used (SIM0
or SIM1)—if SIM1 is populated, obviously.
If <Item> = ‘T’: a single ‘0’ or ‘1’ character, where ‘0’ disables and ‘1’ enables printing the
accumulated VAT on a normal (not extended) fiscal receipt.
If <Item> = ‘X’: a single ‘0’ or ‘1’ character, where ‘1’ disables and ‘0’ enables automatic
drawer opening for commands 53 (35H) and 70 (46H).
If <Item> = ‘W’: two parameters—<WarnTimeRec>,<WarnTimeGInfo>. Both times are
in minutes, between 10 and 1440 or 0. If it is zero, there is no warning.
If <Item> = ‘c’: a single ‘0’ or ‘1’ character, where ‘1’ disables and ‘0’ enables the FEED
button functionality.
If <Item> = ‘d’: a single ‘0’ or ‘1’ character, where ‘0’ disables and ‘1’ enables returning
optional text in the command response when an error occurs. For example: “command
response@error cause”.
If '<Item> =' P '- a '0' or '1' symbol with '0' prohibiting and '1' permitting automatic paper
retention, one ',' and '0' or '1' to indicate whether there is paper in the presenter (' 1'- has paper).
(Answer example: "0.1" - automatic paper picking disabled, and paper in the presenter.) (SK1-
21F and SK1-31F printers)
If '<Item> =' O '- Timing threshold for triggering of automatic retrieval of printed and
waiting to take document, possible values: 0 - automatic retraction disabled and 5 - 600 seconds
waiting. (SK1-21F and SK1-31F printers)
_
Fiscal printer programming interface Version1.00BG Page 16
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
GetP One character with value "P". Retracts a printed and waiting dokument in the inner container
(ONLY for models SK1-21F and SK1-31F). Possible answers "P" and "F".
_
Fiscal printer programming interface Version1.00BG Page 17
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
Text Text, up to 20 characters, sent directly to the display. Before the text, an upper line positioning
and clearing command is sent. The command is rejected, if a fiscal receipt is open and Sw1 is
OFF.
If the command is submitted without arguments, a sequential number of the sale from the Unique Sale ID
of the last issued fiscal receipt is returned. (example: 0001000).
If the command is submitted with the argument "*" returns the global number of the last issued fiscal
document and the Unique Sale ID (in the full format, example: DT000600-OP01-0001000) of the last
issued fiscal receipt. If the last issued document was a Storno document, there would be another field of
the Unique Sale ID on the document that was refunded. (example: 398554, DT000601-0001-0398101,
DT000601-0001-0203305)
After three wrong operator passwords are entered, the printer is locked and needs to be powered off and then
back on to continue to operate.
_
Fiscal printer programming interface Version1.00BG Page 18
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
Response: No data
L1 Text, up to 42 bytes, containing a line describing the sale
Lf One byte containing 0Ah.
L2 Text, up to 42 bytes, containing a second line describing the sale
Tab One byte containing 09h.
TaxCd One byte containing the letter indicating the tax type (‘A’, ‘B’, ‘C’, ...). There is a
restriction dependant on the Enabled_Taxes parameter which is set when the tax rates
are set using command 83.
Dept Department number. Integer between 1 and 60 inclusive. The sale is assigned to the tax
group associated with the department when it is programmed.
Sign One byte with a value of ‘-’.
Price This is the unit price, with up to 8 significant digits.
Qwan Optional parameter indicating the product quantity. By default, it is 1.000. Length, up to
8 significant digits (no more than 3 after the decimal point). The result of the
multiplication Price*Qwan is rounded by the printer to the number of decimal digits
set and also must not exceed 8 significant digits.
UN Name of the unit of measurement. Optional text for the unit of measurement for the
quantity, up to 8 characters, for instance, “kg”.
Perc This is an optional parameter indicating the value of the mark-up or discount (depending
on the sign), as a percentage of the current sale. The allowable values are between -
99.00% and 99.00%. Up to 2 decimal digits are accepted.
Abs This is an optional parameter indicating the value of the mark-up or discount (depending
on the sign), as an amount. A discount amount exceeding the value of the sale is not
allowed.
Only one of the Perc or Abs arguments is allowed.
The FP carries out the following actions:
If the sale is by department and it is enabled using command 43, subcommand ‘N’, the
department name is printed.
The text describing the sale is printed together with the price and tax group code. If a quantity is
set, the information for the quantity is also printed.
The product price is added to the accumulated sums in the RAM registers. In the event of an
overflow, the respective bits of the status field are set.
If there is a discount or mark-up, it is printed on a separate line and added to the printer registers
provided for this purpose. The values for the whole day are printed on the daily financial report.
If a department is indicated, the accumulated value is added to it. Mark-ups and discounts, if
any, are reported.
_
Fiscal printer programming interface Version1.00BG Page 19
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
SubTotal The sum until now for the current fiscal receipt (up to 10 bytes)
TaxA The sum under tax group A (up to 10 bytes)
TaxB The sum under tax group B (up to 10 bytes)
TaxC The sum under tax group C (up to 10 bytes)
TaxD The sum under tax group D (up to 10 bytes)
TaxE The sum under tax group E (up to 10 bytes)
TaxF The sum under tax group F (up to 10 bytes)
TaxG The sum under tax group G (up to 10 bytes)
TaxH The sum under tax group H (up to 10 bytes)
The sum of all sales entered in the fiscal receipt until now is calculated. Optionally, the sum may be printed
and/or displayed. The calculated sum and the sums accumulated until now for each tax group are sent to the PC. If a
mark-up or discount is specified, it is printed on a separate line and the accumulated sums under the tax groups are
adjusted accordingly.
_
Fiscal printer programming interface Version1.00BG Page 20
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
_
Fiscal printer programming interface Version1.00BG Page 21
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
Text Free text to print. The ‘#’ character is printed at the start and the end of the line. The text may be
with any length, but only the characters fitting on the line are used (without raising a truncation error).
The command allows optional font and line print attributes to be set:
Font Integer between 0 and 3:
0 32 dots (4 mm) height, higher letters
1 32 dots (4 mm) height, normal letters
2 24 dots (3 mm) height
3 16 dots (2 mm) height
Flags Between one and 3 letters: ‘B’, ‘H’ or ‘I’. Each may appear only once. Setting, respectively:
B Bold (strong)
H High (double height)
I Italic (oblique)
A fiscal receipt needs to be open. Otherwise, the text is not printed and S1.1 is raised.
_
Fiscal printer programming interface Version1.00BG Page 22
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
_
Fiscal printer programming interface Version1.00BG Page 23
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
The current printer date and time are displayed on the lower line of the display in the following format:
DD-MM-YY HH:MM:SS.
41h (65) INFORMATION ON THE SUMS UNDER TAX GROUPS FOR THE DAY
Data area: [Option]
Response: TaxA,TaxB,TaxC,TaxD,TaxE,TaxF,TaxG,TaxH
Option Specifies the information to return:
‘0’: Total sales.
‘1’: Accumulated VAT.
If the parameter is omitted, it is assumed to be ‘0’.
TaxX The sums under each tax group ‘A’, ‘B’, ‘C’, ... : 12 bytes with a sign.
Returns the sums under tax groups since the last closing time until the time the command is received.
_
Fiscal printer programming interface Version1.00BG Page 24
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
‘2’ A daily financial report without reset is run (i.e., no information is recorded in the
fiscal memory and the registers are not reset). The printout ends with the
“SERVICE RECEIPT” logo.
N This character at the end of data disables the clearing of accumulated data by operator
when a report with reset is run.
Closure The fiscal record number: 4 bytes.
FM_Total The sum of all non-VAT sales: 12 bytes with a sign
TotX The sums under each tax group ‘A’, ‘B’, ‘C’, … : 12 bytes with a sign.
A daily report without reset can be run also by pressing and holding the <FEED> button when the printer is
powered on until the second beep.
_
Fiscal printer programming interface Version1.00BG Page 25
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
If there are no data, the dates are 01-01-2000 00:00:00 and the minutes are 0.
If the minutes of Minfromfirstnotsuccesssent are more than 1440, the printer is blocked.
_
Fiscal printer programming interface Version1.00BG Page 26
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
Response: No data
Resumes receipt printing suppressed as a result of command 43, subcommand 'Q'.
Restore One byte with the following possible values:
0 After the end of printing, printing is reenabled—next data will be printed immediately.
1 After the print buffer is cleared, printing remains suppressed until the end of the receipt.
_
Fiscal printer programming interface Version1.00BG Page 27
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
53h (83) SET THE DECIMAL DIGITS, CURRENCY AND TAX RATES
Data area: [Multiplier,Decimals,Currency,EnabledT,TaxA,...]
Response: Multiplier,Decimals,Currency_name,EnabledT,TaxA,TaxB,TaxC,TaxD,…
Multiplier Multiplier: between 0 and 3, specifying the power of 10 before being multiplied by the
input or output number. Currently deactivated and not used.
Decimals This is one byte with a value between 0 and 2 specifying the decimal point position.
Currency The currency name. Up to 6 bytes.
EnabledT 8 bytes with possible values of ‘0’ or ‘1’ specifying whether the respective tax group is
disabled (‘0’) or enabled (‘1’).
TaxX The values of the tax rates.
If nothing is set in the data area, the FP returns the currently valid values.
If any parameter must be set, then the remaining parameters must also be set.
Setting new tax rates is only allowed before the first customer fiscal receipt for the day is issued.
Before fiscal registration, the command data are stored in the RAM only and can be changed any number of
times.
_
Fiscal printer programming interface Version1.00BG Page 28
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
Align One byte: 'L', 'R' or 'C': left-, right-aligned or centred, respectively. It is allowed only in the
two-dimensional barcodes. If the data are separated by ',', then they are printed as text as
well.
AllowN Optional parameter: one character with a value of '*'. If present, barcodes Code 128 and
ITF will be printed, if needed (longer data input), with a thin-line size of a single dot.
Please, bear in mind that this barcode printing is not standard-compliant, but most readers
can still read it. This way, the maximum length of the data input is doubled. The parameter
has no effect on the other barcodes.
The command prints a barcode. It is allowed only on an open fiscal or service receipt. The two-
dimensional barcodes can be printed left-, right-aligned or centred, while the one-dimensional barcodes can be
printed only centred. If the data are comma-separated, the information is additionally printed as text under the
barcode. If the data length or contents are invalid, the “Syntax Error” status bit is raised and the barcode is not
printed.
The height of the one-dimensional barcodes is set by command 43.
56H (86) READ THE DATE OF THE LAST RECORD IN THE FISCAL MEMORY
Data area: [<WithTime>]
Response: DT
WithTime Optional parameter: the 'T' character. If present, also returns the time of the last record.
DT The date (or date and time) of the last (latest) record in the fiscal memory, in the following
format:
DD-MM-YYYY
or
DD-MM-YYYY hh:mm:ss
_
Fiscal printer programming interface Version1.00BG Page 29
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
name is printed on the extended daily financial report with department printout (command 117) and,
optionally, at the top of each fiscal receipt.
_
Fiscal printer programming interface Version1.00BG Page 30
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
CountryStr String containing the name of the country. For instance, “BULGARIA”
The command can only be executed in service mode at the manufacturer’s facilities. The printer is delivered to
the customer with pre-set Unique Printer ID and Fiscal Memory ID.
If Result = ‘F’ and S1.1 is raised, the command is not executed, because the fiscal memory is not formatted or
the Unique ID is already set.
5Dh (93) OBTAIN INFORMATION ON THE DISCOUNTS AND MARK-UPS FOR THE DAY
Data area: No data
Response: <CntD>,<SumD>,<CntM>,<SumM>
CntD Number of discounts after the last Z-report.
SumD Sum of discounts after the last Z-report.
CntM Number of mark-ups after the last Z-report.
SumM Sum of mark-ups after the last Z-report.
The command calculates and prints a summary fiscal memory report. This report for the entire period of
operation of the fiscal printer can also be run by pressing and holding the <FEED> button when the printer is
powered on until the fourth beep.
With no data input, a report for the entire period of operation is printed.
_
Fiscal printer programming interface Version1.00BG Page 31
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
_
Fiscal printer programming interface Version1.00BG Page 32
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
Response: CanVd,TaxA,TaxB,TaxC,TaxD,TaxE,TaxF,TaxG,TaxH,Inv,InvNum
CanVd: Is a return possible (sale with a negative sign) [0/1]
TaxA: Accumulated sum under tax group A
TaxB: Accumulated sum under tax group B
TaxC: Accumulated sum under tax group C
TaxD: Accumulated sum under tax group D
TaxE: Accumulated sum under tax group E
TaxF: Accumulated sum under tax group F
TaxG: Accumulated sum under tax group G
TaxH: Accumulated sum under tax group H
Inv: Is an extended customer receipt open.
InvNmb: Number of the next invoice (10 digits).
Provides information on the accumulated sums under tax groups and whether already sold products can be
returned.
Prints information on the sales by operator. For each operator, prints the name, ID, number of fiscal receipts,
discounts, mark-ups, adjustments and the accumulated sums.
Sends a pulse to open the drawer. The parameter sets a new pulse length value, which is saved by the printer.
If the parameter is omitted, the last set value is used. After a memory RESET, the value is set to 15 ms.
Option One byte defining the type of requested operation. Depending on it, the
command may or may not require additional parameters. Possible values: ‘I’,
‘P’, ‘D’, ‘A’, ‘C’, ‘R’, ‘F’, ‘L’, ‘N’, ’X’, ’f’, ‘l’, ‘n’, ‘x’.
ErrorCode One byte indicating the result of the operation, with the following meanings:
‘P The command is successful.
‘F’ The command is unsuccessful.
Parameters Command data. Detailed below by <Option>.
‘I’ Article information
Syntax: <I>[@]
Response: Total,Prog,Len | <9>,<ProgrFTT>,<NameMaxLength>
@ Optional parameter to read the number of programmed fuel FTT codes and the
maximum number of characters for their names.
*Only for type 3 and 31 printers.
Total Total number of programmable PLUs (3000 for this printer).
Progr Number of programmed PLUs.
Len Maximum PLU name length.
ProgrFTT Number of programmed fuel FTT.
NameMaxLength The maximum number of characters for the FTT name.
‘P’ Program a PLU.
Syntax: <P><TaxGr><PLU>,<Group>,<SPrice>,[<Replace>]<Quantity>,<Name>
TaxGr Tax group (‘A’,’B’,’C’,’D’,’E’,’F’,’G’,’H’)
PLU PLU code (between 1 and 999999999)
Group Product group (between 1 and 99)
SPrice Unit price. Up to 8 significant digits.
Replace Optional parameter: one byte with a value of ‘A’. Changes the meaning of
the next parameter (Quantity).
Quantity Number with up to 3 decimal digits: the available quantity for this PLU. If
the parameter Replace is present, then the available quantity is replaced by
Quantity. Otherwise, it is added to the existing quantity (if the PLU is
_
Fiscal printer programming interface Version1.00BG Page 33
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
Response1:<P><FTT>,<TaxGr>,<Grp>,<SPrice>,<Total>,<Sold>,<Avail>,<FTTName>
<FTT> FTT number.
<Grp> It will always be 0.
<SPrice> Unit price. Floating-point number with the current decimal digits for the
printer.
<Total> Accumulated sum for the FTT.
<Sold> Sold quantity. Floating-point number with 3 decimal digits.
<Avail> It will always be 0.
<FTTName> FTT name. Up to 16 bytes.
_
Fiscal printer programming interface Version1.00BG Page 34
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
last PLU was read. The PLUs are returned sorted as numbers in ascending or descending order, depending on
the first sent command.
‘f’ Return the data on the first found PLU or FTT having sales.
Syntax: <f>[<PLU>] | <f@>
The data returned are like those for subcommand ‘R’. If the PLU parameter is set, the search
starts from it, in ascending order. Otherwise, it starts from 1.
‘l’ Return the data on the last found PLU having sales.
Syntax: <l[<PLU>]
The data returned are like those for subcommand ‘R’. If the PLU parameter is set, the search
starts from it, in descending order. Otherwise, it starts from 999999999.
‘n’ Return the data on the next found PLU or FTT having sales.
Syntax: <n> | <n@>
The data returned are like those for subcommand ‘R’.
The last three subcommands are used to download the data on all PLUs having sales for the day from the
PC. Subcommand ‘f’ or ‘l’ is sent followed by subcommand ‘n’ until the ‘F’ response is received meaning that
the last PLU was read. The PLUs are returned sorted as numbers in ascending or descending order, depending
on the first sent command.
‘X’ Find the first available (not programmed) PLU.
Syntax: <X>[<PLU>]
Response: PLU
If the PLU parameter is set, returns the first available (not programmed) PLU with a number higher than
or equal to it. If it is omitted, PLU=1 is assumed.
‘x’ Find the last available (not programmed) PLU.
Syntax: <X>[<PLU>]
Response: PLU
If the PLU parameter is set, returns the first available (not programmed) PLU with a number lower than or equal
to it. If it is omitted, PLU=999999999 is assumed.
Extended Optional parameter: one byte with a value of '*'. If present, returns all 11 additional
payment types.
Cash Paid in cash
Credit Credit
Debit Debit card
Cheque Paid by check
PayX Paid by one of the additional payment types
Closure Current (last) fiscal record
ReceiptNext fiscal receipt number
Returns information on the sum breakdown for the day by payment method.
_
Fiscal printer programming interface Version1.00BG Page 35
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
_
Fiscal printer programming interface Version1.00BG Page 36
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
7 ErrorCode[,CashP,CardP,CredP,CheqP,APayd1,...,APayd11]
Information on the amounts by payment type for the specified record or period.
8 ErrorCode[,DiscC,DiscS,MkUpC,MkUpS,VoidC,VoidS,CanC,CanS]
Information on the amounts by payment type for the specified record or period.
9 ErrorCode[,InC,InS,OutC,OutS]
Information on the amounts by payment type for the specified record or period.
10 ErrorCode[,GTotal,GVAT]
Information on the total sales and VAT before the specified Z-report.
11 ErrorCode[,FTT1,Name1,...,FTTn,Namen]
Information on the programmed fuel FTT and names for this Z-report. Only for type 3
and 31 printers.
12 ErrorCode[,FTT1,Vol1,S1,...,FTTn,,Voln,Sn]
Information on the sold quantities and accumulated sales for the programmed fuels for
this Z-report. Only for type 3 and 31 printers.
13 ErrorCode[,Disp1,...,Dispn]
Information on the programmed pumps for this Z-report. Only for type 31 printers.
14 ErrorCode[,Term1,VolAct1,Vol15C1,FL1,Tmpr1,...]
Information on the programmed pumps for this Z-report. Only for type 31 printers.
15 ErrorCode[,Nozzle1,Term1,CVal1,...]
Information on a programmed pump for this Z-report. Only for type 31 printers.
Rec2 Fiscal record number for type 1, 2 and 3 reports. For type 0, 4, 5, 6, 10, 11, 12, 13 and
14 reports, this field is empty. If the parameter is present, returns the data on the period
set by Rec1 and Rec2 for type 1, 2, 3, 7, 8 and 9 reports. For a type 15 report, the field
contains a pump number and not an end record.
ErrorCode One byte with a value of:
’P’ The data are valid.
‘F’ Invalid record checksum. No data.
‘E’ No such record exists. No data.
Closure Fiscal record number.
ClCnt Count of fiscal records.
VR Number of return bills from type „Return“.
VE Number of return bills from type „Operator error“.
VT Number of return bills from type „Tax base reduction“.
SR Number of sales in bills from type „Return“.
SE Number of sales in bills from type „Operator error“.
ST Number of sales in bills from type „Tax base reduction“.
DecRec Last (active) record with tax rates.
Dec Number of decimal digits for the specified Z-report record.
Enabled Enabled tax rates: 8 bytes with a value of ‘0’ or ‘1’ where ‘1’ means “enabled”.
Receipts Number of fiscal receipts.
PerX Tax rate for the respective tax group, as a percentage.
TotX Sales for the respective tax group.
NetX Net amount for the respective tax group.
TaxX VAT assessed for the respective tax group.
ResetRec Last RAM reset before this fiscal block.
KLEN EJ number for this fiscal block.
DT Date and time of the data in the following format: DD-MM-YY hh:mm:ss.
CashP Paid in cash.
CardP Paid by debit card.
CredP Paid by credit card.
CheqP Paid by check.
APaydx Additional payment types.
DiscC,DiscS Number of discounts and accumulated discount sum.
MkUpC,MkUpS Number of mark-ups and accumulated mark-up sum.
VoidC,VoidS Number of adjustments and adjustment total.
CanC,CanS Number of cancelled receipts and cancelled receipt total.
InC,InS Number of service deposits and total.
Out,OutS Number of service withdrawals and total.
GTotal Accumulated sales up to and including the specified daily report.
GVAT Accumulated VAT up to and including the specified daily report.
FTTi Programmed fuel FTT.
Namei Programmed fuel name.
Voli Accumulated programmed fuel sales volume.
Si Accumulated programmed fuel sales amount.
Dispi Programmed pump number.
Termi Programmed tank number.
VolActi Tank volume at current temperature.
_
Fiscal printer programming interface Version1.00BG Page 37
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
R If the character ‘R’ exists at the start of the data, the command returns the
contents of the respective graphic line in hexadecimal form.
RowNum The line being programmed. Number between 0 and 95.
Data Graphic data. Set as hexadecimals, two characters for each byte of information.
The data length is up to 72 bytes. If it is less than that, the data are automatically
padded with 00.
The command allows the user to enter an optional logo graphic with a size of up to 72x12mm (576x96 dots)
or 54x12 mm (384x96 dots) depending on the used thermal paper width. It is printed using command 43. The
same command is used to set its vertical size. To enter the entire logo, the command needs to be executed up to
96 times, once for each line. After a RAM reset, the logo is loaded from the flash memory. The logo
programmed using command 115 can be stored in the flash memory using command 41.
Address Start address (relative to the start of the fiscal memory): hexadecimal number
between 000000h and 1FFFFFh (for a 16-Mbit fiscal memory).
Bytes Number of bytes to return, decimal (between 1 and 64).
Data The hexadecimal contents of the requested fiscal memory block (2 characters for
each data byte).
The command returns the contents of a part of the fiscal memory. To read the entire fiscal memory, it needs
to be executed repeatedly with a different start address.
76h (118) DAILY FINANCIAL REPORT WITH DEPARTMENT AND PLU PRINTING
Data area: [<Option>[N]]
Response: Closure,FM_Total,TotA,TotB,TotC,TotD,TotE,TotF,TotG,TotH
The command is identical to 69 (45h) from the previous version, the only difference being that, at the top
of the daily report, it additionally prints the departments having sales for the day and the PLUs with codes between
1 and 40, if they have sales. Command 69 is left unchanged. Commands 69, 108, 117 and 118 with option ‘0’ (daily
financial report with reset) reset the accumulated department data as well.
_
Fiscal printer programming interface Version1.00BG Page 38
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
Type EJ operation command class. One byte with the following allowed values:
'C' Check the validity of the EJ or a part of it.
'I' EJ information.
'N' Read the next text line from the EJ.
'R' Read EJ data.
'P' Print EJ data.
Class 'C' commands: Verify EJ data.
P[#] Prints report on the validity of all SHA-1 checksums for the Z-reports found in the
EJ. It compares the EJ and fiscal memory SHA-1 checksums. For each mismatch,
prints one line with the Z-report number, date and time. If the optional character '#'
is present, prints information on each found SHA-1, valid or not.
R[<Num>] Returns EJ information for the Z-report number Num. The data from the specified Z-
report are read as a document. Response format:
P,FDocs,DT,SK Information on the found Z-report:
FDocs Document number of the Z-report.
DT Date and time of the report in the “DD-MM-YYYY hh:mm:ss” format.
SK 40 characters: hexadecimal SHA-1 of the Z-report.
F No EJ data are found for this Z-report.
Z[<Num>] Returns EJ information for the Z-report number Num. Reads the actual text of the
documents stored in the EJ, calculates the SHA-1 and compares it to the SHA-1
from the Z-report. The command can take a long time to complete, if there are many
documents in the daily report. Possible responses:
P,Docs,Bytes,SK The checksum is valid. Docs documents and Bytes data bytes are read. SK is
40 characters: the hexadecimal checksum.
F,Docs,Bytes,SK,SZ The checksum is invalid. Docs documents and Bytes data bytes are read. SK
and SZ are 40 characters each: the EJ checksum and the calculated
checksum, respectively.
F No EJ data are found for this Z-report.
Class 'I' commands: EJ information.
[X] The 'I' character may be followed by nothing or the letter 'X'. Returns the following
information:
P,Tot,Used,C1,C2,D1,D2
Tot Total journal size in bytes.
Used Used journal size in bytes.
C1 First Z-report number in the EJ.
C2 Last Z-report number in the EJ.
D1 First document number in the EJ.
D2 Last document number in the EJ.
Class 'R' commands: Read EJ data.
[#<Flg>,]<D1>[,<D2>] Returns the first line of document number D1 and sets the end of search on
document D2 (inclusive). The next lines are retrieved by sending command
class 'N'. If the second argument is omitted, only one document is selected:
D1.
[#<Flg>,]*<Cl>[,<D1>[,<D2>]] Returns the first line of document number D1 for a Z-report Cl and
sets the end of search on document D2 (inclusive) for the same Z-report. The
next lines are retrieved by sending command class 'N'. The document
counter is for the Z-report, i.e., command “*5,1,3” will select only the first
three documents of Z-report number 5. If D2 is omitted, only one document
is selected: D1. If both D1 and D2 are omitted, all documents for the Z-
report are selected.
<Flg>,<DT1>,<DT2> Returns the first line of the document with date and time DT1 and sets the
end of search on document with date and time DT2 (inclusive). A filter is
applied to the selected documents, depending on the Flg argument. The next
lines are retrieved by sending command class 'N'. Input argument format:
Flg Character specifying the document type to be selected for reading:
'A' All document types.
'F' Fiscal (customer) receipts.
'V' Refund (storno) receipts.
'C' Cancelled (customer) receipts.
'N' Service receipts.
'I' Service deposit receipts.
‘O’ Service withdrawal receipts.
_
Fiscal printer programming interface Version1.00BG Page 39
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
_
Fiscal printer programming interface Version1.00BG Page 40
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
'Z' Z-reports.
DT1 Report start date and time in the DDMMYY[hhmmss] format. If the time is
omitted, “000000” is assumed, i.e., 00:00:00.
DT2 Report end date and time in the DDMMYY[hhmmss] format. If the time is
omitted, “235959” is assumed, i.e., 23:59:59.
The previous three subcommands (by document, Z-report and date) return, as a result, the number of
printed documents as an integer.
The copy of the document from the EJ is almost identical to the original document. The differences are:
The copies never have a logo graphic before the header.
The fiscal logo graphic is not printed anywhere on the copies.
The “FISCAL RECEIPT” text with the fiscal logo is replaced by the double-width “ FISCAL
RECEIPT—COPY” text.
INFORMATION ON THE APPEARANCE OF THE TEXT RETURNED WHEN READ FROM THE EJ
The read documents have no logo graphic.
Centre aligned text is rendered by adding spaces to the left of the line.
Double-width printing is rendered by adding a space before each letter.
If a barcode is present anywhere in the fiscal or service receipts, it is replaced by the “ БК [XXXX]” text,
where XXXX is the text information from the barcode.
The read line contains only text, without the <CR> and <LF> characters at the end of the line. When text
information is retrieved from the EJ, these characters need to be added at the end of each line in the same
sequence. If this is done, an external program can calculate the SHA-1 checksum and compare it to the one
stored in the EJ—they should match.
The line returned with the '*' prefix (end of document) also needs to be added to the file (as an empty line
containing only the <CR> and <LF> characters), because it is included in the SHA-1 for the Z-report.
where:
“U” report: Structured information on the receipt. Once on the receipt.
UNP Unique Sale ID. 21 characters with the XXXXXXXX-YYYY-NNNNNNN format.
OperNum Operator ID. Between 1 and 16.
TillNum Cash register location number. Up to 5 digits.
RecType Receipt type: 0: fiscal; 1: invoice; 2: reversal; 3: credit note; 4: cancelled.
DocNum Global document number.
“V” report: Structured decimal digit and tax rate information. Once on the receipt.
DecRecTax rate record number in the FP. Counted starting from 1.
Decimals Decimal digits. 0 or 2.
TaxRateX Decimal rate X as a percentage.
“R” report: Structured sale or adjustment information. Can appear multiple times on the receipt.
TaxGrPos Tax group (between 1 and 8).
TaxRate Tax rate as a percentage.
SinglePrice Unit price. Negative for adjustments.
_
Fiscal printer programming interface Version1.00BG Page 41
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
“M” report: Structured group discount/mark-up information. Can appear multiple times on the receipt.
Discount_MarkUp Discount/mark-up (depending on the sign).
PercentDiscount/mark-up percentage. The field can be empty, if it is included in a total.
Subtotal Subtotal after the operation.
“T” report: Structured information on the accumulated sums on the receipt. Once on the receipt.
DiscCnt Number of discounts.
DiscSum Discount total.
MarkUpCnt Number of mark-ups.
MarkUpSum Mark-up total.
VoidCnt Number of adjustments.
VoidSum Adjustment total.
SalesCnt Number of mark-ups.
Total Receipt total.
TotGrX Tax group total.
“S” report: Structured reversal receipt information. Not present in the fiscal receipts. Once on the
receipt.
StornoType Reversal type: 0: operator error; 1: return/claim; 2: tax base reduction
StornedDocNo Reversed document number.
StornedDT Reversed document date and time in the DD-MM-YYYY hh:mm:ss format.
StornedFMIN Fiscal memory ID of the reversed document.
StornedUNP Unique Sale ID of the reversed document.
StrornedInvoice Invoice number. If not a credit note, contains 0.
Type “D” report: Receipt start and end date and time.
StartDT Start date and time in the DD-MM-YYYY hh:mm:ss format.
The date printed on the document.
EndDT End date and time in the DD-MM-YYYY hh:mm:ss format.
_
Fiscal printer programming interface Version1.00BG Page 42
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
where:
“u” report: Structured information on the receipt. Once on the receipt.
SerialNum Printer serial number.
RecType Receipt type: 0: fiscal; 1: invoice; 2: reversal; 3: credit note; 4: cancelled.
DocNum Global document number.
UNP Unique Sale ID. 21 characters with the XXXXXXXX-YYYY-NNNNNNN format.
“r” report: Structured sale or adjustment information. Can appear multiple times on the receipt.
The information returned is the same as in “R” above.
“t” report: Structured information on the accumulated sums on the receipt. Once on the receipt.
Total Receipt total.
TotGrX Tax group total.
“s” report: Structured reversal receipt information. Not present in the fiscal receipts. Once on the
receipt.
The information returned is the same as in “S” above.
+ Optional symbol "+". When it is available, the date and time of the document are added in the
format: "DD-MM-YYYY HH: MM: SS + pasted tab symbol".
ErrorCode[,Data]
_
Fiscal printer programming interface Version1.00BG Page 43
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
Address Start address (relative to the firmware start): hexadecimal number between
00000h and 6FFFFh.
Bytes Number of bytes to return, decimal (between 1 and 64).
Data The hexadecimal contents of the requested fiscal memory block (2 characters for
each data byte).
The command returns the contents of a part of the firmware. To read the entire firmware, it needs to be
executed repeatedly. The command is available in service mode only!
_
Fiscal printer programming interface Version1.00BG Page 44
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
The command closes the receipt. If there are any pending lines, they are printed automatically before the
receipt is closed.
The command will not be executed, if rotated service text print receipt is not open.
The command is allowed only with a service jumper installed. Used for initial EJ formatting. Allowed
only for a non-fiscally registered printer or an unformatted EJ. The command will not be executed, if the EJ has
already been formatted, even in service mode (since it would destroy any data accumulated in it). If a new
empty EJ is installed, it will be assigned a sequential number and enabled for operation, however, after that, the
old EJ will be write-protected and can be used only to print and read reports.
If the modem is busy (sending data) when the command is sent, it may take longer than usual to
complete—it will wait for the modem to complete its task.
_
Fiscal printer programming interface Version1.00BG Page 45
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
The data in this command are used for the tax terminal—to set it up and read data from it. The command is
used to load all data required for the operation of the built-in terminal. The printer carries out additional actions
only in the following cases:
Successful printer registration and deregistration with the NRA.
Successful change of the NRA data.
Successful service agreement registration.
The command is disabled before the fiscal registration of the printer.
The printer verifies the status of the tax terminal and does not allow fiscal receipts to be issued, if the printer
is fiscally set up but not registered.
_
Fiscal printer programming interface Version1.00BG Page 46
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
APPENDIX 1
_0 _1 _2 _3 _4 _5 _6 _7 _8 _9 _A _B _C _D _E _F
0_ 0 @ P ` p А Р а р А Р а р
1_ ! 1 A Q a q Б С б с Б С б с
2_ “ 2 B R b r В Т в т В Т в т
3_ # 3 C S c s Г У г у Г У г у
4_ $ 4 D T d t Д Ф д ф Д Ф д ф
5_ % 5 E U e u Е Х е х Е Х е х
6_ & 6 F V f v Ж Ц ж ц Ж Ц ж ц
7_ ‘ 7 G W g w З Ч з ч З Ч з ч
8_ ( 8 H X h x И Ш и ш И Ш и ш
9_ ) 9 I Y i y Й Щ й щ Й Щ й щ
A_ * : J Z j z К Ъ к ъ К Ъ к ъ
B_ + ; K [ k { Л Ы л ы Л Ы л ы
C_ , < L \ l | М Ь м ь М Ь м ь
D_ - = M ] m } Н Э н э Н Э н э
E_ . > N ^ n ~ О Ю о ю О Ю о ю
F_ / ? O _ o П Я п я П Я п я
_
Fiscal printer programming interface Version1.00BG Page 47
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
APPENDIX 2
_
Fiscal printer programming interface Version1.00BG Page 48
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
_
Fiscal printer programming interface Version1.00BG Page 49
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
APPENDIX 3
_
Fiscal printer programming interface Version1.00BG Page 50
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
APPENDIX 4
Value Description
_
Fiscal printer programming interface Version1.00BG Page 51
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700
_
Fiscal printer programming interface Version1.00BG Page 52
DATECS FP-800 / FP-2000 / FP-650 / SK1-21F / SK1-31F/ FMP-10 / FP-700