public VIConfig( ) { //Default constructor. Use some default values this._type = DEFAULT_TYPE; this._acdc = DEFAULT_ACDC; this._average = DEFAULT_AVERAGE; }
public void Configure(VIConfig cfg) { // invoke the properties, which actually calls the gpib commands //this.Average = cfg.Average; this.MeasurementVI = cfg.Type; this.MeasurementACDC = cfg.ACDC; }
/// <summary> /// Sets measurement function to V/I AC/DC values /// </summary> /// <param name="type">V/I</param> /// <param name="acdcType">AC/DC</param> public virtual void setMeasureFunction(VIType type, ACDCType acdcType) { string wrt = string.Empty; try { if (this.settings.SourceOrMeasurement == SourceMeasurement.Measurement || this.settings.SourceOrMeasurement == SourceMeasurement.SourceMeasurement) { wrt = string.Format("SENS:FUNC '{0}:{1}'", type.ToString( ).ToUpper( ).Substring(0, 4), acdcType.ToString( ).ToUpper( )); } else { wrt = string.Format("INCORRECT CONFIGURATION FOR {0}. Must be configured as measurement if inside SetMeasureFunction( ).", this.Name); } this.gpib.Write(wrt); this.measurementVI = ( VIType )type; this.measurementACDC = ( ACDCType )acdcType; } catch (Exception ex) { throw new Exception(ex.Message + this.gpib.Device.PrimaryAddress.ToString()); } }
public override void setMeasureFunction(VIType type, ACDCType acdcType) { }
public VIConfig(VIType type, ACDCType acdc) { this._type = type; this._acdc = acdc; this._average = DEFAULT_AVERAGE; }
public VIConfig(VIType type, ACDCType acdc, int average) { this._type = type; this._acdc = acdc; this._average = average; }