public string MeasurementConditionsSummary() { using (StringWriter result = new StringWriter()) { result.WriteLine("Input DUT=> Scope Channel: " + InputDUTChannel.ToString() + " Coupling: " + InputDUTCoupling.ToString() + " Attenuation: " + InputDUTAttenuation.ToString() + " DC Offset: " + InputDUTDCOffset.ToString() + "V"); result.WriteLine("Output DUT=> Scope Channel: " + OutputDUTChannel.ToString() + " Coupling: " + OutputDUTCoupling.ToString() + " Attenuation: " + OutputDUTAttenuation.ToString() + " DC Offset: " + OutputDUTDCOffset.ToString() + "V"); result.WriteLine("Stimulus DUT=> Amplitude: " + InitialStimulus.ToString() + "V" + " DC Offset: " + StimulusOffset.ToString() + "V"); result.WriteLine("Frequency Sweep => Start Freqeuncy: " + StartFrequencyHz.ToString() + " Hz " + " Stop Freqeuncy: " + StopFrequencyHz.ToString() + " Hz " + " Steps/Decade: " + StepsPerDecade.ToString() + " Sweepdirection: " + SweepDirection.ToString()); return(result.ToString()); } }
private void SetUpChannels() { logService.Info("Setting up Picoscope succesfully channels..."); logService.Info("Input DUT channel:" + InputDUTChannel.ToString() + " Coupling:" + InputDUTCoupling.ToString() + " Atten:" + InputDUTAttenuation.ToString() + " DC Offset:" + InputDUTDCOffset.ToString()); logService.Info("Output DUT channel:" + OutputDUTChannel.ToString() + " Coupling:" + OutputDUTCoupling.ToString() + " Atten:" + OutputDUTAttenuation.ToString() + " DC Offset:" + OutputDUTDCOffset.ToString()); logService.Info("Initial stimulus:" + InitialStimulus.ToString() + " Max Stimulis:" + MaxStimulus + " Stimmulus Offset:" + StimulusOffset.ToString()); byte result = FRA4PicoscopeAPI.SetupChannels(InputDUTChannel, InputDUTCoupling, InputDUTAttenuation, InputDUTDCOffset, OutputDUTChannel, OutputDUTCoupling, OutputDUTAttenuation, OutputDUTDCOffset, InitialStimulus, MaxStimulus, StimulusOffset); if (result != 1) { HandlePicoException("Failed to setup channels and stimulus: " + result.ToString()); } else { logService.Info("Picoscope channels and stimulus succesfully setup"); } }