LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

save a string to file

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?

Using LabVIEW 7.1
0 Kudos
Message 1 of 19
(3,221 Views)

Quickly reachitect your code to use an event structure.  You code is not complicated, so it wouldn't be hard.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 19
(3,217 Views)

my boss did it 🙂 i can't change it eheh

Using LabVIEW 7.1
0 Kudos
Message 3 of 19
(3,213 Views)

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.

0 Kudos
Message 4 of 19
(3,212 Views)

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

Using LabVIEW 7.1
0 Kudos
Message 5 of 19
(3,207 Views)

You both need a couple of LabVIEW tutorials.Smiley Wink

 

Three Hour Course

Six Hour Course

 

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.

0 Kudos
Message 6 of 19
(3,202 Views)

could you show me in which way make a control for the "save as" button?

Using LabVIEW 7.1
0 Kudos
Message 7 of 19
(3,181 Views)

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.

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 8 of 19
(3,175 Views)

can you make me an axample with an image?

 

i have just started using labview 🙂

Using LabVIEW 7.1
0 Kudos
Message 9 of 19
(3,168 Views)

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

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 10 of 19
(3,163 Views)