LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

prompt user for input, but use last input as starting

Solved!
Go to solution

Hello,  I am trying to have a VI such that I prompt the user for a text input and then I use that text input later on.  However, I would like to have the prompt such that I can use the last input from a sting as the starting point.  I have started the code but do not know how to proceed.  Any help will be greatly appreciated.

 

Thanks.

hiNi

0 Kudos
Message 1 of 4
(5,334 Views)
Solution
Accepted by topic author hiNI

If you add an uninitiallized shift register, and modify the express vi, you can do this.

 

 

Download All
Message 2 of 4
(5,324 Views)

You will need to create your own user input dialog, since the Express VI that you're using has no such capability. You can get a start by simply converting the Express VI to a regular VI, and resave it with a new name within your own directory structure. To convert the Express VI to a regular VI, right-click on it and select "Open Front Panel". You'll get a confirmation dialog that asks if you really want to convert the Express VI to a regular VI.

 

You can then simply add a shift register to the loop in this new VI, or place one at the calling VI level. If you leave the shift register uninitialized, it will remember the value while that application instance is running. 

 

 

EDIT: I see that Jack was saying the same thing while I was writing...

Message Edited by smercurio_fc on 10-05-2009 12:59 PM
Message 3 of 4
(5,319 Views)
If I were going to do this in addition to the shift register that was already suggested I would also include a control that would allow you to pass in a value. The default value would be an empty string. If the input string is empty use the value of the shift register, if it is not empty then use that value. This allows you to save a selection from one execution to another (using an ini file or something similar) or for the application to programmatically set a suggested value for the input item.


Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 4 of 4
(5,287 Views)