02-01-2022 02:30 PM
Hello,
In my current project, I am using daqmx to send continuous samples of voltage in preview mode. The continuous samples has sample size(2048*512*4). 4 mean 4 AO output channels here.
I want to switch to a acquisition mode to send finite samples, but I have to make sure that the continuous samples have been fully sent out in each round.
I kind of know I should use event function with a callback, but still have no idea, so could someone please help to give any hints? Thank you.
02-04-2022 06:57 AM
If you are switching to use Finite mode, you can also use Wait Until Done VI to make sure that all samples have been generated. Sadly, I don't think there are DAQmx events that would help with your ao application. If you have additional questions, attach your code, and we can help.
02-04-2022 08:30 AM
A hacky method I've suggested before is to create a dummy input task (AI, DI, or CI) that uses the AO sample clock for sampling. Then use the "Every N samples Acquired..." event as a proxy for # samples *generated* (due to the shared sample clock). You can ignore the input data, but it's probably important to read it. If not, your input buffer will overflow and (I suspect) the events would then stop.
When you share the sample clock this way, it'll be important to start the input task before the AO task.
-Kevin P