第
9
页
共
35
页
2.2 Serial port instructions explain
Table 2.2-1 Data format of serial port instructions
Length
Message
Source
Message
target
Reserve Reserve Command beeper Check Sum
Table 2.2-2 Serial port instructions
analysis
Field
Format
Sub-Field
Description
Length
1 Byte
Length
command length
,
not include
Check Sum
,
maximum 0xFF
Message
Source
1 Byte
0x04 = Host
(
PC or IPC
)
;
0x31 = Decoder
(
barcode scanner
)
Sources of command
Message
target
1 Byte
0x04 = Host
(
PC
机或工控机)
;
0x31 = Decoder
(
barcode scanner
)
command target address
Reserve
1Byte
reserved
(
0x00
)
Reserve
1Byte
reserved
(
0x00
)
Command
Variable
number of
bytes
Beeper
1 Byte
0x31 = open
0xFF = close
If the buzzer is open
Check Sum
2 Byte
Check sum of message
formatted as High byte low
byte
Remark
:
1
、
Check Sum
:
Complement of the command sum, high byte is ahead, low byte is behind.
Check calculation method: all bits(not including two check bits) sum up, then inverse the
result and plus 1
Example
:
Exit and save
(
0A 04 31 00 24 25 45 4E 44 FF
)
add up and equal
:
02 5E
,
Turn to binary
(
0000 0010 0101 1110
)
,
inverse calculate
:
1111 1101 1010 0001
,
add 1 and get
the check code
(
FD A2
)
。
2
、
W
hen the command below which format is character(without “0X”as prefix, if you want use
it as serial command, you need to converted them to ASCII which is Hexadecimal.
Summary of Contents for E1007
Page 1: ...User Guide This User Guide Applies to E1007...
Page 4: ......
Page 13: ...7 35 Barcode scanning example...
Page 44: ...38 36...
Page 45: ...39 35...