05-23-2006 03:31 PM
05-24-2006 01:23 PM
Mfrazer,
You definitely don’t want to have CreateTask and subsequently ClearTask in a loop, nor does it look like you need to for your application. You only need on task, you just need to change the task, so there is no need to create multiple tasks. So leave the CreateTask and ClearTask on the outsides of your loop, and keep everything else on the inside of the loop and make the changes you need to the task each iteration. Also you are going to want to have a DAQmxStopTask after your read to make sure the task is stopped and in the proper state to be reconfigured. I hope that helps. -GDE