public VIConfig( )
 {
     //Default constructor. Use some default values
     this._type    = DEFAULT_TYPE;
     this._acdc    = DEFAULT_ACDC;
     this._average = DEFAULT_AVERAGE;
 }
예제 #2
0
 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;
 }
예제 #3
0
        /// <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());
            }
        }
예제 #4
0
 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;
 }