Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 3 of 7

LM520 Scanner Integration & Programming Manual: Section 3, pages 14 to 23

Pages 14 to 23 of 50, from LM520 Scanner Integration & Programming Manual

The original document is the PDF (437 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the PSC LM520

Page 14

Section 3 LM520 Scanner Configuration The LM520 offers a command interface which allows a wide range of customization. Commands can be combined with standard programming bar codes to develop an active configuration and a saved or factory default configuration.

Configuration Management The LM520 scanner always contains two configuration sets: the Active configuration and the Factory Default configuration. Both configurations are stored in nonvolatile memory. When the scanner receives a command changing the configuration, it changes the Active configuration. If the scanner is reset to the Factory Default configuration, the factory defaults are copied to the Active configuration. See Appendix C, Factory Default Configuration for a concise list of the factory defaults. The LM520 offers the ability to change and save a new Factory Default configuration. To overwrite the Factory Default configuration as shipped from PSC, first make changes to the Active Configuration, then store the Active Configuration as the Factory Default. The previous Factory Default will be overwritten. Figure 5 illustrates this process. Table 2 describes the commands for changing the default configuration. Table 2. Configuration Commands

R44-2016

Command

Setting

Z1

Reset active configuration to factory defaults. The active configuration will be overwritten.

Z2

Store the active configuration as Factory Default. The contents of the Factory Default will be overwritten.

10

Page 15

Section 3

LM520 Scanner Configuration

Figure 5. Configuration Management

Factory Default Configuration

Z1

Z2

Active Configuration

Host Serial Command or Programming Label

Z1 - Copy vaulted configuration into active configuration. Z2 - Copy configuration from active configuration to the factory default configuration.

R44-2016

11

Page 16

LM520 Scanner Configuration

Section 3

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: STX-ESC-[command]-[parameters]-ETX 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 characters, followed by any required parameters.

12

LM520 Scanner Integration & Programming Manual

Page 17

Section 3

LM520 Scanner Configuration

Programming with Bar Codes The LM520 scanner can also be programmed by scanning bar codes which contain commands. This method allows users to easily adjust scanner parameters. Bar codes used for programming must be Code 128, with a Function Code 3 (FNC3) as the first character. The command following the FNC3 character configures the scanner in exactly the same way as if it had received the command over the serial line, except that the scanner will not acknowledge the command on the serial line. Each bar code may contain only one command. All parameters for the command must be included in the label with the command characters. For example, the label to limit the minimum number of Code 39 to 5 characters would be.

³

O

H

0

5

<FNC3>OH05 The scanner can be programmed not to accept programming bar codes by using the Disable Programming Bar Codes command (@Y). If you disable the programming with bar codes feature, the scanner will still accept programming commands through the serial port. The Enable Programming (@Z) bar code commands will always be accepted by the scanner, and cannot be disabled. If Disable Programming Bar Codes (@Y) is set, all programming bar codes except Enable Programming Bar Codes (@Z) will be treated as standard Code 128 bar codes.

Conventions The remainder of this manual presents the valid commands in a tabular format. These tables contain two or three columns. • First column – Bar Code Command, contains the two-letter ASCII string which the scanner accepts as programming commands through the serial port or in a programming label. See Appendix D, LM520 Programming Labels, for instructions on how to create bar code programming labels. • Second column – Bar Code Parameters, may be present. If an entry appears in this column, a parameter setting is required to complete the command. • Last column – Setting, describes the effect of the command and its associated parameters. • Default Entries – The factory default settings for the scanner are shaded and denoted by asterisk. A concise list of these defaults is presented in Appendix C, Factory Default Configuration.

R44-2016

13

Page 18

LM520 Scanner Configuration

Section 3

Setting Serial Communication Parameters The first step in the integration process is establishing communications between the scanner and the host. This is done by matching the scanner’s communications parameters to the serial communication requirements of the host. The Baud Rate, Data Format and Flow Control communication settings of the scanner must match the serial communications requirements of the host. For example, if the scanner is sending data at the wrong baud rate, the host will not be able to interpret the data that is being sent. The following section outlines the RS-232 communication settings.

Baud Rate Use one of the commands shown in Table 3 to set the LM520 baud rate. Note that the scanner and the host must communicate at the same rate for communication to be successful. An ACK command will be sent by the scanner at the new baud rate, indicating that the command has been received and understood. Table 3. Baud Rate Command

Setting

DA

Baud = 300

DB

Baud = 600

DC

Baud = 1200

DD

Baud = 2400

DE

Baud = 4800

DF *

Baud = 9600

DG

Baud = 19200

DH

Baud = 38400

* Asterisk and shading denotes the Factory Default Setting.

14

LM520 Scanner Integration & Programming Manual

Page 19

Section 3

LM520 Scanner Configuration

Data Format These parameters control the data format in which the LM520 will communicate with the host. Note that the scanner and host must communicate in the same format for communication to be successful. An ACK command will be sent by the scanner in the new format indicating that the command has been received and understood. Table 4 lists the commands for the data format options. Table 4. Data Format

R44-2016

Command

Setting

EC

7 data bits, 1 stop bit, even parity

ED

7 data bits, 1 stop bit, odd parity

EK

8 data bits, 1 stop bit, even parity

EL

8 data bits, 1 stop bit, odd parity

EM *

8 data bits, 1 stop bit, no parity

EN

8 data bits, 2 stop bits, no parity

15

Page 20

LM520 Scanner Configuration

Section 3

Flow Control As shown in Table 5, the LM520 scanner supports standard flow control protocols, including XOn/XOff (software flow control) and CTS/RTS (hardware flow control). If CTS/RTS is being used, first send the HA command before sending a new Flow Control command (HB - HN). If the CTS and RTS lines are not used for flow control, they can be used to monitor and control the scanner. The default setting is no flow control: CTS = none; RTS = low when scanning in process and Xon/Xoff disabled. To return to this configuration send the HA command followed by the HN command. Table 5. Flow Control

NOTE

16

Command

Setting

HA *

No Flow Control Xon/Xoff disabled CTS mode = none RTS mode = RTS low when ready to receive

HB

Xon/Xoff Enabled CTS mode = none

HC

CTS mode = Low to transmit Xon/Xoff disabled

HD

CTS mode = High to transmit Xon/Xoff disabled

HE

CTS mode = Low to begin scanning Xon/Xoff state unchanged

HF

CTS mode = High to begin scanning Xon/Xoff state unchanged

HG

RTS = Always Low

HH

RTS = Always High

HI

RTS = Low when scanner is ready to receive commands

HJ

RTS = High when scanner is ready to receive commands

HK

RTS = High when scanner has data to send

HL

RTS = Low when scanner has data to send

HM

RTS = High when scanning is in progress

HN *

RTS = Low when scanning is in progress

If Xon/Xoff is enabled, then RTS = low when scanning and CTS = none If Xon/Xoff is disabled, then RTS = low when ready to scan and CTS = none Low = Mark signal (negative voltage) High = Space signal (positive voltage)

LM520 Scanner Integration & Programming Manual

Page 21

Section 3

LM520 Scanner Configuration

Controlling Scanning Through Host Commands Triggering Scanning Using Software Switch A host can instruct the scanner to begin scanning by sending the Scan Now command. Table 6 shows that the number of scanning passes is user programmable. Table 6. Software Switch Control Command

Parameter

Setting

ZD

XX (01-99)

Scan Now. Begin scanning immediately. Scan until a bar code is decoded, or for a maximum of XX scans. NOTE: The LM520 scans approximately 42 times per second.

ZD

00

Scan Now. Begin scanning immediately. Scan until a bar code is decoded, or until the scanning timeout expires. See BH command in Table 30.

The ZD command returns ACK immediately followed by the bar code data when a bar code is decoded. NOTE

Except for terminating after the requested number of scans if no bar code is read, scanning initiated through this command performs identically to scanning initiated by pressing the trigger (assertion on the Scan Trigger line, pin 9).

R44-2016

17

Page 22

LM520 Scanner Configuration

Section 3

Triggering Scanning Using Hardware Switch Using a hardware switch can also be configured to respond to the CTS line rather than the Scan Trigger line using the commands below. Table 7. Hardware Switch Control Command

Setting

HE

CTS mode = High signal triggers scanning (Other serial options unchanged)

HF

CTS mode = Low signal triggers scanning (Other serial options unchanged)

Scanning initiated in response to a CTS signal performs identically to scanning initiated by pressing the trigger (assertion on the Scan Trigger line, pin 9). To disable scanning in response to a CTS signal, set the CTS mode to a non-scanning mode (HA, HB, HC or HD) as described in Setting Serial Communication Parameters on page 14. Hardware scanning continues until either the Scan Trigger is deasserted or until the scanner timeout expires. See BH command in Table 30.

Continuous Scanning Mode The LM520 may also be set for Continuous Scanning mode through host commands. Table 8. Continuous Scanning Mode Command

18

Parameter

Setting

NC

Continuous scanning on.

ND*

Continuous scanning off – only for use when programming with bar codes. (Also, see Canceling Software Triggered Scanning.)

LM520 Scanner Integration & Programming Manual

Page 23

Section 3

LM520 Scanner Configuration

LaserSense Scanning Mode LaserSense is a significant technology breakthrough. LaserSense technology has two key advantages over other automatic triggering methods. • It detects movement at a user configurable range from the scanner. This eliminates false triggers from movement in the general area and clearly identifies where the bar code should be placed with a stable marker point. • It is integral to the scanner. There are no additional components to fail or add-on components that are not well integrated. Using a background color that contrasts with the object being detected will enhance performance. Table 9. LaserSense Mode Command

Parameter

Setting

NA *

Enable LaserSense. When an object is detected, scanning occurs until the scanning timeout expires. See the BH command in Table 30.

NB

Disable LaserSense – only for use when programming with bar codes.(Also see Canceling Software Triggered Scanning.)

NG

Set range for LaserSense. Higher values increases the effective range. A value that is too large will result in false triggers and continuous scanning. A value too low will result in no triggering. Tolerance = ±20%

XX (45 - 70)

Default: NG60 Range = 45 - 70 NG45 = 4.5” (minimum) NG60 = 10” (default) NG70 = 23” (maximum)

Canceling Software Triggered Scanning A scan triggered by software, such as software trigger (ZD), LaserSense scanning (NA), or continuous scanning (NC) can be canceled using the ASCII DC4 command from the host, or by scanning the ND or NB labels. The ASCII DC4 command is a single byte (0x14 hex) and should not be sent with a STX-ESC preceding it. When the LM520 receives this single character, it will respond with an ACK, turn active scanning off and be ready to receive additional programming commands. Sending this DC4 command is sufficient and does not require the host to send the Continuous Scanning Off (ND) or Disable LaserSense (NB) commands.

R44-2016

19