Sunlux XL-3200 User manual

2D Barcode Scanner
XL-3200
User's Manual
V1.0

Table of Contents
Revision History...............................................................................................................................................-3-
Chapter 1 Getting Started..................................................................................................................................1
Introduction..............................................................................................................................................1
About This Guide.....................................................................................................................................2
Barcode Scanning...................................................................................................................................2
Configuring the XL-3200 ….....................................................................................................................2
Barcode Programming......................................................................................................................2
Command Programming ..................................................................................................................2
Read Register............................................................................................................................3
Write Register............................................................................................................................7
Save Register Data in EEPROM.............................................................................................11
Relationship between Programming Command and Serial Command..................................12
Registers .................................................................................................................................14
Programming Barcode Data..................................................................................................................26
Factory Defaults.....................................................................................................................................26
Chapter 2 Communication Interfaces............................................................................................................27
TTL-232 Interface..................................................................................................................................27
Baud Rate.......................................................................................................................................28
USB Interface ........................................................................................................................................29
USB DATAPIPE..............................................................................................................................29
USB HID-KBW................................................................................................................................29
Standard Keyboard .................................................................................................................30
Emulate ALT+Keypad.............................................................................................................30
Function Key Mapping.............................................................................................................31
ASCII Function Key Mapping Table........................................................................................32
USB Country Keyboard Types................................................................................................33
Beep on Unknown Character..................................................................................................36
Inter-Keystroke Delay..............................................................................................................36
Caps Lock................................................................................................................................37
Convert Case...........................................................................................................................38
Emulate Numeric Keypad........................................................................................................39
USB COM Port Emulation..............................................................................................................40

HID-POS.........................................................................................................................................40
Access the Scanner with Your Program.................................................................................41
Acquire Scanned Data ............................................................................................................41
VID/PID....................................................................................................................................41
Chapter 3 Scan Mode.......................................................................................................................................42
Manual Mode.........................................................................................................................................42
Continuous Mode...................................................................................................................................43
Decode Session Timeout ...............................................................................................................43
Timeout between Decodes.............................................................................................................44
Sense Mode...........................................................................................................................................45
Decode Session Timeout ...............................................................................................................45
Timeout between Decodes.............................................................................................................46
Image Stabilization Timeout...........................................................................................................46
Sensitivity........................................................................................................................................47
Command Trigger Mode........................................................................................................................48
Decode Session Timeout ...............................................................................................................48
IR Trigger Mode.....................................................................................................................................49
Chapter 4 Illumination & Aiming.....................................................................................................................50
Illumination.............................................................................................................................................50
Aiming....................................................................................................................................................51
Chapter 5 Notification......................................................................................................................................52
Mute Mode.............................................................................................................................................52
Good Read Beep...................................................................................................................................52
Good Read Beep Frequency..........................................................................................................53
Good Read Beep Duration.............................................................................................................53
Good Read LED....................................................................................................................................54
Decode Result Notification....................................................................................................................54
Chapter 6 Data Formatting..............................................................................................................................55
AIM ID Prefix..........................................................................................................................................55
CODE ID Prefix......................................................................................................................................56
Terminating Character Suffix.................................................................................................................57
Chapter 7 Symbologies...................................................................................................................................58
Global Settings ......................................................................................................................................58

Enable/Disable All Symbologies.....................................................................................................58
Enable/Disable 1D Symbologies....................................................................................................58
Enable/Disable 2D Symbologies....................................................................................................58
Video Reverse................................................................................................................................59
1D Symbologies.....................................................................................................................................60
Code 128........................................................................................................................................60
Restore Factory Defaults.........................................................................................................60
Enable/Disable Code 128........................................................................................................60
UCC/EAN-128 (GS1-128) ..............................................................................................................61
Restore Factory Defaults.........................................................................................................61
Enable/Disable UCC/EAN-128................................................................................................61
AIM 128...........................................................................................................................................62
Restore Factory Defaults.........................................................................................................62
Enable/Disable AIM 128..........................................................................................................62
EAN-8 .............................................................................................................................................63
Restore Factory Defaults.........................................................................................................63
Enable/Disable EAN-8.............................................................................................................63
Transmit Check Digit...............................................................................................................63
Add-On Code...........................................................................................................................64
Add-On Code Required...........................................................................................................65
EAN-8 Extension.....................................................................................................................65
EAN-13 ...........................................................................................................................................66
Restore Factory Defaults ..........................................................................................................66
Enable/Disable EAN-13...........................................................................................................66
Transmit Check Digit...............................................................................................................66
Add-On Code...........................................................................................................................67
Add-On Code Required...........................................................................................................68
ISSN................................................................................................................................................69
Restore Factory Defaults.........................................................................................................69
Enable/Disable ISSN...............................................................................................................69
ISBN................................................................................................................................................70
Restore Factory Defaults.........................................................................................................70
Enable/Disable ISBN...............................................................................................................70
Set ISBN Format .....................................................................................................................70
UPC-E.............................................................................................................................................71
Restore Factory Defaults.........................................................................................................71
Enable/Disable UPC-E............................................................................................................71

Transmit Check Digit...............................................................................................................71
Add-On Code...........................................................................................................................72
Add-On Code Required...........................................................................................................73
Transmit System Character ....................................................................................................73
UPC-E Extension ....................................................................................................................73
UPC-A.............................................................................................................................................74
Restore Factory Defaults.........................................................................................................74
Enable/Disable UPC-A............................................................................................................74
Transmit Check Digit...............................................................................................................74
Add-On Code...........................................................................................................................75
Add-On Code Required...........................................................................................................76
Transmit Preamble Character.................................................................................................76
Interleaved 2 of 5............................................................................................................................77
Restore Factory Defaults.........................................................................................................77
Enable/Disable Interleaved 2 of 5...........................................................................................77
Check Digit Verification...........................................................................................................78
Transmit Appended “0”............................................................................................................79
ITF-6 ...............................................................................................................................................80
ITF-14 .............................................................................................................................................81
Matrix 2 of 5....................................................................................................................................82
Restore Factory Defaults.........................................................................................................82
Enable/Disable Matrix 2 of 5...................................................................................................82
Check Digit Verification...........................................................................................................83
Industrial 25....................................................................................................................................84
Restore Factory Defaults.........................................................................................................84
Enable/Disable Industrial 25 ...................................................................................................84
Check Digit Verification...........................................................................................................85
Standard 25....................................................................................................................................86
Restore Factory Defaults.........................................................................................................86
Enable/Disable Standard 25 ...................................................................................................86
Check Digit Verification...........................................................................................................87
Code 39 ..........................................................................................................................................88
Restore Factory Defaults.........................................................................................................88
Enable/Disable Code 39..........................................................................................................88
Transmit Start/Stop Character ................................................................................................88
Check Digit Verification...........................................................................................................89
Enable/Disable Code 39 Full ASCII........................................................................................89

Codabar..........................................................................................................................................90
Restore Factory Defaults.........................................................................................................90
Enable/Disable Codabar .........................................................................................................90
Check Digit Verification...........................................................................................................91
Transmit Start/Stop Character ................................................................................................91
Start/Stop Character Format...................................................................................................92
Code 93 ..........................................................................................................................................93
Restore Factory Defaults.........................................................................................................93
Enable/Disable Code 93..........................................................................................................93
Check Digit Verification...........................................................................................................94
Code 11 ..........................................................................................................................................95
Restore Factory Defaults.........................................................................................................95
Enable/Disable Code 11..........................................................................................................95
Check Digit Verification...........................................................................................................96
Plessey ...........................................................................................................................................97
Restore Factory Defaults.........................................................................................................97
Enable/Disable Plessey...........................................................................................................97
Check Digit Verification...........................................................................................................98
MSI-Plessey....................................................................................................................................99
Restore Factory Defaults.........................................................................................................99
Enable/Disable MSI-Plessey...................................................................................................99
Check Digit Verification.........................................................................................................100
RSS-14 .........................................................................................................................................101
Restore Factory Defaults.......................................................................................................101
Enable/Disable RSS-14.........................................................................................................101
Transmit Application Identifier “01” .......................................................................................101
RSS-Limited..................................................................................................................................102
Restore Factory Defaults.......................................................................................................102
Enable/Disable RSS-Limited.................................................................................................102
Transmit Application Identifier “01” .......................................................................................102
RSS-Expand.................................................................................................................................103
Restore Factory Defaults.......................................................................................................103
Enable/Disable RSS-Expand................................................................................................103
2D Symbologies...................................................................................................................................104
PDF417.........................................................................................................................................104
Restore Factory Defaults.......................................................................................................104
Enable/Disable PDF417........................................................................................................104

Data Matrix....................................................................................................................................105
Restore Factory Defaults.......................................................................................................105
Enable/Disable Data Matrix...................................................................................................105
Rectangular Barcodes...........................................................................................................105
Mirror Images ........................................................................................................................106
QR Code.......................................................................................................................................107
Restore Factory Defaults.......................................................................................................107
Enable/Disable QR Code......................................................................................................107
Micro QR ...............................................................................................................................107
Mirrored Micro QR.................................................................................................................108
Appendix.........................................................................................................................................................109
Appendix A: Factory Defaults Table....................................................................................................109
Appendix B: AIM ID Table...................................................................................................................115
Appendix C: Code ID Table.................................................................................................................118
Appendix D: ASCII Table.....................................................................................................................119
Appendix E: Parameter Programming Examples ...............................................................................123
Program the Decode Session Timeout........................................................................................123
Program the Timeout between Decodes......................................................................................123
Program the Image Stabilization Timeout....................................................................................123
Program the Sensitivity Level.......................................................................................................124
Appendix F: Digit Barcodes.................................................................................................................125
Appendix G: Save/Cancel Barcodes...................................................................................................128
Appendix H: Frequently-Used Serial Commands...............................................................................129

1
Chapter 1 Getting Started
Introduction
The XL-3200 supports all mainstream 1D as well as PDF417, QR Code (QR1, QR2, Micro QR), Data
Matrix and GS1-DataBarTM(RSS) (RSS-Limited, RSS-14, RSS-14 Stacked and RSS-Expand).
The XL-3200 can read barcodes on virtually any medium - paper, plastic card, mobile phones and
LCD displays. It provides an ideal solution for both emerging mobile phone-based barcode
applications, like coupons, e-tickets and boarding passes, and traditional applications.
TheXL-3200’s instant power on/off feature along with ultra low power consumption brings greater
efficiency and convenience in barcode scanning applications.

2
About This Guide
This guide provides programming instructions for the XL-3200. Users can configure the XL-3100 by
scanning the programming barcodes included in this manual.
The XL-3200 has been properly configured for most applications and can be put into use without
further configuration. Users may check the Factory Defaults Table in Appendix for reference.
Throughout the manual, programming barcodes marked with asterisks (**) are factory default values.
Barcode Scanning
Powered by area-imaging technology,the XL-3200 features fast scanning and accurate decoding.
Barcodes rotated at any angle can still be read with ease. When scanning a barcode, simply center the
aiming pattern projected by the XL-3030-Mover the barcode.
Configuring the XL-3200
There are two ways to configure the engine: barcode programming and command programming.
Barcode Programming
The XL-3200 can be configured by scanning programming barcodes. All user programmable
features/options are described along with their programming barcodes/commands in the following
sections.

3
Command Programming
Besides the barcode programming method, the XL-3200 can also be configured by serial
commands sent from the host device. Note that communication parameters on the engine and the host
must match so that two devices can communicate with each other. The default settings of the engine
are 9600bps, no parity check, 8 data bits, 1 stop bit, and no flow control. The engine uses 8-bit registers.
Read Register
The read command is used to read the contents of 1 to 256 contiguous registers in the engine.
Syntax: {Prefix1} {Types} {Lens} {Address} {Datas} {FCS}
Prefix1 : 0x7E 0x00
Types : 0x07
Lens : 0x01
Address: 0x0000~0x00FF, starting register address.
Datas : 0x00~0xFF, number of registers to be read. When Datas=0x00, 256 contiguous
registers are to be read.
FCS : CRC-CCITT checksum, 2 bytes.
Computation sequence: Types+ Lens+Address+Datas;
polynomial: X16+X12+X5+1 (0x1021), initial value: 0x0000.
The following C language program is provided for reference.

4
unsigned int crc_cal_by_bit(unsigned char* ptr, unsigned int len)
{
unsigned int crc = 0;
while(len-- != 0)
{
for(unsigned char i = 0x80; i != 0; i /= 2)
{
crc *= 2;
if((crc&0x10000) !=0)
crc ^= 0x11021;
if((*ptr&i) != 0)
crc ^= 0x1021;
}
ptr++;
}
return crc;
}

5
Reply: {Prefix2} {Types} {Lens} {Datas} {FCS}
1) Success message:
Prefix2 : 0x02 0x00
Types : 0x00 (success)
Lens : The number of data returned. If Lens=0x00, that means values of 256 contiguous
registers are returned.
Datas : 0x00~0xFF, data that are returned.
FCS : CRC-CCITT checksum.
2) CRC check failure message:
Prefix2 : 0x02 0x00
Types : 0x01 (CRC check failure)
Lens : 0x01
Datas : 0x00
FCS : CRC-CCITT checksum (0x04 0x01)
3) Invalid command message:
Prefix2 : 0x02 0x00
Types : 0x03 (invalid command)
Lens : 0x01
Datas : 0x00
FCS : CRC-CCITT checksum (0x6A 0x61)

6
Example:
Read the content (0x3E) of register 0x000A
1) Read operation succeeds:
Command sent: 0x7E 0x00 0x07 0x01 0x00 0x0A 0x01 0xEE 0x8A
Message received: 0x02 0x00 0x00 0x01 0x3E 0xE4 0xAC
2) CRC check fails:
Command sent: 0x7E 0x00 0x07 0x01 0x00 0x0A 0x01 0x11 0x22
Message received: 0x02 0x00 0x01 0x01 0x00 0x04 0x01
3) Situations that may cause the engine to respond with an invalid command message: Command sent is
shorter than the required length, or the third byte is not sent out within 400ms after the first two bytes
“0x7e 0x00” are sent
Command sent: 0x7E 0x00 0x07 0x01 0x00 0x0A 0x01
Message received:0x02 0x00 0x03 0x01 0x00 0x6A 0x61

7
Write Register
The write command is used to write contiguous registers (1 to 256 registers) in the engine.
Syntax: {Prefix1} {Types} {Lens} {Address} {Datas} {FCS}
Prefix1 : 0x7E 0x00 (2 bytes)
Types : 0x08 (1 byte)
Lens : 0x00~0xFF (1 byte), byte count, i.e. number of registers written. When Lens=0x00, 256
contiguous registers are to be written.
Address : 0x0000~0xFFFF (2 bytes), starting register address.
Datas : 0x00~0xFF (1~256 bytes), data to be written into the register(s)
FCS : CRC-CCITT checksum, 2 bytes.
Computation sequence: Types+ Lens+Address+Datas; polynomial: X16+X12+X5+1
(0x1021), initial value: 0x0000.
The following C language program is provided for reference.

8
unsigned int crc_cal_by_bit(unsigned char* ptr, unsigned int len)
{
unsigned int crc = 0;
while(len-- != 0)
{
for(unsigned char i = 0x80; i != 0; i /= 2)
{
crc *= 2;
if((crc&0x10000) !=0)
crc ^= 0x11021;
if((*ptr&i) != 0)
crc ^= 0x1021;
}
ptr++;
}
return crc;
}

9
Reply: {Prefix2} {Types} {Lens} {Datas} {FCS}
1) Success message:
Prefix2 : 0x02 0x00
Types : 0x00 (success)
Lens : 0x01
Datas : 0x00
FCS : CRC-CCITT checksum (0x33 0x31)
2) CRC check failure message:
Prefix2 : 0x02 0x00
Types : 0x01 (CRC check failure)
Lens : 0x01
Datas : 0x00
FCS : CRC-CCITT checksum (0x04 0x01)
3) Invalid command message:
Prefix2 : 0x02 0x00
Types : 0x03 (invalid command)
Lens : 0x01
Datas : 0x00
FCS : CRC-CCITT checksum (0x6A 0x61)

10
Example:
Write 0x3E into register 0x000A
1) Write operation succeeds:
Command sent: 0x7E 0x00 0x08 0x01 0x00 0x0A 0x3E 0x4C 0xCF
Message received: 0x02 0x00 0x00 0x01 0x00 0x33 0x31
2) CRC check fails:
Command sent: 0x7E 0x00 0x08 0x01 0x00 0x0A 0x3E 0x11 0x22
Message received: 0x02 0x00 0x01 0x01 0x00 0x04 0x01
3) Situations that may cause the engine to respond with an invalid command message: Command sent is
shorter than the required length, or the third byte is not sent out within 400ms after the first two bytes
“0x7e 0x00” are sent
Command sent: 0x7E 0x00 0x08 0x01 0x00 0x0A 0x3E
Message received: 0x02 0x00 0x03 0x01 0x00 0x6A 0x61

11
Save Register Data in EEPROM
The save command is used to save register data into an external EEPROM.
Syntax: {Prefix1} {Types} {Lens} {Address} {Datas} {FCS}
Prefix1 : 0x7E 0x00
Types : 0x09
Lens : 0x01
Address: 0x0000
Datas : 0x00
FCS : CRC-CCITT checksum (0xDE 0xC8)
Reply: {Prefix2} {Types} {Lens} {Datas} {FCS}
1) Success message:
Prefix2 : 0x02 0x00
Types : 0x00 (success)
Lens : 0x01
Datas : 0x00
FCS : CRC-CCITT checksum (0x33 0x31)
2) CRC check failure message:
Prefix2 : 0x02 0x00
Types : 0x01 (CRC check failure)
Lens : 0x01
Datas : 0x00
FCS : CRC-CCITT checksum (0x04 0x01)

12
3) Invalid command message:
Prefix2 : 0x02 0x00
Types : 0x03 (invalid command)
Lens : 0x01
Datas : 0x00
FCS : CRC-CCITT checksum (0x6A 0x61)

13
Relationship between Programming Command and Serial Command
1. Program general parameter with serial command
A programming command (i.e. the characters under programming barcode) contains 7 characters. The
function of each character is described in the table below.
1st Char
2nd Char ~3rd Char
4th Char~5th Char
6th Char~7th Char
Remark
CMD
BITPOSITION
ADDR
DATA
“W”
“00”~“FF”
“00”~“FF”
“00”~“FF”
Write a value (DATA) to the
specified bits (BITPOSITION)
of the register (ADDR).
Note:1. CMD: Command type.
2. ADDR: Address of register to be written.
3. BITPOSITION: Bit(s) the value is written to. For example, if only bit 3 is to be written, the
BITPOSITION should be “08”; if all bits are to be written, the BITPOSITION should be “FF”.
4. DATA: Value written to the BITPOSITION.
The ADDR and DATA in programming command correspond to Address and Datas in serial command,
respectively:
1) If BITPOSITION=”FF”, the values of ADDR and DATA can be used directly in the write command.
e.g., programming command: WFFD9D8 (write value 0xD8 to register 0x00D9)
serial command sent : 0x7E 0x00 0x08 0x01 0x00 0xD9 0xD8 0x91 0x53
reply received : 0x02 0x00 0x00 0x01 0x00 0x33 0x31
2) If BITPOSITION≠”FF”, users need to read the register content, calculate the value (Datas) and then
write the value into the register, as shown in the following example.
e.g., programming command: W030002 (write value 0x02 to bit1and bit0 of register 0x0000)
Step 1: Read the content of register 0x0000.
serial command sent : 0x7E 0x00 0x07 0x01 0x00 0x00 0x01 0x01 0x41
Table of contents
Other Sunlux Barcode Reader manuals

Sunlux
Sunlux XL-3100 User manual

Sunlux
Sunlux XL-2300 User manual

Sunlux
Sunlux XL-3100 User manual

Sunlux
Sunlux XL-3500 User manual

Sunlux
Sunlux XL-3042M User manual

Sunlux
Sunlux XL-626A User manual

Sunlux
Sunlux XL-9600 Installation instructions

Sunlux
Sunlux XL-9038 User manual

Sunlux
Sunlux XL-9620D Installation instructions
Popular Barcode Reader manuals by other brands

Datalogic
Datalogic Heron HD3130 Product reference guide

Wasp Barcode Technologies
Wasp Barcode Technologies WPL308 Series user manual

AMT Datasouth
AMT Datasouth Fastmark M4 Series user guide

Code
Code CR821 Series Integration guide

Symbol
Symbol TC70 quick start guide

Socket
Socket SocketScan S700 user guide