07-08-2019 06:40 PM
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!
07-08-2019 07:04 PM
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.
07-08-2019 07:46 PM
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.