Example #1
0
        public bool IsJigClosed()
        {
            bool retCode = false;

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

            return(retCode);
        }
Example #2
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.");
                }
            }
        }