LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Choosing the "Prompt User Input Value"

Hi,
Im using the Prompt User VI to prompt the user for a value. However, I would like the default value to be set programmatically.
The reason is that it prompts the user when to take a reading for a given X value. Rather than inputting the X value everytime, i would like the default value to be incremented by 1 everytime... unless the user decides to change the value, he shouldn't have to type anything (just press enter).
How can i do that?
Thanks
aleks.
0 Kudos
Message 1 of 2
(3,137 Views)
Aleks,

I don't think the Prompt User for Input VI will let you input default values.  However, you can create a very simple VI of your own to do the job (see picture below).  It uses an uninitialized shift register (AKA a "LabVIEW 2 style global") to keep track of the last value entered by the user and defaults X to the previous value plus one.

If you build this VI yourself (probably a good exercise), make sure to set the Window Appearance (File >> VI Properties) to "Dialog" so that it will pop up when called.

Have fun,
John


Message 2 of 2
(3,117 Views)