LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Capture from Multiple Barcode Scanners

Hello All
 
I would be most grateful if anybody can help me out with the following problem.
 
I am currently writing an application where I intend to have multiple USB "keyboard wedge emulation" barcode scanners attached to a single PC.
 
I have done work before with just a single scanner attached so I am aware of how to acquire data from the keyboard wedge or RS232 scanner interfaces. With the keyboard wedge type I know you can capture its output using a string control with key focus. Also that you can identify which scanner the data came from by pre-programming each barcode reader with its own unique suffix and identify the end of a scan with a pre-progarmmed termination character too.
 
My questions are as follows:
 
  1. What would happen if two such barcode scanners were to scan at the same time or at least in very close succession, could this  lead to a scenario where the output stream from one scanner gets mixed up with the output stream from another within the string control?
  2. If so is there any means of seperating the output streams from each scanner, e.g can windows/labview identify them as seperate keyboard devices at some lower level?

Thank you i anticipation of your help!

 

 

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

Hi,

  I'd recommend using a single point with keyfocus to get the data from the different sources with the barcodes, and then monitoring for which control/ indicator to send the actual data to afterwards, that way you're not permanently swapping between the controls.

Unfortunately you'll have to talk to the barcode reader manufacturer to work out what would happen with more than one in the system, and having them read at the same time. I'm assuming they go through one driver layer, so in theory they shouldn't collide, but only the manufacturer or driver provider will be able to tell you that.

Hope that helps

Sacha Emery
National Instruments (UK)

 

// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 2 of 13
(8,641 Views)
I ran into this problem and solved it using multiple COM ports.  I have setup all of my scanners (from HHP) to use the RS232 interface.  If you need many different RS232 interfaces then you can use some of the RS232 to USB converters that have 4 ports on them.  This allows you to distinguish not only each scanner but also from keyboard entered text as well.  I used this method to choose whether or not to respond to barcodes based on where my program is at the time.  If the user scans a barcode where it doesn't make sense, it is just ignored.  Also, if the user is in an unrelated program the scanners will not interfere in any way.
Message 3 of 13
(8,599 Views)

Thanks Aronsmith

After some deliberation I came to the same conclusion as you and have decided to go the route of using RS232 scanners, each with an RS232 to USB converter.

What I have learnt from this is that using a scanner with keyboard wedge emulation is fine for on a one scanner per machine basis, but if like me in your application you wish to interface many scanners to one machine then it is much easier and safer if each scanner has its own port, that way there is no risk of scanner outputs getting mixed up. Even if the likelyhood of two people scanning at the same time is rare it still may not be a risk worth taking especially if (depending on the application) the consequences of a mix up could be expensive!

It also makes the setup of the scanner easier because you dont need to add a different preamble or prefix to each scanner to be able to identify its wedge output ,with RS232 each one obviosly has its own coms channel. Finally using the RS232 method means that the coms of each scanner can be processed simultaneously\independently.

So the moral of the story is go RS232 if using multiple scanners on a single PC. If using one scanner on a single PC then use a keyboard wedge emulation.

Message 4 of 13
(8,587 Views)
Very good!
Smiley Very Happy
 This solves a problem I just came across.  I have an application where I will be using two keyboards and one barcode scanner for input.  I hadn't thought of keeping track of the comm ports.
0 Kudos
Message 5 of 13
(8,576 Views)
So, using RS232 scanners can prevent from scanner outputs mixing up and identify which is which, right?
I meet almost the same problem recently. This discussion would be greatly helpful for me.
 
Thanks.
0 Kudos
Message 6 of 13
(8,242 Views)


Calvin.ych wrote:
So, using RS232 scanners can prevent from scanner outputs mixing up and identify which is which, right?
I meet almost the same problem recently. This discussion would be greatly helpful for me.
 
Thanks.


Why WOULD? I would feel it IS!
 
The conclusions are quite obvious. With only one keyboard input queue you can't easily detect which barcode scanner sent the code (except using a configurable preamble or something) and you always have the problem of possible mixup if two barcode scanners happen to be triggered more or less simultanously.
 
Obviously the USB models could and sometimes can be installed either as a keyboard wedge model or through a manufacturer provided virtual COM port device driver virtual RS232 device. However the virtual device driver option is usually only available for the somewhat higher end models which also has its price.
 
Rolf Kalbermatter
Rolf Kalbermatter
My Blog
0 Kudos
Message 7 of 13
(8,233 Views)
Virtually every barcode scanner on the market can be programmed with
the book with extra characters either before or after the scan. This
is often used as scanner identifiers. The data is transmitted so fast
it is very very unlikely that the two will tranmsit at exactly the
same time. Given this you could use a keyboard or Usb scanner
Ces
0 Kudos
Message 8 of 13
(8,217 Views)


code39man wrote:
Virtually every barcode scanner on the market can be programmed with
the book with extra characters either before or after the scan. This
is often used as scanner identifiers. The data is transmitted so fast
it is very very unlikely that the two will tranmsit at exactly the
same time. Given this you could use a keyboard or Usb scanner
Ces


Vry unliikely is not enough for an industrial grade application! At least for me.
 
Also the keyboard input queue is anything but fast. Why should it be? A very good typist never will get 10 keys per second or above.
 
Rolf Kalbermatter


Message Edited by rolfk on 11-29-2007 09:21 AM
Rolf Kalbermatter
My Blog
0 Kudos
Message 9 of 13
(8,212 Views)
I'm not saying you had to use it that way after all it's your choice.
BTW, Barcode scanners transmit keyboard characters with less than 1ms
delay between characters every day of the week, that's about 100 times
faster than you typist and with a lot more accuracy.
0 Kudos
Message 10 of 13
(8,188 Views)