LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to detect and read a Barcode Scanner without and active string control

Hello!

I am trying to implement using a barcode scanner in my program so that when the front panel is active/frontmost and a barcode scanner is used (or rapid key presses), the program will read the the numbers/characters from the barcode scanner. Any ideas on how to do this? Thanks!

 

 

0 Kudos
Message 1 of 3
(2,327 Views)

Ah figured out how to do it!

 

Used the Key Down event to get the character code and converted it to its appropriate ASCII Character using Type Cast. I then stored that character in a string control and concatenated any additional characters to it. I then clear out that string control after I read a valid barcode or after a certain timeout.

0 Kudos
Message 2 of 3
(2,314 Views)

if a serial port barcode scanner,it's easy read the barcode from serial port.if a use port barcode scanner and don't have focus on front panel string control,use the this vi key down and key repeat event to get the single charactor,then concatenate charactor to target barcode(like press keypad),you'd better define the barcode start charactor and end charactor.

0 Kudos
Message 3 of 3
(2,294 Views)