Beispiel #1
0
        public static VectorSignalGenerator CreateDetectedVectorSignalGenerator(string address)
        {
            VectorSignalGenerator PsgEsg;

            try
            {
                string str = ScpiInstrument.DetermineModel(address);
                if (string.IsNullOrEmpty(str))
                {
                }
                if (VectorSignalGenerator.IsEVSGC(str) || VectorSignalGenerator.IsPVSG(str) || VectorSignalGenerator.IsMxg(str))
                {
                    PsgEsg = new AgilentE8267D(address);
                }
                else
                {
                    PsgEsg = null;
                }
            }
            catch (Exception exception)
            {
                throw new Exception(string.Concat("连接到矢量信号源出错: ", exception.Message));
            }
            return(PsgEsg);
        }
Beispiel #2
0
        public AV1464BSignalGenerator(string address)
            : base(address)
        {
            string str = ScpiInstrument.DetermineModel(address);

            base.GetErrorQueue();
        }
Beispiel #3
0
        public AgilentEsgAndPsg(string address)
            : base(address)
        {
            string str = ScpiInstrument.DetermineModel(address);

            base.GetErrorQueue();
        }
Beispiel #4
0
        /// <summary>
        /// 创建对应的频率测量对象。
        /// </summary>
        /// <param name="address"></param>
        /// <returns></returns>
        public static CtrlUnit CreateDetectedDCPowerSupply(string address)
        {
            CtrlUnit tempUnit = null;

            try
            {
                //Racksystem,RAC1110,RACXXXXXXXXXX,1.0
                string ModelNo = ScpiInstrument.DetermineModel(address);
                if (ModelNo.IndexOf("RAC1110") >= 0)
                {
                    tempUnit = new CtrlUnitTR29(address);
                }
                else if (ModelNo.IndexOf("RAC-4001B") >= 0)
                {
                    tempUnit = new CtrlUnitTR29(address);
                }

                else
                {
                    throw new Exception(string.Concat(ModelNo, " 不是一个可以支持的波控"));
                }
            }
            catch (Exception exception)
            {
                throw new Exception(string.Concat("连接波控模块错误: ", exception.Message));
            }
            return(tempUnit);
        }
        public static SpectrumAnalyzer CreateDetectedSpectrumAnalyzer(string address)
        {
            SpectrumAnalyzer scpiSpectrumAnalyzer;

            try
            {
                string str = ScpiInstrument.DetermineModel(address);
                if (SpectrumAnalyzer.IsMXA(str) || SpectrumAnalyzer.IsEXA(str) || SpectrumAnalyzer.IsPXA(str))
                {
                    scpiSpectrumAnalyzer = new ScpiSpectrumAnalyzer(address);
                }
                else if (SpectrumAnalyzer.IsFSW(str))
                {
                    scpiSpectrumAnalyzer = new ScpiSpectrumAnalyzerFSW(address);
                }
                else if (SpectrumAnalyzer.IsESA(str) || SpectrumAnalyzer.IsPSA(str) || SpectrumAnalyzer.IsE4446A(str))
                {
                    scpiSpectrumAnalyzer = new ScpiSpectrumAnalyzerE4446A(address);
                }
                else if (SpectrumAnalyzer.IsAV4003(str))
                {
                    scpiSpectrumAnalyzer = new ScpiSpectrumAnalyzerAV4033(address);
                }
                else
                {
                    throw new Exception(string.Concat(str, " 不支持对应型号的频谱仪"));
                }
            }
            catch (Exception exception)
            {
                throw new Exception(string.Concat("连接频谱仪错误: ", exception.Message));
            }
            return(scpiSpectrumAnalyzer);
        }
        /// <summary>
        /// 创建对应的噪声分析仪控制对象。
        /// </summary>
        /// <param name="address"></param>
        /// <returns></returns>
        public static NoiseFigureAnalyzer CreateDetectedNoiseFigureSupply(string address)
        {
            NoiseFigureAnalyzer NoiseFigureAnalyzerSupply = null;

            try
            {
                string ModelNo = ScpiInstrument.DetermineModel(address);
                if (!NoiseFigureAnalyzer.IsSupportedModel(ModelNo))
                {
                    throw new Exception(string.Concat(ModelNo, " 不是一个可以支持的噪声系统分析仪"));
                }


                if (ModelNo.IndexOf("N8975A") >= 0)
                {
                    NoiseFigureAnalyzerSupply = new AgilentN8975A(address);
                }
                else if (ModelNo.IndexOf("AV3985") >= 0)
                {
                    NoiseFigureAnalyzerSupply = new AV3985A(address);
                }
                else
                {
                    throw new Exception(string.Concat(ModelNo, " 不是一个可以支持的噪声系统分析仪"));
                }
            }
            catch (Exception exception)
            {
                throw new Exception(string.Concat("连接噪声分析仪错误: ", exception.Message));
            }
            return(NoiseFigureAnalyzerSupply);
        }
Beispiel #7
0
        /// <summary>
        /// 构造函数,示波器对象建立
        /// </summary>
        public static OSCBase CreateDetectedOscillo(string address)
        {
            OSCBase Oscillo;

            try
            {
                string Model = ScpiInstrument.DetermineModel(address);
                //DSO-X 4104A

                if (Model.IndexOf("DSO9") >= 0)
                {
                    Oscillo = new AgilentDSO90000A(address);
                }
                else if (Model.IndexOf("DSO-X") >= 0)
                {
                    Oscillo = new DSO_X_4104A(address);
                }
                else
                {
                    throw new Exception(string.Concat(Model, " 无法识别对应的示波器,IP地址:" + address));
                }
            }
            catch (Exception exception)
            {
                throw new Exception(string.Concat("连接示波器错误: ", exception.Message));
            }
            return(Oscillo);
        }
Beispiel #8
0
        public static SignalGenerator CreateDetectedAnalogSignalGenerator(string address)
        {
            SignalGenerator PsgEsg;

            try
            {
                string str = ScpiInstrument.DetermineModel(address);
                if (SignalGenerator.IsEVSGC(str) || SignalGenerator.IsPVSG(str))
                {
                    PsgEsg = new AgilentEsgAndPsg(address);
                }
                else if (SignalGenerator.IsAnalogE8257D(str))
                {
                    ///E8257D的代码
                    PsgEsg = new AgilentE8257D(address);
                }
                else if (SignalGenerator.IsAV1464B(str))
                {
                    PsgEsg = new AV1464BSignalGenerator(address);
                }
                else if (!SignalGenerator.IsEVSGB(str))
                {
                    return(null);
                }
                else
                {
                    PsgEsg = null;
                }
            }
            catch (Exception exception)
            {
                throw new Exception(string.Concat("连接至模拟信号源出错: ", exception.Message));
            }
            return(PsgEsg);
        }
        /// <summary>
        /// 创建对应的频率测量对象。
        /// </summary>
        /// <param name="address"></param>
        /// <returns></returns>
        public static FrequencyCounter CreateDetectedDCPowerSupply(string address)
        {
            FrequencyCounter AFreqCounter = null;

            try
            {
                string ModelNo = ScpiInstrument.DetermineModel(address);
                if (ModelNo.IndexOf("53130") >= 0 || ModelNo.IndexOf("53132") >= 0)
                {
                    AFreqCounter = new Agilent53130(address);
                }
                else if (ModelNo.IndexOf("SR620") >= 0)
                {
                    //AFreqCounter = new SR620(address);
                }
                else
                {
                    throw new Exception(string.Concat(ModelNo, " 不是一个可以支持的频率测量模块"));
                }
            }
            catch (Exception exception)
            {
                throw new Exception(string.Concat("连接频率测量模块错误: ", exception.Message));
            }
            return(AFreqCounter);
        }
Beispiel #10
0
        public SMF100a(string address)
            : base(address)
        {
            string str = ScpiInstrument.DetermineModel(address);

            base.GetErrorQueue();
        }
Beispiel #11
0
        public static PowerMeter CreateDetectedPowerMeter(string address)
        {
            PowerMeter APowerMeter;

            try
            {
                string Model = ScpiInstrument.DetermineModel(address);

                if (
                    (Model.IndexOf("E441") < 0) &&
                    (Model.IndexOf("437B") < 0) &&
                    (Model.IndexOf("N191") < 0) &&
                    (Model.IndexOf("ML2488B") < 0)
                    )
                {
                    throw new Exception(string.Concat(Model, " 无法识别对应的功率计,IP地址:" + address));
                }

                if (Model.IndexOf("E441") >= 0)
                {
                    APowerMeter = new AgilentEmp(address);
                }
                else if (Model.IndexOf("437B") >= 0)
                {
                    APowerMeter = new AgilentEmp(address);
                }
                else if (Model.IndexOf("N191") >= 0)
                {
                    APowerMeter = new AgilentN1912A(address);
                }
                else if (Model.IndexOf("ML2488B") >= 0)
                {
                    APowerMeter = new AnritsuML2496(address);
                }
                else
                {
                    APowerMeter = null;
                }
            }
            catch (Exception exception)
            {
                throw new Exception(string.Concat("连接功率计错误: ", exception.Message));
            }
            return(APowerMeter);
        }
Beispiel #12
0
        public static NetworkAnalyzer CreateDetectedNetworkAnalyzer(string address)
        {
            NetworkAnalyzer APna;

            try
            {
                string str = ScpiInstrument.DetermineModel(address);
                if (!NetworkAnalyzer.IsPNA(str))
                {
                    throw new Exception(string.Concat(str, " ,不支持对应型号的网络分析仪"));
                }
                APna = new AgilentPNA(address);
            }
            catch (Exception exception)
            {
                throw new Exception(string.Concat("连接矢网错误: ", exception.Message));
            }
            return(APna);
        }
Beispiel #13
0
        /// <summary>
        /// 创建对应的直流电源控制对象。
        /// </summary>
        /// <param name="address"></param>
        /// <returns></returns>
        public static DCPowerBase CreateDetectedDCPowerSupply(string address)
        {
            DCPowerBase DCPowerSupply = null;

            try
            {
                string ModelNo = ScpiInstrument.DetermineModel(address);
                if (ModelNo.IndexOf("N6705B") >= 0)
                {
                    DCPowerSupply = new AgilentN6705B(address);
                }
                else if (ModelNo.IndexOf("E3634A") >= 0)
                {
                    DCPowerSupply = new AgilentE3634A(address);
                }
                else if (ModelNo.IndexOf("6675A") >= 0)
                {
                    DCPowerSupply = new Agilent6675A(address);
                }
                else if (ModelNo.IndexOf("3649A") >= 0)
                {
                    DCPowerSupply = new AgilentE3649A(address);
                }
                if (ModelNo.IndexOf("N6702A") >= 0)
                {
                    DCPowerSupply = new AgilentN6700B(address);
                }
                if (ModelNo.IndexOf("N6701A") >= 0)
                {
                    DCPowerSupply = new AgilentN6700B(address);
                }
                else
                {
                    throw new Exception(string.Concat(ModelNo, " 不是一个可以支持的直流电源"));
                }
            }
            catch (Exception exception)
            {
                throw new Exception(string.Concat("连接直流电源错误: ", exception.Message));
            }
            return(DCPowerSupply);
        }
Beispiel #14
0
        public static Matrix Connect(string currentAddress, bool isInputMatrix, bool isHighPower)
        {
            //创建临时会话
            //ScpiInstrument tmpIo = new ScpiInstrument(currentAddress);
            //获取开关矩阵型号
            //string model = tmpIo.Model.Trim();
            string model = ScpiInstrument.DetermineModel(currentAddress).Trim();

            if (isInputMatrix)
            {
                //输入开关矩阵
                if (isHighPower)
                {
                    switch (model)
                    {
                    //待测试
                    case "L4491A":
                        Matrix tmpMatrix = new InputMatrix_HighPower_L4491(currentAddress);
                        tmpMatrix.MatrixInitial();
                        return(tmpMatrix);

                    case "AV3638AD":
                        Matrix tmpMatrix1 = new InputMatrix_AV3638AD(currentAddress);
                        tmpMatrix1.MatrixInitial();
                        return(tmpMatrix1);

                    case "RAC1110":
                        Matrix tmpMatrix2 = new SWTRMatrixS(currentAddress);
                        tmpMatrix2.MatrixInitial();
                        return(tmpMatrix2);

                    case "SiWeeTR":
                        Matrix tmpMatrix3 = new SWTRMatrixS(currentAddress);
                        tmpMatrix3.MatrixInitial();    //RAC-8003B
                        return(tmpMatrix3);

                    case "RAC-8003B":
                        Matrix tmpMatrix4 = new SWTRMatrixS(currentAddress);
                        tmpMatrix4.MatrixInitial();    //RAC-8003B
                        return(tmpMatrix4);

                    default: throw new Exception("不能识别的设备");
                        //Racksystem,SiWeeTR,CNSWTR201601
                    }
                }
                else
                {
                    switch (model)
                    {
                    //待测试
                    case "L4491A":
                        //输入开关矩阵
                        Matrix tmpMatrix = new InputMatrix_L4491(currentAddress);
                        tmpMatrix.MatrixInitial();
                        return(tmpMatrix);

                    case "AV3638AD":
                        Matrix tmpMatrix1 = new InputMatrix_AV3638AD(currentAddress);
                        tmpMatrix1.MatrixInitial();
                        return(tmpMatrix1);

                    case "RAC1110":
                        Matrix tmpMatrix2 = new SWTRMatrixS(currentAddress);
                        tmpMatrix2.MatrixInitial();
                        return(tmpMatrix2);

                    case "SiWeeTR":
                        Matrix tmpMatrix3 = new SWTRMatrixS(currentAddress);
                        tmpMatrix3.MatrixInitial();
                        return(tmpMatrix3);

                    case "RAC-8003B":
                        Matrix tmpMatrix4 = new SWTRMatrixS(currentAddress);
                        tmpMatrix4.MatrixInitial();    //RAC-8003B
                        return(tmpMatrix4);

                    default: throw new Exception("不能识别的设备");
                    }
                }
            }
            else
            {
                //输出开关矩阵
                switch (model)
                {
                //待测试
                case "L4491A":
                    Matrix tmpMatrix = new OutputMatrix_L4491(currentAddress);
                    tmpMatrix.MatrixInitial();
                    return(tmpMatrix);

                case "AV3638AD":
                    Matrix tmpMatrix1 = new OutputMatrix_AV3638AD(currentAddress);
                    tmpMatrix1.MatrixInitial();
                    return(tmpMatrix1);

                case "RAC1110":
                    Matrix tmpMatrix2 = new SWTRMatrixS(currentAddress);
                    tmpMatrix2.MatrixInitial();
                    return(tmpMatrix2);

                case "SiWeeTR":
                    Matrix tmpMatrix3 = new SWTRMatrixS(currentAddress);
                    tmpMatrix3.MatrixInitial();
                    return(tmpMatrix3);

                case "RAC-8003B":
                    Matrix tmpMatrix4 = new SWTRMatrixS(currentAddress);
                    tmpMatrix4.MatrixInitial();    //RAC-8003B
                    return(tmpMatrix4);

                default: throw new Exception("不能识别的设备");
                }
            }
        }