Flic® Laser Bar Code Scanner Developer`s Guide

Flic® Laser Bar Code Scanner
Developer’s Guide
Document: DA0110468 Rev A
Trademarks
Microvision, the Microvision logo, and Flic are registered trademarks of Microvision, Inc.
Flicware is a trademark of Microvision, Inc.
Windows is a trademark of Microsoft Corporation.
DA0110468 Rev A
Flic® Laser Bar Code Scanner Developer’s Guide
Table of Contents
1
Getting Started
1.1
1.2
1.3
1.3.1
1.3.2
1.3.3
1.4
2
The Flic Scanner’s Device Features
2.1
2.2
2.3
2.4
2.5
2.6
2.6.1
3
Developer Options
Determining the Version of Firmware Installed on Your Scanner
Firmware Version History
Changes in Version 1.8.0
Changes in Version 1.7.0
Changes in Version 1.6.0
Customer Support
Visual and Audio Scan Status Indicators
Standby Power Save Mode
Flic ID and Data Features
Operation Modes
Bar Code Data Storage
Device Configuration Data
Device Configuration Bytes and Bits
Data Formats
3.1
Compatible Data Format
3.2
XML Data Format
3.2.1 XML Tags and Attributes
3.2.2 XML Format Features
4
5
Configuring the Flic Scanner
Communicating with the Flic Scanner
5.1
5.2
5.3
5.3.1
5.4
5.4.1
5.4.2
5.4.3
5.4.4
5.4.5
5.4.6
5.4.7
5.4.8
6
Setting Up HyperTerminal
Programming Conventions
Sending Commands to the Flic Scanner
Standby Mode
Command Codes
Wake Command
Who Command
Signal Command
Set Device Configuration Command
Return to Factory Settings Command
Initialize Time Reference Setting Command
Download Bar Code Data Command
Clear Bar Code Data Command
Examples
6.1
6.2
6.3
6.4
6.5
6.6
6.7
6.8
6.9
9/29/2003
Changing the Scanner’s Configuration
Changing the Download Data Format to XML
Changing Multiple Consecutive Bytes
Disabling Automatic Data Download
Setting NCR Default Values
Writing a Number to the User ID Field
Writing an 8-Character String to the User ID Field
Recovering the Time From a Timestamp
Transmitting Supplemental Bar Codes
5
5
5
6
6
7
7
7
8
8
8
8
9
10
11
12
16
16
17
17
18
19
19
19
21
21
21
22
23
23
23
24
24
25
25
26
27
27
27
27
28
28
28
29
29
30
Page 3
DA0110468 Rev A
7
Flic® Laser Bar Code Scanner Developer’s Guide
Appendices
7.1
7.2
7.3
7.4
7.4.1
7.5
7.5.1
7.5.2
7.5.3
7.5.4
7.5.5
7.6
Cable Pin Out
COM Port Settings
Microvision and NCR Default Values
AIM Symbol Codes
AIM Code Modifiers
Bar Codes
Device Option Control Bar Codes
Symbology Selection Control Bar Codes
Supplemental Bar Codes
Symbology Options Control Bar Codes
Command Control Bar Codes
ASCII Chart
32
32
32
33
34
34
35
35
37
38
39
39
40
List of Tables
Table 1: LED and Beeper Signals
Table 2: Flic Scanner Features
Table 3: Flic Operation Modes and Data Formats
Table 4: Device Configuration Data
Table 5: Configuration of First Byte (Address 08)
Table 6: Configuration of Second Byte (Address 09)
Table 7: Configuration of Third Byte (Address 0A)
Table 8: Configuration of Fourth Byte (Address 0B)
Table 9: XML Tags and Attributes
Table 10: Command Codes
Table 11: T Command Codes Options
Table 12: Default Settings Options
Table 13: How Data is Downloaded and Deleted from Memory in Batch Mode
Table 14: AIM Code
Table 15: Code 39 Modifiers
Table 16: Code 128 Modifiers
Table 17: UPC/EAN Modifiers
8
8
10
11
12
13
14
15
17
22
24
25
26
34
34
34
34
List of Figures
Figure 1: Cable Pin Out
9/29/2003
32
Page 4
DA0110468 Rev A
1
Flic® Laser Bar Code Scanner Developer’s Guide
Getting Started
The Flic Laser Bar Code Scanner is a flexible product that supports both new and existing applications. The
Flic’s flexibility makes it ideal for a wide range of data collection applications. For portable applications such
as asset tracking, the Flic scanner can store a minimum of 500 UPC bar codes in memory. The saved bar
codes can be easily downloaded for processing. For tethered uses such as library or wired network
applications, the Flic can be attached to a host for immediate data entry. If you require a little of both, Flic
can operate tethered and then be removed and used in store-and-forward (“batch”) mode for applications
like healthcare, where it might be easier to bring the scanner to the patient rather than the patient to the
scanner.
The Flic scanner supports two transmission modes, tethered or store-and-forward, and two data formats,
legacy compatible and XML:
1.1
•
When the Flic scanner is attached to a computer or other host, it is tethered. In this mode, when
the user presses the button, the scanner immediately transmits the decoded bar code to the host.
•
When the Flic scanner is not attached to a host, it operates in batch mode. In this mode, when the
user presses the button, the scanner stores the decoded bar code. Then when the user attaches
the scanner to the host, the scanner immediately begins downloading the stored bar codes.
•
The compatible data format allows the Flic scanner to work with legacy systems. Therefore, you do
not need to change your existing applications.
•
The XML data format gives access to the enhanced features of the scanner, such as timestamp,
device and user IDs. It supports PC- and web-based applications.
Developer Options
Microvision provides three ways for you, a developer, to interact with the Flic scanner:
1. The FlicwareTM and FlicwareTM Pro applications. These are Windows® based applications that run in
the background. They convert the data from a scanner that is connected to a USB or serial port
into keystrokes. Then they insert the keystrokes at the current cursor position into the active
application.
o
The basic version of the application, FlicwareTM, turns any Windows® program into a bar
code application in only minutes. You can download FlicwareTM for free from the
www.flicscanner.com website, or you can order the software on a CD. The CD also
provides USB drivers for the scanner.
o
The upgrade version, FlicwareTM Pro, provides enhancements such as transaction
processing, application recognition and sound prompting. It allows you to customize the
interface. FlicwareTM Pro can be purchased from the website, or from your local reseller.
2. A web browser plug-in. Microvision provides a browser plug-in that handles the setup and
communication with the Flic scanner. The plug-in passes XML formatted data to the web page. The
plug-in and the documentation are available from customer support. Contact customer support at
customer_service@microvision.com.
3. The device interface defined in this developer guide supports full, customized programming.
1.2
Determining the Version of Firmware Installed on Your Scanner
With each firmware release Microvision has implemented new features to enhance the Flic scanner. To see
what features were implemented in what release version, see “1.3 Firmware Version History” below.
9/29/2003
Page 5
DA0110468 Rev A
Flic® Laser Bar Code Scanner Developer’s Guide
Note: In this guide, features that have been implemented after firmware version 1.5.0 are denoted by a
FWV code, followed by the implementation version number.
This section tells you one way of determining what version of the firmware is installed on your scanner. You
can also use the Who command to find this information. The Who command is documented in “5.4.2 Who
Command” on page 23.
Note: The scanner’s firmware cannot be upgraded. If you need to use the functionality that is implemented
in a later version, please contact Microvision.
To determine the firmware version installed on your scanner:
1. Start the Flicware application by selecting Start > Programs > Microvision > Flicware.
1. From the Tools menu, select Options…
2. On the Options dialog box, if the port to which you connected the scanner is different than the
port that is displayed, select the appropriate port from the Port: drop down menu.
Note: Once the software for the USB adaptor has been installed, the scanner treats USB as if it was
a COM port.
3. Click Test.
4. The application detects the Flic scanner and displays the following information:
Look for the number in the FW field. This is the firmware version number.
1.3
Firmware Version History
In this guide, features that have been implemented after firmware version 1.5.0 are denoted by a FWV
code, followed by the implementation version number. The version changes are summarized below.
1.3.1
Changes in Version 1.8.0
•
Implemented expansion of UPC-A bar codes to EAN-13 format. If both the expand UPC-E codes
(byte 09, bit 4) and the convert UPC-A codes (byte 0B, bit 2) are enabled, then the scanner will
expand all UPC-E codes to the EAN-13 format.
•
Implemented standard vs. aggressive scanning selectability via control bar code. Standard scanning
meets all UPC scanning specifications. Aggressive scanning ignores the UPC/EAN-13 requirement
for the amount of blank space (quiet zone) that should surround a bar code.
9/29/2003
Page 6
DA0110468 Rev A
1.3.2
Changes in Version 1.7.0
•
Changed the NCR symbology identifiers for Code 39 and Code 128.
•
Implemented combined bar code feature for supplemental bar codes. For more information, see
“6.9 Transmitting Supplemental Bar Codes” on page 30.
•
Implemented selectable baud rates, 4800 and 9600.
1.3.3
1.4
Flic® Laser Bar Code Scanner Developer’s Guide
Changes in Version 1.6.0
•
Changed the inter-bar code delay to have four selectable settings: no delay, 500ms, 1.1s and 1.6s.
•
Added support for supplemental bar codes with EAN-8.
•
Changed how the scanner appends supplemental bar codes to the base bar code when using NCR
identifiers.
Customer Support
Website:
www.flicscanner.com
Email:
customer_service@microvision.com
Phone:
Toll free within the United States: (866) 333-3542
International: (425) 354-3542
9/29/2003
Page 7
DA0110468 Rev A
2
2.1
Flic® Laser Bar Code Scanner Developer’s Guide
The Flic Scanner’s Device Features
Visual and Audio Scan Status Indicators
The Flic scanner has a green LED and a piezo beeper to provide visual and audible indicators of the status of
a scan. The combination of the two indicates various device conditions as shown in the table below. By
default, both the LED and beeper are enabled. Either the LED or the beeper can be turned on or off by
using the bar codes listed in “7.5.1 Device Option Control Bar Codes” in the Appendices on page 35, or by
setting the appropriate control bits through the command interface.
Table 1: LED and Beeper Signals
Green LED
Beeper
Good Scan
On for 200 msec.
Single beep, higher pitch than the
Invalid Command beep.
Device Memory Full
Blinks 3 times.
Beeps 3 times.
Downloading
Blinks 2 times per second while the
data is downloading.
None.
Download Complete
On for 300 msec.
Three beeps that descend in pitch.
Invalid Command
Not Used.
Single beep, lower pitch than the
Good Scan beep.
System Error
Not Used.
Beeps 5 times. This cannot be disabled.
2.2
Standby Power Save Mode
The Flic scanner operates from 3 AAA batteries that will supply over 20,000 scans. In order to conserve
power the scanner enters standby mode after two seconds of no activity. When scanning, the device wakes
up when you press the scan button. When communicating with a host, the host must follow the wake-up
sequence described in “5.4.1 Wake Command” on page 23.
2.3
Flic ID and Data Features
The following information can be configured for each Flic scanner. Except for the Time Reference field, the
configuration information is stored in non-volatile memory. The Time Reference data is stored in RAM.
Table 2: Flic Scanner Features
Flic Feature
Description
Device ID
Each device has a unique ID number. This number is set at the factory, and it
cannot be changed. You can use this feature to associate a particular scanner with a
specific application or user.
User ID
You can use this data field to store custom information. This field is targeted to be
used as a user ID but can be used to store any information. For example, you can
use it to store the employee number, application data, or the installation date. For
more information, see “6.6 Writing a Number to the User ID Field” on page 28,
and “6.7 Writing an 8-Character String to the User ID Field” on page 29.
9/29/2003
Page 8
DA0110468 Rev A
Flic® Laser Bar Code Scanner Developer’s Guide
Flic Feature
Description
Symbology ID
Each bar code scanned is associated with a code that identifies the bar code
symbology of the data. This data can optionally be transmitted as part of the bar
code data record in either Compatible or XML format. The scanner supports AIM
and NCR code symbology identifiers. For more information, see the bar codes in
“7.5 Bar Codes” on page 35, and the “2.6 Device Configuration Data” on page 11.
Timestamp
This feature provides the amount of time elapsed since the last scan. You can
choose whether to store the relative timestamp with each successful bar code, or
with each button push. For more information, see “2.6 Device Configuration Data”
on page 11.
You can use the timestamp to track time and attendance or for any application
where the scanning time is important information.
Note: This information is not retained if the scanner loses power, or if you return
the scanner to its default configuration.
Time Reference
Use this data field to store an initial time reference value. The timestamp associated
with each scan is the amount of time from the last scan. Your application can use
the value of this field to calculate the actual time by adding it and the amount of
time from the last scan. For more information, see “5.4.6 Initialize Time Reference
Setting Command” on page 25, and “6.8 Recovering the Time From a Timestamp”
on page 29.
If you do not need to calculate time values, you can use this field to store other
information.
Note: The information in this field is stored in RAM. It is not retained if the scanner
loses power, or if you return the scanner ‘s configuration to the default values.
2.4
Operation Modes
The Flic scanner can be used in either real-time tethered mode or store-and-forward batch mode. The
scanner runs in tethered mode when the cable is plugged into the scanner. When the cable is not plugged
in, the scanner operates in batch mode. The scanner automatically detects if the cable is plugged in.
When tethered, the scanner operates like a traditional scanner and transmits the scanned data immediately
after the scan. In batch mode, the data is stored in memory until the memory is full. The stored data can
then be automatically transmitted to the host when the device is plugged in or it can be stored until the
host sends a request for the data.
The scanner can transfer data in the Compatible or XML formats. The Compatible data format allows the
Flic scanner to work in legacy systems. You can use ACK/NAK handshaking with the Compatible format to
insure data security. The XML mode supports PC- and web-based applications. For more information, see
“3 Data Formats” on page 16.
9/29/2003
Page 9
DA0110468 Rev A
Flic® Laser Bar Code Scanner Developer’s Guide
Table 3: Flic Operation Modes and Data Formats
Mode
ACK/NAK
Tethered
Batch
Compatible
(default)
Enabled
Scanner sends data immediately
after the scan. Host sends <ACK>.
Scanner deletes data after receiving
<ACK>.
Scanner sends the first data record
saved in memory when the cable is
plugged in. Host sends <ACK>.
Scanner deletes data after receiving
<ACK>. Then the scanner sends
the next record, if one exists.
If the scanner receives a <NAK>, it
retransmits the data up to two
times.
If the scanner does not receive an
<ACK>, the scanner stores the data
in non-volatile memory. On each
successful scan, the first data record
stored in memory is sent. This
record may not correspond to the
most recent data scanned.
Disabled
Scanner sends data immediately
after the scan. Scanner deletes data.
Warning: If the host software is not
active, the data will be lost.
XML
N/A
If the scanner receives a <NAK>, it
retransmits the data up to two
times.
If the scanner does not receive an
<ACK>, it saves the data in nonvolatile memory, and it aborts the
download process.
Scanner sends data when the cable
is plugged in. All of the records are
sequentially transmitted and then
deleted from memory.
Warning: If the host software is not
active, the data will be lost.
Scanner stores data in memory and
sends the data immediately. Host
sends <ACK> and Clear command.
Scanner deletes data when it
receives the Clear command.
Scanner sends data when the cable
is plugged in. Host sends <ACK>
and Clear command. Scanner
deletes data when it receives the
Clear command.
If the scanner does not receive the
Clear command, the data remains
in memory and will be
retransmitted with the next scan.
If the scanner does not receive the
Clear command, the data remains in
memory and will be retransmitted
with the next data download.
If you have enabled the timestamp
feature, then the host should reset
the time reference.
2.5
Bar Code Data Storage
In batch mode, the Flic scanner stores the bar code information in its internal non-volatile memory. The Flic
can store a minimum of 500 UPC bar codes. Since Code 39 and Code 128 have variable length data, the
minimum number will vary for these bar codes. You can mix bar code styles without penalty.
When the scanner’s memory is full, the scanner’s LED will blink three times, and the beeper will sound three
times. This is the Device Full alert. Once full, the scanner cannot perform any additional scans. If the user
tries to scan by pushing the button, the Flic scanner will repeat the Device Full alert without activating the
laser. In order to enable further scans, you must clear the bar code memory. For information on clearing the
9/29/2003
Page 10
DA0110468 Rev A
Flic® Laser Bar Code Scanner Developer’s Guide
memory, see “5.4.7 Download Bar Code Data Command” on page 25, and “5.4.8 Clear Bar Code Data
Command” on page 26.
2.6
Device Configuration Data
This section describes the device configuration bits. The table below shows the data that the scanner stores,
and the memory locations of the data. Since all data values in the scanner are formatted in hexadecimal, the
start and stop memory addresses listed below are in hexadecimal. The data is stored as two characters per
byte, with each character giving the value of a nibble.
Table 4: Device Configuration Data
Description
Size
Start Memory
Address (ASCII)
Stop Memory
Address (ASCII)
Read/Write
Access
User ID Data
8 bytes
0
7
R/W
Device Configuration Setup
4 bytes
8
B
R/W
Device ID
4 bytes
C
F
R
Hardware Version
2 bytes
10
11
R
Firmware Version
3 bytes
12
14
R
For information on the User ID Data, see “6.6 Writing a Number to the User ID Field” on page 28, and
“6.7 Writing an 8-Character String to the User ID Field” on page 29. The section below gives more
information on the Device Configuration Setup. The Device ID, Hardware Version and Firmware Version
fields are factory defined.
For information about the features added in each firmware upgrade, see “1.3 Firmware Version History” on
page 6.
9/29/2003
Page 11
DA0110468 Rev A
2.6.1
Flic® Laser Bar Code Scanner Developer’s Guide
Device Configuration Bytes and Bits
Tables 5, to 8 give the definitions of the bits of each byte in the Device Configuration Setup memory.
Table 5: Configuration of First Byte (Address 08)
Bit
Description
Values
0
Beep. Enable or disable the beeper.
0 – Off
1 – On*#
2 and 1
Timestamp. Enable or disable setting timestamps for each decoded bar
code or for any button press even without a decoded bar code. The
timestamp is a relative time difference calculated from the last scan or
button press, depending on the mode.
The timestamp only can be accessed in XML mode. The time stamp data
is transmitted as the DT (delta time) attribute. The timestamp value is a
maximum of 4-bytes, with each count representing one second. Leading
zero bytes will not be transmitted. The host is also responsible for setting
the initial time reference value using the I command. For more
information, see “5.4.6 Initialize Time Reference Setting Command” on
page 25, and “6.8 Recovering the Time From a Timestamp” on page 29.
00 – Off*#
01 – On, timestamp
decoded bar codes
only
10 – On, timestamp
any button press
11 – Off. This is
saved in memory as
00
Warning: When switching time stamp modes, the bar code information
stored in the device’s memory can be corrupted. Therefore, you should
download all data before changing the configuration.
3
LED. Enable or disable the LED indicator.
0 – Off
1 – On*#
4
5
STX. Enable or disable sending the <STX> prefix character in
Compatible format.
AIM Code. Enable or disable transmission of AIM Code in both
Compatible and XML formats. See the AIM code definitions in “7.4 AIM
Symbol Codes” on page 34.
0 – Off#
1 – On*
0 – Off*#
1 – On
This field works in combination with the Enable Combined Bar Codes,
and the NCR Symbol Identifiers settings. For more information, see “6.9
Transmitting Supplemental Bar Codes” on page 30.
6
7
Linefeed. Enable or disable sending the linefeed character, <LF>, after
each carriage return, <CR>, in both Compatible and XML formats.
Acknowledgment Protocol. Enable or disable the ACK/NAK protocol in
Compatible format. This does not affect XML format.
0 – Off#
1 – On*
0 – Off*#
1 – On
* Factory Default Setting
# NCR Factory Default Setting
9/29/2003
Page 12
DA0110468 Rev A
Flic® Laser Bar Code Scanner Developer’s Guide
Table 6: Configuration of Second Byte (Address 09)
Bit
Description
Values
0
Download Format. Set the data transmission format for scanner.
0 – Compatible*#
1 – XML
1
2
ETX Enable. Enable or disable replacing the <CR> or <CR><LF> line
termination characters with the <ETX> character.
Disable Auto-Download. Enable or disable automatically downloading
the bar code data when the scanner detects the cable being plugged in.
When automatic data download is disabled, the host must issue a D
command to tell the scanner to send the data. For more information, see
“5.4.7 Download Bar Code Data Command” on page 25.
3
NCR Symbol Identifiers. Enable or disable using NCR symbol identifiers.
The identifier is a one or two character string that precedes each bar
code. When you enable this bit, you must disable AIM codes because the
AIM codes have higher precedence.
0 – Off*#
1 – On
0 – Enable
automatic data
download*#
1 – Disable
automatic data
download
0 – Off*
1 – On#
When enabled, the transmitted bar code will be prefixed with a letter
that identifies the bar code’s symbology:
Code
A
E
F
FF
a
f
Symbology
UPC-A
UPC-E
EAN13
EAN-8
Code
39
Code
128
This field works in combination with the AIM Code, and the Enable
Combined Bar Codes settings. For more information, see “6.9
Transmitting Supplemental Bar Codes” on page 30.
4
Expand UPC-E Codes (FWV 1.8.0). Enable or disable expanding UPC-E
codes to the equivalent UPC-A code.
0 – Do not
expand*#
1 – Expand
5
Reserved.
0
6
Code 39 Strip Check Character. Enable or disable stripping the
checksum character from the data. When enabled, the scanner will force
checksum verification regardless of the setting of the Code 39 Checksum
bit.
0 – Off*#
7
Code 39 Checksum. Enable or disable verifying the checksum before
storing the data.
1 – On
0 – Off*#
1 – On
* Factory Default Setting
# NCR Factory Default Setting
9/29/2003
Page 13
DA0110468 Rev A
Flic® Laser Bar Code Scanner Developer’s Guide
The bits defined in Table 7 are used to disable individual bar code symbology identifiers or to configure
supplemental data. All of the disable bits are set to 0 by default, meaning the code is not disabled, that is, it
is enabled. When these bits are set to 1, the corresponding symbology is disabled.
Table 7: Configuration of Third Byte (Address 0A)
Bit
Description
Values
0
Disable Code 39
0 – Off*#
1 – On
1
Disable Code 128
0 – Off*#
1 – On
2
Disable UPC-E
0 – Off*#
1 – On
3
Disable EAN-8
0 – Off*#
1 – On
4
Disable UPC-A/EAN-13
0 – Off*#
1 – On
5
7 and 6
Enable Combined Bar Codes. This field works in combination
with the AIM Code, and the NCR Symbol Identifier settings. For
more information, see “6.9 Transmitting Supplemental Bar
Codes” on page 30.
0 – Off*#
Require and Disable Supplemental Bar Codes. Bit 6 defines the
Require Supplemental setting, and bit 7 defines the Disable
Supplemental setting. These bits define how supplemental fields
are scanned.
00 – Auto-Detect
supplemental bar codes*
1 – On
01 – Require
supplemental bar codes
for UPC-A, UPC-E and
EAN-13. Bar codes
without supplements are
not scanned.
10 – Ignore supplemental
bar codes. Only decode
the base bar code.#
11 – Ignore supplemental
bar codes. Only decode
the base bar code.
* Factory Default Setting
# NCR Factory Default Setting
9/29/2003
Page 14
DA0110468 Rev A
Flic® Laser Bar Code Scanner Developer’s Guide
Table 8: Configuration of Fourth Byte (Address 0B)
Bit
Description
Values
0
Reserved
0
1
Reserved
0
2
Convert UPC-A Bar Codes to EAN-13 Format (FWV 1.8.0)
0 – Off*#
1 – On
3
Standard vs. Aggressive Scanning (FWV 1.8.0).
0 – Standard*#
Standard scanning meets all UPC scanning specifications.
1 – Aggressive
Aggressive scanning ignores the UPC/EAN-13 requirement for
the amount of blank space (quiet zone) that should surround a
bar code. If your bar code implementation does not have the
standard blank space, you can turn this bit on to scan these
codes.
Note: Aggressive scanning can introduce decoding errors.
Therefore, enabling this feature may reduce your data reliability.
5 and 4
Delay. This applies only to the Compatible mode with
ACK/NAK disabled. In batch mode the scanner saves the bar
codes in memory. When the cable is plugged in, these codes can
be automatically transferred to the host. Some systems cannot
handle receiving the bar codes one right after another. For these
systems you can set the amount of time to wait between
transmissions. During the delay, the scanner is unable to
communicate.
00 – No delay*
01 - 500ms
10 – 1100ms#
11 – 1600ms
FWV 1.6.0 and later use the values listed to the right.
FWV 1.5.0. Bit 5 is reserved. Bit 4 has the following values:
0 – No delay
1 – 25ms
6
Reserved
0
7
Reserved
0
* Factory Default Setting
# NCR Factory Default Setting
9/29/2003
Page 15
DA0110468 Rev A
3
Flic® Laser Bar Code Scanner Developer’s Guide
Data Formats
The scanner can transmit data in two different formats:
3.1
•
The Compatible mode supports legacy applications. It can batch process the data. For more
information see below.
•
The XML mode transmits data in an XML format. It provides access to the advanced features of the
Flic scanner, such as timestamp, device and user IDs. The XML mode supports PC- and web-based
applications. For more information, see “3.2 XML Data Format” below.
Compatible Data Format
In the Compatible format, a transmitted bar code can have one of the following formats:
[<STX>][symbol code]data<CR>[<LF>]
[<STX>][symbol code]data<ETX>
The fields enclosed in brackets [ ] are configured by the format options set by the device’s configuration. For
more information, see “2.6 Device Configuration” on page 11.
The following examples show how bar codes are downloaded in the default and default formats in
compatible mode.
The first example shows how a typical UPC bar code is downloaded in the default format:
<STX>768268017788<CR><LF>
Downloading the same bar code in the NCR default format gives:
A768268017788<CR>
The next example shows how a typical Code 39 bar code is downloaded in the default format:
<STX>QM30840RCR-A<CR><LF>
Downloading the same bar code in the NCR format yields:
aQM30840RCR-A<CR>
And finally, downloading the same bar code with AIM symbology identifiers, you get:
<STX>]A0QM30840RCR-A<CR><LF>
9/29/2003
Page 16
DA0110468 Rev A
3.2
Flic® Laser Bar Code Scanner Developer’s Guide
XML Data Format
3.2.1
XML Tags and Attributes
The XML data format uses the tags and attributes listed in the table below. You should ignore any XML
information in your output that is not included in this table.
Table 9: XML Tags and Attributes
Tag
Attribute
Definition
upload
device
Defines the attributes for a particular scanner.
type
Type of device downloading data. The only valid value within the device tag is
Flic.
id
Factory programmed identification number.
hwv
Hardware version.
fwv
Firmware version.
ud
User-programmed data.
it
Time reference or user-programmed data.
type
Type of record. The valid values within this tag are:
tag
bc – Bar code
t – Timestamp. A t record is used to give a time stamp that is not
associated with a bar code. In time stamp mode two, this would
indicate a button press without a successful scan.
The final t record gives the time between the last record and the
download by the Flic scanner. This record will only appear if the
timestamp feature has been enabled.
dt
Delta time in seconds from previous scan or button press, depending on the
mode. This record will only appear if the timestamp feature has been enabled.
ct
AIM code type. For UPC-A/UPC-E codes that do not have a formal AIM code,
the scanner sends an E. For more information, see “7.4 AIM Symbol Codes” on
page 34.
bc
Bar code data.
Certain characters that appear in some types of bar codes cannot be directly
transmitted as ASCII data since these characters are used to define the XML
structure or are not printable. For these characters the following substitutions
are made based on quote-printable encoding protocol.
9/29/2003
Page 17
DA0110468 Rev A
Tag
Attribute
Flic® Laser Bar Code Scanner Developer’s Guide
Definition
Character
Hexadecimal Substitution
< (less than)
=3C
& (ampersand)
=26
= (equals)
=3D
“ (quote)
=22
Non-printing characters
(ASCII value < 32)
=bb, where bb is the ASCII code in
hexadecimal. For the characters and
codes, see “7.6 ASCII Chart” on page
40.
For example, the string you&I is sent as bc="you=26I".
chk
3.2.2
The checksum is the modulo 256 sum of the characters in the transmission. In
the example below the checksum calculation starts with and includes, the v in
the first line. It ends with the colon (:) character after the chk in the final line.
XML Format Features
The XML format uses a handshaking scheme to insure proper communication and data security. The
ACK/NAK protocol setting does not affect communications.
After downloading the bar code data, you must explicitly delete the data from the scanner’s memory by
sending a Clear command, C. This feature provides additional data security. For more information on the
Clear command, see “5.4.8 Clear Bar Code Data Command” on page 26.
The XML mode downloads bar codes using the format shown in the following example:
Flic v: 1.2.1<CR><LF>
<?xml version="1.0" encoding="us-ascii" standalone="yes"?><CR><LF>
<upload><CR><LF>
<!-- Microvision Flic Barcode Scanner --><CR><LF>
<device type="Flic" id="00003664" hwv="1.1" fwv="1.2.1" ud=
"0123456789ABCDEF " it= "000000000000 "><CR><LF>
<tag type="bc" dt="15" ct="E" bc="043000103050" /><CR><LF>
<tag type="bc" dt="00" ct="E" bc="063202123252" /><CR><LF>
<tag type="t" dt="4A" /><CR><LF>
<tag type="bc" dt="01" ct="E" bc="083404143454" /><CR><LF>
<tag type="t" dt="01C7" /><CR><LF>
</device><CR><LF>
</upload><CR><LF>
chk: 89! <CR><LF>
9/29/2003
Page 18
DA0110468 Rev A
4
Flic® Laser Bar Code Scanner Developer’s Guide
Configuring the Flic Scanner
The Flic scanner can be configured using one of two methods: you can use the device control bar codes
displayed in “7.5 Bar Codes” on page 35, or you can use the command interface described in this guide. Use
the bar codes to:
•
Enable or disable scanner features
•
Set the delay between bar codes in milliseconds
•
Select a symbology
•
Set symbology options
•
Restore the default settings
Use the command capacity to:
•
Retrieve the scanner’s configuration information
•
Programmatically set the scanner’s configuration
•
Set an initial time value
•
Test the scanner’s functionality
•
Download the bar code data
•
Clear the bar code data from memory
•
Restore the default settings
For examples that show how to programmatically set the scanner’s configuration, see “6.1 Changing the
Scanner’s Configuration” on page 27.
5
Communicating with the Flic Scanner
All communications between the Flic scanner and host are done via USB or the RS-232 serial interface.
Once the software for the USB adaptor has been installed, the scanner treats USB as though it was a COM
port. You can use the HyperTerminal application to communicate with the scanner, or you can use any
other application that communicates via the COM port.
5.1
Setting Up HyperTerminal
When you start HyperTerminal, you must configure its settings to communicate with the Flic scanner.
To setup HyperTerminal:
1. Connect the scanner to the computer, if it is not already connected.
2. Open HyperTerminal by selecting: Start > Programs > Accessories > Communications >
HyperTerminal. HyperTerminal opens a Connection Description dialog box.
9/29/2003
Page 19
DA0110468 Rev A
Flic® Laser Bar Code Scanner Developer’s Guide
3. Enter a name for the connection, and select an icon. Click OK. HyperTerminal displays the Connect
To dialog box.
4. In the drop-down menu for the Connect using field, select the serial port where you attached the
scanner. Click OK. HyperTerminal displays the [Port] Properties dialog box.
5. Set the port settings to the following values:
•
9/29/2003
Bits per second:
4800 or 9600, depending on how your scanner is configured
Page 20
DA0110468 Rev A
5.2
Flic® Laser Bar Code Scanner Developer’s Guide
•
Data bits:
8
•
Parity:
None
•
Stop bits:
2
•
Flow control:
None
Programming Conventions
All command codes and XML codes transmitted to and from the Flic scanner are case insensitive.
All data transmitted to and from the Flic scanner is sent using ASCII characters. Data values are formatted in
hexadecimal. The data is sent using two characters/byte, with each character giving the value of a nibble.
5.3
Sending Commands to the Flic Scanner
The host initiates all communications to the Flic scanner by sending a command packet. The command
packet consists of:
1. Start of header character, <SOH>. In HyperTerminal, you type this code as Ctrl+A.
2. Single-character command code. The commands are listed in “Table 10: Command Codes” below.
The commands are case-insensitive.
3. Data, if applicable. There is no space between the command code and the data.
4. Terminating carriage return, <CR> or <ETX>. The Flic scanner ignores the line-feed character
<LF> if it is sent.
The scanner responds within one second. The scanner sends the data when it recognizes commands that
return data. Commands that do not return data, receive an <ACK> character response. Commands that are
not recognized receive a <NAK> response. These commands should be retransmitted. When you receive
no response, this indicates that the device is not connected, or that it is asleep.
5.3.1
Standby Mode
The Flic scanner automatically returns to standby mode after two seconds of inactivity. This prevents the
scanner from waking and staying alert for prolonged periods, and helps to insure a long battery life. Before
you can communicate with the scanner you must wake the scanner by:
•
Following the wake up communication sequence described below in “5.4.1 Wake Command” on
page 23 when you are using the command interface to interact with the scanner.
•
Pressing the button when you are scanning bar codes.
9/29/2003
Page 21
DA0110468 Rev A
5.4
Flic® Laser Bar Code Scanner Developer’s Guide
Command Codes
The command codes are not case sensitive. The codes are described in detail below the table.
Table 10: Command Codes
Name
Command
Code
Data
Description
Wake
Any single
character
None
Send any single character over the interface to
wake the unit. Microvision recommends that you
send the <SOH> character, or Ctrl+A in
HyperTerminal. The scanner does not perform
any action in response other than waking up. It
will not send an <ACK> or <NAK> code. For
more information, see “5.4.1 Wake Command”
below.
Who
W
None
Returns the configuration information. For more
information, see “5.4.2 Who Command” on
page 23.
Signal
T
0 or 1 bytes
Blink LED and/or beep piezo. For more
information, see “5.4.3 Signal Command” on
page 23.
Set device
configuration
S
Varies
Sets the device format and configuration. The
format and configuration is stored in non-volatile
memory. For more information, see “5.4.4 Set
Device Configuration Command” on page 24.
Return to factory
settings
F
1 byte
Return device setup to factory default settings.
The possible values are:
1 – Reset device configuration to factory
default values
2 – Reset to NCR default values.
For more information, see “5.4.5 Return to
Factory Settings Command” on page 24.
Initialize time
reference setting
I
12 bytes
Set the time reference value or use this field for
any other custom data storage. For more
information, see “5.4.6 Initialize Time Reference
Setting Command” on page 25.
Download bar code
data
D
None
Request stored bar code data. For more
information, see “5.4.7 Download Bar Code
Data Command” on page 25.
Clear bar code data
C
None
Clears entire device bar code data buffer. For
more information, see “5.4.8 Clear Bar Code
Data Command” on page 26.
9/29/2003
Page 22
DA0110468 Rev A
5.4.1
Flic® Laser Bar Code Scanner Developer’s Guide
Wake Command
The Flic scanner enters standby mode when it is inactive for two seconds. Microvision has implemented the
wake sequence outlined below so that the scanner knows when it needs to pay attention to the messages it
receives.
The scanner wakes up when it receives any single character. To keep the scanner awake, and to
communicate with the scanner:
1. Send any character. Microvision recommends that you send the <SOH> character, or Ctrl+A in
HyperTerminal.
2. Wait at least 0.75 second, but less than 2.0 seconds.
3. Send a Who command by transmitting the W<CR> characters.
4. Receive the Who response.
If the scanner does not receive a W within the required time window, the device returns to standby mode. If
scanner receives a different character before it receives the W, you must wait at least 0.75 seconds before
sending the W. Once the W has been received, the scanner is awake, and you can use the full command set
in “Table 10: Command Codes,” above.
5.4.2
Who Command
The Who command serves two purposes:
1. It confirms to the scanner that the host is communicating and thus it should stay awake.
2. It returns the complete configuration information.
The format for the command is:
<SOH>W<CR>
The scanner provides the configuration information in the following format:
Microvision Flic Bar Code Scanner, ID: 00003664, FW: 1.8.0<CR><LF>
<SOH>WA123B456C789D01269000000000036640105010800<CR><LF>
The data returned in the above example breaks down as follows:
•
User ID: A123B456C789D012
•
Configuration Setup: 69000000
•
Device ID: 00003664
•
Hardware version: 0105
•
Firmware version: 010800
5.4.3
Signal Command
You can force the scanner to flash the LED and/or emit a tone. The command is:
<SOH>T[n]<CR>
where n is one of the values listed in the table below.
9/29/2003
Page 23
DA0110468 Rev A
Flic® Laser Bar Code Scanner Developer’s Guide
Table 11: T Command Codes Options
n Value
LED
Piezo
(not given)
Current device setting
Current device setting
0
Current device setting
Current device setting
1
Off
Single Beep
2
On for 200 msec
Off
3
On for 200 msec
Single Beep
The device responds with an <ACK> when the test is complete.
5.4.4
Set Device Configuration Command
You can use this command to configure the scanner. The configuration options are listed in “2.6 Device
Configuration Data” on page 11. The configuration data that is transmitted to the Flic scanner is
automatically stored in internal non-volatile memory. The memory location for the data is given in Table 4:
Device Configuration Data on page 11.
The format of the Set command is:
<SOH>SAAD…D<CR>
where:
S
The Set command.
AA
The address of first byte to set. This value must be between 00 to 0B. It must be two
hexadecimal characters long, with a leading 0 if required.
D…D The data. This must be an even number of characters. The data is sent as two ASCII
characters per byte. The available values to set are 00 to FF.
The number of bytes you pass is variable. For example, to set the User ID to A123B456C789D012, the
command would be
<SOH>S00A123B456C789D012<CR>
Note that you do not have to set the value of the entire field. The device will respond with an <ACK> on a
successful write, or a <NAK> when there is an error in the command.
Warning: When switching time stamp modes, the bar codes stored information in the device’s memory can
be corrupted. Therefore, you should download all data before changing the configuration.
The examples in “6 Examples” on page 27 provide additional information on using this command.
5.4.5
Return to Factory Settings Command
You can use this command to return the device to the default factory configuration, or to set NCR default
values. The default values are outlined in “7.3 Microvision and NCR Default Values” on page 33, and in
“2.6.1 Device Configuration Bytes and Bits” on page 12. The User ID and Time Reference values are reset
to 0s.
The command format is:
<SOH>F[n]<CR>
9/29/2003
Page 24
DA0110468 Rev A
Flic® Laser Bar Code Scanner Developer’s Guide
where n is one of the values shown in the table below.
Table 12: Default Settings Options
n Value
Description
1
Reset the device’s configuration to the factory default values.
2
Reset the device’s configuration to the NCR default values.
The device will respond with an <ACK> after performing this operation.
Note: Unlike using the bar codes to reset the default values, The F1 and F2 commands do not change the
baud rate. This is so that you do not lose communication with the scanner when you are programmatically
interacting with it. The Factory Defaults bar code sets the baud rate to 4800. The NCR Defaults bar code
sets the baud rate to 9600.
5.4.6
Initialize Time Reference Setting Command
The Flic scanner stores the time reference value in RAM. This value is reset to zero when the scanner loses
power. When the scanner loses power, its internal clock stops, and the scanner cannot insure that any
information concerning time is accurate.
You can use the value of this field to determine whether the timestamp data is valid. When you know that
you have set a value in this field, and the information transmitted by the scanner tells you that this value is
zero, then you know that the Time Reference has been lost, and the timer function was interrupted.
The command is:
<SOH>IYYMMDDHHMMSS<CR>
where
I
The Initialize Time Reference command.
YYMMDDHHMMSS
The date and time. The 12 digits represent 6 bytes of data. All 12 digits
must be sent or the command will be ignored. The host has flexibility on
the format of the data, but it is recommended that the format be
YYMMDDHHMMSS, with the leading YY being implied as the year. For
example, March 12, 2002, 8:37:14 pm is set as:
<SOH>I020312203714<CR>
The device responds with an <ACK> when the time setting operation is complete. The device sends a
<NAK> when the command is incorrect.
This value will be echoed back in an XML download as the IT attribute.
5.4.7
Download Bar Code Data Command
The Download Bar Code Data command tells the scanner to start downloading the decoded bar codes it
has saved in memory. You can use this command to retrieve the data when you are operating in batch
mode. When the scanner is tethered, the data is always transmitted after a valid scan.
The format for the command is:
<SOH>D<CR>
The device responds with the data.
9/29/2003
Page 25
DA0110468 Rev A
Flic® Laser Bar Code Scanner Developer’s Guide
Note: In Compatible format, when the scanner does not have any bar code data stored, the scanner does
not provide any feedback.
Table 13: How Data is Downloaded and Deleted from Memory in Batch Mode
Mode
Automatic Data
Download Bit
Description
Compatible
Enabled
Data is automatically downloaded when the cable is plugged into the
scanner. The data is deleted from the scanner’s memory.
Warning: If the host software is not active, the data will be lost. You
can enable the ACK/NAK handshaking to prevent this. For more
information, see “Table 3: Flic Operation Modes and Data
Formats” on page 10.
Disabled
Data is downloaded when you send the Download Bar Code Data
command. The data is deleted from the scanner’s memory.
Warning: If the host software is not active, the data will be lost. You
can enable the ACK/NAK handshaking to prevent this. For more
information, see “Table 3: Flic Operation Modes and Data
Formats” on page 10.
XML
5.4.8
Enabled
Data is automatically downloaded when the cable is plugged into the
scanner. The data remains in the device’s bar code memory until you
use the Clear command.
Disabled
Data is downloaded when you use the Download Bar Code Data
command. The data remains in the device’s bar code memory until
you use the Clear command.
Clear Bar Code Data Command
After you download the bar codes in XML mode, the stored bar codes must be deleted from the scanner’s
memory. The format of this command is:
<SOH>C<CR>
The device will respond with an <ACK> when the clear operation is complete.
9/29/2003
Page 26
DA0110468 Rev A
6
Flic® Laser Bar Code Scanner Developer’s Guide
Examples
6.1
Changing the Scanner’s Configuration
To change the scanner’s configuration, first you need to convert the values for all the bits in the byte that
you want to set to hexadecimal.
For example, you want to set the timestamp to stamp decoded bar codes only. Looking at the tables in
section “2.6.1 Device Configuration Bytes and Bits,” starting on page 12, you see that the timestamp bits are
located at address 08, bits 2 and 1. The enable timestamps for decoded bar codes only value is 01. Looking
down the rest of Table 5, you determine that you want to use the factory default values for the rest of the
bits. Therefore, you are using the following values:
Bit
7
6
5
4
3
2
1
0
Value
0
1
0
1
1
0
1
1
64
0
16
8
0
2
1
Filling in the values gives:
Decimal
0
Adding these together gives a decimal value of 91, which converts to 5B in hexadecimal.
To set the value of the byte, you call the Set command as follows:
<SOH>S085B<CR>
Remember that the start address (08) must be two characters long, and the data (5B) must be an even
number of characters.
6.2
Changing the Download Data Format to XML
Microvision has not provided bar codes for changing the download format. Therefore, if you want to change
the format, you must do it via the command interface.
The download data format bit is located at address 09, bit 0.
To change the data format to XML, and to use the factory default values, set the bits as follows:
Bit
7
6
5
4
3
2
1
0
Value
0
0
0
0
0
0
0
1
This converts to 0x01, and the command is:
<SOH>S0901<CR>
6.3
Changing Multiple Consecutive Bytes
You can set multiple consecutive bytes using one set command. For example, we want to combine the two
previous examples, and set both the download data format to XML, and the timestamp at the same time.
This involves setting both bytes 08 and 09. Byte 08 is the first of the consecutive addresses. From above, the
new values for byte 08 is 0x5B, and for byte 09 is 0x01. Combining these gives the following command:
<SOH>S085B01<CR>
This command will set the values of both bytes.
9/29/2003
Page 27
DA0110468 Rev A
6.4
Flic® Laser Bar Code Scanner Developer’s Guide
Disabling Automatic Data Download
To disable automatic data download, you need to write a 1 to the 2nd bit of address 0x09 Using the factory
defaults for the rest of the bits, this translates to 0x04. Therefore send:
<SOH>S0904<CR>
6.5
Setting NCR Default Values
Use this command to set the scanner to the NCR default values. The command for this is:
<SOH>F2<CR>
This setting turns on the NCR Symbol Identifiers. The NCR default values are listed in “2.6.1 Device
Configuration Bytes and Bits” on page 12, and in “7.3 Microvision and NCR Default Values” on page 33.
The User ID and Time Reference values are reset to 0s.
Note: Unlike using the bar codes to reset the default values, The F1 and F2 commands do not change the
baud rate. This is so that you do not lose communication with the scanner when you are programmatically
interacting with it. The Factory Defaults bar code sets the baud rate to 4800. The NCR Defaults bar code
sets the baud rate to 9600.
6.6
Writing a Number to the User ID Field
Before you write a user ID, you should clear the field. To do this, you can set the value of the field to zeros,
or you can use the F command to reset the device to the factory default settings. For more information, see
“5.4.5 Return to Factory Settings Command” on page 24.
User ID numbers must be less than 18,446,744,073,709,551,615 or FFFFFFFFFFFFFFFFH in hexadecimal.
Microvision recommends that your user ID numbers always have the same number of digits. Therefore, you
should add preceding 0s if necessary.
There are two methods of writing a user ID number:
1. If your number is 16 digits or less, use the S command to write the number, starting at address 00.
2. If your number is between 17 and 20 digits long, convert the value to hexadecimal and use the S
command to write the hexadecimal number.
For example, you want to store an 8-digit employee number: 68429235. Using the first method, you would
send the following commands:
<SOH>S000000000000000000<CR>
<SOH>S0068429235<CR>
This command will write the number 68429235 starting at address 0. Using the W command to retrieve the
data yields:
Microvision® Flic® Bar Code Scanner, ID: 4C454406, FW: 1.5.0
<SOH>W6842923500000000590000004C454406062B010500
Note that the user ID number has zeros added to give the full 16 digits. These zeros are the values that
already existed in memory for the bytes that you did not set. You can add the leading zeros to the User ID
to right align the number in the field. In this case, the command will look as follows:
<SOH>S000000000000000000<CR>
<SOH>S000000000068429235<CR>
9/29/2003
Page 28
DA0110468 Rev A
Flic® Laser Bar Code Scanner Developer’s Guide
Using the second method with the same number, 68429235, you would convert 68429235 to the
hexadecimal value 041425B3 and write:
<SOH>S000000000000000000<CR>
<SOH>S00041425B3<CR>
Using the W command to retrieve the data yields:
Microvision® Flic® Bar Code Scanner, ID: 4C454406, FW: 1.5.0
<SOH>W041425B300000000590000004C454406062B010500
The retrieved value, 041425B3, can then be converted to the decimal value 68429235.
6.7
Writing an 8-Character String to the User ID Field
The 8-byte User ID field can be used to store an 8-character string. This example shows how to store and
retrieve JSMITH.
1. Convert each character to its hexadecimal ASCII equivalent by using the chart shown in “7.6 ASCII
Chart“ on page 40. From the chart, J = 4A; S = 53; M = 4D; I = 49; T = 54; H = 48.
2. Write:
<SOH>S000000000000000000<CR>
<SOH>S004A534D4954480000<CR>
3. Read back data using the W command:
Microvision® Flic® Bar Code Scanner, ID: 4C454406, FW: 1.5.0
<SOH>W4A534D4954480000590000004C454406062B010500
4. Take the 16 characters after the W in the second line and convert them back to ASCII.
4A = J; 53 = S; 4D = M; 49 = I; 54 = T; 48 = H; 00 = NUL.
6.8
Recovering the Time From a Timestamp
You have a reference time value of March 12, 2002 8:35:14 AM. Given the following section of an XML
download:
<device type="Flic" id="00003664" hwv="1.1" fwv="1.0.01" ud=
"0123456789ABCDEF " it= "020312083514 "><CR><LF>
<tag type="bc" dt="15" ct="E" bc="043000103050" /><CR><LF>
<tag type="bc" dt="1FC" ct="E" bc="063202123252" /><CR><LF>
<tag type="t" dt="4A" /><CR><LF>
The first scan has a dt (delta time) count of 0x15 or 21 seconds. Call this dt1 and the time for this scan T1.
Therefore,
T1 = Time Reference + dt1 = 020312082535 = March 12, 2002 8:35:35 AM
The second scan has a dt count of 0x1FC or 508 seconds. Call this dt2 and the time for this scan T2.
Therefore,
T2 = Time Reference + dt1 + dt2 = Time Reference + 8 min 45 sec = 020312084359 = March 12, 2002
8:43:59 AM
The next tag is time only tag.
T3 = Time Reference + dt1 + dt2 +dt3
9/29/2003
Page 29
DA0110468 Rev A
Flic® Laser Bar Code Scanner Developer’s Guide
The last time tag in any XML data record gives the delta time from the last scan to the time the data is
downloaded. This final delta time can be used to calculate what the current time should be. The resulting
value can be synchronized with the host to verify accuracy.
6.9
Transmitting Supplemental Bar Codes
The format of supplemental bar codes depends on three parameter settings: AIM Code, NCR Identifier and
Combined Bar Codes. Since AIM Codes take precedence over Combined Bar Codes and NCR Identifiers
require supplemental data to be combined with the main bar code, there are five distinct cases.
1. AIM Codes off, NCR Identifiers off, and Combined Bar Codes off. This is the simplest case. The
main bar code is transmitted first with the active post-amble characters (<CR>, <CR><LF>, or
<ETX>), followed by the supplemental bar code and the post-amble characters. For example,
9781576104903+53999 (EAN-13 + 5) is transmitted as:
9781576104903<CR><LF>
53999<CR><LF>
2. AIM Codes on, NCR Identifiers off/on, and Combined Bar Codes off. The AIM codes for the main
bar code remain the same. There are separate and distinct AIM codes for the supplemental bar
code. The main bar code is transmitted first with the post-amble characters, followed by the
supplemental bar code and the post-amble characters. For example, 9781576104903+53999 is
transmitted as:
]E09781576104903<CR><LF>
]E253999<CR><LF>
3. AIM Codes off, NCR Identifiers on, and Combined Bar Codes off/on. NCR identifiers, by definition,
require that supplemental data be combined with the main bar code. Thus, the combined bar code
option has no effect. For example, 9781576104903+53999 is transmitted as:
F978157610490353999<CR>
4. AIM Codes off, NCR Identifiers off, and Combined Bar Codes on. This case is very similar to the
case above. The supplemental data is merely appended to the end of the main bar code. For
example, 9781576104903+53999 is transmitted as:
978157610490353999<CR><LF>
5. AIM Codes on, NCR Identifiers off/on, and Combined Bar Codes on. This is the most complex
case, since each symbology is handled differently. The AIM code for combined bar codes is different.
For example, 9781576104903+53999 is transmitted as:
]E3978157610490353999<CR><LF>
The AIM specification for combined bar codes states that 13 digits must be used for EAN-13, UPC-A and
UPC-E data. Thus, UPC-E data will always be expanded to the full UPC-A form, and a zero will precede the
UPC-A data. For example, the UPC-A 000123456784+45322 and the UPC-E 3424607+89 is
transmitted as:
]E3000012345678445322<CR><LF>
]E3003400000246789<CR><LF>
The combined bar code AIM modifier does not apply to EAN-8 data. Instead, the same modifier is used
regardless of whether a supplemental bar code is present. For example, the EAN8 + 2-digit add-on symbol
data of 12345670+12 is transmitted as:
]E41234567012<CR><LF>
9/29/2003
Page 30
DA0110468 Rev A
Flic® Laser Bar Code Scanner Developer’s Guide
The XML mode also provides some variations based on the selected options. If the supplemental data is
transmitted on a separate line (combined bar code and NCR Identifier options disabled), the time stamp
field is not output since it always will be zero. Also, if the combined bar code and AIM codes options are
selected, UPC-A and UPC-E bar code data is expanded to 13 digits before the supplemental bar code is
written.
9/29/2003
Page 31
DA0110468 Rev A
7
Flic® Laser Bar Code Scanner Developer’s Guide
Appendices
7.1
Cable Pin Out
DB9 Socket
Connector
Pin 2
Transmit from Flic
Scanner
Stereo Plug
Pin 1
Transmit from Flic
Scanner
Pin 3
Receive to Flic
Scanner
Pin 5
Ground
Pin 3
Ground
Pin 2
Receive to Flic
Scanner
Figure 1: Cable Pin Out
7.2
COM Port Settings
All communications between the Flic scanner and host are done via USB or the RS-232 serial interface.
Once the software for the USB adaptor has been installed, the scanner treats USB as though it was a COM
port. Use the following settings:
Baud Rate:
4800 or 9600, depending on your scanner’s configuration
Data Bits:
8
Parity:
None
Stop bits:
2
Flow Control:
None
Duplex:
Half duplex
9/29/2003
Page 32
DA0110468 Rev A
7.3
Flic® Laser Bar Code Scanner Developer’s Guide
Microvision and NCR Default Values
Setting
Microvision Default Value
NCR Default Value
Acknowledgment protocol
Off
Off
AIM code
Off
Off
Automatic data download
Enabled
Enabled
Baud rate
4800
9600
Beep
On
On
Code 128 symbology
Enabled
Enabled
Code 39 checksum
Off
Off
Code 39 strip check character
Off
Off
Code 39 symbology
Enabled
Enabled
Combined bar codes
Off
Off
Convert UPC-A bar codes to EAN-13 format
(FWV 1.8.0)
Off
Off
Delay between bar code transmissions (FWV
1.6.0)
No delay
1100ms
Standard vs. aggressive scanning (FWV 1.8.0)
Standard
Standard
Download format
Compatible
Compatible
EAN-8 symbology
Enabled
Enabled
ETX enable
Off
Off
Expand UPC-E codes
Do not expand
Do not expand
LED
On
On
Linefeed
On
Off
NCR symbol identifiers
Off
On
STX
On
Off
Supplemental bar codes
Auto-detect
Ignore
Timestamp
Off
Off
UPC-A/EAN-13 symbology
Enabled
Enabled
UPC-E symbology
Enabled
Enabled
9/29/2003
Page 33
DA0110468 Rev A
7.4
Flic® Laser Bar Code Scanner Developer’s Guide
AIM Symbol Codes
The AIM symbol code is a three character string in the format ]cm, where
]
ASCII 5D hex
c
AIM code
m
AIM code modifier.
Table 14: AIM Code
Code
Definition
A
Code 39
C
Code 128
E
EAN/UPC
7.4.1
AIM Code Modifiers
UPC-A and UPC-E symbols do not have an AIM symbol code unless they are combined with supplemental
data.
Table 15: Code 39 Modifiers
Code
Definition
0
No check character
1
Reader has performed check
3
Reader has performed check and stripped check character
Table 16: Code 128 Modifiers
Code
Definition
0
Standard
1
FC1 in first symbol character position
2
FC2 in second symbol character position
Table 17: UPC/EAN Modifiers
Code
Definition
0
Standard 13-digit EAN
1
Two-digit supplemental data only
2
Five-digit supplemental data only
3
Combined Bar Code Data
4
EAN-8
9/29/2003
Page 34
DA0110468 Rev A
7.5
Flic® Laser Bar Code Scanner Developer’s Guide
Bar Codes
To use these bar codes to configure your Flic scanner, print the appropriate page. Then use your scanner to
read the appropriate bar code.
7.5.1
Device Option Control Bar Codes
Return to Factory Default Settings
Return to NCR Default Settings
4800 Baud* (FWV 1.7.0)
9600 Baud# (FWV 1.7.0)
ACK/NAK Protocol
Enable
Disable*#
Auto Download Data
Enable*#
Disable
Beep Control
Enable*#
Disable
Delay Between Bar Codes
None*
500ms
1100ms#
1600ms
* Factory Default Setting
NCR Factory Default Setting
#
9/29/2003
Page 35
DA0110468 Rev A
Flic® Laser Bar Code Scanner Developer’s Guide
ETX Suffix Character
Enable
Disable*#
LED Control
Enable*#
Disable
Line Feed Suffix Character
Enable*
Disable#
STX Prefix Character
Enable*
Disable#
* Factory Default Setting
NCR Factory Default Setting
#
9/29/2003
Page 36
DA0110468 Rev A
7.5.2
Flic® Laser Bar Code Scanner Developer’s Guide
Symbology Selection Control Bar Codes
Enable All Symbologies
Code 39
Enable*#
Disable
Code 128
Enable*#
Disable
EAN-8
Enable*#
Disable
UPC-A/EAN-13
Enable*#
Disable
UPC-E
Enable*#
Disable
* Factory Default Setting
NCR Factory Default Setting
#
9/29/2003
Page 37
DA0110468 Rev A
7.5.3
Flic® Laser Bar Code Scanner Developer’s Guide
Supplemental Bar Codes
Auto-Detect Supplemental Codes*
Require Supplemental codes
Disable Supplemental Codes#
AIM Symbol Identifiers
Enable
Disable*#
Combine Bar Codes (FWV 1.7.0)
Enable
Disable*
NCR Symbol Identifiers
Enable#
Disable*
* Factory Default Setting
NCR Factory Default Setting
#
9/29/2003
Page 38
DA0110468 Rev A
7.5.4
Flic® Laser Bar Code Scanner Developer’s Guide
Symbology Options Control Bar Codes
Code 39 Options
Code39 Checksum Enable
Code39 Checksum Disable*#
(Disables both Code 39 Checksum options)
Code39 Stripped Checksum Enable
UPC/EAN Options
Convert UPC-A codes to EAN-13 codes (FWV 1.8.0) Do Not Convert UPC-A codes*# (FWV 1.8.0)
Expand UPC-E codes to UPC-A codes
Do Not Expand UPC-E codes*#
Standard Scanning*# (FWV 1.8.0)
Aggressive Scanning (FWV 1.8.0)
7.5.5
Command Control Bar Codes
Clear Device Bar Code Memory
* Factory Default Setting
# NCR Factory Default Setting
9/29/2003
Page 39
DA0110468 Rev A
7.6
Flic® Laser Bar Code Scanner Developer’s Guide
ASCII Chart
Use this ASCII chart to convert characters to hexadecimal, and hexadecimal values to characters. For
example, the ampersand (&) is represented as 0x26, or as &#038 in ASCII.
The hexadecimal values can appear in the bar code data. Additionally, you can use the hexadecimal number
to write a name to the User ID field.
Note: Non-printable characters are provided for reference in the first and second rows, and in the 7F
character.
0
1
2
3
4
5
6
7
8
0 NUL SOH STX ETX EOT ENQ ACK BEL BS
9
A
HT LF
B
C
D
E
F
VT
FF CR SO SI
1 DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US
2 SP
!
"
#
$
%
&
'
(
)
*
+
,
-
.
/
3 0
1
2
3
4
5
6
7
8
9
:
;
<
=
>
?
4 @
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
5 P
Q
R
S
T
U
V
W
X
Y
Z
[
\
]
^
_
6 `
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
7 p
q
r
s
t
u
v
w
x
y
z
{
|
}
~
DEL
9/29/2003
Page 40
Open as PDF
Similar pages