Example #1
0
        public void setOutputVoltage()
        {
            runing = true;


            //buttonCh1Output.Text = "Power off";
            //textBoxIndicator.Text = "Power on";
            int jj = Convert.ToInt32(textBoxCycles.Text);

            jj++;
            for (int i = 0; i < Convert.ToInt32(textBoxCycles.Text); i++)
            {
                agilentDevice.ActivateChannelOutput(1);
                int delay = Convert.ToInt32(textBoxIntervalOn.Text);
                System.Threading.Thread.Sleep(delay);
                agilentDevice.De_ActivateChannelOutput(1);
                System.Threading.Thread.Sleep(delay);
            }



            agilentDevice.De_ActivateChannelOutput(1);

            // buttonCh1Output.Text = "Power on";
            //textBoxIndicator.Text = "Power off";
            SetButton(true);

            runing = false;
            // buttonCh1Output_Click(null,null);
        }
Example #2
0
        public void testDUT()
        {
            if (instrument_initiated == false)
            {
                //MessageBox.Show("Instruments not initiated", "Error:", MessageBoxButtons.OK, MessageBoxIcon.Error);
                //return;
                if (partType == "11500400")
                {
                    Init_Bridge();
                    try
                    {
                        agilentDevice.InitializeU2722A(Config.U2722_ADDRESS);
                        instrument_initiated = true;
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message, "Error:", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        dut.ErrorCode = ErrorCode.EEROR_SYSTEM_ERROR;
                        return;
                    }
                }
                if (partType == "11500500")
                {
                    try
                    {
                        agilentDevice.InitializeU2722A(Config.U2722_ADDRESS);
                        instrument_initiated = true;
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message, "Error:", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        dut.ErrorCode = ErrorCode.EEROR_SYSTEM_ERROR;
                        return;
                    }
                }
            }
            if (partType == "11500400")
            {
                SetListBoxStatus("Optics POD Test");
                //LED test
                // “Testing/reading LED current consumption:”
                SetListBoxStatus("Testing/reading LED current consumption:");
                agilentDevice.SetChannelVoltage(LED_Volt, LED_Channal);
                agilentDevice.ActivateChannelOutput(LED_Channal);
                System.Threading.Thread.Sleep(LED_Delay);

                List <double> CurrentLED = new List <double>();
                for (byte j = 0; j < 5; j++)
                {
                    CurrentLED.Add(agilentDevice.MeasureChannelCurrent(LED_Channal) * 1000);
                    System.Threading.Thread.Sleep(LED_Delay);
                    SetListBoxStatus(CurrentLED[j].ToString());
                }
                agilentDevice.De_ActivateChannelOutput(LED_Channal);
                dut.LED = CurrentLED.Average();
                if (dut.LED < Config.LED_MIN)
                {
                    dut.ErrorCode = ErrorCode.ERROR_LED_LOW;
                }
                else if (dut.LED > Config.LED_MAX)
                {
                    dut.ErrorCode = ErrorCode.ERROR_LED_HIGH;
                }



                //ALS test

                try
                { BridgePowerOff(); }  //try to stop the bridge if it's in use.
                catch
                {
                    dut.ErrorCode = ErrorCode.ERROR_NO_TRACKPAD_IN_SLOT;
                }
                try
                {
                    SetListBoxStatus("Testing/reading ALS output in dark environment:");
                    BridgePowerOn();
                    System.Threading.Thread.Sleep(ALS_Delay);
                    bridge.Write(0xEC);
                    agilentDevice.De_ActivateChannelOutput(ALS_Channal);
                    System.Threading.Thread.Sleep(ALS_Delay);
                    byte[] dataOff = bridge.Read(2);
                    dut.ALS_dark = Convert.ToInt32(Convert.ToInt32(dataOff[0]) * 256 + Convert.ToInt32(dataOff[1]));
                    SetListBoxStatus(dut.ALS_dark.ToString());

                    SetListBoxStatus("Testing/reading ALS output with LED illumination");
                    agilentDevice.SetChannelVoltage(ALS_Volt, ALS_Channal);
                    agilentDevice.ActivateChannelOutput(ALS_Channal);
                    System.Threading.Thread.Sleep(ALS_Delay * 2);
                    byte[] dataOn = bridge.Read(2);
                    agilentDevice.De_ActivateChannelOutput(ALS_Channal);
                    dut.ALS_light = Convert.ToInt32(Convert.ToInt32(dataOn[0]) * 256 + Convert.ToInt32(dataOn[1]));
                    SetListBoxStatus(dut.ALS_light.ToString());
                    //dut.ALS=

                    if (dataOff.Count() == 2 && dataOn.Count() == 2)
                    {
                        if (dut.ALS_dark > Config.ALS_DARK)
                        {
                            dut.ErrorCode = ErrorCode.ERROR_ALS_HIGH;
                        }
                        if (dut.ALS_light < Config.ALS_LIGHT)
                        {
                            dut.ErrorCode = ErrorCode.ERROR_ALS_LOW;
                        }
                    }
                    else
                    {
                        dut.ErrorCode = ErrorCode.ERROR_NO_ALS;
                    }
                }
                catch
                {
                    dut.ErrorCode = ErrorCode.ERROR_NO_TRACKPAD_IN_SLOT;
                }
                finally
                {
                    BridgePowerOff();
                }
            }
            if (partType == "11500500")
            {
                try
                {
                    SetListBoxStatus("Main POD Test");
                    SetListBoxStatus("Testing/reading Thermal Resistor values(KOhm)");
                    agilentDevice.SetChannelVoltage(RES_Volt, RES_Channal);
                    agilentDevice.ActivateChannelOutput(RES_Channal);
                    System.Threading.Thread.Sleep(RES_Delay);

                    List <double> CurrentR = new List <double>();
                    for (byte j = 0; j < 5; j++)
                    {
                        CurrentR.Add(agilentDevice.MeasureChannelCurrent(RES_Channal) * 1000);
                        System.Threading.Thread.Sleep(RES_Delay);
                        SetListBoxStatus(Convert.ToString(RES_Volt / CurrentR[j] - 10));//use 12 in IQC fixture in US Jabil
                    }
                    agilentDevice.De_ActivateChannelOutput(RES_Channal);
                    dut.Resistor = Convert.ToInt32(RES_Volt / CurrentR.Average() - 10);//use 12 in IQC fixture in US Jabil
                    if (dut.Resistor < Config.RESISTOR_MIN)
                    {
                        dut.ErrorCode = ErrorCode.ERROR_RES_LOW;
                    }
                    else if (dut.Resistor > Config.RESISTOR_MAX)
                    {
                        dut.ErrorCode = ErrorCode.ERROR_RES_HIGH;
                    }
                }
                catch (Exception ex)
                {
                    dut.ErrorCode = ErrorCode.ERROR_NO_TRACKPAD_IN_SLOT;
                }
                System.Threading.Thread.Sleep(200);
            }
            if (checkBoxCallMTK.Checked)
            {
                CallMTK();
            }
        }
Example #3
0
        //****************************************//
        //              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();
        }