예제 #1
0
 protected override void InternalDisconnect()
 {
     try
     {
         gpib_.Dispose();
         gpib_ = null;
     }
     catch (Exception ex)
     {
         throw new Exception(string.Format("Error disconnecting {0} with address {1}.\n{2}", this.Name, settings_.GpibAddress.ToString(), ex.Message));
     }
     this.LogMessage("Keithley2602 internalDisconnet...");
 }
예제 #2
0
        //public GpibDriver Driver
        //{
        //    get { return gpib_; }
        //    set { gpib_ = value; }
        //}

        #region Instrument override

        protected override void InternalConnect()
        {
            try
            {
                if (gpib_ == null)
                {
                    gpib_ = new GpibDriver(settings_.GpibAddress, settings_.GpibTimeout);
                }
            }
            catch (Exception ex)
            {
                throw new Exception(string.Format("Error connecting {0} with address {1}. \n{2}", this.Name, settings_.GpibAddress.ToString(), ex.Message));
                this.LogMessage("Keithley2602 InternalConnet... ");
            }
        }