LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving Data questions/problems

I'm trying to save a select amount of data that my vi will acquire when it runs in a continuous setting, instead of every single file I could save any number of files I wanted. I'd like to be able to control how many files are being saved via the front panel. I tried using a For loop to control this, but it only saved the same data set over and over again. I have attached a screen capture of my original code. The save button needs to be activated to start the writing to file process.

Also I'm trying to save a set of data that has already been acquired and displayed graphically on my front panel. I would acquire the data and then push the save button to save it, after viewing what it is I see. This is an important option I'd like to have (and need) in my program. The code is very similiar to the screen capture I have attached. I'm not sure if I am able to this or not since my main code is controlled via an event and the saving to file code is within a case structure (I need to keep both). I have tried many different options but haven't had much luck.


If anyone has any ideas or suggestions that would be helpful to my cause, I'd be most grateful. Thanks...
Using Labview 7.0 and 2010 SP1 with Windows XP and 7.
0 Kudos
Message 1 of 7
(2,968 Views)
I'm not sure I fully understood you but look at the attached image and see if it helps you. In this case the number of files is unnecessary, but if you turn off the auto indexing on the 3D array, and use index array instead it will be. I didn't understand your second paragraph. An event structure shouldn't conflict with a case structure. Last thing, please don't post BMP files. Even MS paint can save JPGs. Your attachment would probably have been no more than 80KB.

___________________
Try to take over the world!
0 Kudos
Message 2 of 7
(2,952 Views)
Sorry about the BMP file, I didn't realize that was what for it was in and it was that size. I was trying to get it posted in a hurry.


Well what you posted is along the lines I was thinking and had tried out earlier. It will save the files but it will save the same file for that preset number, not a different file. I thought perhaps using a counter of some type related to the count of the big while loop that contains the sequence structure would work. But I'm not sure exactly how to pull this off so it will save the files for whatever number I want, whenever I want, regardless what number the loop is on. If the loop is on it's 80th iteration, and I wanted to save 50 files (iterations) for example, it would do this then stop and not save, but keep on going.

As for my other question. I'm acquiring a spectra. It is displayed on a plot on the front panel. I'd like to first view the spectra and then save it, instead of pushing a button that saves automatically without viewing the data first. The code is similar to what I posted before it is all contained and executed by an event structure. For some reason I executed the task, but cannot save the data after viewing it.

Thanks for you help....
Using Labview 7.0 and 2010 SP1 with Windows XP and 7.
0 Kudos
Message 3 of 7
(2,920 Views)
Hi Mah2681!

Honestly, I don't quite follow everything that you're trying to do. However, a VI is worth a 1000 words, right? I created an example program for you (attached below) that will hopefully shed light on how to first view your data before logging it to file.

Hopefully this helps!

Travis H.
National Instruments
Travis H.
LabVIEW R&D
National Instruments
0 Kudos
Message 4 of 7
(2,893 Views)
Could you repost the vi in version 7? I have LV Express 7.


Thanks...
Using Labview 7.0 and 2010 SP1 with Windows XP and 7.
0 Kudos
Message 5 of 7
(2,879 Views)
Hi Mah2681,

Here is the VI in LabVIEW 7.0 format.

Travis H.
National Instruments
Travis H.
LabVIEW R&D
National Instruments
0 Kudos
Message 6 of 7
(2,874 Views)
Hi Travis,

Thanks for the repost. I need to spend some time looking over the vi and seeing if I can work it into my vi the way I need it to. I'll let you know how it goes, hopefully some time soon.


Thanks for your help.
Using Labview 7.0 and 2010 SP1 with Windows XP and 7.
0 Kudos
Message 7 of 7
(2,849 Views)