From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Keyboard wedge scanner carriage return

Solved!
Go to solution

I am trying to program a simple sub-vi that takes either a keyboard entry or keyboard wedge scanner entry from an operator into a string field. The data entry is a 9 digit serial number. The scanner used has a carriage return programmed into the scanner for other applications running on this machine so I can't change the scanner programming. Just wondering a way that I can progam a VI to wait for a 9 digit serial number to be passed then jump focus to the 'OK' button after 9 digits are passed? This way if the operator manually types 9 digits then carriage return the VI ends or if they scan a serial barcode it will take the first 9 digits and then read the carriage return as an 'OK' button press.

 

I did see a couple of old postings of similar stuff but none that had a concrete solution.

 

 

An example VI is attached....   

 

Thanks!

0 Kudos
Message 1 of 7
(3,731 Views)

When time it read the scanner set the Key focus to a string control. Then you can use an event structure to watch updates (update while typing). I think the CR will cause the string to loose focus but don't remember that detail.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 7
(3,729 Views)
Solution
Accepted by topic author aaronb
I don't have 2009 installed here but look at the attached code. It uses the Key Navigation to toggle the OK button.
Message 3 of 7
(3,722 Views)
Thanks guys! Exactly what I needed!
0 Kudos
Message 4 of 7
(3,714 Views)

Hi,

 

I'm working on something similar and need help, can someone convert the above vi for Labview 8.5 so that I can open it?  I would really appreciate it. 

 

Thanks

0 Kudos
Message 5 of 7
(3,221 Views)
0 Kudos
Message 6 of 7
(3,213 Views)

Thanks...

0 Kudos
Message 7 of 7
(3,193 Views)