Programming Methods; Programming Through The Serial Interface - PSC LM520 Integration & Programming Manual

Table of Contents

Advertisement

LM520 Scanner Configuration

Programming Methods

The LM520 scanner may be programmed either by sending commands from a host over the
serial interface or by the using bar codes containing programmable commands. Typically,
the scanner is programmed over the serial interface when it is integrated into a system.
Appendix D, LM520 Programming Labels, contains a minimal set of programming
bar codes and the section titled, Programming with Bar Codes, on page13, describes how to
create programming bar codes.

Programming through the Serial Interface

The easiest and most common way to program the LM520 is by sending ASCII commands
through the serial interface. Each command transmission must begin with the STX (0x02
hex) and ESC (0x1B hex) characters. Next, the command itself is transmitted, followed by
any necessary parameters. The command transmission ends with an ETX (0x03 hex).
A complete serial command transmission, therefore, consists of:
The scanner uses an ACK/NAK protocol to communicate with the host. The scanner does
not echo received data back to the host, and will not acknowledge transmissions which do
not begin with STX-ESC and end with ETX. Upon receipt of a valid command sequence,
the scanner responds in one of two ways:
• All commands that are valid (both commands and parameters) take the requested
action and then transmit an ACK to the host.
• If the command is invalid, the scanner responds with an ASCII NAK (0x15 hex).
All valid commands return an ACK. Otherwise, a NAK is returned if the command is not
valid. If the command is not formatted properly (missing the STX, ESC, or ETX), the scanner
does not respond. Each command recognized by the scanner consists of two ASCII charac-
ters, followed by any required parameters.
12
STX-ESC-[command]-[parameters]-ETX
LM520 Scanner Integration & Programming Manual
Section 3

Advertisement

Table of Contents
loading

Table of Contents