Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Bar code reader component

Posted on 2003-02-28
8
Medium Priority
?
425 Views
Last Modified: 2010-04-04
Hello Experts.
We want to develop application that needs to be interfaced with Bar code reader, to read bar code in store products information in a database.

1. I didn't started this application, so that I want to know is there any special components in Delphi that is used with bar code readers, and what type of it's Interface, is it serial or like card reader connected with Keyboard.

2. Is there any advisable bar code reader device that easy to program? or programming has no thing to do with device type.

Thanks in Advance

Motaz
0
Comment
Question by:Motaz
8 Comments
 
LVL 7

Expert Comment

by:billious
ID: 8043107
Motaz,
  a barcode reader contains its own software to generate the character-equivalent of the barcode read as though the characters contained in the barcode were typed by a human user on a keyboard.

  You can get a keyboard wedge type, or some types allow you to input via a serial port.

  In either case, you scan the code, the characters are "keyed" into the device you're reading (keyboard, serial port, wherever...)

  No need for components at all!

HTH

Bill
0
 
LVL 7

Author Comment

by:Motaz
ID: 8044233
Is that mean I can start programming, and when I get the bar code reader, just I have to plug it, install it's driver and software, then it needs only focused edit box to input bar code from products in my edit box?

Motaz
0
 
LVL 7

Author Comment

by:Motaz
ID: 8044236
and What about the types of Bar code readers?

0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 1

Expert Comment

by:Dissaster
ID: 8045404
I've been working with some bar code readers for a while, usig models from Metrologic. Basically i've used three models, two with serial interface and one with keyboard interface. In all of them the configuration of the Bar code reader is made directly to the Reader and there is no need to install special software or drivers, just plug them in and they start working. The Keyboard type, just sends the input to the keyboard buffer so it´s not necesary to make any special programing for this, the serial type however, sends the input to the serial port so you must program the code to scan the serial port at some time intervals (there are components that do this, but i don´t remember the name of any of them, search in www.torry.net for some of them) and do what ever you want with the data you received. I usually send this data to the Keyboard buffer so i don´t have to mind what kind of barcode scanner is installed, and it behaves exactly like a Keyboard type Bar code reader. To do this, I use a very usefull DLL named "PushKeys.dll" you can find it in:

http://www.froggy.com.au/andromeda/software/pushkeys/

Hope this helps you.
0
 
LVL 3

Expert Comment

by:loop_until
ID: 8045690
Hi Motaz,

  I've also worked with some Metrologic barcode readers. The model I used was working with an RS232 cable. You plug the serial cable in one of your COM port, set a terminal program with correct settings (often 9600 bauds, and so and so) and your set. If you want direct control of your barcode reader without the use of external driver, a simple access to your COM port in Delphi can make you happy :). No need for edit box.

  But, you might prefer other solutions?

// Connect to FPortName --> '\\.\COM1'

  FHandle := CreateFile( pchar(FPortName),
                         GENERIC_READ or GENERIC_WRITE,
                         0, // Not shared
                         nil, // No security attributes
                         OPEN_EXISTING,
                         FILE_ATTRIBUTE_NORMAL,
                         0 // No template
                        ) ;

I don't have the code where I am but tell me if you need more help with this. The barcode scanned is sent in ASCII directly to you by the reader. You can tell the barcode reader to send a starting and ending character to help you extract the code from the string.

$03+'123456789'+$02

Anyway, hope it helps!
Have a nice day Motaz! ;)
0
 
LVL 7

Accepted Solution

by:
billious earned 1000 total points
ID: 8045774
Motaz,

   You got it. Nothing more required. There isn't even an "install the driver and software" step - it's just like having a second keyboard in parallel with the first (if you use a "keyboard wedge" type.)

   I'm certain that some types will require some simple driver - somehow it's expected. There are some that you can program to decode only some barcode types, but that's probably too fancy for your needs - and it's a hardware configuration consideration, nothing to do with your software.

   What do you mean by "types"? Do you mean "Brand" or physical configuration (wand, gun, benchtop) or are you concerned about the various barcode types in use?

   If you're dealing with product codes (as found on most items for sale at supermarkets) then you will find that there are three standards, (EAN-8/UPC-E) which is the 8-digit standard, UPC-A, which is the 12-digit standard, and EAN-13, which is the 13-digit standard. If this is what you are using, then simply fill the code read with leading zeroes to the 13-digit length.

  If you're using ITF-14 (carton outer) then you'll get a 14-digit code. You would find ITF-14s at supermarkets - on the big outer wrappers, the barcode surrounded by a heavy-printed box.

   If you are after some other internationally-defined code, such as SSCC or EAN-128, then decoding is another matter - somewhat complex in some cases.

   If you are looking for some internal application, such as asset-tracking then the format is what you choose.

   In all, don't worry about the exact barcode "font" in use - it's the barcode-reader's job to do that. Your application can assume that the reader will simply input the sequence of characters defined in the code sample to whatever port it's attached to - serial, parallel or keyboard - and  no special measures need to be taken on your part. It's the job of the barcode-reader to decode whatever barcode type is presented to a character-string, and the job of its driver to present that string as though it was coming from the keyboard.

HTH

...Bill




   
0
 
LVL 3

Expert Comment

by:LukA_YJK
ID: 8047100
Wa...
0
 
LVL 7

Author Comment

by:Motaz
ID: 8048367
Thanks,
I'll post points to all commenters
motaz
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This is an update to some code that someone else posted on Experts Exchange. It is an alternate approach, I think a little easier to use, & makes sure that things like the Task Bar will update.
Loops Section Overview
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question