コード例 #1
0
        //****************************************//
        //          Main Test Process             //
        //****************************************//

        /// <summary>
        /// The test sequences for trackpad
        /// </summary>
        /// <param name="ob"></param>The testwell class
        private void testProcess(object ob)
        {
            TestWell testWell = (TestWell)ob;

            testWell.Initialize();

            if (testWell.ReadMicroSwitch())
            {
                Show_Test_Result(testWell, false);  //clear test result

                Thread.Sleep(DelayTime.MICRO_SWITCH_ON);
                SetListBoxStatus("Well Closed");

                testWell.PneumaticOn();
                Thread.Sleep(DelayTime.PNEUMATIC_ON);

                if ((DeviceConfig.Items.trackpad_ShopFloor == DeviceConfig.TPCONFIG.TP_TEST_ONLINE) && testWell.PortEnalbes != 0)
                {
                    SetListBoxStatus("***********Check Permission*************");
                    if (!testWell.CheckTestPermission())
                    {
                        Set_StatusBox(textBoxWellAStatus, "Fail to connect SFCS", Color.Red);
                        testWellARunning = false;
                        testWell.PneumaticOff();
                        return;
                    }
                    Show_Test_Result(testWell, false);
                }
                if (testWell.PortEnalbes != 0)
                {
                    SetListBoxStatus("*************IDD Testing***************");
                    testWell.IDDTest(false);
                    Show_Test_Result(testWell, false);
                }
                //if (testWell.PortEnalbes != 0)
                //{
                //    SetListBoxStatus("*********Programming Prod Code*********");
                //    testWell.ProgrammingIC(1);
                //    Show_Test_Result(testWell, false);
                //}

                if (testWell.PortEnalbes != 0)
                {
                    SetListBoxStatus("*************Deep Sleep Testing***********");
                    testWell.DeepSleepCurrentTest();
                    Show_Test_Result(testWell, false);
                }

                //if (testWell.PortEnalbes != 0)
                //{
                //    SetListBoxStatus("*************IDD Testing***************");
                //    testWell.IDDTest(true);
                //    Show_Test_Result(testWell, false);
                //}
                if (testWell.PortEnalbes != 0)
                {
                    SetListBoxStatus("**********Enter Test Mode************");
                    testWell.EnterIntoTestMode();
                }
                if (testWell.PortEnalbes != 0)
                {
                    SetListBoxStatus("**********Fimware Rev Check************");
                    testWell.I2CFWRevCheck();
                    Show_Test_Result(testWell, false);
                }
                if (testWell.PortEnalbes != 0)
                {
                    SetListBoxStatus("**********Row Count Testing**********");
                    testWell.I2CRowCountTest();
                    Show_Test_Result(testWell, false);
                }
                if (testWell.PortEnalbes != 0)
                {
                    SetListBoxStatus("*************IDAC Testing**************");
                    testWell.I2CIDACTest();
                    Show_Test_Result(testWell, false);
                }



                //if (testWell.PortEnalbes != 0)
                //{
                //    SetListBoxStatus("*********Programming Prod Code*********");
                //    testWell.ProgrammingIC(1);
                //    Show_Test_Result(testWell, false);
                //}
                if (testWell.PortEnalbes != 0)
                {
                    SetListBoxStatus("**********Exit Test Mode************");
                    testWell.ExitTestMode();
                }
                if ((DeviceConfig.Items.trackpad_ShopFloor == DeviceConfig.TPCONFIG.TP_TEST_ONLINE))
                {
                    SetListBoxStatus("*********Upload Test Results***********");
                    if (!testWell.UploadTestRecord())
                    {
                        Set_StatusBox(textBoxWellAStatus, "Fail to connect SFCS", Color.Red);
                        testWellARunning = false;
                        testWell.PneumaticOff();
                        return;
                    }
                }
                Show_Test_Result(testWell, true);

                testWell.TestLog();

                //cacalute pass/fail count
                double currentTested = 0;
                double currentFailed = 0;
                foreach (DUT dut in testWell.DUTArray)
                {
                    if (dut.ErrorCode != 0)
                    {
                        currentFailed++;
                    }
                    currentTested++;
                }
                totalTestedNumber += currentTested;
                totalFailedNumber += currentFailed;
                yieldRate          = (totalTestedNumber - totalFailedNumber) / totalTestedNumber;
                SetManufacturingSummary();

                //release fixture lock.
                testWell.PneumaticOff();

                //set status box
                if (currentFailed != 0)
                {
                    Set_StatusBox(textBoxWellAStatus, "Total Failed:" + currentFailed.ToString(), Color.Red);
                }
                else
                {
                    Set_StatusBox(textBoxWellAStatus, "PASS", Color.Green);
                }

                testWellARunning = false;
                Set_TextBox(textBoxSNA, "");    //clear serial number of wellA, get focused.
            }
        }