I am using the AO outputs of a PCI-6731 card for a raster scanning head application and I am having some difficulty reaching the peak performance I need. I am contolling the card with the nidaqmx drivers in c++
Basically one output controls scanning in the Y direction (which is a scanline and is very rapid), and the other in the X (increment once per scanline, therefore much slower). The complication is that both outputs start on an external trigger, because the positioning is synchronized to a separate data acquisition card.
Right now what I do is:
- write the scanline waveform to output 0
- set output 1 to a given position
- tell card to output on next trigger
- pend on completion and stop the tasks
What I really want to do is just tell it to start and on every external trigger have the output 0 scanline waveform output and output 1 increment to the next position. This way I could do a full 2D scan with minimal software control.
Any ideas on how I could best accomplish that? From my understanding of the nidaqmx drivers I don't see an elegant way to do it.
I could potentially do some operations on the done callback, although this makes me a bit nervous because the control PC is running windows, it is by no means a real time operating system.