Barcode reading principles

Barcode reading principles

How is barcode-read data integrated into your system? Advantages: the barcode replaces keyboard input, and is quicker and more error-free. Different types of barcode.

What’s inside a code? What about viruses?

How to read barcodes and with which readers: scanner or terminal? Advantages and disadvantages of different scanning methods. Why use scan-enabled mobile terminals?

A simple explanation of the barcode

The barcode is simply a representation of a number, of letters, in a different font: imagine you’re on your word processor and you select your text and choose a different font because you find it more readable: it’s the same, except that the text is readable by machines and not by the human eye & brain.

Coding is made up of a precise alternation in thickness of black and white.

What’s behind the barcode?

Based on the above explanation: in fact, there’s nothing behind the barcode other than what’s written on it! There’s no price on the item’s barcode in the store, nor its designation: no, there’s what’s clearly marked underneath: its item reference number, in most cases in the store.

The fact that we think that behind the barcode is the price, the designation, is that the machines that read them actually have an on-board database, or one linked to a computer that owns it, and which links the code (item) read to this product line, in which we can have lots of information such as its weight, its title in any language, the last orders placed, etc….

There is one exception: the ubiquitous UPC (Universal Product Code) found on grocery products. Each digit of the barcode has a meaning: the manufacturer’s prefix, the product code and the check digit. Once digitized, this unassuming arrangement reveals a wealth of information, from nutritional data to supply chain logistics.

The main advantages of barcodes

  1. speed of reading by machines called “scanner heads”, which can read hundreds of codes per minute,
  2. its accuracy and resistance to error: in fact, error codes are included in the design to avoid reading errors on dozens of characters.
  3. link several pieces of information: e.g., an item to its quantity and location, or an item to a production order.

The input principle is simple:

StepExplanations
barcode
a barcode is printed on the roduct
Order reception IHM
Operator input: the barcode data is interpreted by the PDA (input terminal) (in this case, receipt of order items on site) and stored there, with other data added, such as the date and time of input, stored on the terminal.
Remote data storage
Synchronization with the database is performed either in pseudo-real time via Wifi or 4G, or via USB between the PC and the terminal: the csv file from the PDA can be transferred to the PC.

see: types of barcode reading devices

List of possible codes: symbologies

we’ll help you choose the symbology best suited to your application. Our label printing report templates are ZPL-written and require NO purchase of licenses or fonts: our specific printer has them built-in, without complex transcoding:

  • Codabar : number, without checksum
  • Code-39 : caracters from 0 to 9, from A to Z, the “space” character and symbols: - * . $ / + %, all the 128 ASCII caracter set
  • Code-128 Auto :encodes ASCII 0-126 caracters, including numbers, letters, some symbols, and the function GS1 FNC-1
  • Jeu de Code-128 : (preferred in industry and logistics)
    • C128A : code 128 in caracter set A, which includes uppercase letters, numbers and some functions
    • C128B : ASCII 32 à 126 caracters,upper and lower case letters, numbers and some symbols
    • C128C : numbers per 2 and the GS1 FNC-1 function
    • GS1-128 (UCC/EAN-128) : same as C128 Auto with GS1 function
  • DPM : Direct Part Marking : Datamatrix-type bar code, directly engraved in relief on the metal without destruction by special machines and read by terminals with imagers that are also special because of their brilliance and reflections: ask us for advice on the choice of code.
    DPM code: bar code for metals
  • Interleaved 2-of-5 : numbers only, very compact and resistant to imperfections
  • MSI : numbers only
  • Postnet : numbers, space and “-”
  • PDF417 :(in 2D) encodes text, numbers, bytes, files, up to 1035 characters
  • QR Code : Maximum data storage capacity(version 40, 177×177) : Numeric characters: maximum 7089 or alphanumeric characters: maximum 4296 or binary (8-bit): maximum 2953 bytes
  • GS1 DataMatrix : (in 2D) encodes text, numbers, bytes, files, can encode up to 2335 characters on a very small area,
  • the “dot code” of cigarette packs can be read with 2D imagers,
    dot code of cigarette packs
    like here the small dot codes in the attached photo on an EDA51 with an SDK application, pops up on the screen as “302Z3HFS62L” in type 46 (symbology) in less than a second. The dot code is a kind of Datamatrix (type 46 ) is a GS1 128 CCA, little known until 2018.

The imager or laser barcode reading head included in the terminals returns the barcode value and symbology to the program.

Our software can take this symbology into account in certain apps with multiple or secure readings.

What not to put / print around the barcode?

The barcode is, as its name suggests, made up of bars.

So, in order not to interfere with its reading, you must NOT put bars in a peripheral zone of around 5 mm (called the “quiet zone”). So don’t enclose the code in a frame (or outline it in Excel cells, for example).

Nor should you place color changes or other bar codes in this zone, or print a code on the edge of a label: the shadow of the thickness can visually constitute a bar too.

Can a barcode be read at any distance?

No. Conventional codes are read with conventional heads, i.e. between 10 and 50cm.

More powerful reading heads are available, but the code must have a minimum size. There are very complex calculation rules on this subject.

In our experience, a code width of one inch (2.5cm) per meter of reading distance is required for an EAN13, with other symbologies in the same proportion.

Is it possible to infect a smartphone or terminal with a barcode virus?

First of all, it’s technically impossible to have a virus in a 1D code. Only 2D codes (QR code or Datamatrix) can. If the 2D code leads you to an Internet page with viruses, yes, the smartphone can catch them, but only in certain cases.

On the other hand, in professional apps, it depends on the design of the software used to read the barcode. Technically, the reading head only reads the code and transmits the read data to the software that called it. If this software interprets the content of the barcode data, it may indeed be possible to have a virus if the code has one, provided you get past the protections of Android, which inherits from Linux, which is fairly impervious by design to such malware.

Example of interpretation: reading a QR-Code that refers to a site: it’s an interpretation if it’s read from the browser.

Our software doesn’t interpret barcodes, it reads them, stores them, and associates them with each other by equality: in general, a code embedding a virus is a very complicated code in terms of content, and will never be able to associate itself with articles or management operations if it isn’t spotted immediately.