scstop
2008-07-30 07:40:07 UTC
Hi Everyone, I am current using NI-USB 6218 on Mandriva 2007. The ai acquisition works fine if I call DAQmxBaseReadAnalogF64() in the main() function, like this:int main(int argc, char *argv[]){ ... while(1) { DAQmxBaseReadAnalogF64(); }...} However, if I call the DAQmxBaseReadAnalogF64() in a subfunction, I always get the stale analogue data!void get(){ DAQmxBaseReadAnalogF64(); // print the acquired data} int main(int argc, char *argv[])
{
..
while(1)
{
get();
}
..
} The attached file is the one which cannot work properly. Would anyone please tell me how to solve it, or is it a bug?
acquire.c:
http://forums.ni.com/attachments/ni/250/41963/1/acquire.c
{
..
while(1)
{
get();
}
..
} The attached file is the one which cannot work properly. Would anyone please tell me how to solve it, or is it a bug?
acquire.c:
http://forums.ni.com/attachments/ni/250/41963/1/acquire.c