06656
31
Serial Commands
General Serial Command Format
Serial Commands are only accepted by the PSC scanner when in
serial communications mode.
Serial commands take the form:
STX ESC LT1 LT2 <optional param-
eters>ETX (Note: STX = ^B; ETX = ^C)
STX, ESC, and ETX are ASCII codes whose values are 02H, 1BH, and
03H, respectively. LT1 and LT2 are uppercase ASCII letters (commer-
cial A and @ are the same as those printed in earlier sections of this
manual under their corresponding menu bar code labels). The ESC
code that follows the STX code identifies this as a command. Some
commands require parameters such as minimum and maximum code
lengths, and strings of hexadecimal characters. When parameters are
required by the command, they immediately follow LT2. There are
never spaces within serial commands.
ACK/NAK
The scanner provides ACK/NAK protocol during serial program-
ming in order to provide feedback to the host computer which is pro-
gramming the scanner.
ACK/NAK protocol provides two vital functions. First, it provides
the host with positive acknowledgment that its commands are being
accepted and acted upon. Second, and perhaps more important, it
ensures that the host will not issue commands to the scanner more
quickly than the scanner can process them. For example, every time
the scanner receives a correct command, it modifies its internal
EEPROM, a function that takes about one second. At 9600 baud, the
host can easily issue commands to the scanner faster than they can be
processed. If after issuing each command the host waits to receive an
ACK or NAK code before issuing the next command, the scanner
cannot be overrun. If XON/XOFF or CTS/RTS Protocol is being used,
the scanner cannot be overrun by programming commands. How-
ever, the host is not provided with feedback as to the outcome of its
commands.
The ACK/NAK protocol is quite simple. Whenever the scanner
receives a correctly formatted command, it sends a confirmation mes-
sage followed by an ACK (06H) code.