09-13-2007 08:04 AM
09-14-2007 05:58 PM
Hi Davie=d
It sounds like you may have been using Traditional DAQ at one point and using the acquireddata event to know when to handle and process the 50 sample batch that had been read. The DAQmx Read function in VB6 would be configured to pull 50 samples at a time during a continuous acquisition, and when that function returns those samples you could average them at that time. The time that it takes to process the returned data should not interfere with the acquisition since you have such a low sampling rate. I always like to point my customer to other resources in your case this example would be very useful. Please make sure that you have look at the VB6 examples located in this path “C:\Program Files\National Instruments\NI-DAQ\Examples\VBasic”.
09-14-2007 07:39 PM
09-17-2007 08:09 PM
Hi David,
Thanks for replying back David, the efficiency of what you are doing will depends on what you want to accomplish and how fast your signal is changing. For example if you have a sine wave of 1KHz you need to sample faster than if your signal changes at 1Hz In your case you are getting 50 samples at a rate of 500 Hz that means that it will take you 0.1 seconds to get the 50 samples. As a rule of thumb we want to set the buffer size (N samples to read) to 10% of the sampling rate; for example buffer size of 100 “samples” for a sampling rate of 1000Hz. Also make sure that your algorithm is running fast enough that is not slowing down your reads. This will work the same for saving or for displaying the data on the screen. We do not have a standard method for how much data to read to get the best display, what I would suggest is tryng to get the best display; according to what you need, with the minimum amount of reads to the card. I hope that I was able to understand your question and help you.
09-18-2007 12:01 PM