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: 

A question about "wait For Front Panel Activity"

When i put "wait for front panel activity" on the Block Diagram, i find that if i click on any button on the front panel, the program will run again. For example, i want the program run when i type something in the String, but not the switch. How can i set the function wait for?

A new beginner,thank you for your help
0 Kudos
Message 1 of 4
(3,059 Views)
Salutations,

If i were you, i'd consider using an event structure that triggers based on the activity in your string control.

One of the ways of doing this..

Create an outermost while loop. Inside this put the event structure. Then, place your string in the event structure. Go to the spot where it should say "timeout" or it's the middle on the top part of the event structure. Right mouse click it, and go to "edit events handled by this case". From here, select your string control name, and then decide on how you want it to trigger. I think, one of the best ways for you would be the key repeat option. That way, you can enter all the text you want, and then when you hold down a key for a few seconds, i'd suggest the shift key or maybe control key. The event will trigger.

Sincerely,
ElSmitho
Message 2 of 4
(3,045 Views)
There is no way to use Wait for Front Panel Activity and limit it to a specific control. You should instead use the event structure. A Value Change event will be issued when someone types anything into the string control.
Message 3 of 4
(3,044 Views)
Thank you for the reply, i can solve the problem
0 Kudos
Message 4 of 4
(3,022 Views)