예제 #1
0
        public void Configure__Trace_Data(double dblFrequncy_in_MHz, U2001_Trigger TriggerMode,
            double dblTriggerLevel_in_dBm, double dblTraceTime_in_MilliSecond, double dblTraceTime_Offset_in_MicroSecond)
        {
            try
            {
                PowerMeter_U2001A.Write("*CLS");
                PowerMeter_U2001A.Write("*RST");

                //PowerMeter_U2001A.Write("SYST:PRES DEF");
                //PowerMeter_U2001A.Write("FREQ " + dblFrequncy_in_MHz + "MHz");
                PowerMeter_U2001A.Write("DET:FUNC NORM");                                   //Set measurement mode to normal

                //PowerMeter_U2001A.Write("TRIG:LEV " + dblTriggerLevel_in_dBm.ToString());   //Set trigger level

                if (TriggerMode == U2001_Trigger.Internal)
                    PowerMeter_U2001A.Write("TRIG:SOUR INT");
                else if (TriggerMode == U2001_Trigger.External)
                    PowerMeter_U2001A.Write("TRIG:SOUR EXT");
                else
                    throw new Exception("Free Run is not allowed in this power mode");

                PowerMeter_U2001A.Write("TRAC:STAT ON");
                PowerMeter_U2001A.Write("TRAC:TIME " + (dblTraceTime_in_MilliSecond / 1000).ToString());   //Set Sweep time
                PowerMeter_U2001A.Write("TRAC:OFFS:TIME " + (dblTraceTime_Offset_in_MicroSecond / 1000000).ToString());   //Set Sweep time offset           

                PowerMeter_U2001A.Write("TRAC:TIME 0.001");
                PowerMeter_U2001A.Write("TRAC:OFFS:TIME 0.0001");

            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
예제 #2
0
        public void Configure__Time_Gated_Burst_Power(double dblFrequncy_in_MHz, U2001_Trigger TriggerMode,
            double dblTriggerLevel_in_dBm, double dblSweepTime_in_MilliSecond, double dblSweepTime_Offset_in_MicroSecond)
        {
            try
            {
                PowerMeter_U2001A.Write("*CLS");
                PowerMeter_U2001A.Write("*RST");

                PowerMeter_U2001A.Write("SYST:PRES DEF");
                PowerMeter_U2001A.Write("FREQ " + dblFrequncy_in_MHz + "MHz");
                PowerMeter_U2001A.Write("DET:FUNC NORM");                                   //Set measurement mode to normal

                if (TriggerMode == U2001_Trigger.Internal)
                {
                    PowerMeter_U2001A.Write("TRIG:SOUR INT");
                }
                else if (TriggerMode == U2001_Trigger.External)
                    PowerMeter_U2001A.Write("TRIG:SOUR EXT");
                else
                    throw new Exception("Free Run is not allowed in this power mode");

                string SDF = PowerMeter_U2001A.Query("TRIG:LEV?");

                PowerMeter_U2001A.Write("TRIG:LEV " + dblTriggerLevel_in_dBm.ToString());   //Set trigger level
                //PowerMeter_U2001A.Write("TRIG:LEV -29.1");   //Set trigger level to lowest
                //PowerMeter_U2001A.Write("SWE:TIME " + (dblSweepTime_in_MilliSecond / 1000).ToString());  //Set Sweep time
                //PowerMeter_U2001A.Write("SWE:OFFS:TIME " + (dblSweepTime_Offset_in_MicroSecond / 1000000).ToString());   //Set Sweep time offset

                PowerMeter_U2001A.Write("SWE:TIME 0.001");
                PowerMeter_U2001A.Write("SWE:OFFS:TIME 0.0001");

                PowerMeter_U2001A.Write("CALC:FEED 'POW:AVER ON SWEEP'");   //Performs time-gated burst power measurement.
                PowerMeter_U2001A.Write("INIT:CONT ON");
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }