You could use the Continuous Analog Output examples that ships with LabVIEW 6 as your starting point. You can add the function AI Read One Scan to get your analog input reading at each iteration of your loop. Then wire this reading to the frequency terminal of a sine generation function such as Sine Waveform.vi. The waveform data can then be used as your input to AO Write.