FP 700 en
FP 700 en
FP-1000/700
PROTOCOL DESCRIPTION
DESCRIPTION OF THE PROGRAM INTERFACE OF FP-1000/700 2
Version 1.00xx, where xx is the code of the country, where the device will operate:
EN - England
BG - Bulgaria
UA - Ukraine
LT - Lithuania
RO - Romania
RU – Russia
CG – Montenegro
INTRODUCTION
The fiscal device operates under the control of an application program, with which communicates via the
RS232 serial connection. The device executes a previously set of wrapped commands, arranged according to the
type of the operations which have to be executed. The application program does not have a direct access to the
resources of the fiscal device although it can detect data connected with the status of the fiscal device and the
fiscal memory.
Each concluded sale can be related to a certain taxation category (VAT) defining a tax rate, applicable to the base
price used for the formation of the sale price. The fiscal printer can operate with a maximum of 8 taxation categories, which
are most often indicated with the first letters of the language of the country, where the fiscal printer is used-in the case of
Bulgaria these letters are А, Б, В, Г, Д, Е, Ж, З. The Latin letters („A‟, „B‟, „C‟, „D‟, „E‟, „F‟, „G‟ и „H‟)are acceptable only
as input parameters.
Each of the taxation groups has a set tax rate (in percent) which is expressed by a number not greater than 99.00
and by no more than two digits after the decimal point.
Part of the four standard categories may be forbidden by using Enabled_taxes in the 83(53H) command.
The commands for registering sales read the said four letters as a parameter.
The status of the fiscal device can differ. Shifting from one to another condition is not always possible. The control
of the printer and the shifting between the different functions - when this is possible - is executed by the application program
Host (PC), which must relate to the included protocol. If this protocol is not applied correctly the printer might enter into an
undesirable status or to skip a given functional status, leading to an ERROR.
A) INITIAL STATUS
This is the functional status in which the date and the hour are set, the number of the fiscal memory is
entered as well as the serial number and the code of the country where the device will be operated.
THE ABOVE-DESCRIBED OPERATIONS ARE PERFORMED PRIOR TO SELLING THE DEVICE TO THE
CLIENT ONLY BY AN AUTHORISED SERVICE SPECIALIST!
DESCRIPTION OF THE PROGRAM INTERFACE OF FP-1000/700 3
The following commands must be performed in the order in which they are presented: 61 (3DH) and 91
(5BH).
This is the state in which the name of the currency is entered, the number of the digits after the decimal point
and the tax rates. After performing these operations the fiscal printer is ready for delivery to the future operator
(owner). This is also the status in which the device is kept in the warehouse of the manufacturer.
Command 83 (53H) has to be performed.
In this functional state the header and the footer are set - the beginning and the end of each receipt. The
header contains information on the owner (name of the company, address etc.) while the footer is usually a short
advertisement text.
The command 43 (2BH) is performed as many times as is the number of printed lines.
D) TUTORIAL MODE
The fiscal printer is in this status prior to fiscalization. Receipts can be issued but it must be born in mind that they
will bear the mark “non-fiscal”. The generation of a daily turnover report with clear but it will not be saved into the fiscal
memory. A tax registration number is also entered but not into the fiscal memory and is subject to change. The clearing of the
memory does not cause an entry in the fiscal memory. The clock may be set arbitrarily.
In tutorial mode the fiscal printer can not be used in commercial places - its purpose is for training.
E) A FISCALIZED PRINTER
In this functional status fiscal receipts may be issued and they will be marked “fiscal”. The daily report and clear(Z-
отчет or Z-report) is registered in the fiscal memory and the setting of the date is possible only ahead in relation to the last
entry in the fiscal memory. The tax registration number is registered in the FM and cannot be changed from this point on. It is
IMPOSSIBLE for the printer to exit the fiscal mode without changing the fiscal memory.
The ЕИК (EIK - Unified Identification Code) number of the owner of the device must be known prior to
fiscalization. Command 98 (62H) after which the command 72 (48H) must be executed.
This is the status of the printer when a serious technical or logical mistake has occurred as well as in case of fiscal
memory failure or „КЛЕН”(KLEN). After switching ON the device in this mode a bold sign ““ФАТАЛНА ГРЕШКА: 4”
(„FATAL ERROR: 4”) appears. The printer does not perform commands for opening fiscal receipts as well as documents,
which save data entries into the fiscal memory. Only diagnostic commands and periodic reports can be executed. Clearing the
RAM and placing a new fiscal memory module must be performed because the module used before the error is now switched
to the READ ONLY mode. ALL THESE OPERATIONS MUST BE PERFORMED BY AN AUTHORIZED SERVICE
SPECIALIST.
The events, which can bring the printer to this state, are:
- Impossibility to make a correct entry in the fiscal memory;
- Invalid control sum, EIK, serial number, reg. No. of the fiscal memory or some of the entries which
contain the tax rates.
- Unidentified format of the fiscal memory module;
- If during the fiscal memory check up (immediately after switch ON) more than three invalid control
sums from a daily report fiscal entry are found.
- No communication with KLEN or locked one
- Filled up KLEN. It is unlikely to come given its size.
“Power” indicator
-Be on continuously: printer is ready
-Blinks steady, 2 times in a second: the printer is executing a long command. You have to wait.
“Error” indicator
- No lighting: device is in normal operating mode.
- Activated continuously: when there is no paper in the device.
- Blinks steady, 2 times in a second: overheating of the printer head. Goes out when the error is cleared.
- Activated continuously with a short blink in approximately two seconds: no communication with
KLEN. The printer can be turned on and off for KLEN reset. If this action does not help, a service
DESCRIPTION OF THE PROGRAM INTERFACE OF FP-1000/700 4
technician is needed.
- Activated continuously with two short blinks in approximately two seconds: no communication with
the fiscal memory, a service technician is needed.
DIP SWITCHES
The current status of the device is coded in field 6 bytes long which is sent within each message of the fiscal
printer. Description of each byte in this field:
The status of the printer at each particular moment is reflected in the so-called “status bytes”. The application
program must get information on the status of the printer when switched ON after a power cut-off. This is
performed by the commands 76 (4AH) and 103 (67H).
The application program must make a decision on the future behavior of the printer depending on its current
status. It is guaranteed that the fiscal memory will not be affected by the power failure as well as that all
accumulated sums in the operational memory of the device will be valid. If the power cut-off has occurred during
a printing session, when switched ON, again the printer will print a line containing the text “* POWER DROP *”
(“*СПАД НАПРЕЖЕНИЕ*”)in an expanded bold type and will then complete the print.
A) NON-FISCAL RECEIPTS
The receipt is first opened, a text is then printed and the receipt is closed. The commands 38 (26H) are
used, an indefinite number of times the command 42 (2AH) and 39 (27H).
B) FISCAL RECEIPTS
A fiscal receipt is first opened, the sales are registered, payment is performed and the receipt is finally closed.
The following commands are used: 48 (30H), 49 (31H), 51 (33H), 52 (34H), 53 (35H), 54 (36H), 56
(38H) and 58 (3AH). At the end of the day a daily financial report and clear are performed in order to enter
and save the accumulated information in the fiscal memory. The function is started with the command 69 (45H).
This printer remember every line from the fiscal receipts, official receipts, documents with service information from
the initialization, X and Z reports in the KLEN. KLEN is with capacity of maximum 2 GB and during normal
operation must be able to store all data coming from printer‟s work until the fiscal memory is filled up. In case of
damage or filling up (really active work with the printer) KLEN can be replaced with an empty one and the old
card to be stored for further reference.
Two flags from the status bytes warn for coming end of KLEN (only 10MB free) and end of KLEN (1MB free).
If the flag “End of KLEN” is set the next commands are prohibited: 38 (Opening a non-fiscal receipt), 42 (Printing
non-fiscal free text), 48 (Open fiscal receipt (invoice)), 49 (Registration of sales), 52 (Registration and display), 54 (Print a
free fiscal text), 58(Registering the sale of an item) и 84 (Barcode printing), 122 (Open non-fiscal receipt with rotated text),
123 (Printing rotated text 90 degrees).
GENERATING REPORTS
Reports are generated singularly by the fiscal printer upon receiving the respective command from the PC. In
these reports the user‟s program will not add any changes to the appearance and content of the reports, i.e.,
they appear exactly as they have been defined in the fiscal printer. The following commands are used for the
generation of reports:
50 (32H) - Report on changes in tax rates and decimal points
69 (45H) - Daily financial report with or without clear
79 (4FH) / 95 (5FH) - Short financial report from date to date /from number to number of the respective
fiscal entries
73 (49H) / 94 (5EH) - Detailed fiscal memory report by closure number / by date of entry.
81 (51H) - report of the fiscal memory by months
The fiscal printer performs the commands sent by the Host and returns messages, which depend on the
result.
The fiscal printer cannot instigate asynchronous communications itself. Only responses to commands from the Host
are sent to the Host. These messages are either wrapped or single byte control codes. The fiscal printer maintains the
communication via the RS232 serial connection at baud rates of 1200, 2400, 4800, 9600,
19200, 38400, 57600 and 115200 b/s, 8N1. The baud rate is set by adjusting the configuration bits 1,2 and 3.
Supported is and a USB connection which is activated automatically after connecting the printer to the PC
through USB cable.
D) WRAPPED MESSAGES
Where:
<01> Preamble.
1 byte long. Value: 01H.
<LEN> Number of bytes from <01> preamble (excluded) to <05> (included) plus the fixed offset of
20H.
Length: 1 byte. Value: 20H - 7FH.
<SEQ> Sequence number of the frame.
Length : 1 byte. Value: 20H – FFH.
The fiscal printer saves the same <SEQ> in the return message. If the FP gets a message with
the same <SEQ> as the last message received it will not perform any operation, but will repeat
the last sent message.
<CMD> The code of the command.
Length: 1 byte. Value: 20H - 7FH.
The fiscal printer saves the same <CMD> in the return message. If the printer receives a
nonexisting code it returns a wrapped message with zero length in the data field and sets the
respective status bit.
<DATA> Data.
Length: 0-213bytes for Host to printer, 0-218 bytes for Printer to Host. Value: 20H – FFH ; .
The format and length of the field for storing data depends on the command. If the command
has no data the length of this field is zero. If there is a syntax error the respective status bit is
established in the data and a wrapped message is returned with zero field length.
<04> Separator (only for printer-to-Host massages)
Length: 1 byte. Value: 04H.
<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> Control sum (0000H-FFFFH)
Length: 4 bytes. Value of each byte: 30H-3FH.
The sum includes between <01> preamble (excluded) to <05>. Each digit from the two bytes
is sent after 30H is added to it. For example the sum 1AE3H is presented as 31H, 3AH, 3EH,
33H.
<03> Terminator
Length: 1 byte. Value: 03H.
This section contains a list of the fiscal printer commands arranged in groups depending on their functions:
INITIALIZATION
29H (41) Saving the settings of the configuration switches and graphic logo in the flash memory
2BH (43) Setting the HEADER and the FOOTER and printing options
3DH (61) Date and hour
48H (72) Fiscalization
53H (83) Setting the multiplier, decimal points, name of currency and tax rates.
55H (85) Setting the additional methods of payment
5BH (91) Programming the manufacturer‟s serial number, the number of the fiscal module and the
number of the country
5CH (92) Programming the number of the fiscal memory
60H (96) Set tax rates.
62H (98) Setting of ЕИК (ЕИК - unified identification code)
65H (101) Entering the operator‟s password
DESCRIPTION OF THE PROGRAM INTERFACE OF FP-1000/700 8
SALES
30H (48) Opening a fiscal receipt
33H (51) Subtotal
34H (52) Registering a sale and showing it on the screen
35H (53) Sum calculation (tender).
36H (54) Printing a free fiscal text
38H (56) Closing a fiscal receipt
39H (57) Cancellation a fiscal receipt
3AH (58) Registering an item sale
54H (84) Barcode printing
6DH (109) Printing a duplicate receipt
DAILY CLOSURE
45H (69) Daily financial report
REPORTS
32H (50) Report on changed tax rates and decimal points through the period
49H (73) Detailed report of the fiscal memory (from number to number)
4FH (79) Short report of the fiscal memory (from date to date)
51H (81) Monthly Report for the entire period of operation
5EH (94) Detailed report of the fiscal memory (from date to date)
5FH (95) Short report of the fiscal memory (from number to number)
69H (105) Operator‟s report
6FH (111) Items report
INFORMATION TO HOST
3EH (62) Read date and the hour
40H (64) Information on the last fiscal entry
41H (65) Information for sums(for the day)
44H (68) Number of the free entries in the fiscal memory
4AH (74) Receiving the status bytes
4CH (76) Status of the fiscal transaction
56H (86) Reading the data of the last memory record
5AH (90) Return diagnostic information
61H (97) Receiving the tax rates
63H (99) Tax registration number
67H (103) Information on the current receipt
6EH (110) Receiving information on the sums arranged according to the type of payments
70H (112) Receiving information on the operator
71H (113) Receiving information on the last printed document
72H (114) Receiving information on a fiscal entry or selected period.
74H (116) Reading a fiscal memory block.
DISPLAY
21H (33) Clearing the display.
23H (35) Showing a text (lower line)
28H (40) Showing a text (upper line).
2FH (47) Showing a text (upper line).
3FH (63) Showing the date and the hour.
4EH (78) Showing a text (lower line).
64H (100) Display - full control.
OTHERS
26H (38) Opening a non-fiscal receipt.
27H (39) Closing a non-fiscal receipt.
2AH (42) Printing text of a non-fiscal receipt.
46H (70) Office cash-in and cash-out.
47H (71) Print diagnostic information.
DESCRIPTION OF THE PROGRAM INTERFACE OF FP-1000/700 9
SERVICE COMMANDS
80H (128) Service reset the RAM.
85H (133) Disable printing.
86H (134) Service maintenance of KLEN/КЛЕН (KLEN – Electronic journal)
A clear display command is sent. If a fiscal receipt is opened and SW4 is OFF only the lower line is cleared.
Allreceipt The number of all issued receipts (fiscal and non-fiscal) from the last daily closure on (4
bytes).
ErrCode Error code when the command is unsuccessful /1 byte/.
TEXT Text up to 20 characters, that is sent directly to the display. Before text sends a command to clear and positioning
upper line. The command is rejected, if is open fiscal receipt and Sw4 is on position OFF.
DESCRIPTION OF THE PROGRAM INTERFACE OF FP-1000/700 10
29H (41) SAVING THE SETTINGS OF THE CONFIGURATION SWITCHES ON THE FLASH MEMORY
This printer does not have hardware switches and software ones are used. Besides this the command stores on the
flash memory and the graphical logo, height of the barcode, printing density and duration of the pulse for drawer kick-out. In
case of RAM reset the default values stored on the flash memory are restored.
If no data is send with this command, the previous values of the “switches” are not changed, but the other data is
saved.
ATTENTION! Switches are counted from right to left!
This command stores the following data in the non-volatile flash memory:
Header и footer (from command 43).
The text of the additional types of payment (from command 85).
The graphical logo (from command 115).
Printing options (from command 43).
Configuration switches.
In case of RAM reset the default values stored on the flash are restored.
HEADER consists of 6 lines of text, which are printed at the beginning of each fiscal and non-fiscal receipt. The
printer will function normally only when at least two “header” lines have been programmed for printing.
FOOTER consists of 2 lines of text printed at the end of each receipt.
HEADER and FOOTER are automatically center aligned.
This command must be fulfill to 8 times, to set all lines on HEADER and FOOTER.
only one more symbol follows which coincides with some of the above.
The command causes the cutting off of the printed, ready document. It must be considered that the program must
advance the paper with at least two lines or the document will not be cut off correctly. If the printer is in the “automatic cut
off” mode it positions the paper itself and the command becomes redundant.
When the printing mechanism blocks for some reason, the paper roll must be taken out of the cutter
mechanism and the command must be executed again. This will position the blade in the extreme right-end of
the mechanism.
Text A text of 20 symbols which is sent directly to the display. Prior to this a command for the
positioning and clearing of the upper line. If a fiscal receipt is opened and SW1 is OFF the
command is rejected.
After entering three wrong operator‟s passwords the printer blocks and must be switched off and ON again to
restart operating.
= PAA,BB,CC,DD,DDMMYY if rates have been found, where „P‟ means „PASS‟ after which the active rates are
listed out as well as the date of their entry.
If there are unused groups (closed with Enabled_rates) for them instead of a rate in percent a „DT‟ is returned
(Disabled tax).
The command prints a report on the changes made in the decimal points and tax rates during the selected period.
33H(51) SUBTOTAL
Print One byte, which if „1‟ the sum of the subtotal will be printed out.
Display One byte which if „1‟ the sum of the subtotal will appear on the display.
Perc A non-mandatory parameter which shows the value of the discount or surcharge in percent
over the sum accumulated so far.
Abs A non-mandatory parameter which shows the value of the discount or surcharge as an
amount (up to 8 significant digits). It is not aloud a surcharge bigger than the sale.
SubTotal The sum accumulated for the current fiscal receipt (10 bytes).
TaxA The sum over tax group A/10 bytes/
TaxB The sum over tax group B/10 bytes/
TaxC The sum over tax group C/10 bytes/
TaxD The sum over tax group D/10 bytes/
TaxE The sum over tax group E/10 bytes/
TaxF The sum over tax group F/10 bytes/
TaxG The sum over tax group G10 bytes/
TaxH The sum over tax group H/10 bytes/
The sum of all sales registered in the fiscal receipt is calculated. If necessary the sum may be printed out
and/or brought out on the display. The calculated total sum and the accumulated separate sums for each tax
group are returned to the PC. If a discount or surcharge is entered it is printed out on a separate line and the
accumulated sums over the different tax groups are respectively corrected.
Perc This is a non-mandatory parameter showing the value of the surcharge and discount
(depending on the sign) in percent over the current sale. Possible values are between
-99.00% to 99.00%.
Abs This is a non-mandatory parameter showing the value of the surcharge and discount
(depending on the sign) as an amount. It is not acceptable a discount with value higher than
the value of the sale.
This command starts the calculation of the sums from the fiscal receipt, the printing of the sum with a special font
and showing the result on the display. An additional text may also be printed. When the command has been successfully
executed a further command for opening a cash drawer is activated, if that is permit with sub command „X‟ on command 43.
If there is no more data after the symbol <Tab> the printer will automatically pay out the whole available sum in cash.
DESCRIPTION OF THE PROGRAM INTERFACE OF FP-1000/700 14
After the successful completion of the command the fiscal printer will not perform the commands 49 and 51 within
the opened receipt although it can still perform command 53.
This command is accessible only over opened fiscal receipt and only before the execution of 53 (Total). Causes
canceling of all accumulated sums in the receipt. With a double width is printed a message “=АНУЛИРАНО=”
(“=ANNULATED=”) and the receipt ends with a message “ФИСКАЛЕН БОН” (“FISCAL RECEIPT”).
contains the final price together with the letter, designating the tax group from which the sale will be
performed. The registries for accumulated sums and item quantities are updated.
- The price of the item is added to the accumulated sums in the registries of the operational memory.
In case of overflows the respective bytes from the status field will be set.
- If there is a discount or surcharge it is printed out on a separate line and is added in specially selected
registries in the printer. The values from the whole day will be printed together with the daily financial
report.
You cannot set a date which is earlier than the date of the last entry into the fiscal memory or KLEN of the device.
The last acceptable year is 2099. After RESET of the memory this command must be executed -
otherwise the normal functioning, after that is executed RESET and write on fiscal memory. The printer‟s real-time clock
must always be set correctly.
It not possible to set the date and time earlier than the last printed document, written in KLEN(electronic journal).
Current date and time are displayed on lower line using the format: DD-MM-YY HH:MM:SS.
ErrCode:
- „P‟ - The command is succesfull
- „F‟ - The last record cannot be read
Response: Logical,Physical
The number of free fields in the fiscal memory, reserved for saving information from the daily report with clear(Z-
report).
N - The presence of this symbol at the end of the data cancels the option to clear the data
accumulated on the operators during a report with clear.
a - The presence of this symbol at the end of the data prohibits clearing of accumulated data items in a report with clear.
A daily report with no clearing can be executed and by holding the <FEED> button, at turning on, until the second
sound signal.
Changes the content of the cash availability register. Depending on the sign of the sum in question it is
accumulated in the register for interior debit-credit. The information is not saved in the fiscal memory of the
device and is accessible until the performance of the daily closure. It is printed out at the command 69 (45h)
and at the generation of the daily report without closure from the printer itself. At the successful completion of this command
the drawer “kick-out” function is activated (if it is permitted wit subcommand 'X' of command 43.
47H (71) PRINTING DIAGNOSTIC INFORMATION
The command initiates the generation of an interior receipt containing diagnostic information as follows:
- Prints the date and the version of the employed software,
- Prints the control sum of the employed firmware,
- Prints the serial port‟s baud rate,
- Prints out the status of the configuration keys and the number of the country
- Prints emergency time after power supply cut-off,
DESCRIPTION OF THE PROGRAM INTERFACE OF FP-1000/700 17
- Prints the number, date and hour of the last reset of the RAM (if there is such),
- Prints the current temperature of the two printer heads,
- Prints the overall number of fields in the fiscal memory and the number of the free fields,
- Prints the current date and hour.
The command will not be executed when there is an open receipt in progress or when the paper roll has
finished. It may also be activated by pressing the <FEED> button while power on.
Serial The serial number of the device - it must be the number entered with command 91 (5Bh).
Status 5.3 is used to verify whether the command has been successfully executed.
ErrCode Error or „P‟ code when the action has been successful.
The command will not be executed (and an error code will be set) if:
- The serial number is invalid,
- The printer has been fiscalized,
- No serial number has been programmed,
- The serial number is different from the one programmed,
- There is an opened receipt in progress,
- There are some already issued fiscal receipts after the last daily report with closure,
- No tax rates have been entered into the memory of the device,
- The clock needs setting.
Fiscalization of the device must be performed and after the successful execution of the command the
returning of the printer to a ”non-fiscalized” mode becomes impossible.
The tax number is entered in the fiscal memory together with the current date and hour. All registries are cleared (to
zero) after which the printer opens the first fiscal receipt, marks the moment of fiscalization on this receipt and closes it.
SHA1 - Optional argument - a byte with value '#'. If exists, for each Z-report and a check sum is
printed (SHA-1 algorithm)
SkipZ - Optional argument - a byte with value '*'. If exists, for each Z-report are printed only the VAT
groups with no zero amount.
A such report is not standard and its use is not encouraged.
The command leads to the printing of a detailed report of the fiscal memory from one selected number to another.
If no parameters are entered the command will be executed for the whole period of exploitation.
Sn Status byte n.
Option =‟T‟ If the parameter has been selected the command will return the information on the
current state of the sum due for payment by the client.
DESCRIPTION OF THE PROGRAM INTERFACE OF FP-1000/700 18
Open One byte which is „1‟ if a fiscal or a non-fiscal receipt has been opened (which it is can be
understood from the status bytes) and „0‟ if there is no opened receipt.
Items The number of sales registered on the on the current or last fiscal receipt - 4 bytes.
Amount The sum from the last fiscal receipt - 9 bytes with a sign.
Tender The sum tendered for the current or the last receipt - 9 bytes with a sign (Only if Option is
present).
The command supports the PC application‟s ability to monitor the status and if needed to restore and
complete am already started fiscal operation which has been interrupted on emergency or out of time - for
example as a result of a power failure.
Text Text up to 20 characters that is sent directly to the display. Before it sends a command is clear and the
positioning lower line.
4FH (79) SUMS ACCUMULATED IN THE FISCAL MEMORY FOR A SELECTED PERIOD
The command generates the printing out of a short periodic financial report.
If the second parameter is missing, the command will generate monthly or annual. The syntax in this case is:
This command creates a sequence of sound tones with a set frequency and continuity.
If there is no input data, a sound signal with frequency 2 kHz and continuity 300 ms is played. If
the input data is with format: <Hz>,<mSec>
where Hz and mSec are integers, than a sound signal is created with a frequency between 100Hz and 5000 kHz
and continuity between 50ms and 2000ms.
In the rest cases the data is in format similar to writing of music notes and the length can be various (the
restriction is defined by the protocol – 218bytes). The first invalid symbol will terminate the command. The
acceptable subcommands are:
Note: A Latin capital letter with range: „A‟ -„G‟.
- „C‟ do
- „D‟ re
- „E‟ mi
- „F‟ fa
- „G‟ sol
- „A‟ la
- „B‟ si
If right after the note there is a symbol „#‟, the note will be raised with a halftone. The symbol „&‟ is for
altered chord , decreases the note with a semitone.
Pause: Symbol interval (ASCII 20h).
After a note or pause there can be one or several bytes indicative of continuity. Valid symbols are in the
range “0”-“5”:
- „0‟ Base continuity
- „1‟ Base continuity * 2
- „2‟ Base continuity * 4
- „3‟ Base continuity * 8
- „4‟ Base continuity * 16
- „5‟ Base continuity * 32
If there a full continuities they will be summed.
DESCRIPTION OF THE PROGRAM INTERFACE OF FP-1000/700 19
The playing of the sent sequence is proceeded in the background, so other commands can be executed during
the sound signal.
The command is printing monthly data for the entire period of use of fiscal printer.
53H (83) SETTING THE MULTIPLIER, DECIMALS, CURRENCY NAME AND TAXES
# - optional parameter, symbol „#‟. Command sets the values of tax rates and returns their current values.
Decimals - One byte with a value between 0 and 2 and shows the exact place of the decimal point.
Currency - The name of the currency used for the payments - not more than 5 bytes.
EnabledT - 8 bytes with value '0' or '1', determines whether the relevant VAT group is forbidden '0' or not '1'
TaxX - The value of each tax rate.
This command prints a barcode. It is accessible only if a receipt is opened. The barcode is printed centered. If the
data separator is a comma, under the barcode is printed the information in text format too. If data length or/and its content are
invalid, the status bit “syntax error” is set and a barcode is not printed.
Barcode height is set with command 43.
Response: Result|Name
Name The name of the method for additional paying printed on the receipt – free
text up to 24 characters. If it is not set, the current value will be returned.
The command sets the comment text that is printed before the data types of the additional payments (command 53).
The definition of the methods have to be completed before the first fiscal receipt for the day to be printed.
56H (86) READING THE DATE OF THE LAST FISCAL MEMORY RECORD
WithTime Optional parameter - symbol 'T'. If it presents, is returned the date and time of the last
fiscal memory record.
DT Date (or date and time) of the last fiscal memory record:
DD-MM-YYYY
or
DD-MM-YYYY hh:mm:ss
Test One byte. If „T‟ an entry into the fiscal memory is done - otherwise there will be no „save‟
performed and only the parameters will be returned.
Free The number of the free blocks left for saving such entries - 4 bytes.
Test block for entries into the fiscal memory: 55h,AAh,33h,CCh,5Ah, A5h,3Ch,C3h
If- and when- the S1.1 flag has been raised the fiscal memory has not been formatted or is in the
READONLY mode.
Calc - If ‟1‟ the control sum of the fiscal memory is calculated - 1 byte.
Name - Name of the fiscal device (in this case “FP2000KL”)
FwRev - The version of the software program - 4 bytes.
Country - Country code - pair of letters (2 bytes; in this case “BG”).
Sp Space - 1 byte.
FwDate - The date of the software program DDMmmYY - 7 bytes.
Sp Space - 1 byte.
FwTime - Hour of the software program HHMM - 4 bytes.
Chk - The EPROM control sum - a 4 bytes string in the hexadecimal code. For example if the control
sum is 214Ah it will be presented as 32h, 31h, 34h, 42h
DESCRIPTION OF THE PROGRAM INTERFACE OF FP-1000/700 21
Sw - The configuration switches from Sw1 to Sw4 - a 4 bytes string with „0‟ or „1‟.
Ser - The serial number - 8 bytes.
FM - Number of the fiscal module - 8 bytes.
5BH (91) PROGRAMMING THE SERIAL NUMBER, THE NUMBER OF THE COUNTRY AND THE
FISCAL MODULE NUMBER
The command IS NOT INCLUDED in the software program package and can be performed only by the
manufacturer of the printer. The printer is handed over to the owner with the name of the country, serial number
and fiscal memory number.
If Result = „F‟ and the S1.1 flag is raised the command has not been successful because either the fiscal memory
has not been formatted or the serial number has already been entered.
FMNumber – 11 bytes – serial number of the printer, which must contain two letters and digits.
Result - One byte containing the letter: „P‟ – no errors, „F‟ – errors.
Command can be executed only in the service mode in a manufacturing company. The printer provides the customer with
pre-recorded serial number of the printer.
If result = „F‟ and the S1.1 is raised the command has not been successful because not set serial number or already is set
serial number of fiscal memory.
The printer prints separator line through the whole width of the paper.
A receipt must be opened.
SHA1 - Optional argument - a byte with value '#'. If exists, for each Z-report and a check sum is
printed (SHA-1 algorithm)
SkipZ - Optional argument - a byte with value '*'. If exists, for each Z-report are printed only the VAT
groups with no zero amount.
A such report is not standard and its use is not encouraged.
Start - The number of the starting fiscal entry - 6 bytes (DDMMYY)
End - The number of the ending fiscal entry - 6 bytes (DDMMYY)
This command prints out a detailed financial report on the period between two selected dates.
If the second parameter is missing, this command generates monthly or annual report. The syntax in this case
is:
Start Month – 4 bytes (MMYY) for monthly report.
Start Year – 2 bytes (YY) for annual report.
5FH (95) SUMS ACCUMULATED IN THE FISCAL MEMORY FOR A GIVEN PERIOD OF TIME
DESCRIPTION OF THE PROGRAM INTERFACE OF FP-1000/700 22
The command starts the calculation and the printing of a short periodic financial report. This report can be make by
holding <FEED> when the printer to the fourth signal.
If one of the parameters must be specified, then the other must be set.
Establishment of new rates only allowed prior to the issuance of the first client cash receipt for the day.
Before fiscalization command data are stored only in memory and can be changed several times.
Tax rates can be set with command 83(command 96 is reserved for compatibility).
Text A text of no more than 40 symbols sent for displaying. If symbols with ASCII codes smaller
than 20h (control symbols) they are increased with 40h and are preceded by 10h.
Example: To send 1Bh, 4Bh, 00h the data field will have to contain 10h, 5Bh, 10h, 40h.
Response: None
Sets one of the 16 operator‟s passwords, which will be demanded upon opening a fiscal receipt. After three
erroneous password entries the printer will block, it must then be switched OFF and ON again to continue
operating.
After initialization or reset of the operational memory all 16 passwords are “0000”.
Enters one of the 16 operator names. The number and the name of the operator are printed at the beginning of each
fiscal (clients) receipt. After three erroneous password entries the printer will block, it must then be switched OFF and ON
again to continue operating. After initialization or reset of the operational memory all eight passwords locations are empty.
CanVd Possible/impossible return (sale registration with a negative sign) [„0‟ / ‟1‟]
TaxA The sum accumulated under tax A
TaxB The sum accumulated under tax B
TaxC The sum accumulated under tax C
TaxD The sum accumulated under tax D
TaxE The sum accumulated under tax E
TaxF The sum accumulated under tax F
TaxG The sum accumulated under tax G
TaxH The sum accumulated under tax H
The command offers information on sums accumulated so far under the different tax groups and whether it is
possible to return the registered items sold.
Information on the sales, performed by the operators, is printed out where for each separate operator the following
data is printed out: name, individual number, number of fiscal receipts, discharges made,surcharge, sum adjustments and
accumulated total sums.
Sends an impulse for opening the cash drawer. This parameter sets a new value for the length of the impulse, which
is stored in the memory of the printer. If this parameter is skipped, the last entered value remains
valid. After memory RESET a value of 15 ms is set.
# Optional byte with the value '#'. If you have it, the commands for reading the articles
returned extended information. Stand in front of the commands 'R', 'F', 'L', 'N', 'f', 'l', 'n'.
Option One byte, defining the type of the selected operation. Depending on this the command might
- or might not - demand the entering of additional parameters. The possible values are: „I‟,
„P‟, „D‟, „A‟, „C‟, „R‟, „F‟, „L‟, „N‟, ‟X‟, ‟f‟, „l‟, „n‟, „x‟
ErrorCode One byte, showing the result from the operation and having the following meaning:
- „P‟ A successful command
- „F‟ Unsuccessful command
Parameters Data on the command - described in detail further on <Option>.
Up to 11350 articles can be programmed. The command will be rejected if there is already a such article and there
are sells of it.
Syntax: <A><PLU>,<Quantity>
PLU Article‟s number (1 to 999999999).
Quantity Quantity correction – floating point number with up to 3 decimal numbers.
Positive numbers increase the quantity and the negative decrease it.
Syntax: <R><PLU>
Response: <‟P‟><PLU>,<TaxGr>,<Grp>,<SPrice>,<Total>,<Sold>,<Avail>,<Name>
<PLU> - Article‟s number. Between 1 and 999999999.
<TaxGr> - VAT group. 1byte
DESCRIPTION OF THE PROGRAM INTERFACE OF FP-1000/700 25
<SPrice> - Single price. Floating point number with decimal symbols current for the
printer.
<Avail> - Current quantity. Floating point digit with 3 decimal symbols.
<Sold> - Sold out quantity. Floating point number wit 3 decimal symbols.
<Total> - Accumulated amount of the article.
<Name> - Item‟s name(Up to 36 bytes).
The last three subcommands are for extracting of all programmed items. A subcommand „F‟ or „L‟ is
being sent and after that subcommand „N‟ until an answer „F‟ is received (the last article is read). The articles
are returned sorted by PLU number ascending or descending depending of the first sent command.
„f‟ Returns data about the first found item with sales on it.
Syntax: <f>[<PLU>]
Returned data is the same as in subcommand „R‟. If a parameter PLU is set, searching starts from 1.
„l‟ Returns data about the last found item with sales on it.
Syntax: <l>[<PLU>]
The returned data is the same as in subcommand „R‟. If a parameter PLU is set, searching starts from
999999999.
„n‟ Returns data for the next found item with sales on it.
Syntax: <n>
Response is the same as for subcommand „R‟.
The last three are subcommand to retrieve data from your PC for all items, with sales for the day. Submitted
subcommand „f‟ or „l‟ after that „n‟, until recive „F‟, which means that the last item read. Returned items is sorted by number
increasing or decreasing direction depending on the first submitted command.
The command initiates the printing of a copy of the last closed receipt containing registered sales. The copy is
marked as an „НЕСЛУЖЕБЕН БОН” („NON-OFFICIAL RECEIPT”), immediately after HEADERA is printing with
bold „ДУБЛИКАТ” (“DUPLICATE”). When retry the command will refuse to print. Printing duplicate receipt is
impossible if the number of rows in the receipt is greater than 810.
DESCRIPTION OF THE PROGRAM INTERFACE OF FP-1000/700 26
Returns information on the distribution of the daily sum according to the terms of payment used.
Option Defines the type of the information under print. Possible values:
- „0‟ - Prints all items programmed number, tax group, the name and quantity available.
- „1‟ - Prints all programmed items number, tax group, name and unit price.
- „2‟ - Prints only items, with sales for the day. For each item number is printed, the tax group, the name
and quantity sold.
- „3‟ - Prints all items programmed number, tax group, name, unit price, quantity sold and quantity
available.
- „4‟ - Prints only items, with sales for the day number, tax group, name, unit price, quantity sold and
turnover items.
Start Number of the first article which to be included in the rport. Default: 1.
End Last number of article which to be included in the report. Default: 999999999.
Items are arranged according to their individual numbers. In a daily report with a closure the accumulated sums are
cleared.
The command leads to the reading of the available information, which will be printed out in the operator‟s report.
The sums are returned as floating-point numbers incorporating the currently set number of decimal places.
- ‘0’ Information about the active tax rates for the Z-report
ErrorCode[,DecRec,Dec,Enabled,PercA,PercB,PercC,PercD,DT]
- ‘1’ Information about the turnover for the selected record or period.
ErrorCode[,Closure,Receipts,TotA,TotB,TotC,TotD,TotE,TotF,TotG,TotH]
- ‘2’ Information about net amounts for the selected record or period.
ErrorCode[,Closure,Receipts,NetA,NetB,NetC,NetD,NetE,NetG,NetG,NetH]
- ’3’ Information about the total VAT (ДДС) for the selected record or period.
ErrorCode[,Closure,Receipts,TaxA,TaxB,TaxC,TaxD,TaxE,TaxF,TaxG,TaxH]
- ‘5’ Information from the selected record from the fiscal memory with tax rate setting.
ErrorCode[,Dec,Enabled,PercA,PercB,PercC,PercD,DT]
- ‘6’ Information from the selected record from the FM with RAM reset.
ErrorCode[,DT]
Closure2 Number of the fiscal entry for references „1‟ „2‟ and „3‟. For references „0‟, „4‟ „5‟ and
„6‟ this field is empty. If the parameter exist is returned data for the period set by
Closure1 and Closure2 for references „1‟, „2‟ и „3‟.
The command returns information on the different tax groups for each separate entry and or a selected period of
time. Periodic references for longer time periods may take a few seconds to process.
R - If symbol „R‟ presents in the beginning of the data, the command returns the contents of the
relevant graphic line in hex format.
RowNum - Shows the line which is being programmed - a number between 0 and 95
Data - Graphic data. Two symbols for each byte of information are entered in the xehadecimal code
(Two symbols for every byte). The length of the data is up to 54 bytes and if they are less an automatic
addition of “00” follows.
This command offers the option to define a graphic logo with dimensions 54 x 12 mm (432 x 96 dots) designed by
the user himself. The printing of this logo is activated with command 43. It is printed out immediately before the HEADER -
DESCRIPTION OF THE PROGRAM INTERFACE OF FP-1000/700 28
at the beginning of each fiscal or non-fiscal receipt. In order to define the whole logo, the command must be executed 96
times - once for each line. After RESET of the memory, the logo is loaded from the flash memory. The logo can be stored in
the flash memory by virtue of command 41.
Address - Start address (from the beginning of the fiscal memory) – a hexadecimal number
from 00000h to 1FFFFh (for 1 Mbit fiscal memory).
Bytes - Number of bytes to be returned (a decimal integer from 1 to 64).
Data - The contents of the requested fiscal memory block in a hexadecimal view (2 symbols for each byte).
This command returns the contents of a part from the fiscal memory. For reading of the whole memory
the command has to be executed several times with a different start address.
P[#] - Prints report about the validity of all SHA-1 check sums for Z-reports, found in KLEN.
The check sums are compared with those from the fiscal memory. If a difference is
found, a line with the number of the Z-report, date and time is printed. If the
optional symbol „#‟ presents, information for all SHA-1 is printed regardless if they
are valid or not.
R[<Num>] - Returns information from KLEN for Z-report with number Num. The data is read as a
document. Response format:
P,FDocs,DT,SK - Information about the found Z-report.
FDocs - Document number of the Z-report.
DT - Date and time of the Z-report in format „DD-MM-YYYY hh:mm:ss”.
SK - 40 symbols – SHA-1 of the Z-report in a hex format.
F - No data is found in KLEN for this Z-report.
Z[<Num>] - Returns information from KLEN for a Z-report wiyh number Num. It is read the real
text of the document records in KLEN, SHA-1 is calculated and compared with SHA-1
of the Z-report. It is possible a long time to be necessary for the command to be finished in case of too many
documents.
Response:
P,Docs,Bytes,SK - The check sum is valid. The documents (Docs) and data bytes (Bytes) are
read. SK is 40 symbols – the check sum in a hexadecimal.
F,Docs,Bytes,SK,SZ - The check sum is invalid. Docs and Bytes are read. SK and SZ are 40
Symbols each – the respectively stored value in KLEN and the calculated one.
F - No data is found in KLEN for this Z-report.
[X] Commands class 'I': Information about KLEN. The 'X' symbol can be omitted. Response:
P,Tot,Used,C1,C2,D1,D2
Tot - Total capacity of the electronic journal in bytes.
Used - Used space of the electronic journal.
C1 - First number of a Z-report in the electronic journal.
C2 - Last number of a Z-report in the electronic journal.
D1 - First number of document Z-report in the electronic journal.
D2 - Last number of a document Z-report in the electronic journal.
DESCRIPTION OF THE PROGRAM INTERFACE OF FP-1000/700 29
<D1>[,<D2>] - Returns the first line from document D1 and sets the end of searching are
document D2 (including). Next lines are got with command class 'N'. If the
second argument is missed, only one document is set - D1.
*<Cl>[<D1>[,<D2>]] - Returns the first line from document number D1, for Z-report Cl and
sets the end of searching at document D2 (including) for the same Z-report.
Next lines are got with command class 'N'. Document counter is for the
Zreport.
Example: command „*5,1,3“ will select the first tree documents from
Z-report number 5. If D2 is missed, only one document is selected – D1. If
D1 and D2 are missed, all documents are selected for the Z-report.
<Flg><DT1>,<DT2> - Returns the first line from a document with date and time DT1 and
sets the searching end at document with date and time DT2 (including).
There is a filtration of the selected documents depending on the argument
Flg. Next lines are got with command class 'N'. Input arguments format:
Flg - A symbol which sets the type of document for reading:
'A' - All types of documents.
'F' - Fiscal receipts.
'N' - Official receipts.
'R' - Official receipts with 90 degree rotated text.
'S' - Receipts form service manipulations.
'X' - X-reports.
'Z' - Z-reports.
DT1 - Beginning and end date of the check up in format DDMMYY[hhmmss]. If time is missed a default
value is used „000000“ (00:00:00).
DT2 - End date and time of the check up in format DDMMYY[hhmmss]. If the time is missed a default value is
used „235959“ ( 23:59:59).
The tree previous subcommands (by document, Z-report and data) return one of the next responses:
- P,Text There is a destroyed text line in KLEN (КЛЕН). Its content is in Text. The read text is
always coded with table 1251, regardless if it is chosen a DOS table by the switches.
The code table is important for the right calculation of the SHA-1 check sum.
- *, There is a destroyed text line in KLEN and it is an empty line - document separator.
Can be used for counting of the found documents or for stopping of the reading exactly at the
end of the document.
-F No more data in KLEN.
Example:
One of the previous commands is sent. If the response is 'F', there is not such data in KLEN.
Otherwise a command class 'N' is being sent until a response 'F' (no more data) is received. By this way all
desired lines from KLEN can be got one by one as a text.
Q<Addr>,<Bytes> Direct reading of data from KLEN in a raw format. This command returns
2*Bytes symbols starting from address Addr. Addr is set hexadecimal and
Bytes – decimal. Data is returned in hexadecimal format.
q<Addr>,<Bytes> Direct reading of data from KLEN in a raw format. The difference in
comparison with the previous command: the symbols are returned as a
normal text if they are printable (above 1Fh) or in format „<XX>”
(hexadecimal), if they are check numbers (under 20h).
Commands class 'N':
[<Fnt>]<Flg><DT1>,<DT2> Documents with date and time from DT1 to DT2 including
are printed. There is a filtration of the documents selected
depending on the argument Flg. Input arguments format:
Fnt Optional parameter. By virtue of it a document from KLEN
can be printed with a font with a set height (if the printer
can accept it). One byte with a possible value:
'>' Printing with a normal font.
'<' Printing with . font height.
Flg A symbol which sets the type of document for reading:
'A' All types of documents.
'F' Fiscal receipts.
'N' Official receipts.
'R' Official receipts with 90 degree rotated text.
'S' Receipts form service manipulations.
'X' X-reports.
'Z' Z-reports.
DT1 Beginning and end date of the check up in format DDMMYY[hhmmss]. If time is missed a
default value is used „000000“ (00:00:00).
DT2 End date and time of the check up in format DDMMYY[hhmmss]. If the time is missed a
default value is used „235959“ ( 23:59:59).
The 3 previous subcommands (by document, Z-report and data) return in a result the count of printed
documents as an integer.
The copies of the documents from KLEN are almost identical with the original documents. The differences are:
The copies never have a graphical logo before the header.
In the copies there is no graphical fiscal logo.
The notice „ФИСКАЛЕН БОН“ (“FISCAL RECEIPT”) with fiscal logo is substituted with
notice „ФИСКАЛЕН БОН – КОПИЕ“ (“FISCAL RECEIPT - COPY”) with double wight.
DT2 End date and time of the check up in format DDMMYY[hhmmss]. If the time is
missed a default value is used „235959“ ( 23:59:59).
The tree previous subcommands (by document, Z-report and data) return one of the next responses:
P,Text There is a destroyed text line in journal. Its content is in Text.
*, There is a destroyed text line in journal and it is an empty line - document separator. Can be
used for counting of the found documents or for stopping of the reading exactly at the end of
the document.
F No more data in journal.
Example:
One of the previous commands is sent. If the response is 'F', there is not such data in journal. Otherwise a
command class 'N' is being sent until a response 'F' (no more data) is received. By this way all desired lines from
journal can be got one by one as a text.
Q<Addr>,<Bytes> Direct reading of data from journal in a raw format. This command returns 2*Bytes
symbols starting from address Addr. Addr is set hexadecimal and Bytes – decimal.
Data is returned in hexadecimal format.
q<Addr>,<Bytes> Direct reading of data from journal in a raw format. The difference in comparison
with the previous command: the symbols are returned as a normal text if they are
printable (above 1Fh) or in format „<XX>” (hexadecimal), if they are check numbers
(under 20h).
Commands class 'N':
There is no additional data after this symbols. It is used in combination with some of the
commands class 'R'. Reads the next line in journal. The responses are the same as the initial
command class 'R' and described above.
ATTENTION! The sending of this command without previous one from class 'R' setting a
range of the inquire can cause reading of illegal information!
Commands class 'P': Data printing from journal.
[<Fnt>]<D1>[,<D2>] Documents from number D1 to D2 including are printed. If the second argument is
missed, only one document is selected - D1.
[<Fnt>]*<Cl>[<D1>[,<D2>]] Documents from number D1 for Z-report Cl to number D2 including for the
same Z-report are printed. The document counter is for the Z-report. Example:
command „*5,1,3“ will print the first 3 documents from Z-report number 5. If D2 is
missed, only one document is selected – D1. If D1 and D2 are missed, all documents
for the Z-report are selected.
[<Fnt>]<Flg><DT1>,<DT2> Documents with date and time from DT1 to DT2 including are printed.
There is a filtration of the documents selected depending on the argument Flg. Input
arguments format:
Fnt Optional parameter. By virtue of it a document from journal can be printed with a font
with a set height (if the printer can accept it). One byte with a possible value:
'>' Printing with a normal font.
'<' Printing with ½ font height.
Data The contents of the fiscal memory block requests in hexadecimal (2 characters for each byte of data).
The command returns the contents of part of the code memory (firmware). To read the entire code memory to be
performed repeatedly. The command is only available in service mode!
7AH (122) OPENING A NON FISCAL RECEIPT FOR 90 DEGREE ROTATED TEXT
RotRec Serial number of the opened non fiscal receipt for 90 degree text for the day. 4bytes
with no sign.
Text The content of the text line for printing. The length is up to 100 symbols. The text can be printed
with attributes: bold and underline. They can be turned on and of by the following way:
<Tab>B Starts bold printing.
<Tab>b Stops bold printing.
<Tab>U Starts underline printing. Can be used for a separator line of a table,
<Tab>u Stops underline printing.
<Tab>A Inserts a start vertical line for tables.
<Tab>Z Inserts an end vertical line for tables.
<Tab>O Starts the printing line in the top two positions of the characters. It can be used as a dividing line
horizintalna table.
<Tab>o Terminate mode started with <Tab>O
This command is used for printing of a 90 degree rotated text, up to 18 lines. The sent text lines are
accumulated in the memory by sequence of their sending. If the command is executed more than 18 times
after the receipt opening, the accumulated information will be printed and printer will wait for new lines or
command 124. The printer determines the longest line and fills the others to the same length.
If more than 18 lines are sent, more than one column will be printed. There is no space between two
columns, therefore with appropriate picked out data can be printed lines with unlimited length.
The command will be not executed if there is not an opened receipt for 90 degree rotated text.
DESCRIPTION OF THE PROGRAM INTERFACE OF FP-1000 34
7CH (124) CLOSING OF A NON FISCAL RECEIPT FOR 90 DEGREE ROTATED TEXT
RotRec Serial number of the opened non fiscal receipt for 90 degree text for the day. 4bytes
with no sign.
This command colese hte receipt. If there are any not printed yet lines, they will be printed automaticaly
before its closing.
The command will note be executed if there is not opened a receipt for 90 degree printing.
Command resets the printer memory. After implementation and need to update the clock command 61, which is
done in RAM reset entry into the fiscal memory with date and time specified.
Command is enabled only when placed service jumper.
Have place for 100 RAM reset records.
Command is enabled only when placed service jumper. When printing is dasabled printer performs all actions,
including entry in KLEN, but does not print on paper. The records of the printer accumulate data correctly according to the
data are sent when necessary, shall be entry in the fiscal memory.
When printing is disabled, is sends commands with high speed for testing printer and KLEN.
Command is enabled only when placed service jumper. Used for initial formatting of KLEN. For initial formatting of
KLEN. Permit only on non-FISCALIZED device or not formatting KLEN. The command will not run in already formatted
KLEN, even in service mode.
DESCRIPTION OF THE PROGRAM INTERFACE OF FP-1000 35