Example #1
0
 public void CloseDCIVISession()
 {
     bNeedExit = true;
     if (iviDCPower != null)
     {
         try
         {
             iviDCPower.Outputs["0"].Enabled = false;
             iviDCPower.Outputs["1"].Enabled = false;
             iviDCPower.Close();
             iviDCPower   = null;
             bInitialized = false;
         }
         catch (Exception ex)
         {
             StatusDCUpdate?.Invoke(ex.Message);
         }
     }
 }
Example #2
0
        /// <summary>
        /// Инициализация источника питания
        /// </summary>
        void InitDC()
        {
            try
            {
                iviDCPower = IviDCPwr.Create(DC_DeviceName, true, true);
                iviDCPower.DriverOperation.Warning += DriverOperationDC_Warning;

                //iviDCPower.Outputs["0"].OvpEnabled = true;
                ConfigureChannelName();
                ConfigureCurrentlimitBehavior();
                StatusDCUpdate?.Invoke("SUCCESS");
                //bOnOff1 = true;
                bInitialized = true;


                thrDC = new Thread(updateDCProcessing);
                thrDC.Start();
            }
            catch (Exception ex)
            {
                StatusDCUpdate?.Invoke(ex.Message);
            }
        }
 public void InitAdapter()
 {
     DCPwr = (IIviDCPwr)IviDriver.Create("AgE36xx", true, true, "Simulate=1,RangeCheck=1,QueryInstrStatus=0,Cache=1");
 }
 public void InitAdapter()
 {
     DCPwr = (IIviDCPwr)IviDriver.Create("AgE36xx", true, true, "Simulate=1,RangeCheck=1,QueryInstrStatus=0,Cache=1");
 }