It can be done fairly simply. There are numerous shipping examples for using DAQ to generate a waveform and for taking a measurment. There's also a shipping example called Frequency Response. It uses simulated GPIB instruments to set amplitude, number of steps, low frequency, and high frequency. What you can do is replace the simulated GPIB calls with calls to DAQ functions that generate a sine wave and measure an output.