LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger event only after Enter key pressed (or barcode scanned)

Solved!
Go to solution

Hi,

 

I am trying to do the following....I have a string field where the user either manually enters a code or scans the code into it. Based on this code I want to trigger an event that will look at what this (string) code is and output another string (esssentially using a  case sequence in an event). Using Value change achieves what I want if I were only to enter in one value but I need to be able to do this with more than one value. any help in how to approach this would be appreciated. I am using Labview 8.2

 

Thanks!!

0 Kudos
Message 1 of 5
(5,683 Views)

Without any actual code, I can only guess at what's wrong.

Is your event structure inside a while loop?

Does your string control have 'Update value while typing' active (I would advise you not to do so).

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 5
(5,677 Views)
Solution
Accepted by topic author TanWal

TanWal:

 

If you right-click your string control, is the "Update Value While Typing" option enabled? You may need to disable that to prevent the value change event from firing until the entire string is entered.

Also, if you enable "Limit value to single line," that will make the "enter" key submit the value instead of adding a new line (which will fire the value change event if you have "update while typing" disabled.

Caleb Harris

National Instruments | http://www.ni.com/support
Message 3 of 5
(5,644 Views)

Thanks for the feedback, I wasn't aware of that option. It now allows me to control it better using the 'value change' event

0 Kudos
Message 4 of 5
(5,641 Views)

TanWal:

 

Thanks for the solution, but TCPlomp had the idea first. You might want to mark his post as the solution instead Smiley Wink

Caleb Harris

National Instruments | http://www.ni.com/support
0 Kudos
Message 5 of 5
(5,637 Views)