It's funny you bring this up, it's a problem I solved quite a while ago and then re-solved.
With an E-series board, I first configured the AO buffer outside of a while loop. Then, I placed my input parameters in a bundle in the while loop, and added a shift register in the while loop for the bundle. I compared the old values of the bundle with the current values (is the bundle coming out of the shift register equal to the one going in?), and if true, I just sent the task ID to an "AO Write" statement inside the while loop but outside of the for loop, and into a shift register in the while loop. If these were not equal, I wrote my signal to buffer via AO write and then used AO start (set to "continuous") to start the output. Again, the task ID went to the write statement. This changes wave parameters "on the fly" without gaps. I'll attach the code for this, and, if you remove the analog input stuff, it may have what you want.
Good luck,
Joe