Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Simultaneous AO and AI when "Sample Clock:Underflow Behavior" is set to "Pause until Data Available"

Hello,
I have a USB-6343 DAQ and I am trying to perform simultaneous AO and AI at the fastest possible rate.

For my application (which is implementing a Pound-Drever-Hall loop😞

  1. I output 100 analog samples (sine signal plus an offset) and read at the same time 100 analog samples on a different channel
  2. I calculate the amplitude and the phase of the analog input (with respect to the output I sent) and use them to compute a new offset
  3. I repeat point 1 with the new offset

I manage to implement this by setting up a "finite samples" task for the AO and AI and starting and stopping the tasks at every iteration of the loop. The issue is that the start/stop takes ~30ms which is way larger than the actual acquisition (0.5ms at 200kHz clock) and that is limiting the loop time.

To improve this I am experimenting with running a continuous AO with the Sample Clock:Underflow Behavior set to Pause until Data Available; this way I can massively improve the loop time but I am now struggling on how to synchronize the AI, to make sure that I read exactly the 100 samples acquired while the AO was running. I was looking into the possibility of using a trigger produced by the AO when new samples are available but I couldn't find any option for that.

I would appreciate any suggestion on how to achieve this or whether there is a difference solution to the problem I described.

0 Kudos
Message 1 of 1
(59 Views)