Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Help understanding NI/Signal Express Sample Rate terminology

Hello, I feel dumb asking this question but sooner or later I need to thoroughly understand how Signal Express handles sample rates.

 

All of our other DAQ software, when it comes to sample rates, outputs a "samples per second". Since most of our testing is slow-speed load/displacement data a sample rate of 10 samples per second is sufficient. That's it, if we want 10s/s  we input "10" in the "samples per second" box.

With Signal Express (and any NI-DAQmx hardware I imagine) it's defined as "Samples to Read" and "Rate". Furthermore you have an option of acquiring; Continuous, N Samples, or 1 Sample (on demand). I'm pretty sure I understand what the different "modes" are; but I still don't understand how SigEx handles the sample rates based on the mode you've selected.

 

For instance, if I acquire Continuous samples of 100(Samples to Read) @ 1k(Hz), from what I understand the "Samples to Read" is now a buffer? So you fill a buffer of 100 sample points, then every thousandth of a second it displays that 100 samples?

 

Then how does that differ from N Samples?

 

What if I wanted to specifically acquire 10 samples per second? Is this defined as Samples to Read=10 and Rate= 1?

 

Because when I do that, and acquire 5 seconds of data I get 10 samples; I would expect closer to 50 if I defince 10 samples every 1hz (or 10 samples per second).

 

This is where I start getting confused; so obviously I need to take a few steps back and have someone re-explain this to me.

 

I'm currently working on a project where the engineer want's 200 sample points within x-time. Time will be a ramp rate (TBD) may be 3-5 seconds, but he specifically (well, roughly) want's only ~200 samples.  

 

I'm sure more question will follow, so thanks in advance.  

...and please understand this is new hardware for us and I'm trying to learn all this on the fly.

SCXI- 1000 Chassis w/ 1346 adapter
PCI 6281 DAQ card
SCXI- 1520 Bridge Board w/ 1314 Terminal Block (x2)
SCXI- 1180 Feedthrough Panel w/ 1302 Block
Signal Express 2014.
Win7 Enterprise
0 Kudos
Message 1 of 4
(8,758 Views)

As the help shows, the rate entry is the sampling rate in Hz. If you specify a sample rate of 1k, that means 1000 samples/sec. You can then specify a number of samples taken at that rate. If the rate is 1k and you specify 100 samples to read, those 100 samples will be returned in .1 sec (100 samples/1000 samples/sec). If you request 1000 samples, all of those samples will be returned in 1 sec. If you request 10000 samples, it will take 10 seconds for the data to be returned. The size of the buffer is calculated based on the sample rate and number of samples requested.

 

Your example is backwards. To acquire at 10 samples per second, you set the rate to 10. If you wanted 5 seconds worth of data, you would set the number of samples to 50.

 

 

Rate.PNG

Message Edited by Dennis Knutson on 11-09-2009 12:49 PM
0 Kudos
Message 2 of 4
(8,755 Views)

Thanks for the explanation. I believe at one point in my learning curve, that's what I understood how the sample rates were handled. Unfortunately, when I set my Samples to Read to 50 and Rate to 10 (10 samples per second as you explained), the output graph on the display (when viewing as strip chart) is only updated once every 5 seconds.

So it throws up x number of sample points which create part of a 'line' in the graph, then 5 seconds later it will throw up another x number of sample points and append it to the existing line.

This makes the data as it streams in really 'blocky' looking. This is a very undesireable affect for us since I use the graph as a reference to control my test fixture and I need 'real time' display output.

 

When viewing the data in Excel I can see all the data points, but what is output to the data file is NOT what is displayed on the scope chart view.

 

Ultimately this is where my question lies.

 

The only way for my data to 'appear' in real time on the graph is to sample at an unusually high sample rate.   

 

SCXI- 1000 Chassis w/ 1346 adapter
PCI 6281 DAQ card
SCXI- 1520 Bridge Board w/ 1314 Terminal Block (x2)
SCXI- 1180 Feedthrough Panel w/ 1302 Block
Signal Express 2014.
Win7 Enterprise
0 Kudos
Message 3 of 4
(8,746 Views)
No, the way to get your data to appear quicker is to request fewer samples at a time. If you request the same number as the rate. you get an update every second. If you need 5 seconds worth of data, you repeat the code five times. I have no idea how you do this in signal express but I use a while loop or for loop. The relationship between the sample rate/number of samples and how often your display is updated is a simple math function as I explained above.
0 Kudos
Message 4 of 4
(8,740 Views)