10-25-2013 07:28 PM
Hello,
I want to use the “User Input” function to change a variable, but the problem is it pops up all the time.
I can make it so it only appears when I start-up the PC and then have a state that only run one time.
I want activate the “User Input” function only when I press a button on the screen, or preferably pressing a “Function Key”.
Is there any way to do that?
Thanks,
GerryC
10-28-2013 09:36 AM
Hi Gerry,
Could you include a screenshot/snippet of the functionality that you currently have? Also, I assume the User Input function is the "Prompt User for Input" Express VI. Let me know if that is not the case.
Right off the bat, without looking at your current implementation, I could suggest two options. One would be to set up an event structure parallel to your main code that will effectively wait for the key to be pressed to prompt the user. Since having a specific key pressed as an event is relatively complex, a bypass would be to assign it to a Boolean button and have that button set up as the event.
The other idea would be to set up a state machine with an initialization state where the prompt happens, and a running state where the rest of your code is running. If you press the F1 key, for example, you could return to the initialization state to reprompt the user. Hopethishelps!
Regards,