In traditional NI-DAQ you could use WFM_Op to generate a signal. You must pass to the function an array that describes the signal to generate, the number of iterations (0 for continuous generating) and the sample rate: by configuring adequately the array you can generate whichever freq/dty combination you want: since I assume you want to generate a sqare wave, calculating the array is quite simple.
Working with an analog channel, you can also determine the level of High and low level: you could for example have a squadre wave from -5 to +5 V or other levels at your desire, all depends on how you structure your array.
I don't know which function has substituted WFM_Op in DAQmx.