first thing I suggest is to look thru the examples that ship with LabView for buffered output generation. one particular example is a function generator that you can look at experiment with.
In your code, you are generating a timed output (for so many seconds and then the generation stops). If this is what you want, then this is what to use.
You left the update rate input of the "Ao generate waveform.vi", unwired. just create a control and set its value (defaulted to 1000). Increasing it will allow higher frequency. The maximum value (I think) is 10k for the card.
once the upper limit is hit, you can acheive higher frequencies by having more cycle per buffer generation.
Duration (sec)=#s/Fs ==duration of wave generated, and #s is number of samples.
also,
#of samples/(one cycle===1 period) is
Fs/freq
and should be at least 10 (higher will give smoother wave, but is not a problem for a square wave (because it is flat top/bottom). Higher value will reduce the max frequeny output. so keep it as a small as possible (not less than 10)