12-20-2021 06:53 AM
Hi all,
Used to PXIe 4461 simultaneous task AO&AI write and read waveform,first time executed without error and then error with rest of tasks,error code is -200088 as snapshot,what wrong with that?PXI chassis if have other good way handle simultaneous tasks.
Any help will be highly appreciated,thanks!!
Solved! Go to Solution.
12-20-2021 07:28 PM
The obvious mistake is that you're clearing the AO task after the first iteration but continue to use this cleared DAQmx Task handle in the subsequent iterations and hence get the invalid task handle error.
Move the clear task call to outside both the loops.
12-20-2021 09:44 PM
In addition to what Santhosh said, a decent *starting* point would be to substitute a call to DAQmx Stop for the AO task right where you presently have DAQmx Clear.
But there are other things to consider:
- Should these be FInite Sampling tasks? You configured as continuous, but you Start and Stop (or Clear) the tasks each iteration. The repetitive starts and stops are more typical of a Finite Sampling task.
On the other hand, if you actually want Continuous Sampling, you should be doing your starts and stops *outside* the inner loop and probably outside the outer one as well
- You should specify how many AI samples you read
-Kevin P
12-20-2021 10:31 PM
Hi Santhosh,
Thank you for your commenting,I have fixed it.
12-20-2021 10:34 PM
Hi Kevin,
This is a demo, actually the different frequency with sampling number.Post the thread just to fix the error,Thanks!