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