I am trying to generate an analog output of a finite number of samples from a PCI-6713 card each time the card is triggered. I am currently accomplishing this by putting the "DAQmx Start Task", "DAQmx Wait Until Done", and "DAQmx Stop Task" in a while loop:

This code works at trigger rates of 50Hz (red is the triggers, blue is the analog output):

but begins to fail at faster trigger rates, such as 170 Hz:

Is there any way I can let the PCI-6713 card re-trigger and output again without relying on software to stop and re-start the task? Otherwise, is there any way to optimize the LabVIEW code so that the card can re-trigger faster?
Thanks,
John Bosshard