예제 #1
0
        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);
        }
예제 #2
0
파일: MainGUI.cs 프로젝트: labJunky/DDS
        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;
        }