//****************************************// // User Interface // //****************************************// private void Show_Test_Result(TestWell tW, bool testFinished) { if (tW.CurrWell == 1) { //testWellARunning = !testFinished; int i = 0; foreach (TextBox tb in dutTextBoxWellA) { int errorCode = tW.DUTArray[i].ErrorCode; SetDUTTextBox(tb, errorCode, testFinished); i++; } } else { //testWellBRunning = !testFinished; int i = 0; foreach (TextBox tb in dutTextBoxWellB) { int errorCode = tW.DUTArray[i].ErrorCode; SetDUTTextBox(tb, errorCode, testFinished); i++; } } }
//private void tabControlMain_SelectedIndexChanged(object sender, EventArgs e) //{ // if (tabControlMain.SelectedIndex != 2) // { // labelDeviceSettingStatus.Text = ""; // } //} private void textBoxSNA_TextChanged(object sender, EventArgs e) { if (textBoxSNA.Text.Length == SERIAL_NUMBER_LENGTH) { string serialNumber = textBoxSNA.Text; //Go to Produciton Mode First. if (toolStripMenuItemEMode.Checked) { toolStripMenuItemEMode.CheckState = CheckState.Unchecked; toolStripMenuItemPMode.CheckState = CheckState.Checked; } //Check test parameter setting DeviceConfig.partType = serialNumber.Substring(0, PARTNUMBER_LENGTH); //DeviceConfig.filePath = Application.StartupPath + "\\Production.ini"; if (!DeviceConfig.Read()) { MessageBox.Show("Cannot find " + DeviceConfig.partType.ToString() + " in Production.ini", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Set_TextBox(textBoxMPNA, ""); Set_TextBox(textBoxSNA, ""); return; } //Check test hardware if (!testHardwareReady) { MessageBox.Show("Hardware is not ready, check hardware config", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Set_TextBox(textBoxMPNA, ""); Set_TextBox(textBoxSNA, ""); SettingLoad(); return; } if (checkBoxWellA.Checked && !testWellARunning && !testWellBRunning) { testWellARunning = true; Set_StatusBox(textBoxWellAStatus, "", Color.White); Set_TextBox(textBoxMPNA, DeviceConfig.partType); Set_TextBox(textBoxSNA, serialNumber.Substring(PARTNUMBER_LENGTH + 1, (SERIAL_NUMBER_LENGTH - PARTNUMBER_LENGTH - 1))); SettingLoad(); testWellA = new TestWell(agilentDevice, mpqDevice, 1, serialNumber); Thread testThread1 = new Thread(testProcess); testThread1.Start(testWellA); } else { MessageBox.Show("Well A is not selected or in testing...", "Error:", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
//private void tabControlMain_SelectedIndexChanged(object sender, EventArgs e) //{ // if (tabControlMain.SelectedIndex != 2) // { // labelDeviceSettingStatus.Text = ""; // } //} private void textBoxSNA_TextChanged(object sender, EventArgs e) { if (textBoxSNA.Text.Length == SERIAL_NUMBER_LENGTH) { string serialNumber = textBoxSNA.Text; //Go to Produciton Mode First. if (toolStripMenuItemEMode.Checked) { toolStripMenuItemEMode.CheckState = CheckState.Unchecked; toolStripMenuItemPMode.CheckState = CheckState.Checked; } //Check test parameter setting DeviceConfig.partType = serialNumber.Substring(0, PARTNUMBER_LENGTH); //DeviceConfig.filePath = Application.StartupPath + "\\Production.ini"; if (!DeviceConfig.Read()) { MessageBox.Show("Cannot find " + DeviceConfig.partType.ToString() + " in Production.ini", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Set_TextBox(textBoxMPNA, ""); Set_TextBox(textBoxSNA, ""); return; } //Check test hardware if (!testHardwareReady) { MessageBox.Show("Hardware is not ready, check hardware config", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Set_TextBox(textBoxMPNA, ""); Set_TextBox(textBoxSNA, ""); //SettingLoad(); return; } if (!testWellARunning) { testWellARunning = true; Set_StatusBox(textBoxWellAStatus, "", Color.White); Set_TextBox(textBoxMPNA, DeviceConfig.partType); Set_TextBox(textBoxSNA, serialNumber.Substring(PARTNUMBER_LENGTH + 1, (SERIAL_NUMBER_LENGTH - PARTNUMBER_LENGTH-1))); //SettingLoad(); testWellA = new TestWell(agilentDevice, mpqDevice, serialNumber); Thread testThread1 = new Thread(testProcess); testThread1.Start(testWellA); } else MessageBox.Show("Current Well is in testing...", "Error:", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
//****************************************// // User Interface // //****************************************// private void Show_Test_Result(TestWell tW, bool testFinished) { //testWellARunning = !testFinished; int i = 0; foreach (TextBox tb in dutTextBoxWellA) { int errorCode = tW.DUTArray[i].ErrorCode; SetDUTTextBox(tb, errorCode, testFinished); i++; } }
//****************************************// // 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(300); SetListBoxStatus("Well Closed"); testWell.PneumaticOn(); Thread.Sleep(300); if (SFCS_Online && testWell.PortEnalbes != 0) { SetListBoxStatus("***********Check Permission*************"); if (!testWell.CheckTestPermission()) { 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("*************Switch Testing**************"); // testWell.I2CSwitchTest(); // Show_Test_Result(testWell, false); //} if (testWell.PortEnalbes != 0) { SetListBoxStatus("**********Fimware Rev Check************"); testWell.I2CFWRevCheck(); Show_Test_Result(testWell, false); } if (testWell.PortEnalbes != 0) { SetListBoxStatus("**********Row Count X*Y Testing**********"); testWell.I2CRowCountTest(); 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("*************IDD Testing***************"); testWell.IDDTest(true); Show_Test_Result(testWell, false); } if (testWell.PortEnalbes != 0) { SetListBoxStatus("*************IDAC Testing**************"); testWell.I2CIDACTest(); if (SFCS_Online) { Show_Test_Result(testWell, false); } else { Show_Test_Result(testWell, true); } } if (SFCS_Online) { SetListBoxStatus("*********Upload Test Results***********"); if (!testWell.UploadTestRecord()) { testWell.PneumaticOff(); return; } Show_Test_Result(testWell, true); } testWell.TestLog(); //cacalute pass/fail count int currentTested = 0; int 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(); if (testWell.CurrWell == 1) { //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. } else { //set status box if (currentFailed != 0) { Set_StatusBox(textBoxWellBStatus, "Total Failed:" + currentFailed.ToString(), Color.Red); } else { Set_StatusBox(textBoxWellBStatus, "PASS", Color.Green); } testWellBRunning = false; Set_TextBox(textBoxSNB, ""); //clear serial number of wellB, get focused. } } }
//****************************************// // 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. } }