One of my colleagues recently wrote this example. It has not been tested fully, but it may help you out:
This example demonstrates how to continuously output a waveform using an internal sample clock. The automatic regeneration of data has been disabled, so new data has to be provided throughout the duration of the continuous Analog Output operation. This allows the generation of any arbitrary frequency as this VI computes new data for each iteration of the loop, maintaining phase continuity of the signal. This also allows the user to change the waveform type and frequency of the signal while the VI is running, still maintaining phase continuity.
Instructions for Running:
1. Select the Physical Channel to correspond to where your signal is output on the DAQ device.
2. Enter the Minimum and Maximum Voltage range.
3. Specify the desired Sample Clock Rate of the output Waveform. Higher sample clock rates will produce a smoother waveform.
4. Manually specify the Analog Output buffer size, in number of samples. A larger buffer would help non-regenerative operations avoid errors due to occasional high CPU load.
Note:
The Analog Output buffer has to be at least as big as the amount of data being written to the board per iteration. The recommended buffer size would be at least twice the amount of data being written to the board per iteration.
5. Enter the Waveform Information. See the documentation of the Basic Function Generator SubVI for information on each parameter.
6. Change the Waveform Information and see the effect on the Waveform Graph and the Analog Output channel.