Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Can the pci-6111 capture 400,000 samples

Solved!
Go to solution
I'm trying to capture a signal that lasts for about 8 seconds.  The signal varies from 20kHz to 25kHz so I would probably want to sample at around 50kHz right?  At that rate and if I wanted to capture the whole 8 seconds I think I would need around 400000 samples.  Is there any way this can be done with the PCI-6111 card. FYI I'm using LabVIEW 7.1. Thanks.
0 Kudos
Message 1 of 12
(3,952 Views)

Mr. rock,

 

To get an accurate measure of the frequency of your signal, yes, you would sample greater than 2x its frequency, so 50 KHz would be sufficient. On the other hand, for an accurate depiction of what the signal looks like, you'd want to sample roughly 10x the expected frequency.

 

Each channel on the 6111 can sample at 5M/s, so you're well within its spec.

Warm regards,

pBerg
0 Kudos
Message 2 of 12
(3,944 Views)
I saw that there was a limit of 8192 samples for the on board memory will this limit me in what I'm trying to do.  Also I'm very new to labview and not quite sure how to program this are there any good examples.
0 Kudos
Message 3 of 12
(3,936 Views)

Hi rocksolidsr,

 

50 kHz would be the bare minimum to pick out the frequency components of your 25 kHz signal, but I'd recommend sampling at least at 250 kHz to better characterize the waveform.  This is actually a relatively slow sample rate since the 6111 is capable of up to 5 MHz per channel.

 

At these rates we can transfer data across the PCI bus while the acquisition is taking place so we never overflow the device's on-board memory (the driver handles this for you).  The data is stored in a DMA buffer until it is brought into LabVIEW memory with a DAQmx Read call.

 

I suggest looking in the following folder for examples:

Help >> Find Examples... >> Hardware Input and Output >> DAQmx >>  Analog Measurements >> Voltage >> ...

 

The exact example to start with will depend on how you intend to trigger the signal.   I suggest trying Acq&Graph Voltage-Int Clk-Analog Start w Hyst.vi so you can trigger off of the analog input signal.  You might want to use a reference trigger instead of a start trigger--this would allow you to retrieve samples from before the trigger actually takes place.  If you are triggering off of a digital edge there are examples for this as well.

 

 

Not that you necessarily need to, but you could actually acquire continuously up to the full rate of the card on the 6111 (2 channels * 5 MHz per channel * 2 Bytes per Sample = 20 MB/sec of data).  You can typically sustain ~80 MB/sec across the PCI bus.

John Passiak
0 Kudos
Message 4 of 12
(3,932 Views)
That was a great example I am able to capture the whole 8 seconds, is there anyway to scroll through the captured data and zoom in on certain parts, also is there anyway to measure the frequency at a given point
0 Kudos
Message 5 of 12
(3,905 Views)

Hi rocksolidsr,

 

The easiest way to scroll through the data/zoom in on certain parts would be to use the Graph Palette.  Just right-click on the waveform graph and select Visible Items >> Graph Palette.  This will give you a toolbox that provides zoom/scroll functionality.

 

As far as measuring the frequency at a certain point, this gets a little bit trickier.  Here's one way to do it:

Calculate Frequency of Signal Displayed on Waveform Graph

 

 

You can use the above function as a sub-vi (put it in a loop like in the example on the community page) to calculate frequency based on the visible signal on your waveform graph.  The resolution of the frequency measurement is going to be based off of your sample clock rate--it counts the number of samples between zero crossings and inverts to determine frequency.  With this in mind, you might want to go with a higher sample rate (play around with it until you get the resolution you need).

 

 

 

Also, are you using the on-board counters of the 6111?  If not, another option would be to implement something similar in hardware using a counter.  The counters on the 6111 have a 20 MHz timebase and would yield a more accurate frequency measurement.  I haven't tested this out yet, but what I would try if you want to go this route would be to set up an Analog trigger (like the original shipping example we mentioned), then take a buffered frequency measurement of the Analog Comparison Event. 

 

There are shipping examples for the counters that show how to configure a frequency measurement, you might want to take a look at a few of the examples in the DAQmx >> Digital Frequency--I can help you out if you run into any issues.  The hard part would be correlating the array of frequency measurements to the region of the graph that you are zoomed in on.  It may not be worth the trouble to look into this if you are satisfied with the results of the software method.

 

 

Best Regards,

John

John Passiak
0 Kudos
Message 6 of 12
(3,867 Views)

I tried that example you sent me but when I wire the "Measurement" to the Calculate frequency it says that the two data types don't match and I can't figure out why.  Any ideas here is my code

 

 

0 Kudos
Message 7 of 12
(3,854 Views)

Oops, sorry about that.  I actually developed the code in LabVIEW 2009 then noticed after the fact that you were using 7.1 and had to downconvert.  It looks like there is a discrepancy with the datatypes in the new version of the code.

 

I'll post a version of the sub-vi for both LabVIEW 7.x and LabVIEW 8.x.

 

 

-John

John Passiak
0 Kudos
Message 8 of 12
(3,847 Views)

The community site seems to be not allowing me to upload new code at the moment--in the meantime try this VI:

John Passiak
0 Kudos
Message 9 of 12
(3,842 Views)
I just tried the vi you posted however when I try to run it I get an error saying " The data type of the variant is not compatible with the data type wired to the type input."  The error doesn't occur until I actually run the vi
0 Kudos
Message 10 of 12
(3,828 Views)