C Language Development Kit/Application development/Reading barcodes

From OptiWiki

Jump to: navigation, search

The handheld terminals can read all major barcode types and some special ones. By default all major barcode types can be read.

A large number of parameters are available to influence the way barcodes are being read. They are listed in the section: Systemsettings, and can be set with the systemsetting() function. Options exist for setting which barcode types must be read, if a check digit must be calculated on the barcode or not, and extra formatting of the barcode. Setting only the barcode types used in your application is good practice, since it reduces the probability of false reads.

  1. Specifics for the laser terminals (OPH100x, H13, PHLxxxx, OPL97xx and DCL153x).
  2. Specifics for the DWT7133.

Specifics for the laser terminals

For the OPH100x, PHLxxxx and the OPL97xx/DCL153x laser terminals other options exist that influence the performance of the scanner. They are also listed in the Systemsettings-section of this help file and can again be set by using the systemsetting() function. The redundancy setting specifies how many times a barcodes must be decoded in a row, before it is accepted as a valid read. By default it is set to two. Setting this value lower will make the scanner more aggressive, but false reads may become somewhat more likely.

The scan-engine is the part of the handheld terminal that emits the laser beam, detects variations in reflected laser light and stores this information in a buffer for further processing by the readbarcode() function. The scan-engine can be controlled from the application by the scannerpower() function.

After the handheld terminal reads a barcode the scan-engine will be switched off or continue reading ("multiple read"), depending on which parameters were passed to scannerpower(). The scan-engine must be seen as an independent process running concurrently with the application and regulated by scannerpower().

The function readbarcode() tries to find a barcode in the scan-engine data. If readbarcode() finds a valid barcode, it returns the barcode, else it returns an error code.

It is important to understand that readbarcode() must be called repeatedly, in a loop, to yield a barcode. Each time readbarcode() is called, it processes the scan-engine data generated so far and then returns. In this respect it is much like getchar() on an stream, that neither waits for a keystroke, but returns immediately.

Specifics for the DWT7133

For the DWT7133 the white margin options influence the performance of the scanner. They are also listed in the Systemsettings-section of this help file and can again be set by using the systemsetting() function.

The scan-engine is the part of the DWT7133 that emits the LED light, detects variations in reflected LED light and stores this information in a buffer for further processing by the readbarcode() function. The scan-engine can be controlled from the application by the scannerpower() function.

After the handheld terminal reads a barcode the scan-engine will be switched. The scan-engine must be seen as an independent process running concurrently with the application and regulated by scannerpower().

The function readbarcode() tries to find a barcode in the scan-engine data. If readbarcode() finds a valid barcode, it returns the barcode, else it returns an error code.

It is important to understand that readbarcode() must be called repeatedly, in a loop, to yield a barcode. Each time readbarcode() is called, it processes the scan-engine data generated so far and then returns. In this respect it is much like getchar() on an stream, that neither waits for a keystroke, but returns immediately.

Views
Personal tools