コード例 #1
0
        public static void ConfigureCommon(ref RFmxInstrMX sessionHandle, ref RFmxSpecAnMX specAnSignal, CommonConfiguration commonConfig,
                                           AutoLevelConfiguration autoLevelConfig, string selectorString = "")
        {
            sessionHandle.ConfigureFrequencyReference("", commonConfig.FrequencyReferenceSource, 10e6);
            sessionHandle.SetLOSource("", commonConfig.LOSource);
            sessionHandle.SetDownconverterFrequencyOffset("", commonConfig.LOOffset);
            specAnSignal.ConfigureDigitalEdgeTrigger(selectorString, commonConfig.DigitalEdgeSource, commonConfig.DigitalEdgeType, commonConfig.TriggerDelay_s, commonConfig.EnableTrigger);
            specAnSignal.ConfigureFrequency(selectorString, commonConfig.CenterFrequency_Hz);
            specAnSignal.Spectrum.Configuration.ConfigureSpan(selectorString, commonConfig.Span_Hz);
            specAnSignal.ConfigureExternalAttenuation(selectorString, commonConfig.ExternalAttenuation_dB);

            if (autoLevelConfig.AutoLevelReferenceLevel)
            {
                specAnSignal.AutoLevel(selectorString, commonConfig.Span_Hz, autoLevelConfig.AutoLevelMeasureTime_s, out _);
            }
            else
            {
                specAnSignal.ConfigureReferenceLevel(selectorString, commonConfig.ReferenceLevel_dBm);
            }
        }
コード例 #2
0
        public static void ConfigureCommon(RFmxInstrMX sessionHandle, RFmxWlanMX wlanSignal, CommonConfiguration commonConfig,
                                           AutoLevelConfiguration autoLevelConfig, string selectorString = "")
        {
            string instrModel;

            sessionHandle.ConfigureFrequencyReference("", commonConfig.FrequencyReferenceSource, 10e6);
            sessionHandle.GetInstrumentModel("", out instrModel);

            sessionHandle.SetLOSource("", commonConfig.LOSource);
            sessionHandle.SetDownconverterFrequencyOffset("", commonConfig.LOOffset);

            wlanSignal.ConfigureDigitalEdgeTrigger(selectorString, commonConfig.DigitalEdgeSource, commonConfig.DigitalEdgeType, commonConfig.TriggerDelay_s, commonConfig.EnableTrigger);
            wlanSignal.ConfigureFrequency(selectorString, commonConfig.CenterFrequency_Hz);
            wlanSignal.ConfigureExternalAttenuation(selectorString, commonConfig.ExternalAttenuation_dB);

            if (autoLevelConfig.AutoLevelReferenceLevel)
            {
                wlanSignal.AutoLevel(selectorString, autoLevelConfig.AutoLevelMeasureTime_s);
            }
            else
            {
                wlanSignal.ConfigureReferenceLevel(selectorString, commonConfig.ReferenceLevel_dBm);
            }
        }
        private void ConfigureNR()
        {
            watch.Start();

            NR_offsets = instrSession.GetNRSignalConfiguration("signal::offsets");
            NR_carrier = instrSession.GetNRSignalConfiguration("signal::carrier");

            instrSession.ConfigureFrequencyReference("", frequencyReferenceSource, frequencyReferenceFrequency);
            instrSession.SetDownconverterFrequencyOffset("signal::carrier", 256e6);

            //Configure offset measurements
            NR_offsets.SetSelectedPorts("", selectedPorts);
            NR_offsets.ConfigureRF("", centerFrequency, referenceLevel, externalAttenuation);
            NR_offsets.ConfigureDigitalEdgeTrigger("", digitalEdgeSource, digitalEdge, triggerDelay, enableTrigger);
            NR_offsets.SetLinkDirection("", linkDirection);
            NR_offsets.SetFrequencyRange("", frequencyRange);
            NR_offsets.SetBand("", modaccBand);
            NR_offsets.ComponentCarrier.SetBandwidth("", carrierBandwidth);
            NR_offsets.ComponentCarrier.SetBandwidthPartSubcarrierSpacing("", subcarrierSpacing);
            NR_offsets.SelectMeasurements("", RFmxNRMXMeasurementTypes.Acp | RFmxNRMXMeasurementTypes.Sem, true);


            //Configure carrier measurements
            NR_carrier.SetSelectedPorts("", selectedPorts);
            NR_carrier.ConfigureRF("", centerFrequency, referenceLevel, externalAttenuation);
            NR_carrier.ConfigureDigitalEdgeTrigger("", digitalEdgeSource, digitalEdge, triggerDelay, enableTrigger);
            NR_carrier.SetLinkDirection("", linkDirection);
            NR_carrier.SetFrequencyRange("", frequencyRange);
            NR_carrier.SetBand("", modaccBand);
            NR_carrier.ComponentCarrier.SetBandwidth("", carrierBandwidth);
            NR_carrier.ComponentCarrier.SetBandwidthPartSubcarrierSpacing("", subcarrierSpacing);
            NR_carrier.SelectMeasurements("", RFmxNRMXMeasurementTypes.ModAcc | RFmxNRMXMeasurementTypes.Chp | RFmxNRMXMeasurementTypes.Obw, true);

            NR_offsets.Acp.Configuration.ConfigureSweepTime("", RFmxNRMXAcpSweepTimeAuto.True, sweepTimeInterval);

            NR_offsets.Chp.Configuration.ConfigureSweepTime("", RFmxNRMXChpSweepTimeAuto.True, sweepTimeInterval);

            NR_offsets.Obw.Configuration.ConfigureSweepTime("", RFmxNRMXObwSweepTimeAuto.True, sweepTimeInterval);

            NR_offsets.Sem.Configuration.ConfigureSweepTime("", RFmxNRMXSemSweepTimeAuto.True, sweepTimeInterval);

            NR_carrier.ModAcc.Configuration.SetAveragingEnabled("", RFmxNRMXModAccAveragingEnabled.False);
            NR_carrier.ModAcc.Configuration.SetAveragingCount("", averagingCount);

            NR_offsets.Acp.Configuration.ConfigureAveraging("", RFmxNRMXAcpAveragingEnabled.False, averagingCount,
                                                            RFmxNRMXAcpAveragingType.Rms);

            NR_carrier.Chp.Configuration.ConfigureAveraging("", RFmxNRMXChpAveragingEnabled.False, averagingCount,
                                                            RFmxNRMXChpAveragingType.Rms);

            NR_carrier.Obw.Configuration.ConfigureAveraging("", RFmxNRMXObwAveragingEnabled.False, averagingCount,
                                                            RFmxNRMXObwAveragingType.Rms);

            NR_offsets.Sem.Configuration.ConfigureAveraging("", RFmxNRMXSemAveragingEnabled.False, averagingCount,
                                                            RFmxNRMXSemAveragingType.Rms);

            NR_carrier.ModAcc.Configuration.SetMeasurementLengthUnit("", measurementLengthUnit);
            NR_carrier.ModAcc.Configuration.SetMeasurementOffset("", measurementOffset);
            NR_carrier.ModAcc.Configuration.SetMeasurementLength("", measurementLength);

            if (linkDirection == RFmxNRMXLinkDirection.Uplink)
            {
                NR_offsets.Sem.Configuration.ConfigureUplinkMaskType("", uplinkMaskType);
            }
            else
            {
                NR_offsets.ConfiguregNodeBCategory("", gNodeBCategory);
                NR_offsets.Sem.Configuration.SetDownlinkMaskType("", downlinkMaskType);
                NR_offsets.Sem.Configuration.SetDeltaFMaximum("", deltaFMaximum);
                NR_offsets.Sem.Configuration.ComponentCarrier.ConfigureRatedOutputPower("", componentCarrierRatedOutputPower);
            }
            NR_offsets.Commit("");
            NR_carrier.Commit("");
            offsetResults  = RFmxNRMX.BuildResultString("offsetResults");
            carrierResults = RFmxNRMX.BuildResultString("carrierResults");
            NR_carrier.Initiate("", "carrierResults");
            instrSession.WaitForAcquisitionComplete(timeout);
            NR_offsets.Initiate("", "offsetResults");
            //NR_offsets.WaitForMeasurementComplete("", timeout);
//            NR_carrier.Initiate("", "");
        }