Пример #1
0
        public double ReadChargerCurrent()
        {
            double charger = 0;

            charger = CItemListEquip.MeasPS2Current();
            Thread.Sleep(200);

            return(Convert.ToDouble(charger.ToString("N7")));
        }
Пример #2
0
        public double ReadBattery()
        {
            double battery = 0;

            battery = CItemListEquip.MeasPS1Current();
            Thread.Sleep(200);

            return(Convert.ToDouble(battery.ToString("N7")));
        }
Пример #3
0
        public bool IsJigClosed()
        {
            bool retCode = false;

            if (CItemListEquip.IsOpenJigEnable() != TestCoreMessages.SUCCESS)// if == 1 that is, Jig Closed
            {
                retCode = true;
            }

            return(retCode);
        }
Пример #4
0
 public void PowerOn()
 {
     if (File.Exists(".\\station.ini"))
     {
         CItemListEquip.LoadBZConfig();
         CheckReturn(CItemListEquip.InitItemListEquip());// Check GPIB conections etc..
         CheckReturn(CJagLocalFucntions.EntryHandlerTest());
     }
     else
     {
         throw new RackException("Can not find station.ini file.");
     }
 }
Пример #5
0
        public void CloseJig()
        {
            if (CItemListEquip.IsOpenJigEnable() == 1)
            {
                int    nStatus        = -1;
                double dVoltage       = 999;
                int    nCloseJigCount = 0;

                nStatus = CI2cControl.SendI2cCommand("DVM1_CHARLES_CLOSE");
                CheckReturn(nStatus);
                Thread.Sleep(200);

                if (nStatus == 0)
                {
                    nStatus = tcc.Andon.SetState(Andon.State.ON);
                    CheckReturn(nStatus);
                }

                if (nStatus == 0)
                {
                    while (dVoltage > 2 && nCloseJigCount < 10)
                    {
                        dVoltage = CItemListEquip.ReadDVM1Voltage();
                        nCloseJigCount++;
                    }
                }

                nStatus = CI2cControl.SendI2cCommand("DVM1_CHARLES_OPEN");
                CheckReturn(nStatus);

                if (nStatus == 0)
                {
                    nStatus = tcc.Andon.SetState(Andon.State.OFF);
                    CheckReturn(nStatus);
                }

                if (dVoltage > 2)
                {
                    throw new JigException("Fail to close Jig.");
                }
            }
        }
Пример #6
0
        public void OpenJig()
        {
            int nStatus = 0;

            if (IsJigClosed())// if == 1 that is, Jig Closed
            {
                double dVoltage = -999;
                int    Count    = 0;

                nStatus = CI2cControl.SendI2cCommand("DVM1_CHARLES_CLOSE");
                CheckReturn(nStatus);
                Thread.Sleep(200);

                if (nStatus == 0)
                {
                    nStatus = tcc.Andon.SetState(Andon.State.ON);
                    CheckReturn(nStatus);
                }

                if (nStatus == 0)
                {
                    while (dVoltage < 2) //&& Count < 3)
                    {
                        dVoltage = CItemListEquip.ReadDVM1Voltage();
                        Thread.Sleep(1000);
                        Count++;
                    }
                }

                nStatus = CI2cControl.SendI2cCommand("DVM1_CHARLES_OPEN");

                if (nStatus == 0)
                {
                    nStatus = tcc.Andon.SetState(Andon.State.OFF);//CI2cControl.SendI2cCommand("FAIL_LAMP_OFF");
                    CheckReturn(nStatus);
                }
            }
        }
Пример #7
0
        public double ReadDVM1Voltage()
        {
            double retCode = CItemListEquip.ReadDVM1Voltage();

            return(Convert.ToDouble(retCode.ToString("N7")));
        }