09-06-2011 03:31 PM
I'm using the example c-codes that can be downloaded with the daqmxbase driver. I work on a linux machine and I have four pressure transducers with analog output signal. Now the example codes work really good with little changes made. When I use the contacquireNchan.c code, changing the sampling rate does not seem to change the number of readouts we get.
For example, when I set the while loop to run only for 1 sec and the sampling rate to be 250..... I'm supposed to get only 250 readings for each channel right?
But mysteriously, the code gives out two runs instead of 1 run even though the loop is only for 1 sec. Each run also has 500 output readins instead of 250.
When I compile and run the code again and again, I keep on getting different number of readings, sometimes 500 sometimes 1000 etc....
I believe there is something I've not identified. Does anybody have any idea?
Also, I'm using the 'onboard clock' as the timing parameter, is it possible to get time as one output by itself? If so how?
Thanks
09-07-2011 12:06 PM
Kichew,
Can you post a snippit of your while loop and read calls? There could be a few different things going on here. I suspect it has to do with your batch size for the reads, but id like to see the code to make sure.
Regards,
Kyle Mozdzyn
Applications Engineering
National Instruments