Technical Information

Application Development Manual | Opening bar code device

Opening bar code device

Function

Open the bar code device file, ready for reading in bar codes.

Syntax

Detailed Description

BHT-BASIC treats the bar code device as a file. Reading and using bar codes therefore requires first opening the bar code device file. Opening the bar code device automatically makes it ready to read bar codes.
Pressing the trigger switch starts the illumination LED flashing. The BHT then automatically reads the bar code off a label that comes within its scan range.

fileno can be any number from 1 to 16 not currently in use by another file (data or communications device). Use the same number to read incoming bar code data from and close the bar code device file.

codetype is a comma-delimited list of the bar code types to accept together with any code length specifications. (See examples.)

Note that always close the IrDA communications device before opening this device. The two cannot be used simultaneously.

Closing the bar code device when there is no longer any need to read bar codes conserves BHT power, increasing the time between recharges.→ Closing bar code device

Examples
Accept universal product codes (JAN, EAN, and UPC)
  open "bar:" as #1 code "A"
Accept universal product codes (JAN, EAN, and UPC) starting with 49
  open "bar:" as #1 code "A:49"
Accept universal product codes (JAN, EAN, and UPC) as well as Code 39 and Code 128
  open "bar:" as #1 code "A","M","K"
Accept 6- to 10-digit ITF codes
  open "bar:" as #1 code "I:6-10"
Accept QR Code
  open "bar:" as #1 code "Q"

Contact us

QBdirect