![Odeca SW22 User Manual Download Page 17](http://html1.mh-extra.com/html/odeca/sw22/sw22_user-manual_3338129017.webp)
SW22
16
User
manual
P1630830G
5
SERIAL COMUNICATION PROTOCOL
ON REQUEST COMMUNICATION PROTOCOL
These are the structures of a request from host to SW22 :
structure 1
ADDR CMD EOT
structure 2
ADDR CMD
PARAM
ETX
CHK
EOT
where:
ADDR
start transmission character : STX (02 Hex) when the
address of SW22 is 0 ; when the address is not 0 it is the
sum between character 80 Hex and the value of the
address.
CMD
sequence of characters that identify the operation
requested to SW22.
PARAM
sequence of characters that gives to SW22 the necessary
information for the execution of an operation.
ETX
end character ETX ( 03 Hex ).
CHK
checksum value used by SW22 to verify the correct
reception ; this value is the operation XOR between
characters ADDR and ETX.
EOT
end transmission character EOT ( 04 Hex ).
Weight request command
Request :
ADDR CMD
EOT
02 Hex or (80 Hex + address SW)
N
04 Hex
Answer:
ADDR CMD STATUS NET TARE ASW PCS COD
1 COD
2 PROGR ETX CHK EOT
where:
ADDR
start transmission character
1
chr
CMD
command code : character “N”
1 chr
STATUS SW22 status :
O = overload, E = offrange, S = stable weight, M = instable weight 1 chr
NET
net weight
7 chr
TARE
tare
7 chr
AWS
Single average weight ( unit: g )
7 chr
PCS
number of pieces
6 chr
COD 1
numeric code n° 1
6 chr
COD 2
numeric code n° 2
6 chr
PROGR serial weight number preceded by “P” or “F” if fiscal memory is installed 7 chr
ETX
end character ETX ( 03 Hex )
1 chr
CHK
checksum value
2 chr
EOT
end transmission character EOT ( 04 Hex )
1 chr