LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

delta x in acquired data

Solved!
Go to solution

Hello

 

I am using Labview to acquire data from a seismograph. In DAQ Assistant one apparently can set the acquisition rate as one of the properties on the panel with a wire but also in the configuration tab of DAQ assistant. However, whatever value I set in any of those, when I save the data to a file the Delta x used is always the same. I would have expected it to be determined as the inverse of the acquisition rate. Is it set elsewhere?


Thanks

Jorge

0 Kudos
Message 1 of 10
(1,293 Views)

Your description is way to sparse to say anything. How do you save to file? What is the actual "always the same" value?

0 Kudos
Message 2 of 10
(1,286 Views)

Many thanks for replying! On Monday when I get access to my work computer I will provide more details. The mysterious "always the same" value is 0.000605

 

Thanks!

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

LabVIEW, designed as it was for data acquisition using hardware with built-in (and reasonably accurate) timing, has "invented" a Data Type, called the Waveform, that provides the Time and Data information characterized by hardware-timed sampling called the "Waveform".  There is even a palette on the Block Diagram devoted to Waveform Functions.

 

As you probably know, a Waveform is a Cluster with three components -- a TimeStamp, "t0", that says when the particular "sample" (to be shortly defined) was acquired, a Sampling Interval, "dt", that says how much time (in seconds) is between each sample (so 1/dt is the Sampling Rate, in Hz), and an Array, "Y", denoting the Samples acquired (often 1000 at a time, but determined by how you set up your DAQ device).

 

Consider sampling using an A/D converter.  You configure your DAQ device using DAQmx commands (Good!) or the Dreaded DAQ Assistant (not so good), and say "Please acquire 1000 Samples at 1,653 Hz".  You then do a DAQmx Read, specifying that you want the results returned as a Waveform of samples.  You will see that the output "wire" is a Cluster, and if you examine the components of the Cluster, you will see that it is a Waveform with components t0, dt, and Y.  And, if you look at the value of dt, you will see that it is 0.000605, corresponding to the (constant) Time Interval you requested with you configured the A/D converter in DAQmx.

 

Note that "Variations on a Theme by LabVIEW" show up for Waveforms.  If you start doing FFTs, and input a Waveform, you may get a similar Cluster with components f0, df, and magnitude, but it's the same idea.

 

There is another (optional) component, "Attribute", you can add to a Waveform, but I've not used it for the routine DAQ stuff I do.

 

Bob Schor

 

0 Kudos
Message 4 of 10
(1,232 Views)

@Bob_Schor wrote:

LabVIEW, designed as it was for data acquisition using 

 

There is another (optional) [WFM]  component, "Attribute"[s], you can add to a Waveform, but I've not used it for the routine DAQ stuff I do.

 

Bob Schor

 


Oh yes you do use attributes!  DAQmx always adds the "Channel Name" attribute and a few others like "Scale" if used 


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 10
(1,220 Views)

Curiously, waveform attributes are fully interchangeable with variant attributes, so they are basically the same under the hood. (See my slide #7 here)

 


@Bob_Schor wrote:

As you probably know, a Waveform is a Cluster with three components ...


Historically (i.e. before the introduction of the special waveform datatype), it was just such a cluster, but now it is a waveform, i.e. no longer a cluster at all! (While the addition of attributes was nice, the x components in a waveform are locked to "time" units and the Y values only allow 1D arrays, which makes them less general!).

 

... Later things got even more complicated with the introduction of dynamic data (yuk!), but I disgress.... 😄

 

I still often define the x axis for waveform graphs with the cluster method (my x axis is almost never time!!!). Note that waveform graphs recognize the "x0, dx, [Y]" cluster, and even work fine with 2D [Y] arrays for multiple plots. Of course any other cluster except [scalar, scalar, array] would break the wire.

 

 

altenbach_0-1686434229352.png

 

Still be careful if defining the x axis this way, because if you additionally redefine x0 and dx properties, things might go haywire. 😮 ).

 

So the original problem boils down to the saving part. There are so many possibilities (from low-level to express!) that we would need to see the code as already requested.

0 Kudos
Message 6 of 10
(1,214 Views)

Hi

 

Thanks for your replies! Here is my code, I cannot find anywhere it specifies 1,653 as the rate...

 

Thanks

Jorge

0 Kudos
Message 7 of 10
(1,168 Views)

Sorry, the use of express VIs and dynamic data prevents any troubleshooting. In can't even look at the assistant configurations because I don't have drivers installed.

 

What do you see if you probe the dynamic data after the multiplication?

0 Kudos
Message 8 of 10
(1,154 Views)
Solution
Accepted by topic author jorgepullin

It appears that the DAQ card I'm using (NI 9234) has a MINIMUM acquisition rate of 1653, if one specifies any value lower it defaults to that. To get lower rates one has to subset and resample. Thanks for replying!

0 Kudos
Message 9 of 10
(1,151 Views)

You also create a new file with each iteration, so make sure to not look at the oldest file forever.

0 Kudos
Message 10 of 10
(1,148 Views)