10-13-2017 08:36 AM
@pincpanter wrote:
There are barcode readers emulating a serial port over USB. The LabVIEW code could poll the port and drive any input to the proper wire.
Anyone ever tried that? It might work, but usually the barcode scanners are also seen as keyboard. So how to disable the automatic keyboard feature?
10-13-2017 08:57 AM
wiebe@CARYA wrote:
@pincpanter wrote:
There are barcode readers emulating a serial port over USB. The LabVIEW code could poll the port and drive any input to the proper wire.
Anyone ever tried that? It might work, but usually the barcode scanners are also seen as keyboard. So how to disable the automatic keyboard feature?
I've only ever used the scanners that act as a keyboard wedge but my understanding is that there are scanners which are RS232 or RS232 over USB which just act as a standard serial device and Windows would not treat them as a second keyboard.
http://www.taltech.com/barcodesoftware/articles/which_barcode_scanner_interface
10-13-2017 09:12 AM
wiebe@CARYA wrote:
@pincpanter wrote:
There are barcode readers emulating a serial port over USB. The LabVIEW code could poll the port and drive any input to the proper wire.
Anyone ever tried that? It might work, but usually the barcode scanners are also seen as keyboard. So how to disable the automatic keyboard feature?
Been there done that. May have been a "MicroScan" device? Not sure. so many widgets over the years so few brain cells left.
Aside from a command to tell it to start reading I just had to read the serial buffer and ... well you know the rest of the story.
Ben
10-13-2017 09:48 AM
We don't know which is the scanner model used by sudhin_sudh, but it's possible that it could be configured as a USB or Serial-over-USB device in addition to kb wedge.
I used in the past some Datalogic scanners that featured multi-I/F. There are even BT interfaced models.
In any case, it's the only hope for the OP to get the scanned data in an unattended way.
10-13-2017 10:13 AM
Guess it is possible to block a keyboard, and read it's raw stream:
https://www.codeproject.com/Articles/716591/Combining-Raw-Input-and-keyboard-Hook-to-selective
I'd think buying a scanner suitable for the purpose makes more sense... What I get from the web is most scanners can be configured to act as either a keyboard, or a serial device...
10-13-2017 11:35 AM
Of course, if we look into the example finder.....
We get this
10-13-2017 01:00 PM
Here's a whole mess of RS-232 interface barcode scanners.
http://www.retailerwarehouse.com/Barcode-Scanner-World-RS-232-Serial-Barcode-Scanner-s/162.htm
10-13-2017 03:39 PM
Oh, my goodness. It is so simple to use a USB Barcode Reader ("scanner"). It takes three VISA Commands -- Open VISA, VISA Read, and Close VISA. If you want to read multiple items, put the VISA Read in a While Loop.
Note that you do need to know some of the properties of your Barcode device, such as its Baud Rate and something about the data stream that it generates. We have one that we use to read a 9-character bar code that identifies a container. The same code and scanner also is used to read a QR symbol that gives us the 6-character part number. This particular scanner uses ^D (hex 04) as the "End-of-stream" character, so we build that into the Open VISA function.
Bob Schor
10-13-2017 04:49 PM - edited 10-13-2017 04:50 PM
@Bob_Schor wrote:
Oh, my goodness. It is so simple to use a USB Barcode Reader ("scanner"). It takes three VISA Commands -- Open VISA, VISA Read, and Close VISA. If you want to read multiple items, put the VISA Read in a While Loop.
Sure if the barcode scanner in question installs as a virtual com port.
The OP's scanner and all of the barcode scanners we have here are USB but they all appear to Windows (and LabVIEW) as a USB keyboard, not as a virtual com port.
10-14-2017 02:16 AM
Jeff·Þ·Bohrer ha scritto:
Of course, if we look into the example finder.....
We get this
Yes I knew about these functions, although I never used it before doing a little experiment.
First, acquiring the keyboard doesn't return a history of the keystrokes, but which keys are currently pressed. For example, sampling at 1 ms and typing 'ciao' I got a sequence like ccccccccccciiiiiiiiiiaaaaaaaaooooooo. The number of repetitions of each key was different, depending on the time lapse my fingers remained on the keys (although we may expect the reader would be more regular).
Second, the OP says that the operator will be working on something else, possibly pressing further keys. The Initialize keyboard vi does not seem to be able to discriminate between the two devices.