12-04-2013 10:28 PM
12-05-2013 06:22 AM - edited 12-05-2013 06:52 AM
Well, how I finally got rid of that problem was inserting a wait function inside the acq loop. I suppose this is not a good practice because my hw goes at 1621Hz (wasted resources), but it was the only immediate solution for this. I'd like to hear your opinion or another way to deal with this. Thanks again.
12-06-2013 07:57 AM
Hello,
Well, firstly you have to keep in mind that it is possible to configure you DAQ device o acquire in different Sample Rates at a Hardware level. Refer to the link below to get more information on that:
Can I Sample Different Channels at Different Rates with my Multifunction DAQ device?
Sencondly, you've got to learn that your cDAQ chassis (9174) features three AI timing engines and is therefore capable of performing up to three Analog input tasks at different sampling rates. refer to the link below for further information:
Specifying Different Sample Rates for Multiple NI CompactDAQ Modules
Ultimately and more focused on your code, you should think about using multiple tasks on your code. Each task contain a single timebase configuration, so every channel on that task will use its task timebase. This way, you can set up to 3 different timebases with your HW in 3 diferent tasks. Refer to this Example to see how to use three different tasks in parallel:
Concurrent Multiple Sample Rates with cDAQ 9178
Read carefully each article I've just sent you and then recode based on that information. You may get it well done!!
About the timestamp, acquire the data as "waveform datatype". Refer to the example above to see how to do that.
I really hope to get an answer from you telling that you made it!
Best regards
12-09-2013 03:34 PM
Hi iapetus2001,
Each of those modules have specific sampling rates. The 9227 has a minimum sampling rate of 1612 Hz as found in the manual here: http://www.ni.com/pdf/manuals/375101c.pdf on page 12.
Wehn we choose an invalid sampling rate for the 9227 it will coerce up to the nearest valid value. In the case of your 9227 specifying 1-10 Hz causes it to coerce to 1612 Hz.
With all of the modules in the same task the timing will coerce to the same rate for each module in the task. In cases like the 9219 which only supports up to 100 Hz sampling rates, the returned data is padded with extra data to ensure the arrays are all the same size.
If you are looking for specific sampling rates you can decimate or average the data returned from the DAQmx Read VI.
I hope that helps!