05-30-2007 09:31 AM
05-30-2007 08:13 PM
If you want to see the data displayed as it's be acquired, you're going to have to acquire fewer data points per acquisition.
Setting up the acquisition to get 500,000 samples will cause the DAQ Read to grab all 500,000 data points and output all of them as an array or waveform.
Try dividing the total number of samples per acquisition down to a number that will return the data in about 100mS chunks. (or experiment a bit to see what works best for you) So using your example, try grabbing 5000 points at 50kHz and loop on that 100 times concatenating the data from the previous run to the new data so you can plot it all and run your FFT.
As for getting it all to a .wav file, there's some VI's in LabVIEW to write data to a wave file. Look in the 'Graphics & Sound>Sound>Files' palette. You should find what you want there.
Ed
06-01-2007 06:19 AM
Thanks Ed, I'll give those things a try!
Jeff
06-27-2007 11:37 AM
06-28-2007 09:57 PM - edited 06-28-2007 09:57 PM
So, the data input to Sound File Write Simple.vi is an array of waveforms. However, if you only have one waveform, you can build an array that contains only your single waveform using the Build Array VI. As described in the LabVIEW Help description:
Sound File Write Simple (Windows, Linux)Writes data from an array of waveforms to a .wav file. This VI automatically opens, writes to, and closes the .wav file. Windows You must have DirectX 8.0 or later to use this VI. Linux You must have the Open Sound System (OSS) driver to use this VI.
So, for example, you could run your single waveform into the Build Array function and get an array of waveforms containing only your waveform. You could then wire this array of waveforms to the Sound File Write Simple.vi. This is shown in the image below.
Build ArrayConcatenates multiple arrays or appends elements to an n-dimensional array. You also can use the Replace Array Subset function to modify an existing array.
Message Edited by Matt A on 06-28-2007 09:58 PM
06-29-2007 01:09 PM
06-29-2007 05:36 PM
06-29-2007 08:45 PM
THanks Matt that makes it very clear!
Jeff
06-30-2007 09:12 PM
It's like a 1-D array with exactly one element. But in this case, the element is a waveform.
@jeff_scharpf wrote:
It's a weird concept to accept though, that I can turn one waveform into an array of waveforms..