| |
Barcode Scanner and Magnetic Reader 101
Everything you wanted to know about barcode and magnetic stripe reading but were afraid to ask.
If you need programming help for our Kanescan or a manual click HERE
In most cases there is only a number either barcoded on a sheet or label or magnetically encoded on a magnetice strip. This number is then scanned into an application like a Point of Sale or Inventory control software that searches its database fot that number and returns the applicable information. Using this format you can buy or produce numerically ascending barcodes or magnetic cards and assign them as you go, saving a lot ot time and money.
You can NOT scan a barcode or swipe a card and instantly open an application that tells you who or what the item is, what it costs or what they owe, how many are in stock or whether the person is wanted in 4 states. You ALWAYS have to have an application open to receive the data. In the case of magnetic cards you could take the time to encode up to 3 tracks (tracks are like lines of data) of information and swipe that data into a simple text editor like "Notepad".
Here is an example of the output when a 3 track magnetic card is read;
%This would be the first track as encoded? (return key function)
;This would be the second track as encoded? (return key function)
+This would be the third track as encoded? (return key function)
Typical Credit card read;
%12345678912345678^DOE/JOHN C^1234567891234567891234?(return key function)
;1234567891234567=123456789123456?(return key function)
California Drivers License read; (Note- format may change and not all drivers licenses use magnetic strips, some use 1D and/or 2D bar codes)
%CARIVERSIDE^DOE$JOHN$CARL^1234 ANYROAD APT 12^?(return key function)
;123456789123456=123456789123?(return key function)
+!!92519 C 01 M600200BRNBRN D55491990151M1O%+).[8)?=0?(return key function)
Note that the first character meets the ISO 7811 track identification requirements. ("%" for track 1, ";" for track 2 and "+" for track 3) The end sentinal is the "?" question mark and each track ends with an "Enter" function. The carrot symbol "^" separates data fields and the dollar sign "$" is used to separate data within a field. The data on track 3 of the California Drivers license has been altered to not represent any person specifically. The Kaneswipe unit is not programable and will always return the ISO 7811/AAMVA characters/data exactly as shown above. The rest of the MSR's sold here can be programmed to manipulate the data read. This means you can remove the start, stop, dollar signs and carrot symbols and change or remove the return key function if you so desire. This would require you to own a magnetic writing device and you would have to "burn" each card one by one. This is the more expensive and time consuming option.
These devices usually plug into the PC or Mac and act like a keyboard. These are usually PS2 (PC) or ADB (Mac) keyboard wedge (shares the keyboard port) or USB devices. They are referred to as "Plug and Play" because the computer sees them as another keyboard. Also, they are easy to use and install like many mobile broadband modems out in the market. Data transferred into any open application (like Excel, Word etc.) by these devices is done just as if you typed it in yourself. "Keyboard wedges" connect between a PC or Mac and its keyboard. The Reader looks transparent to both the keyboard and the PC until a bar code or magnetic strip is read. When a bar code or magnetic strip is read, the Reader disables the keyboard and sends the data using the same scan codes used by the keyboard. The PC cannot distinguish between data from the keyboard and data from the Reader.
Serial devices like RS232 will not communicate directly with applications without additional specific software. They can communicate through Hyper Terminal in a Windows environment.
So lets recap.
Barcodes and magnetic strips are not magic and do not contain huge amounts of information.
You need an application open to receive data.
Unless your a programmer and are really smart, stay away from Serial (RS232) devices unless your application requires it and you have someone to help you set "Baud rates" and "Data Bits" etc.
This section of the page is all about Barcodes. For Magnetic technology scroll down.
What is a Bar Code?
A binary coding system consisting of varying widths of vertical black lines (called bars) and white spaces that when read by an optical scanner can be converted into machine language. Bars and spaces are just one of many "elements" that make up a bar code.
Elements of a Bar Code
Almost all bar codes contain the following elements:
Start and Stop Symbologies
At the beginning and end of some bar code symbols, there are "start" and "stop" characters. These characters identify the symbology and also enable the scanner to read the symbol bidirectionally, decoding the data in the correct order. Bar codes also often include a check digit at the end that is determined according to an algorithm based upon the preceding characters.
Quiet Zones
In order for the scanner to recognize the bar code, there must be an 1/4" wide area next to the start and stop characters that contains no markings. If the space is too short, the bar code symbol will not be read by the scanning device.
Interpretation Line
This is a line of human-readable characters that is located usually beneath the bar code.
Bar/Space Patterns
These are the wide and narrow black bars and whites spaces contained in the bar code.
Inter-Character Gap
In some bar codes, like Code 39 (same as Code 3 of 9), each character is printed independently of other characters and is not part of the encoded character and is thus separated by what's called an inter-character gap
Code Density
Code density refers to the number of data or message characters which can be represented per unit length of space. Four variables affect code density: type of code, ratio of wide to narrow elements and the X dimension.
Type of Code
UPC bar codes are used in the U.S. and Canada EAN and JAN symbols are used in Europe and Japan respectively. All bar codes have different structures. Some are able to encode more information per inch than others. An example is shown in comparing the Interleaved 2of5 bar code with Code 3 of 9. The Interleaved 2of5 can encode more numeric information than the Code 3 of 9 in the same amount of space.
Ratio of Wide to Narrow Elements
Ratio is important in deciding on the type of scanning device to read the code. Changing the code density of a particular bar code is accomplished by varying the ratio.
X Dimension
The width of the narrowest bar or space is referred to as the X dimension, usually given in mils (thousandths of an inch). The X dimension dictates the width of all other bars and spaces, and ultimately the length of the bar code. The greater the X dimension, the more easily a bar code will scan. The smaller the width of the bar, the shorter the length of the symbol, the closer the tolerances are and the more difficult it is to print. The larger the width of the elements, the more space it takes to print the bar code; therefore, the lower the bar code density. The thinner the bar and spaces, the less space is required and the higher the bar code density. Lower density bar codes are more reliably printed and more consistently read than higher density bar codes.
How is a bar code read?
When a bar code scanner is passed over the bar code, the light source from the scanner is absorbed by the dark bars and not reflected, but it is reflected by the light spaces. A photocell detector in the scanner receives the reflected light and converts the light into an electrical signal.
As the wand is passed over the bar code, the scanner creates a low electrical signal for the spaces (reflected light) and a high electrical signal for the bars (nothing is reflected); the duration of the electrical signal determines wide vs. narrow elements. This signal can be "decoded" by the bar code reader's decoder into the characters that the bar code represents. The decoded data is then passed to the computer in a traditional data format.
Bar Code Symbology Types
Some bar codes are numeric only (such as UPC, Interleaved 2of5, and EAN). Others have a fixed length (i.e., UPC-A is 12 digits, UPC-E is 6 digits, EAN-13 is 13 digits and EAN-8 is 8 digits). Some bar codes also have both numbers and alphabetic characters (i.e., Code 128, Code 39 and Code 93). Code 128 enables you to encode all 128 characters.
Bar codes are also grouped into two types of symbologies: linear or two-dimensional.
Linear Symbologies
A linear (or one-dimensional or 1D) symbology bar code is made up of one single row of various widths and lengths of predefined black bars and white spaces. Ordinary bar codes are "vertically redundant,", meaning that the same information is repeated vertically. It is in fact a one-dimensional code. The heights of the bars can be truncated without any lose of information. However, the vertical redundancy allows a symbol with printing defects, such as spots or voids, to still be read. The higher the bar heights, the more probability that at least one path along the bar code will be readable.The height of the bars can be truncated without any lose of information. Examples of one-dimensional bar codes are shown below as Codabar, Code 39, and Interleave 2of5.
The most common 1D symbologies are Code 39, pioneered by the defense and automotive industries; the Universal Product Code (U.P.C.), first employed by the supermarket industry in 1973; Codabar, used early on by blood banks, Interleaved 2-of-5 (ITF), Code 128. Another is Code 93.
Two-Dimensional Symbologies
The need for ever increasing amounts of information in smaller spaces has lead to more compact and higher density symbologies found in two-dimensional or stacked symbologies. A two-dimensional symbology is either a "stacked (called matrix)" or "multi-rowed". Each type allows more information to be stored in a smaller amount of space.
Initially, two-dimensional symbologies were developed for applications where only a small amount of space was available for an automatic ID symbol. The first application for such symbols was unit-dose packages in the healthcare industry. These packages were small and had little room to place a bar code. The electronics industry also showed an early interest in very high density bar codes, and two-dimensional symbologies since free space on electronics assemblies was scarce. More recently, the ability to encode a portable database has made two-dimensional symbologies attractive in applications where space is not at a premium. One example is storing name, address, and demographic information on direct mail business reply cards.
For examples of 2D symbologies, refer to the PDF417 bar code symbology listed below.
Matrix symbologies include Datamatrix, Maxicode, Dot Code A, Code One, QR Code, and Aztec Code.
Multi-rowed symbologies include PDF417, Code 16K, Code 49, Codablock F, MicroPDF417 and SuperCode.
Bar Code Symbologies
The following is a list of the most popular bar code symbologies in use today:
Codabar (also known as USD-4, NW-7, and 2 of 7 code) is used in libraries, blood banks, the overnight package delivery industry, and a variety of other information processing applications.
Code 39 (also known as LOGMARS, Code 3 of 9 and the 3 of 9 Code) is an alpha-numeric barcode and is one of the most popular bar codes used in a variety of industries. Each Code 39 character is constructed of five bars and four spaces, for a total of nine elements. Three of these are always wider than the rest. LOGMARS (Logistics Applications of Automated Marking and Reading Symbols) is an application of Code 39 used by the United States Department of Defense.
Code 16K A multi row symbology, Code 16K offers high information density encoding of the full (128-character) ASCII set and double density encoding of numeric data strings
Code 128- Code 128 is a very compact and versatile language which allows the encodation of the entire 128 ASCII character set. This symbology is self-checking and is designed with geometric features to improve scanner read performance.
Datamatrix - Data Matrix is a 2-D matrix code designed for putting a lot of information in a very small space and can store between one and 500 characters. The symbol is also scalable between a 1-mil square to a 14-inch square. That means that a Data Matrix symbol has a maximum theoretical density of 500 million characters to the inch! The practical density will be limited by the resolution of the printing and reading technology used. Symbols between one-eight inch square to seven inches square can be read at distances ranging from contact to 36 inches away. Typical reading rates are 5 symbols per second.
The most popular applications for Datamatrix is the marking of small items such as integrated circuits and printed circuit boards. The code is read by CCD video camera or CCD scanner.
EAN - There are two different versions of EAN bar codes, EAN 8 and EAN 13, which can encode 8 and 13 digit numbers. All other countries aside from the United States utilize the EAN bar code for identification on retail goods. The symbol is identical to the UPC-A with one exception, the EAN bar code represents thirteen numeric characters instead of twelve.
Interleaved 2of5 - Interleaved 2 of 5 is a numeric-only high density symbology that is very compact because information is encoded in both the bars and spaces. Only an even number of numeric data can be encoded within this symbol. This "double density" symbol encodes odd positioned data in the bars, and even positioned data in the spaces. Interleaved 2 of 5 bar codes are used on corrugated boxes, in the shipping industry, and in laboratories.
MSI Plessey - was designed in the 1970s by the Plessey Company in England and has been used primarily in libraries and retail applications.
MaxiCode -MaxiCode is a two-dimensional matrix symbology containing a fixed number of dark and light hexagonal modules. The symbol is specified to be a fixed size. MaxiCode has a bulls eye finder pattern in the center of the symbol. A two-dimensional device such as a CCD camera is necessary to scan the symbology. MaxiCode is designed with two selectable levels of error correction capability. It supports industry standard escape sequences to define international code pages and special encodation schemes. MaxiCode is used by the United Parcel Service to encode address and customer specified data on shipping packages which are scanned on high-speed conveyors.
PDF417 - PDF417 is a two-dimensional bar code consists of a stack of vertically aligned rows with a minimum of 3 rows (maximum 90 rows). Each row includes a minimum of 1 symbol character (maximum 30 symbol characters), excluding start, stop and row indicator columns. A PDF417 symbol may contain up to 928 symbol characters or codewords. It is used whenever large amounts of information is required in a small space. The Gettysburg address can be put into a 1" x 1" PDF417 square.
POSTNET - (POSTal Numeric Encoding Technique) bar code was developed by the US Post Office to encode zip code information. POSTNET bar codes printed on US mail improve the speed, accuracy and delivery of mail. Some US Post Offices even offer a discount for sending bulk mail when the POSTNET bar code is used.
The Universal Product Code (UPC) was the first bar code symbology widely adopted. Its birth is usually set at April 3, 1973, when the grocery industry formally established UPC as the standard bar code symbology for product marking. Foreign interest in UPC led to the adoption of the EAN code format, similar to UPC, in December 1976.
There are now five versions of UPC and two versions of EAN. The Japanese Article Numbering (JAN) code has a single version identical to one of the EAN versions with the flag characters set to ``49''.
UCC/EAN128 - A variation of the Code 128 symbology was designed primarily for product/shipment identification applications. The UCC/EAN-128 specification uses the same code set as Code 128, however a special character (function 1) is used as part of the start code in the symbol. In addition, UCC/EAN-128 symbols utilize standardized application identifiers (AI’s). By 2005 all US retailers will have to be able to scan all EAN/UCC article numbers (8, 12, 13 and 14-digit). This event is also know as Sunrise 2005.
Applications for Bar Codes
Bar codes are used in any applications where data needs to be automatically identified and captured efficiently and accurately in real-time for purposes of inventory control, asset tracking, product identification, patient information, warehouse picking and packing. Bar codes are used in many industries such as healthcare, packaging, transport, retail, apparel and textiles, automotive, government and defense, and more. Standards for many industries are defined by Industry Standard Organizations. Some of the major organizations obtaining bar codes application, label and product standards are identified in the next section.
Industry Standard Organizations
The following industry standard organizations are a resource for AIDC application or industry standards.
Industry volunteers from automotive OEMs, parts suppliers and technology vendors all work together at AIAG on achieving consensus on common automotive industry rules for using bar codes, and two dimensional symbols, and other Automatic Identification technologies in applications such as shipping labels and parts identification/marking.
ANSI
The American National Standards Institute facilitates development of American National Standards by establishing consensus among qualified groups.
EAN International was started in 1974 when manufacturers and distributors of 12 European countries formed an ad-hoc council. Its brief was to examine the possibility of developing an uniform and standard numbering system for Europe, similar to the UPC system already in operation in the USA. As a result , a UPC compatible system called "European Article Numbering" was created.
The Health Industry Business Communications sets the standards for the health industry.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Now for Magnetic Stripe technology.
The purpose of this guide is to give an overview of the magnetic encoding characteristics as defined by ANSI and ISO/IEC standards. (Standards by which most cards are encoded and configured) Practices are also infulenced by the American Association of Motor Vehicle Administrators or AAMVA.
For more detailed information ID Tech has a good page HERE
First lets get our terms out of the way. Here are some Definitions;
Bit - A binary digit with the value of either 0 or 1. Each track consists of a string of bits; bits strings make up an alpha or numeric character (see Coded Character Set tables).
End Sentinel - A defined character (bit pattern) in an encoding format. Cannot be used for data. The End Sentinel is encoded on the magnetic stripe immediately after the last data character and indicates the end of data.
Field Separator - A designated character which separates data fields. Cannot be used for data.
Format Code - Under ANSI/ISO Track 1 protocol there are two defined formats: Code A is name first; Code B is account number first. For Track 3, the first two digits identify the data format used.
Start Sentinel - A defined character (bit pattern) in an encoding format. Cannot be all zeros. The Start Sentinel is encoded on the magnetic stripe immediately before the first data character and indicates the beginning of data.
Parity - A self-checking code using binary digits in which the total number of ones (or zeros) in each track is always even or always odd. A check for even or odd parity detects errors in the system.
Longitudinal Redundancy Check Character- A bit pattern which is encoded immediately after the End Sentinel. Checks for bit errors in the message, which includes the Start Sentinel, End Sentinel, data, and field separators.
How much and what kind of data can be encoded on a magnetic card;
Track 1 (IATA)
Recording density (bits per inch) = 210 bpi
Character configuration (including parity bit) = 7 bits per character
Information content (max.) = 79 alphanumeric char.
These characters shall have the following meaning for this application:
(%) Start Sentinel
($) Delimiter of Data Element within a data field.
(^) Data field separator for variable length fields
(?) End Sentinel stop character
Track 2 (ABA)
Recording density (bits per inch) = 75 bpi
Character configuration (including parity bit) = 5 bits per character
Information content (including SS, ES max.) = 40 numeric chars.
These characters are available for hardware control purposes only and cannot contain information characters (data content).
(%) Start Sentinel
(=) Field Separator
(?) End Sentinel stop character
Track 3 (Thrift)
Recording density (bits per inch) = 210 bpi
Character configuration (including parity bit) = 5 bits per character
Information content (max.) = 107 alphannumeric
As you can see only tracks 1 and 3 can encode letters. Track 2 is for numbers only.
Start sentinels vary by use. CA drivers licenses use the (+) symbol.
The AAMVA recommended characters are;
(%) Start Sentinel
($) Delimiter of Data Element within a data field.
(^) Data field separator for variable length fields
(?) End Sentinel stop character
The AAMVA "Best Practices" guide can be found HERE
Magnetic Resistance -
HICO or LOCO Coercivity is the energy retention value of the magnetic material. The low coercivity material is 300 oersted whereas, high coercivity is 2750 to 4000 oersted. The higher coercivity magnetic stripe cannot be erased with a common "refrigerator" or " purse clasp" magnet as the low coercivity may. (In theory)
Kanecal provides both low and high coercivity encoding. HICO encoding, as it is called, is used to help eliminate erasures of the low coercivity magnetic stripes. The new HICO standard became effective in 1998.

Pay by check or credit card! CLICK HERE FOR OUR CATALOG

KANECAL Inc. 4312 Shetland Ln. Riverside, Ca. 92509
care@kanecal.net Toll Free 877-KANECAL (526-3225) US only Outside US +1-951-681-9495 Mon.-Fri. 7am to 5pm PST FAX 951-685-4135 Click for Printable FAX/MAIL Order Form
Go to Top
|