11-09-2009 01:18 PM
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.
11-09-2009 01:48 PM - edited 11-09-2009 01:49 PM
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.
11-09-2009 03:23 PM
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.
11-09-2009 04:59 PM