Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Barcode for Newbies

Status
Not open for further replies.

Jhongski

Programmer
Nov 25, 2004
10
0
0
US
I'm a VB programmer planning to develop an attendance monitoring system that uses barcode. I haven't developed any application that uses barcode so could you please tell me what are the steps that I need.

a. Their ID has a barcode in it already - how will I know which type of symbology code to use?

b. My clients are planning to buy their barcode scanner but I don't know which type to recommend. Are barcodes generic to the point that they can scan different types of barcode labels?

c. For testing purposes, if my clients photocopy the IDs with their barcode then can I already read the barcode from that photocopied paper?
 
What type depends on how they want to scan their barcode. Is it a badge then maybe a swipe reader is best.
if they need to scan documents too then maybe a hand held gun
Wands are not preferred as they break when dropped (the tip is going to hit the floor first as its tethered to your pc) and scratch barcodes on paper used over and over again.

A hands free type is good also passing badges and small documents
PS2 and USB are easiest to integrate to any program as they send barcode data to where the cursor is blinking. But you program as to running and setting on the screen at the time of scanning. These are also good if you want to scan data into any program regardless of who made it or what it is even DOS. USB’s are nice because you can move them from PC to PC to Laptop and back without having to do anything except unplug it.
I recommend the HHP IT3800 gun. no moving parts, very fast, will read the worst barcodes. If this don’t read it, nothing else will. Comes out of the box ready to work.

RS232 can happened in the background but you have to write a com port monitor program or buy one to read the data and do something with it.

Photcopy is not a good way to go as the barcode lines need to be precise.

DougP, MCP, A+
 
Hi, Doug!

Thanks for the reply. I have a follow up question, assuming my client bought the swipe barcode scanner already:

1. What are the next steps that I need in order to integrate that barcode to my VB app? Do I need additional OCX/DLL to read the barcode?

2. How will I know which symbology to use - they are using the alpha numeric format so from what I've read in the past posts I need to use Code 39.

3. As much as possible I want my application to support barcode and the normal keyboard entries so that they could do it either way when entering their employee ID, is it possible?

Thanks!
 
Jhongski,

As Doug already explained "you have to write a COM port monitor program".

I call that an "interface". Once know as device driver. Basically, you write code that monitors the port (COM, LPT, USB, whatever) for incoming characters and read them from a buffer. Before you can do this, it helps to know what form the date is in so you know what to expect.

The easiest way to accomplish this is to set it up in HyperTerminal. You will need the baud, stop bits, parity etc. just like your interface program will. This also becomes part of your research. Once you get HyperTerminal talking to it, look at the format the scanned data is in.

With all barcode scanners, the first char is alpha and tells you what symbology the following numeric chars (or alpha) are in. Examples:

E02881920 - "E" = UPC-E / Barcode = 02881920
A028200101907 - "A" = UPC-A / Barcode = 028200101907

Scanners can be programmed to accept or ignore certain symbologies (barcode types) This is done by scanning programmed barcodes from the user manual of the scanner.

Using HyperTerminal or whatever "Direct Cable Connect" software you choose, once you have it reading correctly, you are then ready to write your code.

I have written several in Pascal and Delphi, but I don't do VB... But should be able to answer general coding questions. Some code trade would be welcomed.

See me in Borland Delphi Forum:
 
Also Visual Basic has a "Dialer" program as a sample and you can see how to open a comport and send and receive "Some" characters

DougP, MCP, A+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top