public override void Run() { // Harmonics if (enableHarmonics) { if (enableOutputHarmonics) { MyInst.ScpiCommand(":FORMat:TRACe:DATA REAL,64"); MyInst.ScpiCommand(":FORMat:BORDer SWAP"); OutputHarmonics = MyInst.ScpiQueryBlock <System.Double>(Scpi.Format(":MEASure:HARMonics{0}?", Harmonics)); } if (enableOutputAmplitude) { OutputAmplitude = MyInst.ScpiQuery <System.Double[]>(Scpi.Format(":MEASure:HARMonics{0}:AMPLitude{1}?", Harmonics, Amplitude), true); OutputAllAmp = MyInst.ScpiQuery <System.Double[]>(Scpi.Format(":MEASure:HARMonics{0}:AMPLitude{1}:ALL?", Harmonics, Harmonics), true); } if (enableOutputDistortion) { OutputDistortion = MyInst.ScpiQuery <System.Double>(Scpi.Format(":MEASure:HARMonics{0}:DISTortion?", HarmonicsDistortion), true); } if (enableOutputFrequency) { OutputFrequency = MyInst.ScpiQuery <System.Double>(Scpi.Format(":MEASure:HARMonics{0}:FREQuency{1}?", Harmonics, Frequency), true); OutputAllFreq = MyInst.ScpiQuery <System.Double[]>(Scpi.Format(":MEASure:HARMonics{0}:FREQuency{1}:ALL?", Harmonics, Frequency), true); OutputFundFreq = MyInst.ScpiQuery <System.Double>(Scpi.Format(":MEASure:HARMonics{0}:FUNDamental?", Harmonics), true); } } // TOI if (enableTOI) { MyInst.ScpiCommand(":FORMat:TRACe:DATA REAL,64"); MyInst.ScpiCommand(":FORMat:BORDer SWAP"); OutputToi = MyInst.ScpiQueryBlock <System.Double>(Scpi.Format(":MEASure:TOI2?")); } if (enableIP3) { OutputIp3 = MyInst.ScpiQueryBlock <System.Double>(Scpi.Format(":MEASure:TOI1:IP3?")); } // SEM if (enableSEMask) { MyInst.ScpiCommand(":FORMat:TRACe:DATA REAL,32"); MyInst.ScpiCommand(":FORMat:BORDer SWAP"); OutputSEMask = MyInst.ScpiQueryBlock <System.Single>(Scpi.Format(":MEASure:SEMask{0}?", SEMask)); } // Spurious if (enableSpurious) { MyInst.ScpiCommand(":FORMat:TRACe:DATA REAL,32"); MyInst.ScpiCommand(":FORMat:BORDer SWAP"); OutputSpurious = MyInst.ScpiQueryBlock <System.Single>(Scpi.Format(":MEASure:SPURious{0}?", Spurious)); } // BurstPower if (enableBPower) { MyInst.ScpiCommand(":FORMat:TRACe:DATA REAL,32"); MyInst.ScpiCommand(":FORMat:BORDer SWAP"); OutputBPower = MyInst.ScpiQueryBlock <System.Single>(Scpi.Format(":MEASure:BPOWer{0}?", BPower)); } }