01-13-2006 12:41 PM
01-16-2006 01:49 PM
01-16-2006 02:22 PM
01-16-2006 02:34 PM
01-16-2006 03:34 PM
01-16-2006 03:59 PM - edited 01-16-2006 03:59 PM
I haven't done this with NI-DAQmx, but I assume Read.vi works the same way as it does with traditional NI-DAQ. The way I do it is to give Read.vi the number of samples that it will read in 1 second. For example:
4 channels, 1000 Hz, read 4000 samples in Read.vi
All you have to do to accomplish this is multiply your scan rate and number of channels and pass the answer in as the number of samples to read. It will always read a second of data, even if it gets behind on one iteration of the loop it can catch up on the next. I also use a Wait Until Next ms Multiple and wire like 400 to it as not to bog down the CPU. Then you can just keep track of the elapsed time and stop the loop after 24 hours. Just be sure to clear the acquisition after the loop now that you're using a continuous acq, otherwise the buffer will overflow.
As I said, this is how AI Read.vi works for traditional NI-DAQ, I'm not positive that DAQmx Read.vi works the same way, but I don't see why it wouldn't.
Message Edited by Marc A on 01-16-2006 05:07 PM
Message Edited by Marc A on 01-16-2006 05:09 PM
01-17-2006 06:59 AM
01-17-2006 03:30 PM
01-17-2006 04:01 PM
01-17-2006 10:05 PM
To add to marc's answer, the 8 channels share a single ADC and hence you cannot set different sampling rates(program ADC to do this) on different channels.
However here is a workaround to achieve an "effect" of sampling different channels at different sampling rates on a single card
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=BCB8746152612330E034080020E74861
Hope this hepls
Regards
Dev