From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving a signal from daq to the increment spreadsheet

I have two different ideas I want to implement into one, but I can't seem to find out how to put my signal into an example I downloaded from the site.
 
The top diagram is a lab I have from school and the bottom diagram is the one I downloaded from the site.
 
The top diagram takes a signal from the DAQ and displays and saves to a spreadsheet. The bottom takes the information and saves the data after a certain time limit, it incremants the file name and saves again under the same name but +1.
 
What i'm tring to do is, put the top diagram into the bottom so that my signal will read and record to a spreadsheet and after a certain count it will save my data and increment the file name. And also i'm tring to see if I can limit the increment to three so that my memory wont overflow and after that three saves it will overwrite and only three files will be saved altogether.
0 Kudos
Message 1 of 7
(2,630 Views)

Your bottom while loop doesn't appear to save anything at all and certainly none of the data in thw acquisition loop. The top loop saves only when you click the stop button and then it will only save the results of the last acquisition. There are numerous other problems with the bottom loop so I would recomend you delete it entirely. If you want to save periodically, you need to put the file write function inside the acquisition loop or pass the data to a second loop with something like a queue.

How much data do you want in each spreadsheet file. Do you want that time limited before you increment the file name or do want to do that based on how many records you write?

0 Kudos
Message 2 of 7
(2,618 Views)
First off thx for the reply and input. What i'm tring to do is save 60 mins of data to a spreadsheet, and after that 60 mins the file will save and start another 60 mins file. After it hits 3 files it will overright the first and keep looping.
0 Kudos
Message 3 of 7
(2,609 Views)
Here's a quick modification. I don't have the time to run and debug the whole thing but it should get you started. The idea is to create a file at the beginning and then use another Elapsed Time function to determine when to close the current file and then create a new one. You'll also get better performance using the Write File instead of the Write to Spreadsheet File.
Message 4 of 7
(2,605 Views)
I been messing around with the vi for a couple hours now. I can get my signal to read, and with the trace function I can see the file get incremented after the given time. But i can't seem to get my saved files to show or they aren't saving and also can't find a way around the error 7 problem.
0 Kudos
Message 5 of 7
(2,595 Views)
I can log data just fine. Did you use the front panel path control to select the folder you want to save the data to? I'm sorry that I didn't explain this in enough detail. I set it up so that the user can select the folder but not the file name. I just made it simple and always use the same names. You can certainly modify so that any base name can be chosen but then you have a bit more work to do to append a number to the file name and then keep track of the next one to use.
0 Kudos
Message 6 of 7
(2,591 Views)
Ok I got it working ... just had my files and folders reading from different areas >.>
 
Thx for all the help =D
0 Kudos
Message 7 of 7
(2,587 Views)