nlscan.com
Page 13
General Programming
Command Programming
Commands under RS232 connection mean using 0x20-0x7D
(
the displayable characters
)
to express all
commands information.
Con
fi
guration State
1
、
The scanner should be in con
fi
guration state when programming functions under RS232 connection.
In the state, the scanner would only accept and execute the commands from communication and feed
back.
Sending certain command to the scanner will make it enter or quit the con
fi
guration state. Or if in
con
fi
guration state the scanner hasn
’
t received new information for
fi
ve seconds, the scanner will quit
the state automatically.
Express Regulation
2
、
Sending
“
$$$$
”
and receiving
“
@@@@
”
mean entering con
fi
guration state successfully.
①、
Sending
“
%%%%
”
and receiving
“
^^^^
”
mean quitting con
fi
guration state successfully.
②、
Receiving
“
^^^^
”
in con
fi
guration state means that the scanner has quitted the state automati-
③、
cally.
In con
fi
guration state, every command begins with
“
#
”
and ends with
“
;
”
.E.g.
④、
“
#99900030;
”
In con
fi
guration state, if the command is executed successfully, the Host will receive a com-
⑤、
mand which begins with
“
!
”
and ends with
“
;
”
. E.g.
“
!99900030;
”
。
In con
fi
guration state, if the command is invalid or executed unsuccessfully, the Host will
⑥、
receive a command which begins with
“
?
”
and ends with
“
;
”
E.g.
“
?99976543;
”
In con
fi
guration state, if commands of query type are executed successfully, the host will receive
⑦、
“
! xxxxxxxx
;
”
as well as the feedback which begins with
“
&{
“
and ends with
“
|
”
. In the last
nine characters in feedback, such as
“
|BF7974B7
”
,
“
|
”
is the separating character which separates
the feedback information and check value. And other eight characters
“
BF7974B7
”
are CRC32
’
s Hex
value and arranged from the highest position to the lowest. The feedback information is placed between
“
{
“
and
“
|
”
. E.g.: Sending
“
#99900301;
”
and receiving
“
!99900301;&{Firmware v1.7.5;Decoder
v1.00.023.C6;|FD25430B}
”
If feedback information may have undisplayable characters, it will be expressed in hexadecimal nota-
tion. Two characters represent a character value. E.g.
“
&
{AAAA100423C5008001FF400001FF400001FF400001FF400001FF4000000040800000
40800000400000004080000040800000408006FF40000000408000004080000040800000408006F
F400006FF400006FF400006FF400004FF400004FF400002FF400004FF400004FF400004F
F400001FF400000000000006A75667467646E426863657271776C6F7669736261797A706D5-
2000000000000000000000000000000000000000000000000000000000000000000600000FEB2A2F4CC
CFD390ADC8D38FF5E6D99DAA|E1DFA587}
”
In con
fi
guration state, if a command is with parameters, it will be composed following the rules
⑧、
which command system de
fi
ned. For example, the command string which has 0x0D and 0x0A as ending
character and be saved is
“
#99904112;#99900000;#99900015;#99900000;#99900012;#99900020;
”
。