public string sweep(int channel, int amplitude, double startFreq, double stopFreq, double rate) { AD9958 selectedDDS = ddsList[0]; selectedDDS.MasterReset(); //Set a saftely limit for the rf amplifier for evaporative cooling NTU. if (amplitude > 400) { amplitude = 400; } string bytesWritten = selectedDDS.SetLinearSweep2(channel, amplitude, startFreq, stopFreq, rate); return(bytesWritten); }
private void sweepButton_Click(object sender, EventArgs e) { AD9958 selectedDDS = ddsList[deviceListBox.SelectedIndex]; SweepSetting setting = sweepControl1.SweepSetting; int channel = setting.Channel; int amplitude = setting.AmplitudeScaleFactor; double startFreq = setting.StartFreq; double stopFreq = setting.StopFreq; double rate = setting.Rate; string bytesWritten = selectedDDS.SetLinearSweep2(channel, amplitude, startFreq, stopFreq, rate); //string bytesWritten = selectedDDS.SetLinearSweep(0, 1e6, 10e6, 160e-9, 1.6); //selectedDDS.SetDifferentialSweep(100); // selectedDDS.SetMultiTaskList(); //string bytesWritten = selectedDDS.programInBytes(); // string bytesWritten = selectedDDS.SetMultiTaskList(); // string bytesWritten = selectedDDS.SetLinearSweep(2, 50e6, 60e6, 1e-6, 1); textBox1.Text = bytesWritten; }