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 5 of 7

LM520 Scanner Integration & Programming Manual: Section 3, pages 34 to 42

Pages 34 to 42 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 34

LM520 Scanner Configuration

Section 3

Filters After the bar code is decoded, the LM520 scanner may apply a filter on the decoded data before transmitting the data to the host. A filter is maintained for each symbology the scanner supports. All bar codes using a given symbology are processed using the filter for that symbology. Table 24 shows examples of filters that include fill characters, edit functions and two types of “literals,” pre-literals and post-literals. In the following examples the bar code data contain five numeric characters: “12345.” Table 24. Filter Examples Filter

Output

Comment

%DZL7%

‘12345000’

Return left-most seven characters. Zeroes are added to to the right of the label data to bring the total number of characters to seven.

%DSR7%

‘ 12345’

Return right-most seven characters. Spaces are added to the left of the label data to bring the total number of characters to seven.

%DL3%

‘123’

Return left-most three characters of the label.

%DR4%

‘2345’

Return right-most four characters of the label.

%DM2,3%

‘234’

Return three characters of the label, starting at the second character.

‘2340000’

1. Inner-most edit functions (M2,3): return three characters of the label, starting at the second character. Provide this data (‘234’) as input to the next inner-most edit function. 2. Outer-most edit functions (L7): return the left-most seven characters of the input string (‘234’). Zeroes are added to the right of the label data to bring the total number of characters to seven.

%DSRM2,3,7%

‘ 234’

1. Inner-most edit functions (M2,3): return three characters of the label, starting at the second character. Provide this data (‘234’) as input to the next inner-most edit function. 2. Outer-most edit functions (R7): return the right-most seven characters of the input string (‘234’). Spaces are added to the left of the label data to bring the total number of characters to seven.

SCAN%D%END

‘SCAN12345END’

Return the pre-literal ‘SCAN’, the label data, and the post-literal ‘END’.

%DZLM2,3,7%

30

LM520 Scanner Integration & Programming Manual

Page 35

Section 3

LM520 Scanner Configuration

Figure 6 shows an example of fully appended bar code data that would be sent from the scanner to the host. To set a filter for a particular symbology, use the command below. Note that the filter must be provided as a parameter. If no filter is provided, the scanner will return no data. To return only the bar code data a filter of %D% may be set. Reference Table 25 for Symbology Identifiers. Figure 6. Formatting Example Symbology specific filter data

PREAMBLE | PRE-LITERAL | BARCODE DATA | POST-LITERAL | POST-AMBLE

0 - 20 CHARACTERS

0 - 20 CHARACTERS

[PRE-LITERAL]%[SYMBOLOGY ID][D][PAD CHARACTERS][EDIT FUNCTIONS]%[POST-LITERAL] [PRE-LITERAL] and [POST-LITERAL] - optional fields that specify literal characters before and after the bar code data. [SYMBOLOGY ID] - optional field that identifies the type of bar code symbology the scanner read. When provided, the filter contains an entry from, Symbology Identifiers Table. [D] - optional field. If present, contains bar code data. [PAD CHARACTERS] - optional field used to add padding characters when justifying the bar code data. [EDIT FUNCTIONS] - optional field used to include part of the bar code data as part of the output data.

Field Descriptions [Pre-literal] and [Post-literal] - Optional fields that specify literal characters before and after the bar code data. These are different from a Preamble or Postamble in that they only apply to the symbology that the filter is defined. When a filter is applied to all symbologies, preand post-literals serve the same function as a Preamble and Postamble. For example, if the following was defined: Preamble = “123”, Postamble = “789”, Pre-literal = “ABC”, and Postliteral = “XYZ” the data returned to the host would take the format of “123ABC[bar code data]789XYZ”. Filters must be bracketed by the ‘%’ character as shown in this example: %[id]D[Pad Character][Edit Function]% NOTE

R44-2016

31

Page 36

LM520 Scanner Configuration

Section 3

The [D] parameter is an optional field containing the ASCII character D (0x44 hex). If the D is present, bar code data (including supplemental and concatenated bar code data) will be returned in it’s place (edited or unedited – see Edit Functions below.) If a ‘D’ is not present in the filter, no bar code data will be sent, but any pre- or post-literal data will be sent for that symbology. The [symbology id] parameter is optional. When provided, the filter will output a single character indicating the symbology of the bar code. When a symbology identifier is used, it precedes the bar code data and informs the host of the data type that follows. For example: If the filter for Code 39 is set to ‘%idD%’, a Code 39 bar code containing the data ‘12345’ will be transmitted to the host as ‘a12345’. The following table lists the symbology identifiers. The [pad character] field is optional. It designates a character to be used as padding when justifying the code data. The [edit functions] parameter is an optional field that can divide the bar code data into pieces by taking the right-most characters, left-most characters, or middle characters. Table 25. Symbology Identifiers

32

Symbology

Identifier

UPC-A

‘d’

UPC-E

‘d’

EAN-13

‘d’

EAN-8

‘d’

Code 39

‘a’

ITF

‘b’

STF

‘c’

Codabar

‘h’

Code 93

‘g’

Code 128

‘f’

Code ISBT128

‘f’

LM520 Scanner Integration & Programming Manual

Page 37

Section 3

LM520 Scanner Configuration

Pad Character Valid pad characters are N, S and Z as shown below. Table 26. Pad Characters N

Do not fill

S

Pad with spaces

Z

Pad with zeroes

Edit Function Edit functions may be one of: Table 27. Edit Functions R[s,](n)

Include the last ‘n’ characters of the output from filter ‘s’ or the label if ‘s’ is not present.

L[s,](n)

Include the first ‘n’ characters of the output from filter ‘s’, or the label if ‘s’ is not present.

M[s,](p,n)

Include ‘n’ characters starting at position ‘p’ of the output from filter ‘s’ or the label if ‘s’ is not present.

If n is larger than the number of characters in the bar code, then pad characters are added to the output. The bar code data will be justified in the same position in which it appeared in the bar code. Edit functions may also be nested. When nested, the innermost function is processed first, taking the bar code data as input. The output of the innermost function is passed to the next most-embedded function as input. However, only the outermost function will pad data using the pad character(s). Examples of edit strings, including nesting and the use of pad characters, are shown in Table 26.

R44-2016

33

Page 38

LM520 Scanner Configuration

Section 3

Setting the Bar Code Format To set the bar code format for a particular symbology, use the following commands. Note that the filter must be provided as a parameter. If no filter is provided, the scanner will return no data. To return only the bar code data (including supplemental and concatenated bar code data), a filter of %D% may be set. Table 28. Bar Code Format Command

Parameter

Setting

FA *

Set filters for all symbologies to %D% (bar code data only)

FB

Set filters for all symbologies that have not been specifically set with a filter to %idD% (symbology identifier and bar code data)

FC

Filter

Set filter for UPC-A bar codes

FD

Filter

Set filter for UPC-E bar codes

FE

Filter

Set filter for EAN-13 bar codes

FF

Filter

Set filter for EAN-8 bar codes

FG

Filter

Set filter for Code 39 bar codes

FH

Filter

Set filter for Interleaved 2 of 5 bar codes

FI

Filter

Set filter for Codabar bar codes

FJ

Filter

Set filter for Code 93 bar codes

FK

Filter

Set filter for Code 128 and ISBT 128 bar codes

FM

Filter

Set filter for Standard 2 of 5 bar codes

For example, a complete command to set the bar code filter to return the literal ‘12’, the bar code data, then the literal ‘34’ for UPC-A bar codes is: FC12%D%34 The command to set the same filter for UPC-E bar codes is: FD12%D%34

34

LM520 Scanner Integration & Programming Manual

Page 39

Section 3

LM520 Scanner Configuration

Additional Commands The commands in this section customize the scanner’s operation to meet your specific system requirements.

Good Read Beeper Duration This command controls the length of time the scanner will produce a signal on the Beeper/Good Read line (pin 1) when a bar code is successfully decoded. Table 29. Beeper Duration Command

Parameter

Setting

AE

XX (00 - 99)

Set Beeper duration to (XX * 45)ms. The default is 135ms (XX = 03).

Setting AE = 00 disables the Good Read Beeper. NOTE

Laser Timeout If a bar code is not read and decoded successfully within a certain period of time, the LM520 will stop scanning. The length of time the scanner remains active before timing out can be set to between 0.1 and 9.9 seconds. This command affects hardware, software and LaserSense triggering modes. Table 30. Laser Timeouts

NOTE

R44-2016

Command

Parameter

Setting

BH

XX (00 - 99)

Set scanning timeout to (XX * 100)ms. +/-10%. (Default is 6 seconds XX = 60)

A duration of zero implies infinite duration. The scanner continues to scan until: a. a bar code is decoded b. cancel command, DC4 (0x14 hex) is sent if using software or LaserSense triggering c. hardware triggering is released or deasserted on the scan trigger line using hardware trigger.

35

Page 40

LM520 Scanner Configuration

Section 3

Double Read Timeout After a bar code has been successfully read, the scanner will wait for the amount of time set using this command before it will read a bar code that contains the same bar code data. Setting this parameter effects the scanner’s internal timing and produces no external I/O response. Table 31. Double Read Timeout Command

NH *

Parameter

Setting

XX (00-99)

Default is NH24 (timeout = 600ms). Set double read prevention to XX * 25ms. After a successful decode, the scanner will ignore a label containing identical data for XX * 25ms. If set to 00, scanner returns to default timeout = 600 ms.

Read Verification When the Read Verification feature is used, the LM520 will not consider a bar code to be successfully decoded until it has obtained the same results from scanning the bar code on multiple attempts. This feature is particularly useful for reading poorly printed bar codes. Since there is a small performance penalty when this feature is enabled, it should be left disabled unless it is needed to prevent misreads of poorly printed bar codes. Table 32. Read Verification

36

Command

Setting

BC *

Read verification disabled

BD

Read verification set to two decodes

BE

Read verification set to four decodes

LM520 Scanner Integration & Programming Manual

Page 41

Section 3

LM520 Scanner Configuration

No Read Message When no read message is enabled, the ASCII character string ‘No Read’ will be transmitted to the host when scanning is completed without a bar code being successfully decoded. Table 33. No Read Message Command

Setting

NX

No read message enabled.

NY *

No read message disabled.

The No Read message is not available if Continuous Scanning mode is enabled. NOTE

No Read Output Signal The LM520 No Read signal is output on pin 4 of the 9 pin DSUB connector. This signal is an active low signal (0 V) input to a PLC (Programmable Logic Controller). The normal signal is high (5VDC). Care must be taken no to exceed the electrical limits of this output (see Electrical Interface). The signal is asserted (0V) when a scan results in no bar code being decoded. There are two modes of operation available.

No Read Output Signal Mode 1 When a scanning timeout occurs or the trigger is released and no bar code was decoded, the signal is set active (0V) and remains active until a label is successfully decoded.

No Read Output Signal Mode 2 When a scanning timeout occurs or the trigger is released and no bar code was decoded, the signal is set active (0V) and remains active until a duration set by the timeout argument of the enable command NKxx. After the timeout, the signal returns to 5V. The two digit argument for NK has a valid range of 1-99 (0.1 – 9.9 sec.) In the event of another scanning timeout occurring during the active period of the signal, the timer is reset to 0, which extends the active period of the No Read Output Signal for the period xx. The No Read Output Signal is deactivated and remains at 5VDC when the command is given to disable this function. This Function is not available in Continuous Scan mode. NOTE

R44-2016

37

Page 42

LM520 Scanner Configuration

Section 3

Table 34. No Read Output Mode Command

Parameter

Setting

NI

Enable No Read Timeout Mode 1 and forces disable of No Read Timeout Mode 2 [if a laser timeout occurs, the No Read Timeout signal (pin 4) is asserted (0.0VDC) until a decode occurs].

NJ *

Disable No Read Timeout Mode 1. Returns signal to +5VDC.

NKxx

Enables No Read Timeout Mode 2 and forces disable of No Read Timeout Mode 1. The XX arguments following the command characters are the length of time in approximately 100 ms that the No Read Timeout signal will remain 0.0VDC.

XX = 01 - 99

Disable No Read Timeout Mode 2. Returns signal to +5VDC

NL *

Diagnostic Commands The LM520 scanner provides commands which allow testing of the scanner, and provide information about the firmware in the scanner. Table 35. Diagnostic Commands Command

Settings

ZC

Display operational software version. Scanner sends ACK followed by the data.

AG

Activate the Beeper/Good Read line (pin 1) for a single Good Read beep (as configured by Beeper Duration: AE command).

AH

Activate the internal Good Read LED for the amount of time specified by Good Read LED duration (AF command).

Good Read LED Duration This command controls the length of time the scanner will light the Good Read LED when a bar code is successfully decoded. Table 36. Good Read LED Duration

38

Command

Parameter

Setting

AF

XX (00-99)

Set Good Read LED duration to XX * 45ms. The default is 135ms (XX = 03).

LM520 Scanner Integration & Programming Manual