LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get time out of a "dynamic data" wire from DAQ Assistant?

Hi all...

I'm gonna make my question as generic as possible:

Lets say you use the DAQ Assistant to collect analog voltage of 2 channels. You collect 1 sample, but it's inside a while loop, so it collects several readings over a period of time.

A "dynamic data" wire goes out into a graph, which displays "voltage vs. time" for each channel.
The wire can also go into a "Write to measurement file" express VI and it'll save the time (at which the event happened) & the voltages.


I know I can split the signal and get the the 1st and 2nd voltages separate and do calculations on each alone if I want to and then merge them again.

My question is: How about if I wanna do calculations with the time? How do I get the time out as well?

Is there a different procedure to split the signal and get the time out of the dynamic data wire?

In my particular case, the data collection is done as a probe is moving (linearly) at a constant velocity, therefore, by knowing the velocity and the time I can figure out the exact position where the event (the readout) took place.
Ultimately, the graphs would be of "voltage vs. position".

Any help?
0 Kudos
Message 1 of 4
(5,812 Views)
My first suggestion would be to use the "From Dynamic Data" (From DDT) to convert to an Array of Waveforms.  Then index out the waveform (channel) you want, and then use the "Get Waveform Components" function to get the time information you want.
 
Hope this helps, if not, it might help if you could post a little snippet of code that's like what you're trying to do, possibly with more information about what specific timing information you're trying to get out of the data.
Message 2 of 4
(5,795 Views)
Well...for example if I use the "Write to measurement file" express VI, then a typical measurement will look like:


X_Value    Untitled    Untitled 1    Untitled 2    Comment
0.000000    -0.002441    0.368195    -0.000610
0.181000    -0.005188    0.445862    -0.000305
0.221000    -0.005951    0.461884    -0.000153
0.271000    -0.005493    0.463867    -0.000458
0.291000    -0.004578    0.550537    -0.000305
0.321000    -0.004425    0.501556    -0.000610
0.341000    -0.002441    0.539551    0.000305
0.371000    -0.004425    0.543060    -0.000305
0.391000    -0.005341    0.541687    -0.000610


...where the first column is the time, and the other ones are voltage readings. And each row was created by an iteration of the "while loop" (since I take 1 sample/iteration)

Like I said, right after the data collection,I can split the "dynamic data" type wire and get access to the voltages (for ex:-0.005951,    0.461884,    -0.000153), but how do I get access to the time (0.221000)?
0 Kudos
Message 3 of 4
(5,787 Views)

The Discussion Forum linked below provides an excellent example of how to do this.

Need "time" 1D array from DAQ assistant in DAQmx - LabVIEW - NI Discussion Forums

 

Message 4 of 4
(5,781 Views)