Beispiel #1
0
        private void textBoxSerialNumber_TextChanged(object sender, EventArgs e)
        {
            if (textBoxSN.Text.Length == Config.SERIAL_NUMBER_LENGTH)
            {
                serialNumber = textBoxSN.Text;
                string partType   = serialNumber.Substring(0, Config.PARTNUMBER_LENGTH);
                string identifier = serialNumber.Substring(Config.PARTNUMBER_LENGTH, (Config.SERIAL_NUMBER_LENGTH - Config.PARTNUMBER_LENGTH));

                serialNumber = partType + identifier;

                if (validateSerialNumber(serialNumber))
                {
                    textBoxSN.Text  = identifier;
                    textBoxMPN.Text = partType;

                    serialNumberScanned = true;

                    dut = new DUT();
                    dut.SerailNumber = serialNumber;

                    SetTextBoxSleepResult("", Color.White);
                    SetTextBoxDeepSleepResult("", Color.White);
                    sleep1_test_done    = false;
                    deepsleep_test_done = false;
                }
                else
                {
                    MessageBox.Show("invalid serial number", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    textBoxSN.Text  = "";
                    textBoxMPN.Text = "";

                    serialNumberScanned = false;
                }
            }
        }
Beispiel #2
0
        private void mm_fucntion_ResultEvent(object sender, MMResultEventArgs e)
        {
            if (e.Status == 1)
            {
                sleep1_test_done   = true;
                dut.IDDValue_Sleep = e.Average;

                SetListBoxStatus(false, "Sleep1 Current:" + e.Average.ToString() + "uA");
                if (e.Result)
                {
                    SetTextBoxSleepResult("PASS", Color.Green);
                    //Log.info("[" + serialNumber + "]" + "Sleep1 PASS:\t\t\t" + e.Average.ToString() + "uA");
                }
                else
                {
                    SetTextBoxSleepResult("FAIL", Color.Red);
                    //Log.info("[" + serialNumber + "]" + "Sleep1 FAIL:\t\t\t" + e.Average.ToString() + "uA");
                    dut.ErrorCode += ErrorCode.ERROR_IDD_HIGH;

                    //No need to test the deep sleep.
                    deepsleep_test_done = true;
                }
            }

            if (e.Status == 2)
            {
                deepsleep_test_done    = true;
                dut.IDDValue_DeepSleep = e.Average;

                SetListBoxStatus(false, "Deep Sleep Current:" + e.Average.ToString() + "uA");
                if (e.Result)
                {
                    SetTextBoxDeepSleepResult("PASS", Color.Green);
                    //Log.info("[" + serialNumber + "]" + "Deep Sleep PASS:\t\t" + e.Average.ToString() + "uA");
                }
                else
                {
                    SetTextBoxDeepSleepResult("FAIL", Color.Red);
                    //Log.info("[" + serialNumber + "]" + "Deep Sleep FAIL:\t\t" + e.Average.ToString() + "uA");
                    dut.ErrorCode += ErrorCode.ERROR_IDD_LOW;

                    //No need to test the sleep1.
                    sleep1_test_done = true;
                }
            }

            tp_thread.en_queue(STATE.states.TP_PowerOff);

            if (sleep1_test_done && deepsleep_test_done)
            {
                serialNumberScanned = false;
                SetTxtBoxSN("");

                WriteTestReport();

                dut = null;
            }
        }
Beispiel #3
0
        /// <summary>
        /// Constructor of TestFunction
        /// </summary>
        /// <param name="serialNumber"></param>
        /// <param name="UsbBridge"></param>
        public TestFunction(string serialNumber, USB_I2C UsbBridge, TrackpadConfig trackpadConfig, string testStation)
        {
            dut = new DUT();
            dut.SerailNumber = serialNumber;
            dut.RawCount     = new List <int>();
            dut.RawCountX    = new List <int>();
            dut.RawCountY    = new List <int>();
            dut.Noise        = new List <int>();
            dut.StdDev       = new List <double>();

            dut.IDAC        = new List <int>();
            dut.Global_IDAC = new List <int>();
            dut.IDACGain    = new List <byte>();
            dut.IDAC_Erased = new List <int>();
            dut.Local_IDAC  = new List <int>();

            dut.Signal = new List <int>();
            dut.SNR    = new List <double>();

            dut.RawCount_Single  = new List <int>();
            dut.Signal_Single    = new List <int>();
            dut.Finger_Positions = new List <Point>();

            m_TPCONFIG = trackpadConfig;

            if (testStation == "TMT")
            {
                m_TPCONFIGtestItems = m_TPCONFIG.TMT;
            }
            if (testStation == "OQC")
            {
                m_TPCONFIGtestItems = m_TPCONFIG.OQC;
            }
            if (testStation == "TPT")
            {
                m_TPCONFIGtestItems = m_TPCONFIG.TPT;
            }

            NUM_COLS       = m_TPCONFIGtestItems.FW_INFO_NUM_COLS;
            NUM_ROWS       = m_TPCONFIGtestItems.FW_INFO_NUM_ROWS;
            RAW_DATA_READS = m_TPCONFIGtestItems.RAW_DATA_READS;

            bridge = UsbBridge;
            bridge.DeviceAddress = m_TPCONFIG.I2C_ADDRESS;

            VDD_DEFAULT = Convert.ToString(m_TPCONFIG.VDD_OP_PS);
            if (m_TPCONFIG.TRACKPAD_PLATFORM == TPCONFIG.TP_FUNCTION_APA)
            {
                I2CReadDelay = DelayTime.I2C_MS / 2;
            }
            else
            {
                I2CReadDelay = DelayTime.I2C_MS;
            }
        }
Beispiel #4
0
        public NewF2KBoard(AltiumParser.AltiumParser parser)
        {
            Board         = parser;
            ActiveChanels = new List <Chanel>();
            FreeChanels   = new List <ConnectionUnion>();
            BlackBoxes    = new List <BlackBox>();
            GetActiveChanels();

            DUT = DeterminateDut();
            GetBlackBoxes();
            Connections = new List <ConnectionUnion>();
            Connections = GetConnections();
        }
Beispiel #5
0
 private void btnCon_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         //DUT TRDut = SystemHardware.Hardware<DUT>.GetElmentByName("RackSys.TestLab.Instrument.DUT1");
         //DutInfo.InstrumentTypeID = InstrumentType.;
         CurCtrlDut        = DUT.Connect(DutInfo.IpAddress);
         DoTest.CurCtrlDut = CurCtrlDut;
     }
     catch (Exception ex)
     {
         System.Windows.Forms.MessageBox.Show(ex.ToString());
     }
 }
Beispiel #6
0
        public bool bBuildEquipmentList()
        {
            DutStruct[]    MyDutManufactureCoefficientsStructArray;
            DriverStruct[] MyManufactureChipsetStructArray;
            int            i = 0;

            try
            {
                if (MyEquipList != null)
                {
                    MyEquipList.Clear();
                }
                pDut             = (DUT)MyEquipmentManage.Createobject(ProductionTypeName.ToUpper() + "DUT");
                pDut.deviceIndex = 0;
                MyDutManufactureCoefficientsStructArray = GetDutManufactureCoefficients();
                MyManufactureChipsetStructArray         = GetManufactureChipsetControl();

                pDut.Initialize(MyDutManufactureCoefficientsStructArray, MyManufactureChipsetStructArray, StrAuxAttribles);

                for (i = 0; i < EquipmenNameArray.Count; i++)
                {
                    TestModeEquipmentParameters[] CurrentEquipmentStruct = GetCurrentEquipmentInf(EquipmenNameArray.Values[i].ToString());
                    string[] List = EquipmenNameArray.Keys[i].ToString().Split('_');
                    string   CurrentEquipmentName = List[0];
                    string   CurrentEquipmentID   = List[1];
                    string   CurrentEquipmentType = List[2];

                    MyEquipList.Add(EquipmenNameArray.Keys[i].ToString(), (EquipmentBase)MyEquipmentManage.Createobject(CurrentEquipmentName));
                    if (!MyEquipList[EquipmenNameArray.Keys[i].ToString()].Initialize(CurrentEquipmentStruct))
                    {
                        return(false);
                    }
                    if (!MyEquipList[EquipmenNameArray.Keys[i].ToString()].Configure())
                    {
                        return(false);
                    }
                }
                pEnvironmentcontroll = new EnvironmentalControll(pDut);
                return(true);
            }
            catch (Exception EX)
            {
                MessageBox.Show(EX.Message);
                return(false);
            }
        } //建立Equipmen List
Beispiel #7
0
        public DUT DeterminateDut()
        {
            var connectionCounters = new  List <ConnectionCounter>();

            foreach (var component in Board.Components)
            {
                if (!(component.DesignItemId.Contains("FORMULA-256") || component.DesignItemId.Contains("FORMULA256") || component.SourceLibraryName.Contains("KONT_TOCH")))
                {
                    connectionCounters.Add(new ConnectionCounter(component));

                    foreach (var pin in component.PinList)
                    {
                        var connection = "";

                        if (pin.ConnectedNets.Count != 0)
                        {
                            connection = pin.ConnectedNets.ElementAt(0).Text.ToUpper();
                        }
                        else
                        {
                            if (pin.ConnectedPorts.Count != 0)
                            {
                                connection = pin.ConnectedPorts.ElementAt(0).Name.ToUpper();
                            }
                        }

                        if (ActiveChanels.Exists(x => x.ConnectionName == connection))
                        {
                            connectionCounters.Single(x => x.Component == component).Count++;
                        }
                    }
                }
            }

            var resulresultlist   = connectionCounters.OrderByDescending(x => x.Count).ToList();
            var combinedComponent = CombineMultyPartComponent(resulresultlist.ElementAt(0).Component.Designator.Text);
            var result            = new DUT(combinedComponent);

            return(result);
        }
Beispiel #8
0
        private void textBoxSN_TextChanged(object sender, EventArgs e)
        {
            if (textBoxSN.Text.Length == Config.SERIAL_NUMBER_LENGTH)
            {
                dut = new DUT();
                serialNumber = textBoxSN.Text;
                partType = serialNumber.Substring(0, Config.PARTNUMBER_LENGTH);
                string identifier = serialNumber.Substring(Config.PARTNUMBER_LENGTH, (Config.SERIAL_NUMBER_LENGTH - Config.PARTNUMBER_LENGTH));

                serialNumber = partType + identifier;

                textBoxSN.Text = identifier;
                textBoxMPN.Text = partType;

                serialNumberScanned = true;
                dut.SerailNumber = serialNumber;
                buttonStart.Enabled = true;
                //StartTest();
                //buttonStart.Focus();
            }
        }
Beispiel #9
0
        /// <summary>
        /// The StateMachine EVENT of class MultiMeter
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void mm_fucntion_STEvent(object sender, StateMachineEventArgs e)
        {
            //Multi-Meter Init
            if (e.CurrentState == STATE.states.initialize)
            {
                if (e.PassOrFail)
                {
                    mm_ready = true;
                    if (tp_ready)
                    {
                        EnableButtonConnect(false);
                        EnableButtonSleep(true);
                        EnableButtonDeepSleep(true);
                    }
                }
            }

            //Multi-Meter Exit
            if (e.CurrentState == STATE.states.exit)
            {
                if (tp_ready)
                {
                    try
                    {
                        EnableButtonConnect(true);
                        EnableButtonSleep(false);
                        EnableButtonDeepSleep(false);

                        serialNumberScanned = false;
                        SetTxtBoxSN("");

                        tp_thread.exit();
                    }
                    catch { }
                }


                mm_fucntion = null;
                mm_thread   = null;
                mm_ready    = false;
            }

            //sleep1 current
            if (e.CurrentState == STATE.states.MM_CalcSleep1Curr)
            {
                sleep1_test_done   = true;
                dut.IDDValue_Sleep = Convert.ToDouble(e.Message);

                SetListBoxStatus(false, "Sleep1 Current:" + e.Message + "uA");
                if (e.PassOrFail)
                {
                    SetTextBoxSleepResult("PASS", Color.Green);
                    //Log.info("[" + serialNumber + "]" + "Sleep1 PASS:\t\t\t" + e.Average.ToString() + "uA");
                }
                else
                {
                    SetTextBoxSleepResult("FAIL", Color.Red);
                    //Log.info("[" + serialNumber + "]" + "Sleep1 FAIL:\t\t\t" + e.Average.ToString() + "uA");

                    if (dut.ErrorCode == 0)
                    {
                        dut.ErrorCode += ErrorCode.ERROR_IDD_HIGH;
                    }

                    //No need to test the deep sleep.
                    deepsleep_test_done = true;
                }

                tp_thread.en_queue(STATE.states.TP_PowerOff);

                if (sleep1_test_done && deepsleep_test_done)
                {
                    serialNumberScanned = false;
                    SetTxtBoxSN("");

                    WriteTestReport();

                    if (Config.ONLINE)
                    {
                        UploadResult();
                    }

                    dut = null;
                }
            }

            //deep sleep current
            if (e.CurrentState == STATE.states.MM_CalcDeepSleepCurr)
            {
                deepsleep_test_done    = true;
                dut.IDDValue_DeepSleep = Convert.ToDouble(e.Message);

                SetListBoxStatus(false, "Deep Sleep Current:" + e.Message + "uA");
                if (e.PassOrFail)
                {
                    SetTextBoxDeepSleepResult("PASS", Color.Green);
                    //Log.info("[" + serialNumber + "]" + "Deep Sleep PASS:\t\t" + e.Average.ToString() + "uA");
                }
                else
                {
                    SetTextBoxDeepSleepResult("FAIL", Color.Red);
                    //Log.info("[" + serialNumber + "]" + "Deep Sleep FAIL:\t\t" + e.Average.ToString() + "uA");

                    if (dut.ErrorCode == 0)
                    {
                        dut.ErrorCode = ErrorCode.ERROR_IDD_LOW;
                    }

                    //No need to test the sleep1.
                    sleep1_test_done = true;
                }


                tp_thread.en_queue(STATE.states.TP_PowerOff);

                if (sleep1_test_done && deepsleep_test_done)
                {
                    serialNumberScanned = false;
                    SetTxtBoxSN("");

                    WriteTestReport();

                    if (Config.ONLINE)
                    {
                        UploadResult();
                    }

                    dut = null;
                }
            }

            if (e.CurrentState == STATE.states.MM_ReadCurr)
            {
                SetListBoxStatus(false, "Current: " + e.Message + "uA");
            }
        }
Beispiel #10
0
 public EnvironmentalControll(DUT dut)
 {
     pDut = dut;
 }
Beispiel #11
0
        private void textBoxSerialNumber_TextChanged(object sender, EventArgs e)
        {
            if (textBoxSN.Text.Length == Config.SERIAL_NUMBER_LENGTH)
            {
                dut = new DUT();

                serialNumber = textBoxSN.Text;
                string partType = serialNumber.Substring(0, Config.PARTNUMBER_LENGTH);
                string identifier = serialNumber.Substring(Config.PARTNUMBER_LENGTH, (Config.SERIAL_NUMBER_LENGTH - Config.PARTNUMBER_LENGTH));

                serialNumber = partType + identifier;

                textBoxSN.Text = identifier;
                textBoxMPN.Text = partType;

                serialNumberScanned = true;
                dut.SerailNumber = serialNumber;

                if (validateSerialNumber(serialNumber))
                {
                    SetTextBoxSleepResult("", Color.White);
                    SetTextBoxDeepSleepResult("", Color.White);

                    sleep1_test_done = false;
                    deepsleep_test_done = false;
                }
                else
                {

                    MessageBox.Show("invalid serial number", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    textBoxSN.Text = "";
                    textBoxMPN.Text = "";

                    serialNumberScanned = false;
                }

            }
        }
Beispiel #12
0
        /// <summary>
        /// The StateMachine EVENT of class MultiMeter
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void mm_fucntion_STEvent(object sender, StateMachineEventArgs e)
        {
            //Multi-Meter Init
            if (e.CurrentState == STATE.states.initialize)
            {
                if (e.PassOrFail)
                {
                    mm_ready = true;
                    if (tp_ready)
                    {

                        EnableButtonConnect(false);
                        EnableButtonSleep(true);
                        EnableButtonDeepSleep(true);
                    }
                }
            }

            //Multi-Meter Exit
            if (e.CurrentState == STATE.states.exit)
            {

                if (tp_ready)
                {
                    try
                    {
                        EnableButtonConnect(true);
                        EnableButtonSleep(false);
                        EnableButtonDeepSleep(false);

                        serialNumberScanned = false;
                        SetTxtBoxSN("");

                        tp_thread.exit();
                    }
                    catch { }
                }

                mm_fucntion = null;
                mm_thread = null;
                mm_ready = false;
            }

            //sleep1 current
            if (e.CurrentState == STATE.states.MM_CalcSleep1Curr)
            {
                sleep1_test_done = true;
                dut.IDDValue_Sleep = Convert.ToDouble(e.Message);

                SetListBoxStatus(false, "Sleep1 Current:" + e.Message + "uA");
                if (e.PassOrFail)
                {
                    SetTextBoxSleepResult("PASS", Color.Green);
                    //Log.info("[" + serialNumber + "]" + "Sleep1 PASS:\t\t\t" + e.Average.ToString() + "uA");

                }
                else
                {
                    SetTextBoxSleepResult("FAIL", Color.Red);
                    //Log.info("[" + serialNumber + "]" + "Sleep1 FAIL:\t\t\t" + e.Average.ToString() + "uA");

                    if (dut.ErrorCode == 0)
                    {
                        dut.ErrorCode += ErrorCode.ERROR_IDD_HIGH;
                    }

                    //No need to test the deep sleep.
                    deepsleep_test_done = true;
                }

                tp_thread.en_queue(STATE.states.TP_PowerOff);

                if (sleep1_test_done && deepsleep_test_done)
                {
                    serialNumberScanned = false;
                    SetTxtBoxSN("");

                    WriteTestReport();

                    if (Config.ONLINE)
                    {
                        UploadResult();
                    }

                    dut = null;
                }
            }

            //deep sleep current
            if (e.CurrentState==STATE.states.MM_CalcDeepSleepCurr)
            {
                deepsleep_test_done = true;
                dut.IDDValue_DeepSleep = Convert.ToDouble(e.Message);

                SetListBoxStatus(false, "Deep Sleep Current:" + e.Message + "uA");
                if (e.PassOrFail)
                {
                    SetTextBoxDeepSleepResult("PASS", Color.Green);
                    //Log.info("[" + serialNumber + "]" + "Deep Sleep PASS:\t\t" + e.Average.ToString() + "uA");

                }
                else
                {
                    SetTextBoxDeepSleepResult("FAIL", Color.Red);
                    //Log.info("[" + serialNumber + "]" + "Deep Sleep FAIL:\t\t" + e.Average.ToString() + "uA");

                    if (dut.ErrorCode == 0)
                    {
                        dut.ErrorCode = ErrorCode.ERROR_IDD_LOW;
                    }

                    //No need to test the sleep1.
                    sleep1_test_done = true;
                }

                tp_thread.en_queue(STATE.states.TP_PowerOff);

                if (sleep1_test_done && deepsleep_test_done)
                {
                    serialNumberScanned = false;
                    SetTxtBoxSN("");

                    WriteTestReport();

                    if (Config.ONLINE)
                    {
                        UploadResult();
                    }

                    dut = null;
                }
            }

            if (e.CurrentState == STATE.states.MM_ReadCurr)
            {
                SetListBoxStatus(false, "Current: " + e.Message + "uA");
            }
        }
Beispiel #13
0
        private void mm_fucntion_ResultEvent(object sender, MMResultEventArgs e)
        {
            if (e.Status == 1)
            {
                sleep1_test_done = true;
                dut.IDDValue_Sleep = e.Average;

                SetListBoxStatus(false, "Sleep1 Current:" + e.Average.ToString() + "uA");
                if (e.Result)
                {
                    SetTextBoxSleepResult("PASS", Color.Green);
                    //Log.info("[" + serialNumber + "]" + "Sleep1 PASS:\t\t\t" + e.Average.ToString() + "uA");

                }
                else
                {
                    SetTextBoxSleepResult("FAIL", Color.Red);
                    //Log.info("[" + serialNumber + "]" + "Sleep1 FAIL:\t\t\t" + e.Average.ToString() + "uA");
                    dut.ErrorCode += ErrorCode.ERROR_IDD_HIGH;

                    //No need to test the deep sleep.
                    deepsleep_test_done = true;
                }
            }

            if (e.Status == 2)
            {
                deepsleep_test_done = true;
                dut.IDDValue_DeepSleep = e.Average;

                SetListBoxStatus(false, "Deep Sleep Current:" + e.Average.ToString() + "uA");
                if (e.Result)
                {
                    SetTextBoxDeepSleepResult("PASS", Color.Green);
                    //Log.info("[" + serialNumber + "]" + "Deep Sleep PASS:\t\t" + e.Average.ToString() + "uA");

                }
                else
                {
                    SetTextBoxDeepSleepResult("FAIL", Color.Red);
                    //Log.info("[" + serialNumber + "]" + "Deep Sleep FAIL:\t\t" + e.Average.ToString() + "uA");
                    dut.ErrorCode += ErrorCode.ERROR_IDD_LOW;

                    //No need to test the sleep1.
                    sleep1_test_done = true;
                }
            }

            tp_thread.en_queue(STATE.states.TP_PowerOff);

            if (sleep1_test_done && deepsleep_test_done)
            {
                serialNumberScanned = false;
                SetTxtBoxSN("");

                WriteTestReport();

                dut = null;
            }
        }