LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Obtaining time information for collected data

Hi,
 
I'm trying to read the signals from 16 different microphones using the attached VI. I believe that the DAQ VIs are working fine.
 
However, my problem is that the data that I obtain is only of the array type without any time information. This prevents me from calculating things like frequency of the input data. If I'm not mistaken, the dt values of the input data is now at a default value of 1. I wanted to know what I could change to obtain the actual analog frequency of the input data, and be able to save the X and Y values of the waveforms in a file.
 
Thanks.
0 Kudos
Message 1 of 5
(3,098 Views)

Change the DAQmx Read. You want to be returning a 1D Wavefrom. Right click on the function and do a Selct Type or click on the plymorphic selector below the function (the thing that right now says Analog 2D DBL NChan NSamp). You want this to say Analog 1D Waveform NChan NSamp.

 

Message 2 of 5
(3,095 Views)

Thank you for the suggestion.

I have changed the instance of the polymorphic VI. But now I'm having issues with saving the data. I don't know how I could save the data for all the channels (similar to my post on another thread)

Write To Measurement File does what I want, but I just wondered whether I could use Write to Spreadsheet VI (as I prefer it in this form).

Cheers.



Message Edited by imperial-aero on 03-02-2008 05:13 AM
0 Kudos
Message 3 of 5
(3,078 Views)
Now you've created a different problem. In your previous post, you generated the data outside the loop, wired that, and then wired it back out the loop to save it. Your data did not change and it did not matter that yuo were passing the data straight out. Now, you are generating data inside the loop and passing it straight out. By doing so, you are only passing the result of the very last iteration. You are recording all channels but only the very last result from the DAQmx Read. You can 1) Put the file write inside the loop. 2) Pass the result to another loop via something like a queue and the other loop willl do the file writing. 3) Autoindex the DAQmx Read results out of the while loop by right clicking on the exit tunnel and selecting Enable Indexing. This will create a 2D array and you would pass this to a for loop with the file write inside this loop.
Message 4 of 5
(3,057 Views)
Can you give me further pointers regarding the last method (3) as I can't get it to work yet.
0 Kudos
Message 5 of 5
(3,047 Views)