Hi magnushsu,
I wasn't able to find any examples specific to generating an arbitrary waveform, but I did find one that reads waveform data from a file. This example uses a function generator to create the file, and then reads the data from the text file to generate the waveform. You will have to modify the text file point-by-point to create an arbitrary waveform. The example can be found in the NI Example Finder by selecting "Examples" from the pulldown menu next to "Open" on the splash screen. Search for "Hardware Input and Output >> DAQmx >> Analog Generation >> Voltage >> Gen Mult Volt Updates-Text File Source.vi
I hope this info helps,