Jump to content

Scaning rate and AI read


hlseck

Recommended Posts

I am new to data acquisition and I hope someone could help clear some doubts regarding scan rate.

Say I have an analog signal of 100Hz and I am sampling the it using a DAQ card at 1000 scans per second. This would mean that each cycle is represented with 10 samples. However, if I were to set the AI read VI to read the newest sample per loop. Then Labview will only return a sample with each iteration. If the loop is taking place at 100Hz, then wouldn't the data collected by Labview be spurious? This is because the 1000 samples collected by the DAQ card is now sampled again at a lower frequency of 100Hz. Does this mean that the sampling theory is violated?

Link to comment
  • 2 weeks later...
I am new to data acquisition and I hope someone could help clear some doubts regarding scan rate.

Say I have an analog signal of 100Hz and I am sampling the it using a DAQ card at 1000 scans per second. This would mean that each cycle is represented with 10 samples. However, if I were to set the AI read VI to read the newest sample per loop. Then Labview will only return a sample with each iteration. If the loop is taking place at 100Hz, then wouldn't the data collected by Labview be spurious? This is because the 1000 samples collected by the DAQ card is now sampled again at a lower frequency of 100Hz. Does this mean that the sampling theory is violated?

hlseck,

If I understand you correctly, as you state things I don't think any "sampling theory" would be violated. I *think* you are talking about sampling a single channel at a rate of 1000 Hz, and that channel happens to have a 100 Hz signal on it. If you have a loop reading one sample at a time, as long as the card is reading and buffering the acquistion AND the loop on average can read a single sample within a millisecond or less, then everything should work fine.

If on the other hand, you have set the DAQ card to trigger on on the 100 Hz signal and you only grab one sample after each trigger, regardless of the 1000 samples per second, you would have "slaved" your acquistion to the 100 Hz characteristic of the channel. This would be a thing to avoid unless you have a good reason to do this (and there can be VERY good reasons to do things like this!)

More appropriately, in a well buffered system, you would be better off downloading several points at a time so that the overhead of buffer manipulation and loop control doesn't get the better of your processors resources. Unless you have a system that needs to react within 1 ms to a particular value, you may want to download, say, 1000 points at once as a waveform, which could be done by the loop once per second. If you are using NI hardware with NI-DAQ drivers, much of the common buffering is already programmed into the device drivers.

-Pete Liiva

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.