LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmable barcode scanner

Well, you've certainly received a lot of advice!  Thanks for confirming that you want some sort of fixed scanner, and that the barcode in question is expected to stay in the field of view (FOV) for a long time.

 

This should not be a problem.  As Rolf and others pointed out, scanners can be programmed to remain idle until either a trigger button (found on handhelds) or a control message (handhelds and fixed scanners) requests a scan.

 

If a scanner is in a continuous-acquisition mode, it generally also implies that a "new" barcode arriving in the FOV is reported once, and then no more, until the barcode is removed from view and replaced.

 

I'll still suggest that you use a virtual serial, rather than a virtual keyboard, interface for your application.  Using virtual serial puts you more firmly in control of triggering and any other programming you may need to do during operation, because it provides a path for host-to-device messaging (which you lack in a virtual keyboard configuration).  It also means you don't have to worry about whether your application has Windows focus, if some specific textbox on your app has focus, and if you're competing with an operator typing on the system keyboard.  As a serial device, your scanner is really just another "instrument".

 

Nearly certain any Honeywell device (sorry, I'm not familiar with the model you quoted), if USB-attached, will readily be configurable as a serial-port class device, and will use the same "syntax", or at least a compatible set from, the handheld scanners from Honeywell.  If you get stuck (after you read the programming manual!), let me know and I may be able to coach you on how to access it with VISA Read and Write calls.

 

Dave

David Boyd
Sr. Test Engineer
Abbott Labs
(lapsed) Certified LabVIEW Developer
0 Kudos
Message 21 of 26
(496 Views)

Thank you for your reply. Sure with the serial connection, I am sure I will be able to configure and use Visa write and read to program the device. But if a problem occurs, yes I can message you. But the first task is deciding the scanner which I have and hopefully my company will agree to me. Thank you.

Message 22 of 26
(491 Views)

Hi David,

 

I have a barcode scanner (Honeywell 1470g) set up in serial mode and using manual trigger. I'm successfully reading from the device, but I want to send the trigger command to the scanner so that it can be ready to read a barcode (from above a conveyor), provided in the manual as "SYN T CR". I was able to successfully trigger the scanner using a Python serial connection and the hex versions of the provided command, "\x16M\r\x16T\r". However, I don't know how to translate this command to what LabView would expect to see for use with a VISA write. I tried first in MAX but can't successfully trigger it (though reading works fine). Do you have any insight? Thanks!

 
0 Kudos
Message 23 of 26
(338 Views)

Hello bashleigh,

 

This should be an easy one - if you're not a longtime LabVIEW user you may not be fully aware of the display and data entry settings for LV string controls, indicators, and block diagram constants.  Generally, you right-click and select Visible Items->Display Style, then you (and for front panel items, possibly your end user) have the ability to switch string rendering and entry between normal, hex, \backslash, and password (all asterisks) styles.

 

For the present task, you'll probably want "backslash codes", where normally invisible chars will display as \s, \r, \n, etc.  Here's an example string constant from my code:

DavidBoyd_0-1705343455754.png

 

 

Keep in mind that this doesn't fundamentally alter the content of the string, just how it is rendered (and entered).

 

I have a few disorganized bits of example code, and one fully-fleshed-out library routine providing extensive control of a Honeywell scanner.  Let me know (via PM with an email address) if it's anything you'd want a look at.

 

Dave

David Boyd
Sr. Test Engineer
Abbott Labs
(lapsed) Certified LabVIEW Developer
Message 24 of 26
(318 Views)

\x16 in some text based languages means to produce the hex byte value 16. In LabVIEW you need to enable the \ display mode to have this working (also for \r) and you need to enter it as \16. Basically any number between 00 and FF following a \ character is interpreted as hex value (and for printable character converted to the according character when a string is in \ Display mode.

Rolf Kalbermatter
My Blog
Message 25 of 26
(315 Views)

Oh, brilliant, I figured it was something simple but fundamental that I was missing. I knew about the display styles but didn't know that x16 would equate to \16 in backlash mode (for example). That's very helpful to know, thank you for the quick reply. And thank you rolfk for another helpful reply.

0 Kudos
Message 26 of 26
(300 Views)