Beispiel #1
0
        private void setChannelButton_Click(object sender, EventArgs e)
        {
            // Parse information
            AD9958         selectedDDS = ddsList[deviceListBox.SelectedIndex];
            ChannelSetting setting     = ((IChannelSetting)channelTabControl.SelectedTab.Controls[0]).ChannelSetting;

            setChannel(selectedDDS, setting);
        }
Beispiel #2
0
        private ChannelSetting getChannelSetting()
        {
            ChannelSetting setting = new ChannelSetting();

            setting.Channel   = Convert.ToInt32(comboBox1.Text);
            setting.Frequency = Convert.ToDouble(frequencyTextBox.Text);
            return(setting);
        }
Beispiel #3
0
        private ChannelSetting getChannelSetting()
        {
            ChannelSetting setting = new ChannelSetting();

            setting.Channel   = 2;
            setting.Frequency = Convert.ToDouble(frequencyComboBox.Text);
            setting.Phase     = Convert.ToDouble(phaseComboBox.Text);
            return(setting);
        }
Beispiel #4
0
 private void setChannel(AD9958 dds, ChannelSetting Setting)
 {
     if (Setting.Channel == 2)
     {
         dds.SetTwoChannelRelativePhase(Setting.Frequency, Setting.Phase);
     }
     else
     {
         dds.SetFrequency(Setting.Channel, Setting.Frequency);
     }
 }