Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="SGsetting"></param>s=输入参数中,仅使用SGsetting.NPREnable,SGsetting.TwoTonesEnable两个参数
        /// <param name="SGsetting"></param>
        /// <returns></returns>
        public override bool VectorSignalGeratorConfigurationRead(out VectorSignalGeneratorSetting SGsettingResult)
        {
            SGsettingResult = new VectorSignalGeneratorSetting();

            //双音信号设置部分
            if (this.MultitoneState == 1)
            {
                SGsettingResult.TwoTonesEnable = true;

                SGsettingResult.SubCarrierNumber = (uint)this.MultitoneCarryNum;
                this.WaitOpc();
                SGsettingResult.SignalBandWidth = this.MultitoneFreqSpace;
                this.WaitOpc();
                SGsettingResult.Freq = this.RFFrequency;
                this.WaitOpc();
                SGsettingResult.Offset = this.AmplOffset;
                this.WaitOpc();
                SGsettingResult.RFPower = this.RFPower;
                this.WaitOpc();
                SGsettingResult.RFOn = this.RFOutputEnabled;
            }
            //NPR信号设置部分
            else if (this.QueryNumber(":RADio:ARB?") == 1)
            {
                SGsettingResult.NPREnable = true;
                SGsettingResult.Freq      = this.RFFrequency;
                this.WaitOpc();
                SGsettingResult.RFPower = this.RFPower;
                this.WaitOpc();
                SGsettingResult.GapRatio = 1;           //NPR信号缺口不支持回读,暂定1%
                this.WaitOpc();
                SGsettingResult.SignalBandWidth = 20e6; //NPR信号贷款不支持回读,暂定20MHz
                this.WaitOpc();
                SGsettingResult.SubCarrierNumber = 101; //NPR信号个数不支持回读,暂定101
                this.WaitOpc();
                this.WaitOpc();
                SGsettingResult.Offset = this.AmplOffset;
                this.WaitOpc();
                SGsettingResult.RFOn = this.RFOutputEnabled;
                this.WaitOpc();
            }
            //单音信号设置部分
            else
            {
                SGsettingResult.Freq = this.RFFrequency;
                this.WaitOpc();
                SGsettingResult.Offset = this.AmplOffset;
                this.WaitOpc();
                SGsettingResult.RFPower = this.RFPower;
                this.WaitOpc();
                SGsettingResult.RFOn = this.RFOutputEnabled;
                this.WaitOpc();
                SGsettingResult.TwoTonesEnable = false;
                this.WaitOpc();
                SGsettingResult.NPREnable = false;
            }

            return(true);
        }
Beispiel #2
0
 /// <summary>
 /// 矢量信号源参数读取
 /// </summary>
 /// <param name="SGsetting"></param>
 /// <param name="SGsettingResult"></param>
 /// <returns></returns>
 public virtual bool VectorSignalGeratorConfigurationRead(out VectorSignalGeneratorSetting SGsettingResult)
 {
     SGsettingResult = new VectorSignalGeneratorSetting();
     return(false);
 }
Beispiel #3
0
 /// <summary>
 /// 矢量信号源参数设置
 /// </summary>
 /// <param name="SGsetting"></param>
 /// <returns></returns>
 public virtual bool VectorSignalGeratorConfigure(VectorSignalGeneratorSetting SGsetting)
 {
     SGsetting = new VectorSignalGeneratorSetting();
     return(false);
 }
Beispiel #4
0
        /// <summary>
        /// 将矢量信号源的各设置参数实现到仪表
        /// </summary>
        /// <param name="SGsetting"></param>
        /// <returns></returns>
        public override bool VectorSignalGeratorConfigure(VectorSignalGeneratorSetting SGsetting)
        {
            //单音信号设置部分
            if (!(SGsetting.NPREnable || SGsetting.TwoTonesEnable))
            {
                this.Preset();
                this.WaitOpc();
                this.Send(":OUTP:MOD:STAT off");
                this.RFFrequency = SGsetting.Freq;
                this.WaitOpc();
                this.AmplOffset = SGsetting.Offset;
                this.WaitOpc();
                IsSafeCall   = true;
                this.RFPower = SGsetting.RFPower;
                this.WaitOpc();
                this.RFOutputEnabled = SGsetting.RFOn;
            }
            //双音信号设置部分
            else if (SGsetting.TwoTonesEnable)
            {
                this.Preset();
                this.WaitOpc();
                this.MultitoneCarryNum = 2;
                this.WaitOpc();
                this.MultitoneFreqSpace = SGsetting.SignalBandWidth;
                this.WaitOpc();
                this.MultitoneState = 1;
                this.WaitOpc();
                this.RFFrequency = SGsetting.Freq;
                this.WaitOpc();
                this.AmplOffset = SGsetting.Offset;
                this.WaitOpc();
                IsSafeCall = true;

                this.RFPower = SGsetting.RFPower;
                this.WaitOpc();
                this.RFOutputEnabled = SGsetting.RFOn;
            }
            //NPR信号设置部分
            else if (SGsetting.NPREnable)
            {
                this.Preset();
                this.WaitOpc();
                NprSignalGenerator NPRSG = new NprSignalGenerator(this.m_address);
                //信号特征参数赋值
                NPRSG.Connect();
                NprSignalGenerator.NprParameter NPRTestParameter = new NprSignalGenerator.NprParameter();
                NPRTestParameter.m_CenterFreq = SGsetting.Freq;
                IsSafeCall = true;

                NPRTestParameter.m_Amplitude = SGsetting.RFPower - 20;
                NPRTestParameter.m_AlcState  = true;
                NPRTestParameter.m_CalculateNoiseOffsetAutomatically = true;
                NPRTestParameter.m_NotchRelativeWidth = SGsetting.GapRatio;
                NPRTestParameter.m_SignalBW           = SGsetting.SignalBandWidth;
                NPRTestParameter.m_ToneCount          = (int)SGsetting.SubCarrierNumber;
                NPRTestParameter.m_PhaseDistribution  = RackSys.RFLib.Npr.PhaseDistribution.Random;
                NPRTestParameter.m_PhaseSeeds         = 1;
                //强制结束

                NPRSG.DownLoadAndPlay(NPRTestParameter);
                this.WaitOpc();



                this.RFFrequency = SGsetting.Freq;
                this.WaitOpc();
                this.AmplOffset = SGsetting.Offset;
                this.WaitOpc();
                IsSafeCall = true;

                this.RFPower = SGsetting.RFPower;
                this.WaitOpc();
                this.RFOutputEnabled = SGsetting.RFOn;
            }

            return(true);
        }