11-01-2005 08:36 PM
11-02-2005 01:32 PM
11-04-2005 04:44 AM
Dear Micaela,
Thank you for advice. I will change driver to the DAQmx . But it will take time to download 460 M.
Therefore I continued with the old driver.
I changed DAQmxBaseCfgSampClkTiming to DAQmx_Val_ContSamps and immediately faced with another problem. The device began to acquire data continuously, and when I call DAQmxBaseReadAnalogF64 in the timer handler, I got the date that does not correspond to the current time. The data corresponds to the experimental parameters which were 5 minutes ago. I was very surprised until I realized that this huge delay exits!
To fix this problem I tried to add DAQmxBaseStartTask and DAQmxBaseStopTask to the timer handler.
{
DAQmxBaseStartTask(taskHandle);
DAQmxBaseReadAnalogF64(taskHandle,40,timeout,0,data,80,&pointsRead,NULL);
DAQmxBaseStopTask(taskHandle);
data[0] … data[39] I convert to pressure;
data[40] … data[79] I convert to temperature;
}
The program did not work. Even did not respond to any action.
11-04-2005 04:44 AM
Should I add some time delay after DAQmxBaseStartTask and DAQmxBaseStopTask ?
Is it right way to put DAQmxBaseStartTask and DAQmxBaseStopTask to the timer hanler ?
Or I have to use Triggering possibilities of this device ( for example use one digital input as triggering source, another digital output to generate triggering signal and connect them by wire)?
And one more question. Where I can find more examples how to use NI-DAQmx functions in C? I saw a lot of LabView examples, but I do not want to learn LabView.
Thanks in advance.
Victor.
11-06-2005 02:40 PM
11-07-2005 03:10 PM
11-07-2005 03:34 PM
Hi Frank,
As Ryan stated: you can add channels to an existing task, however, you cannot have multiple analog input tasks running at the same time or you will receive an error. This is because there is only one analog input sample clock and it cannot be used twice at the same time. If all of the channels are in the same task, then only the one sample clock will be used and everything will work great.
I hope that you find this information helpful.
Regards,
Hal L.
11-07-2005 03:46 PM