Data exchange protocol of ON-LINE operation mode
Software for detecting ZEKA products
General description
The mode is ON-LINE communication with personal computer where the registration is carried through the ECR and supervised by PC. The cash register keeps its functions in the report modes and only in registration (sales) mode demands constant connection with PC. Every operation in this mode is reported to PC. At article or department sale the cash register receives from the PC necessary data (name, price etc.). To set the cash register for work in ON-LINE mode, must set P09=1, P11=0 in the Program menu. This mode can be used in creating network of type many cash registers and one PC.
ECR models with support this protocol:
Zeka 02, Zeka 02-E, Zeka M02, Zeka M02-E
Protocol description
Connection parameters:
Baud rate 9600 bps, 8 bits, no parity
Message format:
<marker><machine number><commands><information><crc><LF>
The exact data fields, enclosed by < and > are described in the following table:
| Field | Bytes | Value |
| marker | 1 | Start of message – always 0xАА |
| machine number | 6 | ASCII ('nnnnnn') ECR manufacture number |
| command | 1 | 'a'..'z' command |
| information | ? | variable character length in range 0x20 .. 0x8F |
| crc | 2 | Arithmetic sum, including marker, formed in the following manner: sum of all bytes - the result is byte of type 0xHL, which is converted to 0x3H, 0x3L. |
| LF | 1 | End of message - always - 0x0A |
Acknowledgment format:
<type><machine number><crc><LF>
The exact data fields, enclosed by < and > are described in the following table:
| Field | Bytes | Value |
| type | 1 | Acknowledgement type – 0x06 = ACK (possitve), 0x15 = NACK (negative), 0x0Е = RETRY (request re-sending of the command) |
| machine number | 6 | ASCII ('nnnnnn') ECR manufacture number |
| crc | 2 | Arithmetic sum, including marker, formed in the following manner: sum of all bytes - the result is byte of type 0xHL, which is converted to 0x3H, 0x3L. |
| LF | 1 | End of message - always - 0x0A |
Communication sequence:
| ECR: | PC: |
| "Question" message -------> | |
| <-----ACK <-----"Answer" message | |
| ACK -------> |
Active communication side is the cash register. If the computer did not respond the same message is sent after certain timeout. This process continues until ACK is received. In that time the cash register operation is blocked and in the left side of the display is shown "r"
Command description and information
PC notifing messages sent by ECR:
Operator login/logout:
<f/o><number><name>
data fields:
| f/o | 1 byte command - 'f' = login, 'о' = logout |
| number | 1 byte ASCII operator number '1' to '9' |
| name | 12 bytes operator name |
PC response: ACK, NACK or RETRY message
Received on Account/Paid Out sums for the logged operator:
<k><+/-><sum><payment type><decimal point><receipt number>
data fields:
| k | 1 byte command - 'k' |
| +/- | 1 byte command type - '+' = Received on Account, '-' = Paid Out |
| sum | 8 byte sum (without decimal point) ASCII format |
| payment type | 1 byte payment type - ASCII number '0' to '4' |
| decimal point | 1 byte decimal point position - ASCII number '0' or '2' |
| receipt number | 5 byte receipt number in ASCII format (example "12345") |
PC response: ACK, NACK or RETRY message
Discount/Addition over last transaction:
<m><+/-><sum><tax group><decimal point><department>
data fields:
| m | 1 byte command - 'm' |
| +/- | 1 byte command type - '+' = addition, '-' = discount |
| sum | 8 bytes sum (without decimal point) ASCII format |
| tax group | 1 byte tax group - ASCII number '0' to '7' |
| decimal point | 1 byte decimal point position - ASCII number '0' or '2' |
| department | 1 byte department number ASCII number '0' to '9' |
PC response: ACK, NACK or RETRY message
Discount/Addition cancellation
<u><+/-><sum><tax group><decimal point><department>
data fields:
| u | 1 byte command - 'u' |
| +/- | 1 byte command type - '+' = cancel addition, '-' = cancel discount |
| sum | 8 bytes sum (without decimal point) ASCII format |
| tax group | 1 byte tax group - ASCII number '0' to '7' |
| decimal point | 1 byte decimal point position - ASCII number '0' or '2' |
| department | 1 byte department number ASCII number '0' to '9' |
PC response: ACK, NACK or RETRY message
Department sale:
<s><department><tax group><quantity><price><decimal point>
data fields:
| s | 1 byte command - 's' |
| department | 1 byte department number ASCII number '0' to '9' |
| tax group | 1 byte tax group - ASCII number '0' to '7' |
| quantity | 9 bytes quantity ASCII format without decimal point (decimal point is with fixed position ) - example "123456789" => the quantity is 123456.789) |
| price | 8 bytes price (without decimal point) ASCII format |
| decimal point | 1 byte decimal point position - ASCII number '0' or '2' |
PC response: ACK, NACK or RETRY message
Department sale void:
<n><department><tax group><quantity><price><decimal point>
data fields:
| n | 1 byte command - 'n' |
| department | 1 byte department number ASCII number '0' to '9' |
| tax group | 1 byte tax group - ASCII number '0' to '7' |
| quantity | 9 bytes quantity ASCII format without decimal point (decimal point is with fixed position ) - example "123456789" => the quantity is 123456.789) |
| price | 8 bytes price (without decimal point) ASCII format |
| decimal point | 1 byte decimal point position - ASCII number '0' or '2' |
PC response: ACK, NACK or RETRY message
Messages requiring answer from PC
Article sale order:
<b><barcode><article number><quantity>
data fields:
| b | 1 byte command - 'b' |
| barcode | 12 article barcode |
| article number | 5 bytes article number ASCII format - for example "00123" |
| quantity | 9 bytes quantity ASCII format without decimal point (decimal point is with fixed position ) - example "123456789" => the quantity is 123456.789) |
PC response:
<p><article number><price><name><tax group><art group><department><decimal point>
or at error:
<е><number>
data field:
| p | 1 byte command - 'p' |
| article number | 5 byte article number ASCII format - for example "00123" |
| price | 8 bytes price (without decimal point) ASCII format |
| name | 12 byte article name |
| tax group | 1 byte tax group - ASCII number '0' to '7' |
| article group | 1 byte article group - ASCII number '0' to '9' |
| department | 1 byte department number ASCII number '0' to '9' |
| decimal point | 1 byte decimal point position - ASCII number '0' or '2' |
or at error
data field:
| e | 1 byte command - 'e' |
| number | 1 byte error number - '1' = article not found, '2' = forbidden article, '6' =overflow |
Article sell cancellation order:
<c><barcode><article number><quantity>
data fields:
| c | 1 byte command- 'c' |
| barcode | 12 article barcode |
| article number | 5 bytes article number ASCII format - for example "00123" |
| quantity | 9 bytes quantity ASCII format without decimal point (decimal point is with fixed position ) - example "123456789" => the quantity is 123456.789) |
PC response:
<j><article number><price><name><tax group><article group><department><decimal point>
or at error
<е><number>
data fields:
| j | 1 byte command - 'j' |
| article_number | 5 bytes article number ASCII format - for example "00123" |
| price | 8 bytes price (without decimal point) ASCII format |
| name | 12 byte article name |
| tax group | 1 byte tax group - ASCII number '0' to '7' |
| article group | 1 byte article group - ASCII number '0' to '9' |
| department | 1 byte department number ASCII number '0' to '9' |
| decimal point | 1 byte decimal point position - ASCII number '0' or '2' |
or at error
data fields:
| e | 1 byte command - 'e' |
| number | 1 byte error number - '1' = article not found, '2' = forbidden article, '6' =overflow |
Close receipt order (payment):
<d><payment_type><sum><received sum><receipt number><decimal point>
data fields:
| d | 1 byte command - 'd' |
| payment type | 1 байт ASCII номер '0' до '3' |
| sum | 8 bytes sum (without decimal point) ASCII format |
| received sum | 8 bytes received sum (without decimal point) ASCII format |
| receipt number | 5 байта номер на бон ASCII формат - примерно "00123" |
| decimal point | 1 byte decimal point position - ASCII number '0' or '2' |
PC response:
<q><000001000><payment name>
or at error
<е><number>
data fields:
| q | 1 byte command - 'q' |
| 000001000 | 9 bytes - constant ASCII format "000001000" |
| payment name | 6 bytes payment name. If the payment is 0 (CASH) the name is not significant the ECR will print "CASH" |
or at error
data field:
| e | 1 byte command - 'e' |
| number | 1 byte error number ASCII number - '3' = payment forbidden |
Messages sent by ECR after the last order is confirmed:
'x' after 'b', overflow (price * quantity > 8 characters)
'x' after 'c', different article parameters (price, tax group, etc.)
'w' after 'b', subtotal overflow (STL > 8 characters)
<last revision 27.11.2006>