LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to save X and Y values using waveform chart?


@Ben121 wrote:

Thank you so much for clarifying several things. It is really helpful.

...

Thank you your response.


You're very welcome. As a selfish aside, many forum users (including probably all of the people helping you in this thread and others) appreciate kudos 😉 You can take a look at the Unofficial Forum Rules and Guidelines that

 


@Ben121 wrote:

Now coming back to my original question, when I am trying to save the data from waveform chart, I am getting just one value instead of an array of numbers. Then I also tried using case structure. It is saving the data but after saving, it is again asking to save then again and so on.  So I have to stop the code abruptly in middle.


This is because the Open/Create/Replace File node (or similar Write nodes that take a path input), when called without a path wired, produce a dialog box asking for a path.

 

You have several options to avoid this:

  1. Open the file before your loop. Only one popup with no other modifications. Close after the loop finishes. Use a Case or Event Structure to change the file reference if you want to change the file you're using.
  2. Wire a constant or control value to the node. No popups anymore, even if you repeatedly open the same file. Disadvantage - might be harder to change the file at the appropriate time if you don't always want the same file. Using a shift register for the path would allow the approach above (Case or Event Structure to change value, in this case the path, not the reference).
  3. Use the "File Dialog" express VI before the loop starts, and wire that value to the approach described in 2. Advantage - you get a dialog instead of a control (might be you prefer this). Disadvantage - all of the disadvantages to 2. So really this is more "2b".

GCentral
Message 21 of 21
(346 Views)