Hi,
I'm not sure if you have decided to move to using DAQmx functions vs. using the DAQ assistant so I will provide advice for both.
With the DAQ Assistant I am guessing you are using "N Samples with the "use timing from waveform data" option, and "samples to write" set to 1. This can result in the error you posted. To resolve it, increase the number of samples to write or set the rate instead of using the waveform timing.
Similar advice applies to the application you posted. I did not see any channels selected, you must select your device and output channel. It is not necessary to input a task. Also, it looks like you are wanting to output a square wave for a finite duration, however you are using a 1-sample write which will only write a single voltage out unless put in a loop. Finally, the way you have set the rate in the DAQmx timing function will only work if you use the "Use Waveform" option in the polymorphic selector (the selection box below the function).
When starting out with LabVIEW programming, one of the best resources is the Example Finder (Help>>Find Examples). There is an example called "Gen Mult Volt Updates-Int Clk.vi" which is very similar to what you are wanting to do. I recommend taking a look at the example and experimenting with different inputs to see how the VI works. Also the context help (CTRL+H) is very useful to learn about LabVIEW functions. Bring up the context help and simply place your cursor over a function to learn about it.
Hope this helps,
Jennifer O.Applications EngineerNational Instruments