LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

barcode scanner for LabView

What is a recommended inexpensive barcode scanner that is compatible with LabView (with USB interface)?
Thanks
Alex

0 Kudos
Message 1 of 13
(8,717 Views)

Just about any barcode scanner will work. All of the ones I've seen support keyboard emulation or serial port emulation, either of which will work with LabVIEW. I find the serial port emulation easier. With the keyboard emulation, either a string control needs to have focus or your code needs to handle keystroke events in order to read the scan; with serial port emulation, the driver will buffer the scan and you can read it whenever you want with no keyboard inteference or focus issues. Do you need to read a 1-D barcode, or 2D? Do you need built-in illumination? I'd start by figuring out which features you need; LabVIEW compatibility probably won't be a problem.

Message 2 of 13
(8,708 Views)

Like nathand said the keyboard emulation type works great.  We have used one of those on several projects.  You just need to set the key focus on a string control, scan your code and 'beep' there it is.  If the scanner does a end of line at the end of the string you can set that to be the update the control code and then the program works straight from the scan.

 

I think the one we used cost like $30.  I can't find the link to it any more.  Changed computers too many times.

Wire Warrior

Behold the power of LabVIEW as my army of Roomba minions streaks across the floor!
0 Kudos
Message 3 of 13
(8,685 Views)

I don't think Nathan actually said that the keyboard emulation actually works great.  It sounds like the easier one to use, until you realize as the programmer, how do you handle things when the user accidentally clicks somewhere else on the front panel, sends the focus elsewhere, and the the "keyboard entry" that the scanner causes sends the data to the wrong spot.

 

The serial port style of scanner, while you need to do a little bit more work as a programmer to read the data from the serial port, (actually not hard at all), it saves you from a lot of hassle dealing with "user errors" caused by the keyboard being hit, or the change in focus of controls.  It is a lot harder to predict what a user can do to screw up a program, then it is to read the serial port and work with the data that is collected.

 

I believe Nathan is actually recommending a serial port version of the scanner.  EDIT:  Rereading his message, I see he specifically says "I find the serial port emulation easier."  That doesn't sound like a recommendation for keyboard type scanners to me.

 

If you doubt that, search the forums for message threads dealing with keyboard type bar code scanners and how often people ask questions to figure out how to make them work properly in their applicationsl

0 Kudos
Message 4 of 13
(8,676 Views)

Re-reading Nathan's post I see that.  My experience with the keyboard emulation was great but there was not much interaction beyond scanning with that computer.  The rest of the UI was done using Data Dashboard on an iPad.  That's probably why I didn't have a lot of user issues.

Wire Warrior

Behold the power of LabVIEW as my army of Roomba minions streaks across the floor!
Message 5 of 13
(8,644 Views)
Once, i would have recommended Intermec, having had years of experience with their corded and cordless (Bluetooth and PicoLink) guns. Presently, for a simple corded gun solution, I'd recommend Symbol (a Motorola subsidiary). Look for their LS-2208 on CDW, if you're US domestic. They're USB and can be configured to look like a keyboard wedge or serial.

Absolutely concur that serial is ultimately much easier to manage.
Here's what I do:
Create a user event with a data type of string. Register event into dynamic terminal of your UI event handler. Also pass the event wire to a subVI which contains a loop on a VISA Read setup for termchar, and a short timeout, on the virtual com port created by the gun's driver. Whenever the VISA Read DOES NOT timeout, post the characters to a Generate User Event. (Exit this loop, and the subVI, if the event refnum gets destroyed.)
Now your UI loop gets an event whenever someone scans a barcode, without wasteful polling. I set the gun to give me the AIM ID preamble so my code can test for what class of barcode (code 39, 128, UPC, etc) - helps when parsing multiple BC targets that are scanned in unpredictable order.

Dave
David Boyd
Sr. Test Engineer
Abbott Labs
(lapsed) Certified LabVIEW Developer
Message 6 of 13
(8,624 Views)

At a previous job, we used Handheld (now Honeywell, I believe) scanners with no problems, but I have no idea how much they cost - they were what we we already had on hand for other applications, I just repurposed one for a LabVIEW project (and looking at the way we mounted it, it was immediately obvious that we grabbed whatever was available rather than finding one a new one that would fit the space properly).

 

I did write a LabVIEW application that used keyboard emulation mode because another application already running on the same computer required it. In my application, the scanner was the only input, but the computer did have a keyboard for other uses. In order to avoid focus problems and interference from keystrokes, here's what I did. There were no controls on the front panel. Instead, I registered for key down events on the front panel itself. Normally the event structure waited forever. When it received a keystroke, I checked that it was part of a valid sequence, and if so, I added that character to the string of received characters and set the timeout to a shorter value. If an invalid character was received, or a timeout occurred, I cleared the received character string and reset the event structure timeout to forever. That way, the only way input would be processed was if a valid string was received in a fairly short period of time, which was almost impossible to do from the keyboard (it could be done, which was useful for testing, but was highly unlikely to ever occur by accident in normal use).

Message 7 of 13
(8,620 Views)

Why don't you use a simple USB camera and LabVIEW Vision Development Module/IMAQ to read barcodes? There is a specific function that reads barcodes from an image and outputs the required data. Must give it a try.

 

Regards. 


0 Kudos
Message 8 of 13
(8,494 Views)
you can add a focus-property to the keydownevent, and if focus wasnt there already, send the recieved char to the indicator.
/Y
G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 9 of 13
(8,488 Views)

You may refer to a professional barcode site on Google.

0 Kudos
Message 10 of 13
(8,147 Views)