private bool SelectCH_SWA(string CH) { if (CH == "OFF") { channelClosed = true; } else if (CH == "CH1") { SW_A.SetRelayWellA(1, 0); channelClosed = false; } else if (CH == "CH2") { SW_A.SetRelayWellA(2, 0); channelClosed = false; } else if (CH == "CH3") { SW_A.SetRelayWellA(4, 0); channelClosed = false; } else if (CH == "CH4") { SW_A.SetRelayWellA(8, 0); channelClosed = false; } else if (CH == "CH5") { SW_A.SetRelayWellA(0, 1); channelClosed = false; } else if (CH == "CH6") { SW_A.SetRelayWellA(0, 2); channelClosed = false; } else if (CH == "CH7") { SW_A.SetRelayWellA(0, 4); channelClosed = false; } else if (CH == "CH8") { SW_A.SetRelayWellA(0, 8); channelClosed = false; } else { channelClosed = true; } return(channelClosed); }
//****************************************// // Current Test // //****************************************// /// <summary> /// Trackpad current test; /// </summary> /// <param name="workingCurrentTest"></param> true for trapckpad current test with production code; false for short and open test. public void IDDTest(bool workingCurrentTest) { byte relayNum = 0x01; m_Agilent.De_ActivateChannelOutput(AGILENT_POWER_CHANNEL1); //power off m_Agilent.De_ActivateChannelOutput(AGILENT_POWER_CHANNEL2); for (byte i = 0; i < 4; i++) { if (currWell == 1) { m_Agilent.SetRelayWellA(relayNum, relayNum); //close relay one by one from DUT1 to DUT4, } // DUT5 to DUT8. else { m_Agilent.SetRelayWellB(relayNum, relayNum); } m_Agilent.ActivateChannelOutput(AGILENT_POWER_CHANNEL1); //power on channel 1 m_DUTArray[i].IDDValue = m_Agilent.MeasureChannelCurrent(AGILENT_POWER_CHANNEL1) * 1000; //measure IDD DUT1 to DUT4 m_Agilent.De_ActivateChannelOutput(AGILENT_POWER_CHANNEL1); m_Agilent.ActivateChannelOutput(AGILENT_POWER_CHANNEL2); //power on channel 2 m_DUTArray[i + 4].IDDValue = m_Agilent.MeasureChannelCurrent(AGILENT_POWER_CHANNEL2) * 1000; //measure IDD DUT5 to DUT8 m_Agilent.De_ActivateChannelOutput(AGILENT_POWER_CHANNEL2); relayNum <<= 1; } PowerOFF(); foreach (DUT dut in m_DUTArray) //Check Test Result { double MaxLimit, MinLimit; if (!workingCurrentTest) { MaxLimit = DeviceConfig.Items.IDD_SHORT; MinLimit = DeviceConfig.Items.IDD_OPEN; } else { MaxLimit = DeviceConfig.Items.IDD_MAX; MinLimit = DeviceConfig.Items.IDD_MIN; } if (dut.IDDValue <= MinLimit) //Check for low current condition { if (dut.ErrorCode == 0) { dut.ErrorCode = DeviceConfig.ErrorCode.ERROR_IDD_LOW; } } if (dut.IDDValue >= MaxLimit) //Check for high current condition { if (dut.ErrorCode == 0) { dut.ErrorCode = DeviceConfig.ErrorCode.ERROR_IDD_HIGH; } } } UpdateDUT_Enables(); }