05-24-2010 11:01 AM
Hi,
I am wondering if after using DAQmxRegisterEveryNSamplesEvent to give me a callback at N Samples, I can call again the same function or another without restarting the task to change the number of samples before I receive a new callback.
Thanks
Alex
Solved! Go to Solution.
05-26-2010 05:39 AM
Dear laurman
It is recommended to have only one thread per task. You should place your DAQmxRegisterEveryNSamplesEvent in the same thread as your task and callback function. The DAQmx driver is designed to have the task, event and callback all in the same thread. If you have it in a separate thread than your callback will not be able to see this event and be triggered because it is not in the same thread as the task. In summary,once you call this for your task, you can't define it again without restarting the task.