private SweepSetting getSweepSetting() { SweepSetting setting = new SweepSetting(); setting.Channel = Convert.ToInt32(sweepChannelComboBox.Text); setting.AmplitudeScaleFactor = Convert.ToInt32(ampTextBox.Text); setting.StartFreq = Convert.ToDouble(startFreqTextBox.Text); setting.StopFreq = Convert.ToDouble(stopFreqTextBox.Text); setting.Rate = Convert.ToDouble(rateTextBox.Text); return(setting); }
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; }