LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview only saving 2 seconds of data to file

Solved!
Go to solution

Sorry for this beginner question, but after a few hours of searching for an answer and trying to fix the problem, I still cannot figure it out.

 

I am using a DAQ Assistant vi, displaying the data on a waveform chart, and using the Write To Measurement File vi to attempt to save the data I am collecting (all of this is within a while loop). A .tdm file is being successfully created but only about 2 seconds of data (25k samples) are being saved in the file. Additionally, I have the Write to Measurement vi set to "append".

 

I need to save the data from the duration of my collection time (anywhere from 2-20 min).

 

I'm sure the solution is brutally simple, but any help would be greatly appreciated.

 

Thanks!

0 Kudos
Message 1 of 10
(3,285 Views)

It is nearly impossible to provide any answers for you without being able to see the code. Please post your VI.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 10
(3,279 Views)

If you attach your VI to your post, we might have a chance to figure out where you are going wrong.  Smiley Wink  Otherwise we can only make wild guesses.

0 Kudos
Message 3 of 10
(3,277 Views)

Sorry, here is the vi.

 

 

0 Kudos
Message 4 of 10
(3,268 Views)

Try one header only rather than one header per segment in your Write to Measurement File.

0 Kudos
Message 5 of 10
(3,252 Views)

I tried that header setting change and I still only get 25k samples. Here is the excel file. You can see that I only get ~2 sec of data even though the process was run for almost 30 seconds. Completely baffled...

 

Thanks

 

0 Kudos
Message 6 of 10
(3,231 Views)

How are you getting the data into Excel?  Your VI show writing and reading of a .tdm file, but doesn't have anything pertaining to Excel.  Are you using a TDM import function from within Excel?

 

Something doesn't make sense about your Excel file.  You say you have 2 seconds worth of data and 25,000 rows.  I see 23,448 rows of data with the time of 13:28:49.000 and the remaining rows are 13:28:50.000.  Obviously the times are getting rounded off to integer seconds.  Since you are recording at 25 kHz, you really only have 1 second's worth of data, most of it in the 49th second, and a small portion in the 50th second.

0 Kudos
Message 7 of 10
(3,218 Views)

Yes, I am using the TDM importer in OpenOffice as provided by NI.

0 Kudos
Message 8 of 10
(3,213 Views)
Solution
Accepted by topic author surffl

@surffl wrote:

Yes, I am using the TDM importer in OpenOffice as provided by NI.


Do you trust OpenOffice?  What do you get when you use the importer with MS Office?  I don't think you have a problem with your VI, but a problem with the importer program.  LabVIEW is definitely saving more than 1 second of data to the file.  I figured the headers after every section might have caused and file reading problem, but if you say that settting it to only write one header still causes problem with importing the data, I think the problem is with the importer.

Message 9 of 10
(3,210 Views)

After downloading a trial of MS Office and testing, it now works. Annoying to think that was the problem the whole time, but thanks for your help!

0 Kudos
Message 10 of 10
(3,202 Views)