Transmission protocol standard:
1. Transmission speed = 9600.
2. Data bits = 8.
3. Stop bits = 1.
4. Parity - None.
5. Data format = ASCII.
6. Command definition:
"ENQ" = 05h
"ACK" = 06h
"NAK" = 15h
"SOH" = 01h
"STX" = 02h
"ETX" = 03h
"EOT" = 04h
"DC1" = 11h
"DC2" = 12h
"DC3" = 13h
"DC4" = 14h
Protocol:
No
PC sends
Scale sends
Notes
1
ENQ
Inquiry about ready send data state
2
ACK
Scale answers "ACK" = YES
or "NAK" = NO – in the situation PC repeats "ENQ"
3
DC1
4
Data frame
Scale sends only weight data
or:
DC2
Scale sends weight, unit price and total price data
Data frame is as follows:
STX
Start of data frame
2, n+1
In turn: D1, ..., Dn
Next bytes (ASCII characters) data frame
n+2
BCC
BCC = xor (logic sum) bytes from No. 2 to No. n+1
n+3
ETX
End of data frame
Data frame for weight (RD1):
Byte
Byte meaning
D1
STA
Sign "S" – for weight indication stabilized since 500 ms.
Sign "U" for non yet weight indication stabilized
D2
SIGN
Sign " " (Space) for weight equal or above “zero”
Sign "-" for weight below “zero”
D3..D8
In turn: C4, C3, KD, C2, C1, C0
C4..C0 ASCII digits for weight (C0 – least significant digit)
KD = "." – decimal dot sign (format: 99.999 kg)
D9, D10
UN
Signs "kg" (D9 = "k" , D10 = "g")
Data frame for total price (RD2) and unit price (RD3):
D1..D8
C6, C5, C4, C3, C2, KD, C1, C0
C6..C0 ASCII digits for total price (or unit price)
(C0 – least significant digit)
Data frame for command "DC1"
No.
SOH
Start of transmission
gennek