LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading entire waveform from file?

I've written a program that aquires data from 6 channels and writes the data to a waveform file. I'm using a buffered program so basically it appends the new information to the existing file once every second. When I go to read my file back in to labview it seems that I'm only able to read it in one second at a time. I'm able to see the rest of the file second by second by using the offset in the read waveform.vi but I'd like to be able to read my entire waveform all at once so that I can postprocess the data. I attached a copy of the basic form of the program that I'm using to read my waveforms.

thanks
0 Kudos
Message 1 of 7
(3,655 Views)
Each time your program appends new data, it is considered to be a new record. When you use your read program, you get a single record. You always have options as a programmer. The least invasive option here is to leave your acquisition program alone and make some changes to your read program. I monsterized your read program a bit. I think it will do what you want. It reads out all the records while stitching together one big waveform for each channel.

Remember, the Alliance Members are here to help. We do this stuff every day.

Daniel L. Press
PrimeTest Corp.
www.primetest.com


PS - What's with the crazy local variable usage? Be careful with those!
Message 2 of 7
(3,655 Views)
Thanks Daniel,

That's kind of what I figured. I can't open your program though. I don't have 6.1. I only have 6.0. Can you save it as a 6.0 file please.

thanks,
0 Kudos
Message 3 of 7
(3,655 Views)
OK, but only if you promise to upgrade to 7.0 real soon! 🙂

- Dan
Message 4 of 7
(3,655 Views)
Thanks again. I've taken your program and modified it to do the post processing that I need to do but the scales seem to be off. Basically I'm doing a psd as well as an fft on the waveform. When I graph the data and compare it to the real time data I was collecting as well as the psd and fft I did on the 1 sec portions of file I could retrieve before, it's not even close. Is it possible there is a problem with your program?
0 Kudos
Message 5 of 7
(3,655 Views)
Don't expect 1 second portions to contain the same spectral information as the entire file. If you take the 1 second portions and repeat them so that they equal the length of the entire file, they probably do not match up very well.

- Dan
0 Kudos
Message 6 of 7
(3,655 Views)
I agree that they shouldn't be the same but they should be similar. The problem is that they don't even come close. The 1 second samples yield data which looks to be correct, but we would like to average it over more than 1 second. When using your program the amplitude axis is too big by a factor of 10000 and the frequency range only goes up to 500 hz whereas before it went up to 3000 hz.
0 Kudos
Message 7 of 7
(3,655 Views)