Exemplo n.º 1
0
        public void singletone(int channel, int amplitude, double freq)
        {
            AD9958 selectedDDS = ddsList[0];

            selectedDDS.MasterReset();

            //Set a saftely limit for the rf amplifier for evaporative cooling NTU.
            if (amplitude > 400)
            {
                amplitude = 400;
            }

            selectedDDS.SetFrequency(channel, amplitude, freq);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        public void TestMasterReset()
        {
            Message fullResetCall = new Message();

            fullResetCall.Add(fullDDSReset);

            Message initializeCall = new Message();

            initializeCall.Add(selectBothChannels);
            initializeCall.Add(setSingleTone);
            initializeCall.Add(setTwoLevel);

            using (mocks.Ordered)
            {
                Expect.Once.On(mockDevice).Method("SendDataToEP1").With(fullResetCall.ToArray());
                Expect.Once.On(mockDevice).Method("SendDataToEP2").With(initializeCall.ToArray());
            }

            dds.MasterReset();

            mocks.VerifyAllExpectationsHaveBeenMet();
        }
Exemplo n.º 4
0
        private void fullResetButton_Click(object sender, EventArgs e)
        {
            AD9958 selectedDDS = ddsList[deviceListBox.SelectedIndex];

            selectedDDS.MasterReset();
        }