A. Hancock,
There is a handy example that illustrates waveform output using the onboard clock located in the DAQmx example folder. Assuming you installing DAQmx to it's default location, it would be located:
C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Analog Out\Generate Voltage\Cont Gen Volt Wfm-Int Clk
Simply load a regular waveform into this example. It defaults to a sin wave, you could easily adapt it for a square wave.
Changing the frequency is relatively straightforward, simply make a call to the
DAQmxSetSampClkRate function before or while the task is running. This and all of the other functions are detailed in the DAQmx API located here:
"C:\Program Files\National Instruments\NI-DAQ\Docs\cdaqmx.chm"
or under Start > Programs > National Instruments > NI-DAQ > NI-DAQ C Reference Help.
Good luck,
--Paul
--------------
Applications Engineering
National Instruments, Inc
http://www.ni.com/support
--Paul Mandeltort
Automotive and Industrial Communications Product Marketing