01-17-2013 09:35 AM
hello to everybody,
i have a question...i need to save a file txt which contains a string that i already have. i have to save it ONLY when i press a button save.
i have done it many times but always, in my main program, i used an event structure.
now my main is different, as you can see in my image.
in what way can i decide to save the file?
01-17-2013 09:41 AM
Quickly reachitect your code to use an event structure. You code is not complicated, so it wouldn't be hard.
01-17-2013 09:43 AM
my boss did it 🙂 i can't change it eheh
01-17-2013 09:44 AM
If you have really used an event structure before, there is no reason not to use one again. It doesn't look like your VI is finished. It only runs once and then stops. Is that intended? You could, of course, also just have a simple while loop for the print button and a case statement.
01-17-2013 09:51 AM
it's not finished...but my boss start the program in this way 😞 i can't change it not because it's finished....only because he decided to do in this way
01-17-2013 10:01 AM
You both need a couple of LabVIEW tutorials.![]()
If you can't change it, why are you asking how to modify it? Adding an event for the print button or another while loop with the print button and case structure WILL require modification to the program.
01-18-2013 01:35 AM
could you show me in which way make a control for the "save as" button?
01-18-2013 01:48 AM
Hi,
You basically have two choices:
- Do what the other forum members suggest; Adding while loop and event structure to handle your save button.
- Since the program will run only one interation after you push "Start", you can add the save functions at the end of the program. Not that your program will stop and you have to start it all over again.
01-18-2013 02:48 AM
can you make me an axample with an image?
i have just started using labview 🙂
01-18-2013 03:14 AM
You can basically put all your current code in the Start button event (after removing the wait for Start-loop), and then add a Save-button event that handles that case. Easy as pie. 🙂
If you're uncertain on event structures, check Help -> find examples and search for event.
/Y