private void button2_Click(object sender, EventArgs e) { AD9958 selectedDDS = ddsList[deviceListBox.SelectedIndex]; selectedDDS.SetLinearSweep(2, 50e6, 60e6, 2e-6, 0.1); selectedDDS.SetDifferentialSweep(100); }
public void TestLinearUpSweep() { Message msg = new Message(); msg.Add(selectChannelZero); msg.Add(setTwoLevel); msg.Add(setFMLinearSweep); msg.Add(setStartfrequency1MHz); msg.Add(setEndFrequency2Mhz); msg.Add(setRSRR1us); msg.Add(setRDW1kHz); msg.Add(setFDW1kHz); Expect.Once.On(mockMicrocontroller).Method("SendDataToEP2").With(msg.ToArray()); dds.SetLinearSweep(0, 1e6, 2e6, 1.024e-6, 1e3); mocks.VerifyAllExpectationsHaveBeenMet(); }
private void button4_Click(object sender, EventArgs e) { AD9958 selectedDDS = ddsList[deviceListBox.SelectedIndex]; double startSlope = 100; double slopeIncr = 100; List <double> slopes = new List <double>(); selectedDDS.SetLinearSweep(2, 50e6, 60e6, 2e-6, 10e3); selectedDDS.SetDifferentialSweep(startSlope); for (int k = 0; k < 10; k++) { slopes.Add(startSlope + k * slopeIncr); } selectedDDS.SetDifferentialSweepList(slopes.ToArray()); }
private void button2_Click(object sender, EventArgs e) { AD9958 selectedDDS = ddsList[deviceListBox.SelectedIndex]; LinearSweepSetting setting = linearSweepControl1.LinearSweepSetting; int channel = setting.Channel; double startFreq = setting.StartFreq; double stopFreq = setting.StopFreq; double dFreq = setting.DeltaFreq; double dt = setting.DeltaTime; string bytesWritten = selectedDDS.SetLinearSweep(channel, startFreq, stopFreq, dt, dFreq); //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; }