예제 #1
0
        public static void None(VSLeakDetector myLD, ref TestInfo myTestInfo, ref UUTData myuutdata)
        {
            switch (myTestInfo.TestLabel)
            {
            case "5.12.1 Test_IOBoard (Opt.)":
            {
                while (step <= myTestInfo.ResultsParams.NumResultParams)
                {
                    myTestInfo.ResultsParams[step].SpecMax = "Skip";
                    myTestInfo.ResultsParams[step].SpecMin = "Skip";
                    myTestInfo.ResultsParams[step].Nominal = "Skip";
                    myTestInfo.ResultsParams[step].Result  = "Skip";

                    step++;
                }

                break;
            }

            case "5.12.2 Wireless_Remote (Opt.)":
            {
                while (step <= myTestInfo.ResultsParams.NumResultParams)
                {
                    myTestInfo.ResultsParams[step].SpecMax = "Skip";
                    myTestInfo.ResultsParams[step].SpecMin = "Skip";
                    myTestInfo.ResultsParams[step].Nominal = "Skip";
                    myTestInfo.ResultsParams[step].Result  = "Skip";

                    step++;
                }

                break;
            }
            }
        }
예제 #2
0
        public void Execute(ref TestInfo myTestInfo, ref UUTData myUUTData, ref CommonData myCommonData)
        {
            try
            {
                switch (myTestInfo.TestLabel)
                {
                case "LeakRateTest":
                {
                    DoLeakRateTest(ref myTestInfo, ref myUUTData, ref myCommonData);
                }
                break;

                case "LeakRateProfilingTest":
                {
                    DoLeakRateProfilingTest(ref myTestInfo, ref myUUTData, ref myCommonData);
                }
                break;

                default:
                    break;
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #3
0
        public void Execute(ref TestInfo myTestInfo, ref UUTData myUUTData, ref CommonData myCommonData)
        {
            try
            {
                switch (myTestInfo.TestLabel)
                {
                case "NistLeakTempTest":
                {
                    DoNistLeakTempTest(ref myTestInfo, ref myUUTData, ref myCommonData);
                }
                break;

                case "InitNistDatatable":
                {
                    DoInitNistDatatable(ref myTestInfo, ref myUUTData);
                }
                break;

                case "TemperatureTest":
                {
                    DoTempTest(ref myTestInfo, ref myUUTData, ref myCommonData);
                }
                break;

                default:
                    break;
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #4
0
        /// This is the main interaction between iTestExec software with this project, and when user press "start" button
        public TestInfo DoTests(TestInfo myTestInfo, ref UUTData myUUTData, ref CommonData myCommonData)
        {
            try
            {
                switch (myTestInfo.GroupLabel)                      //Swtich between testing group enlisted for the UUT
                {
                case "DcvGroup":
                {
                }
                break;

                case "DcrGroup":
                {
                }
                break;

                case "CurrentGroup":
                {
                }
                break;

                default:
                    break;
                }
            }
            catch (Exception)
            {
                throw;
            }

            return(myTestInfo);
        }
예제 #5
0
        public void UserCleanup(ref UUTData _uutData, ref CommonData _commonData)
        {
            string conStr = "Data Source=wpsqldb21;Initial Catalog=VpdOF;Persist Security Info=True;User ID=VpdTest;Password=Vpd@123";

            if (iteSlot.Contains("P1"))
            {
                SQL_XGS.Update_XGS("1", "No");
                SQL_34970A.Update_DMM_Status("1", "No", conStr);
                InstrumentIO.Close_Extleak(1);

                myLD1.Close();
                //   myLD1 = null;
            }
            else if (iteSlot.Contains("P2"))
            {
                SQL_XGS.Update_XGS("2", "No");
                SQL_34970A.Update_DMM_Status("1", "No", conStr);
                InstrumentIO.Close_Extleak(2);

                myLD2.Close();
                myLD2 = null;
            }
            else
            {
            }
        }
예제 #6
0
        public void Execute(ref TestInfo myTestInfo, ref UUTData myUUTData, ref CommonData myCommonData)
        {
            try
            {
                switch (myTestInfo.TestLabel)
                {
                case "StoreStdLeakRate":
                {
                    StoreLeakRate(ref myTestInfo, ref myUUTData, ref myCommonData);
                }
                break;

                case "Calibrate":
                {
                    DoExternalCal(ref myTestInfo, ref myUUTData, ref myCommonData);
                }
                break;

                case "Experiment":
                {
                    DoExperiment1(ref myTestInfo, ref myUUTData, ref myCommonData);
                }
                break;

                default:
                    break;
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #7
0
        /// When we click 'New DUT" button from the iTestExec, it will refer to the sequence file XML
        /// (Future dev: Show an interface where user can select the right model for testing.)
        public void UserBegins(ref UUTData _uutData, ref CommonData _commonData)
        {
            uut_form uut = new uut_form();

            uut.TopMost = true;

X:
            uut.ShowDialog();

            _uutData = new UUTData();

            if (uut.DialogResult == DialogResult.OK)
            {
                _uutData.Model  = Model;
                _uutData.SerNum = Serial;

                _commonData.Testplan = @"C:\VSLDtest.PRJ\Sequences\VSLD.xml"; //Obtain the neccesary info about the UUT from sequence file XML created in sequential editor
                uut.Dispose();
            }

            else if (uut.DialogResult == DialogResult.Cancel)
            {
                DialogResult result = MessageBox.Show("Are you sure?", "Confirmation", MessageBoxButtons.YesNo);

                if (result == DialogResult.Yes)
                {
                    uut.Dispose();
                }

                else if (result == DialogResult.No)
                {
                    goto X;
                }
            }
        }
예제 #8
0
        //@@ When the 'START' button is pressed @@//
        public void UserSetups(ref UUTData _uutData, ref CommonData _commonData)
        {
recheck_connection:

            try
            {
                if (iteSlot.Contains("P1"))
                {
                    myLD1         = new VSLeakDetector(comPort1);
                    myLD1.iteSlot = iteSlot;
                    myLD1.Open();
                    //Helper.comPort = comPort1;
                }
                else if (iteSlot.Contains("P2"))
                {
                    myLD2         = new VSLeakDetector(comPort2);
                    myLD2.iteSlot = iteSlot;
                    myLD2.Open();
                    //Helper.comPort = comPort2;
                }
                else
                {
                }

                //Initialize data acquisition system

recheck:
                string conStr = "Data Source=wpsqldb21;Initial Catalog=VpdOF;Persist Security Info=True;User ID=VpdTest;Password=Vpd@123";
                string DMMstatus = SQL_34970A.Read_DMM_Status(conStr);

                if (DMMstatus != "No")
                {
                    MessageBox.Show("DMM locked", "warning", MessageBoxButtons.OK);
                    Thread.Sleep(5000);
                    goto recheck;
                }

                InstrumentIO.DAS_initialize();

                //Accquire the voltage requirement based on the model number and channel number based on the slot number of the tester
                InstrumentIO.Init_UUT_Voltage_Switches(_uutData.Model, _uutData.Options);
            }

            catch (Agilent.TMFramework.InstrumentIO.VisaException ex)               //When there is connection error between the 34970A and the PC
            {
                DialogResult connection = MessageBox.Show(ex.Message + "\n\nPlease check the connection between the 34970A data accquisition system and the PC.", "WARNING", MessageBoxButtons.RetryCancel);

                if (connection == DialogResult.Retry)
                {
                    goto recheck_connection;
                }

                else
                {
                    Application.Exit();
                }
            }
        }
예제 #9
0
        private void DoNistLeakTempTest(ref TestInfo myTestInfo, ref UUTData myUUTData, ref CommonData myCommonData)
        {
            try
            {
                int    loop      = int.Parse(myTestInfo.TestParams[1].Value);
                int    delay     = int.Parse(myTestInfo.TestParams[2].Value);
                double deltaSpec = double.Parse(myTestInfo.TestParams[3].Value);
                int    trial     = Convert.ToInt32(myTestInfo.TestParams[4].Value);

                // Configure Thermocouple measurement
                InstrumentIO.ConfigureThermocouple(mySw);

                List <double> tempReadings = new List <double>();
                Trace.WriteLine("Measuring NIST Cal Leak Temperature.");
                Trace.WriteLine("... waiting for the NIST Cal-Leak's temperature to stabilized.");
                Trace.WriteLine("Loop 10 times");
                int counter = 0;
                Repeat : for (int i = 0; i < loop; i++)
                {
                    var nistTemp = InstrumentIO.MeasureCalLeakTemp(mySw, 0);
                    tempReadings.Add(nistTemp);
                    Trace.WriteLine("NIST Temperature: " + nistTemp.ToString());
                    Thread.Sleep(delay);
                }
                Trace.WriteLine("NIST Average Temperature: " + tempReadings.Average().ToString());
                Trace.WriteLine("NIST Max Temperature: " + tempReadings.Max().ToString());
                Trace.WriteLine("NIST Min Temperature: " + tempReadings.Min().ToString());
                Trace.WriteLine("NIST Delta Temperature: " + (tempReadings.Max() - tempReadings.Min()).ToString());

                var delta = tempReadings.Max() - tempReadings.Min();
                counter++;

                if (delta > deltaSpec && counter < trial)
                {
                    goto Repeat;
                }

                if (counter == trial)   // more than 3 times try to get stable temperature, considered failed
                {
                    myTestInfo.ResultsParams[1].Result = "TIMEOUT";
                }
                else
                {
                    var averageTemperature = tempReadings.Average();
                    myTestInfo.ResultsParams[1].Result = "PASS";
                    myTestInfo.ResultsParams[2].Result = Math.Round(delta, 3).ToString();
                    myTestInfo.ResultsParams[3].Result = averageTemperature.ToString();
                    //myTestInfo.ResultsParams[3].SpecMax = Convert.ToString(averageTemperature + deltaSpec);
                    //myTestInfo.ResultsParams[3].SpecMin = Convert.ToString(averageTemperature - deltaSpec);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #10
0
 /// <summary>
 /// This method is called when the TestExec is loaded. User can customize PlugIn objects before
 /// any event or action during test setup or test run
 /// </summary>
 /// <param name="_uutData"></param>
 /// <param name="_commonData"></param>
 public void TestExecLoaded(ref UUTData _uutData, ref CommonData _commonData)
 {
     try
     {
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #11
0
        private void DoInitNistDatatable(ref TestInfo myTestInfo, ref UUTData myUUTData)
        {
            try
            {
                string sqlConStr = CalLeakConfigs.Default.SqlConString;
                using (SqlConnection conn = new SqlConnection(sqlConStr))
                {
                    Trace.WriteLine("Connecting to SQL Database for NIST Data Retrieval");
                    conn.Open();
                    Trace.WriteLine("Connection succeeded");
                    // Get NIST Reference currently being used in the test system from app.config file
                    string model    = CalLeakConfigs.Default.NistModel;
                    string serial   = CalLeakConfigs.Default.NistSerial;
                    var    nistData = SqlHelper.GetNistData(conn, model, serial);
                    Trace.WriteLine("NIST Std Leak Details:-");
                    Trace.WriteLine("     Model = " + model);
                    Trace.WriteLine("     Serial = " + serial);
                    Trace.WriteLine("     Cal Date = " + nistData.CalibrationDate.ToShortDateString());
                    Trace.WriteLine("     Cal Due Date = " + nistData.CalibrationDueDate.ToShortDateString());
                    Trace.WriteLine("     Leak_15Deg = " + nistData.Temp15Leak.ToString() + "std cc/s");
                    Trace.WriteLine("     Leak_16Deg = " + nistData.Temp16Leak.ToString() + "std cc/s");
                    Trace.WriteLine("     Leak_17Deg = " + nistData.Temp17Leak.ToString() + "std cc/s");
                    Trace.WriteLine("     Leak_18Deg = " + nistData.Temp18Leak.ToString() + "std cc/s");
                    Trace.WriteLine("     Leak_19Deg = " + nistData.Temp19Leak.ToString() + "std cc/s");
                    Trace.WriteLine("     Leak_20Deg = " + nistData.Temp20Leak.ToString() + "std cc/s");
                    Trace.WriteLine("     Leak_21Deg = " + nistData.Temp21Leak.ToString() + "std cc/s");
                    Trace.WriteLine("     Leak_22Deg = " + nistData.Temp22Leak.ToString() + "std cc/s");
                    Trace.WriteLine("     Leak_23Deg = " + nistData.Temp23Leak.ToString() + "std cc/s");
                    Trace.WriteLine("     Leak_24Deg = " + nistData.Temp24Leak.ToString() + "std cc/s");
                    Trace.WriteLine("     Leak_25Deg = " + nistData.Temp25Leak.ToString() + "std cc/s");
                    Trace.WriteLine("     Leak_26Deg = " + nistData.Temp26Leak.ToString() + "std cc/s");
                    Trace.WriteLine("     Leak_27Deg = " + nistData.Temp27Leak.ToString() + "std cc/s");
                    Trace.WriteLine("     Leak_28Deg = " + nistData.Temp28Leak.ToString() + "std cc/s");
                    Trace.WriteLine("     Leak_29Deg = " + nistData.Temp29Leak.ToString() + "std cc/s");
                    Trace.WriteLine("     Leak_30Deg = " + nistData.Temp30Leak.ToString() + "std cc/s");
                    if (nistData == null)
                    {
                        // problem getting NIST Data. --> FAIL
                        Trace.WriteLine("Unable to get NIST Data from SQL Database.");
                        myTestInfo.ResultsParams[1].Result = "FAIL";
                    }
                    else
                    {
                        Trace.WriteLine("NIST Data successfully transfered to local.");
                        myTestInfo.ResultsParams[1].Result = "PASS";
                    }

                    myNistData = nistData;
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #12
0
        /// <summary>
        /// This method is called when the Performance test is started
        /// </summary>
        /// <param name="_uutData"></param>
        /// <param name="_commonData"></param>
        public void UserSetups(ref UUTData _uutData, ref CommonData _commonData)
        {
            try
            {
                if (_uutData == null)
                {
                    _uutData = this.g_UUTData;
                }
                if (_commonData == null)
                {
                    _commonData = this.g_CommonData;
                }


                // Initialize Test Equipments
                mySw    = new DirectIO("GPIB0::9::INSTR"); mySw.Timeout = 10000;
                myScope = new DirectIO("GPIB0::7::INSTR"); myScope.Timeout = 10000;
                //myScope = new DirectIO("USB0::2391::6056::MY53280249::0::INSTR"); myScope.Timeout = 10000;


                //ResourceManager rmc = new ResourceManager();
                //var rs = rmc.FindRsrc("USB?*");
                //foreach (var item in rs)
                //{
                //    Trace.WriteLine(item);
                //}



                string comPort = CalLeakConfigs.Default.ComPort;
                myLD = new VSLeakDetector(comPort, 9600, System.IO.Ports.Parity.None, 8, System.IO.Ports.StopBits.One);
                myLD.UnlockFullCommand();
                myLD.NoSniff();     // Set the LD HighPressure test to OFF



                InstrumentIO.SetupBoardTempMeasRoute(mySw, myScope, TestPort);


                // Initialize list
                ListOfUUTLeakRate   = new List <double>();
                ListOfUUTTempFactor = new List <double>();
                ListOfUUTTemp       = new List <double>();

                // Initialize CalLeakData
                myCalLeakData              = new CalLeakData();
                myCalLeakData.PartNumber   = _uutData.Model;
                myCalLeakData.SerialNumber = _uutData.SerNum;
                myCalLeakData.TestPortId   = Convert.ToInt32(_commonData.Slot);
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #13
0
        /// <summary>
        /// This method is called when user clicks NewUUT button in case user want to customize the
        /// Plugin objects
        /// </summary>
        /// <param name="_uutData"></param>
        /// <param name="_commonData"></param>
        public void UserBegins(ref UUTData _uutData, ref CommonData _commonData)
        {
            try
            {
                // For cal leak, Automated serial number generation is needed.
                // Therefore TestExecutive UUT information will be provided from user code (here)

                if (_uutData == null)
                {
                    myUutForm = new FormNewUUT();
                }

                myUutForm.isProdMode = _commonData.isProdMode;


                // Call user form
                myUutForm.ShowDialog();
                if (DialogResult.OK == myUutForm.dialogResult)
                {
                    _uutData         = new UUTData();
                    _uutData.Model   = myUutForm.ModelNumber;
                    _uutData.SerNum  = myUutForm.serialNumber;
                    _uutData.Options = myUutForm.OptionNumber;
                    this.TestPort    = myUutForm.TestPort;

                    _commonData          = new CommonData();
                    _commonData.Slot     = this.TestPort.ToString();
                    _commonData.Testplan = Path.Combine(@"C:\CalLeakTest.PRJ\Sequences", _uutData.Model + ".xml");

                    this.g_UUTData    = _uutData;
                    this.g_CommonData = _commonData;
                }
                else if (myUutForm.dialogResult == DialogResult.Cancel)
                {
                    if (_commonData != null)
                    {
                        _commonData.Mode = "Abort";
                    }
                    else
                    {
                        _commonData      = new CommonData();
                        _commonData.Mode = "Abort";
                    }
                    Trace.WriteLine("New UUT input aborted.");
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #14
0
        /*------------------------------------------------------------------------------------------------------------------------------------------
         * This test sequence is for UUT Information storage such as UUT Model Number, Serial Numbers, Cal Leak Information
         * Spectube, Valve Block and External Cal Leak Information
         * -------------------------------------------------------------------------------------------------------------------------------------------*/
        public static void DoUUTInfoTest(ref TestInfo myTestInfo, UUTData myUUTData, CommonData myCommonData, string[] UUTInfos)
        {
            try
            {
                string intCalLeakSN = UUTInfos[0];
                string extCalLeakPN = UUTInfos[1];
                string extCalLeakSN = UUTInfos[2];
recheck:
                string conStr = "Data Source=wpsqldb21;Initial Catalog=VpdOF;Persist Security Info=True;User ID=VpdTest;Password=Vpd@123";
                SQL_34970A.Calibrated(conStr);
                string DMMstatus = SQL_34970A.Read_DMM_Status(conStr);

                if (DMMstatus == "No")
                {
                }
                else
                {
                    Trace.WriteLine("DMM locked");
                    Thread.Sleep(5000);
                    goto recheck;
                }

                int step = 1;
                myTestInfo.ResultsParams[step].Result      = myTestInfo.ResultsParams[step].SpecMin =
                    myTestInfo.ResultsParams[step].Nominal = myTestInfo.ResultsParams[step].SpecMax = myUUTData.Model; // UUT model
                step++;
                myTestInfo.ResultsParams[step].Result      = myTestInfo.ResultsParams[step].SpecMin =
                    myTestInfo.ResultsParams[step].Nominal = myTestInfo.ResultsParams[step].SpecMax = myUUTData.SerNum; // UUT serial
                step++;
                myTestInfo.ResultsParams[step].Result      = myTestInfo.ResultsParams[step].SpecMin =
                    myTestInfo.ResultsParams[step].Nominal = myTestInfo.ResultsParams[step].SpecMax = intCalLeakSN; // UUT Int Cal Leak Serial number
                step++;
                myTestInfo.ResultsParams[step].Result      = myTestInfo.ResultsParams[step].SpecMin =
                    myTestInfo.ResultsParams[step].Nominal = myTestInfo.ResultsParams[step].SpecMax = extCalLeakPN; // Ext Cal Leak Part Number
                step++;
                myTestInfo.ResultsParams[step].Result      = myTestInfo.ResultsParams[step].SpecMin =
                    myTestInfo.ResultsParams[step].Nominal = myTestInfo.ResultsParams[step].SpecMax = extCalLeakSN; // Ext Cal Leak Serial number
                step++;
                myTestInfo.ResultsParams[step].Result      = myTestInfo.ResultsParams[step].SpecMin =
                    myTestInfo.ResultsParams[step].Nominal = myTestInfo.ResultsParams[step].SpecMax = myUUTData.Options; // slot number
                step++;
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #15
0
        //@@ ITest Exec Initial boot @@//
        public void TestExecLoaded(ref UUTData _uutData, ref CommonData _commonData)
        {
            Size area = Screen.PrimaryScreen.WorkingArea.Size;

            this.screenHeight = area.Height;
            this.screenWidth  = area.Width;
            if (iteSlot.Contains("P1"))
            {
                this.startLocY = 10;
                this.startLocX = (this.screenHeight / 2) - 50;
            }
            else if (iteSlot.Contains("P2"))
            {
                this.startLocY = (this.screenWidth / 2) + 10;
                this.startLocX = (this.screenHeight / 2) - 50;
            }
            else
            {
            }
        }
예제 #16
0
        private void DoTempTest(ref TestInfo myTestInfo, ref UUTData myUUTData, ref CommonData myCommonData)
        {
            try
            {
                int    loop       = int.Parse(myTestInfo.TestParams[1].Value);
                int    delay      = int.Parse(myTestInfo.TestParams[2].Value);
                double deltaSpec  = double.Parse(myTestInfo.TestParams[3].Value);
                double deltaSpec2 = double.Parse(myTestInfo.TestParams[4].Value);
                int    trial      = Convert.ToInt32(myTestInfo.TestParams[5].Value);

                int slot = Convert.ToInt32(myCommonData.Slot);  // UUT Slot

                // Configure Thermocouple measurement
                Trace.WriteLine("Starting to initialize thermocouple and DUT's Temperature board.");
                InstrumentIO.ConfigureThermocouple(mySw);

                Trace.WriteLine("Measuring Thermocouple.");
                Trace.WriteLine("... waiting for the DUT's thermocouple to stabilized.");
                Trace.WriteLine("Loop 10 times");
                int counter = 0;
                Repeat : List <double> tempReadings = new List <double>();
                for (int i = 0; i < loop; i++)
                {
                    var dutTemp = InstrumentIO.MeasureCalLeakTemp(mySw, slot);
                    tempReadings.Add(dutTemp);
                    Trace.WriteLine("DUT Temperature: " + Math.Round(dutTemp, 2).ToString());
                    Thread.Sleep(delay);
                }
                Trace.WriteLine("DUT Average Temperature: " + tempReadings.Average().ToString());
                Trace.WriteLine("DUT Max Temperature: " + tempReadings.Max().ToString());
                Trace.WriteLine("DUT Min Temperature: " + tempReadings.Min().ToString());
                Trace.WriteLine("DUT Delta Temperature: " + (tempReadings.Max() - tempReadings.Min()).ToString());

                var delta = tempReadings.Max() - tempReadings.Min();
                counter++;

                if (delta > deltaSpec && counter < trial)
                {
                    goto Repeat;
                }

                // Measure Board Temperature
                Trace.WriteLine("Measuring DUT Board Temperature.");
                Trace.WriteLine("... waiting for the DUT's board's temperature to stabilized.");
                Trace.WriteLine("Loop 10 times");
                //InstrumentIO.SetupBoardTempMeasRoute(mySw, myScope, slot);   // setup route for BoardTemp supply and output 5V and TTL signal output
                int counter2 = 0;

                Repeat2 : List <double> tempReadings2 = new List <double>();
                for (int i = 0; i < loop; i++)   // repeat 10times to make sure the temp is stable
                {
                    var boardTemp = InstrumentIO.MeasureBoardTemperature(mySw, myScope, slot);
                    boardTemp = Math.Round(boardTemp, 2);
                    tempReadings2.Add(boardTemp);
                    Trace.WriteLine("Board Temperature: " + boardTemp.ToString());
                    Thread.Sleep(delay);
                }
                Trace.WriteLine("Board Average Temperature: " + tempReadings2.Average().ToString());
                Trace.WriteLine("Board Max Temperature: " + tempReadings2.Max().ToString());
                Trace.WriteLine("Board Min Temperature: " + tempReadings2.Min().ToString());
                Trace.WriteLine("Board Delta Temperature: " + (tempReadings2.Max() - tempReadings2.Min()).ToString());
                var delta2 = tempReadings2.Max() - tempReadings2.Min();
                counter2++;
                if (delta2 > deltaSpec2 && counter2 < trial)
                {
                    goto Repeat2;
                }
                var boardTempFinal = InstrumentIO.MeasureBoardTemperature(mySw, myScope, slot);
                //InstrumentIO.DisconnectTempBoardMeasRoute(mySw, slot);


                // Save result
                if (counter == trial)   // more than 3 times try to get stable temperature, considered failed
                {
                    myTestInfo.ResultsParams[1].Result = "TIMEOUT";
                }
                else
                {
                    myTestInfo.ResultsParams[1].Result = "PASS";
                }
                //var averageTemperature = tempReadings.Average();
                var finalCanTemp = InstrumentIO.MeasureCalLeakTemp(mySw, 1);
                myTestInfo.ResultsParams[2].Result = Math.Round(delta, 3).ToString();
                myTestInfo.ResultsParams[3].Result = Math.Round(finalCanTemp, 1).ToString();

                myTestInfo.ResultsParams[4].Result = Math.Round(delta2, 3).ToString();
                //var boardTempAve = tempReadings2.Average();

                myTestInfo.ResultsParams[5].Result = Math.Round(boardTempFinal, 1).ToString();

                // Get Temperature difference between Can's temperature and board temperature. (Factor)
                double diffTemp = boardTempFinal - finalCanTemp;
                //myTestInfo.ResultsParams[6].Result = Math.Round(diffTemp, 3).ToString();
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #17
0
        public static TestInfo DoSeq5_8(VSLeakDetector myLD, ref TestInfo myTestInfo, ref UUTData myuutdata)
        {
            Boolean status = false;
            string  retval;
            int     step = 1;

            Helper.comPort = comPort;


            try
            {
                switch (myTestInfo.TestLabel)
                {
                case "5.8.3 Leak_Reading":
                {
                    step = 1;

                    while (step <= myTestInfo.ResultsParams.NumResultParams)
                    {
                        //Access to full command

                        Trace.WriteLine(iteSlot + "Access to full command...");
                        Helper.SendCommand(myLD, ref status, "XYZZY", "ok");


                        //Obtain stdleak reading

                        Trace.WriteLine(iteSlot + "Obtain the stdleak reading...");
                        retval = Helper.SendCommand(myLD, ref status, "?STDLEAK", "ok");

                        if (status == true)
                        {
                            string[] response = retval.Split(new string[] { "?STDLEAK ", "ok" }, StringSplitOptions.RemoveEmptyEntries);
                            Stdleak = Convert.ToDouble(response[0]);
                        }
                        else
                        {
                            Stdleak = -999;
                        }


                        //@@ Read and observe the leak rate by using helium spray probe. A dialog will be shown to monitor the leak rate @@//

                        Trace.WriteLine(iteSlot + "Monitoring the UUT leak reading when STDLEAK CLOSED...");

                        Leak_Reading monitor_leak_reading = new Leak_Reading(myLD);
                        monitor_leak_reading.StartPosition = FormStartPosition.Manual;
                        monitor_leak_reading.Location      = new Point(locX, locY);
                        Leak_Reading.Stdleak_status        = "CLOSE";
                        monitor_leak_reading.ShowDialog();

                        if (monitor_leak_reading.DialogResult == DialogResult.Yes)
                        {
                            monitor_leak_reading.Hide();

                            Trace.WriteLine(iteSlot + "Test point complete.");
                            myTestInfo.ResultsParams[step].Result = "ok";

                            step++;
                        }

                        else if (monitor_leak_reading.DialogResult == DialogResult.No)
                        {
                            monitor_leak_reading.Dispose();

                            myTestInfo.ResultsParams[step].Result = "FAILED";
                            //throw new Exception("Test point failed.");
                        }


                        //@@ Open the Stdleak @@//

                        Trace.WriteLine(iteSlot + "Opening the stdleak...");

                        status = Helper.DoThis(myLD, ref myTestInfo, "STDLEAK", "ok", step, "ok");

                        Thread.Sleep(12000);          //(MOD: Time is required to fully open the stdleak contained inside the UUT. In order to prevent any interruption while it is opening, a small interval must be implemented.
                        step++;


                        //@@ Read and observe the stdleak rate by using helium spray probe. A dialog will be shown to monitor the leak rate @@//

                        Trace.WriteLine(iteSlot + "Monitoring the UUT leak reading when STDLEAK OPEN...");

                        Leak_Reading.Stdleak_status = "OPEN";
                        monitor_leak_reading.ShowDialog();

                        if (monitor_leak_reading.DialogResult == DialogResult.Yes)
                        {
                            monitor_leak_reading.Dispose();

                            Trace.WriteLine(iteSlot + "Test point complete.");
                            myTestInfo.ResultsParams[step].Result = "ok";

                            step++;
                        }

                        else if (monitor_leak_reading.DialogResult == DialogResult.No)
                        {
                            monitor_leak_reading.Dispose();

                            myTestInfo.ResultsParams[step].Result = "FAILED";
                            //throw new Exception("Test point failed.");
                        }


                        //@@ Close the Stdleak @@//

                        Trace.WriteLine(iteSlot + "Closing the stdleak...");

                        status = Helper.DoThis(myLD, ref myTestInfo, "STDLEAK", "ok", step, "ok");
                        step++;
                    }

                    break;
                }

                case "5.8.6 Final_setup":
                {
                    step = 1;

                    //@@ Sets the leak rate analog output voltage to Linear. Not preceded by a value. @@//

                    Trace.WriteLine(iteSlot + "Sets the leak rate analog output voltage to linear...");
                    status = Helper.DoThis(myLD, ref myTestInfo, "INIT-LINEAR", "ok", step, "ok");

                    step++;


                    //@@ Sets the status of Auto-zero < 0.  Preceded by 0 or 1, 0 = OFF, 1 = ON. @@//

                    Trace.WriteLine(iteSlot + "Sets the status of Auto Zero to ON...");
                    status = Helper.DoThis(myLD, ref myTestInfo, "1 INIT-AZ<0", "ok", step, "ok");

                    break;
                }

                case "5.8.7 Valve_cycle":
                {
                    step = 1;

                    while (step <= myTestInfo.ResultsParams.NumResultParams)
                    {
                        //@@ Access to full command @@//

                        Trace.WriteLine(iteSlot + "Access to full command...");

                        status = Helper.DoThis(myLD, ref myTestInfo, "XYZZY", "ok", step, "ok");
                        step++;


                        //Read the stdleak rate

                        Trace.WriteLine(iteSlot + "Obtain the stdleak reading...");

                        retval = Helper.SendCommand(myLD, ref status, "?STDLEAK", "ok");

                        if (status == true)
                        {
                            string[] response = retval.Split(new string[] { "?STDLEAK ", "ok" }, StringSplitOptions.RemoveEmptyEntries);
                            Stdleak = Convert.ToDouble(response[0]);
                        }


                        //@@ Vent the UUT @@//

                        Trace.WriteLine(iteSlot + "Venting the UUT...");

                        status = Helper.DoThis(myLD, ref myTestInfo, "VENT", "ok", step, "ok");
                        step++;
checkagain:
                        retval = Helper.SendCommand(myLD, ref status, "?PRESSURES", "ok");

                        string[] resp     = retval.Split(new string[] { "(mTorr): ", "\r\nSpectrometer" }, StringSplitOptions.RemoveEmptyEntries);
                        int      Pressure = Convert.ToInt32(resp[1]);


                        Trace.WriteLine(iteSlot + "Pressure: " + Pressure + "mTorr   System Pressure: ");
                        // commented out below manual limit checking, use test executive to do the limit checking and display the result correctly
                        if (!(Pressure >= 700000 && Pressure <= 760000))
                        {
                            Thread.Sleep(2000);
                            goto checkagain;
                        }
                        // YS Wong added to make sure vented properly

                        Thread.Sleep(1000);



                        //@@ Rough the UUT @@//

                        Trace.WriteLine(iteSlot + "Roughing the UUT...");

                        status = Helper.DoThis(myLD, ref myTestInfo, "ROUGH", "ok", step, "ok");
                        Thread.Sleep(30000);
                        //YS Wong
                        string update;
                        int    counter = 1;
recheck:
                        update = Helper.SendCommand(myLD, ref status, "?VALVESTATE", "MIDSTAGE");
                        if (!update.Contains("MIDSTAGE"))
                        {
                            Thread.Sleep(2000);
                            update = null;
                            counter++;
                            if (counter > 10)
                            {
                                break;
                            }
                            else
                            {
                                goto recheck;
                            }
                        }

                        step++;
                        update = null;          // YS Wong



                        //@@ STDleak ON @@//

                        Trace.WriteLine(iteSlot + "Open the stdleak...");

                        status = Helper.DoThis(myLD, ref myTestInfo, "STDLEAK", "ok", step, "ok");
                        step++;

                        Thread.Sleep(10000);


                        //@@ Vent the UUT @@//

                        Trace.WriteLine(iteSlot + "Venting the UUT...");

                        status = Helper.DoThis(myLD, ref myTestInfo, "VENT", "ok", step, "ok");

checkagain2:
                        retval = Helper.SendCommand(myLD, ref status, "?PRESSURES", "ok");

                        string[] resp2     = retval.Split(new string[] { "(mTorr): ", "\r\nSpectrometer" }, StringSplitOptions.RemoveEmptyEntries);
                        int      Pressure2 = Convert.ToInt32(resp2[1]);


                        Trace.WriteLine(iteSlot + "Pressure: " + Pressure + "mTorr   System Pressure: ");
                        // commented out below manual limit checking, use test executive to do the limit checking and display the result correctly
                        if (!(Pressure >= 700000 && Pressure <= 760000))
                        {
                            Thread.Sleep(2000);
                            goto checkagain2;
                        }
                        // Hairus added to make sure vented properly
                        //myLD.Open();
                        Thread.Sleep(1000);

                        step++;



                        //@@ Rough the UUT @@//

                        Trace.WriteLine(iteSlot + "Roughing the UUT...");

                        status = Helper.DoThis(myLD, ref myTestInfo, "ROUGH", "ok", step, "ok");
                        Thread.Sleep(30000);
                        // YS Wong

                        update = null; counter = 1;
recheck2:
                        update = Helper.SendCommand(myLD, ref status, "?VALVESTATE", "MIDSTAGE");
                        if (!update.Contains("MIDSTAGE"))
                        {
                            Thread.Sleep(2000);
                            update = null;
                            counter++;
                            if (counter > 10)
                            {
                                break;
                            }
                            else
                            {
                                goto recheck2;
                            }
                        }

                        step++;
                        update = null;         // YS Wong

                        //@@ STDleak OFF @@//

                        Trace.WriteLine(iteSlot + "Close the stdleak...");

                        status = Helper.DoThis(myLD, ref myTestInfo, "STDLEAK", "ok", step, "ok");
                        step++;

                        Thread.Sleep(30000);

                        // After valve cycle test completed, wait until the leak rate stabilize before proceed for calibration
                        //VSLeakDetector myLD = new VSLeakDetector(comPort);
                        // myLD.iteSlot = iteSlot;
                        string myRetVal = "";
                        //myLD.Open();
                        myLD.WaitForStdLeakState(ref myRetVal);
                        Thread.Sleep(1000);
                        bool isStabilized = myLD.WaitForStabilizedReading(ref myRetVal, 60, 0.97, 10);
                        if (isStabilized)
                        {
                            Trace.WriteLine(iteSlot + "Std Leak reading is now stabilized");
                        }
                        else
                        {
                            Trace.WriteLine(iteSlot + "Unable to get stable leak rate reading");
                        }
                        //myLD.Close();
                        //myLD = null;
                    }

                    break;
                }
                }
            }

            catch (Exception ex)
            {
                Trace.WriteLine(ex.Message);
                Helper.Fail_Test(ref myTestInfo, ex.Message, step);
                throw;
            }

            return(myTestInfo);
        }
예제 #18
0
        private void StoreLeakRate(ref TestInfo myTestInfo, ref UUTData myUUTData, ref CommonData myCommonData)
        {
            try
            {
                Trace.WriteLine("Measuring NIST Temperature...");
                var nistLeakTemp = InstrumentIO.MeasureCalLeakTemp(mySw, 0);
                Trace.WriteLine("NIST Temperature = " + nistLeakTemp.ToString());

                int nistLeakTempInt = Convert.ToInt32(nistLeakTemp);
                Trace.WriteLine("NIST Temperature = " + nistLeakTempInt.ToString());
                double leakRate = TestHelper.GetLeakRateFromTempMap(nistLeakTempInt, myNistData);
                Trace.WriteLine(String.Format("NIST Leak Rate @{0}deg C = {1}", nistLeakTempInt, leakRate));

                Trace.WriteLine("External Cal-Leak configuration in progress...");
                Trace.WriteLine("Set VS Leak Detector to use External Cal Leak");
                myLD.UseExtCalLeakRef();    // Set LD to use External CAL Leak

                //leakRate = Math.Round(leakRate, 8);     // the number in scientific must follow exactly this format (X.XE-7 or X.XE-8), else error will occurs
                string leakRateMod = "";
                string strLeakRate = "";
                if (leakRate < 1E-7)
                {
                    leakRateMod = Math.Round(leakRate * 100000000, 1).ToString();
                    Trace.WriteLine("External Cal-Leak value to be stored in VS Leak Detector = " + leakRateMod.ToString() + "E-8");
                    strLeakRate = string.Format("{0}E-8", leakRateMod);
                    Trace.WriteLine("Storing leak rate value....");
                    myLD.SetExtCalLeakValue(strLeakRate);
                    Trace.WriteLine("Done!");

                    Trace.WriteLine("Leak rate = " + strLeakRate);
                }
                else
                {
                    leakRateMod = Math.Round(leakRate * 10000000, 1).ToString();
                    Trace.WriteLine("External Cal-Leak value to be stored in VS Leak Detector = " + leakRateMod.ToString() + "E-7");
                    strLeakRate = string.Format("{0}E-7", leakRateMod);
                    Trace.WriteLine("Storing leak rate value....");
                    myLD.SetExtCalLeakValue(strLeakRate);
                    Trace.WriteLine("Done!");

                    Trace.WriteLine("Leak rate = " + strLeakRate);
                }



                var storedVal = myLD.GetExternalLeakValue().Trim();
                Trace.WriteLine("Readback Leak Rate Value from Leak Detector = " + storedVal.ToString());

                if (double.Parse(strLeakRate) == double.Parse(storedVal))
                {
                    // pass
                    myTestInfo.ResultsParams[1].Result = "PASS";
                    myTestInfo.ResultsParams[2].Result = storedVal;
                }
                else
                {
                    // FAIL
                    myTestInfo.ResultsParams[1].Result = "FAIL";
                    myTestInfo.ResultsParams[2].Result = storedVal;
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #19
0
 public void UserCleanup(ref UUTData _uutData, ref CommonData _commonData)
 {
 }
예제 #20
0
        // We are not using below functions anymore

        public static void IOBoard(VSLeakDetector myLD, ref TestInfo myTestInfo, ref UUTData myuutdata)
        {
            Boolean status = false;
            string  retval;

            switch (myTestInfo.TestLabel)
            {
            case "5.12.1 Test_IOBoard (Opt.)":
            {
                while (step <= myTestInfo.ResultsParams.NumResultParams)
                {
                    //Access to full command

                    Trace.WriteLine(iteSlot + "Access to full command...");
                    Helper.SendCommand(myLD, ref status, "XYZZY", "XYZZY ok");

                    //Obtain stdleak rate

                    Trace.WriteLine(iteSlot + "Obtain the stdleak rate...");
                    retval = Helper.SendCommand(myLD, ref status, "?STDLEAK", "ok");

                    if (status == true)
                    {
                        string[] response = retval.Split(new string[] { "?STDLEAK ", "ok" }, StringSplitOptions.RemoveEmptyEntries);
                        Stdleak = Convert.ToDouble(response[0]);
                    }


                    //lock DMM from other test sockets while it is being used

                    int    checking = 1;
                    string conStr   = myTestInfo.TestParams[1].Value;

                    Trace.WriteLine(iteSlot + "Check before Locking the DMM...");

                    while (checking > 0)
                    {
                        string DMMstatus = SQL_34970A.Read_DMM_Status(conStr);

                        if (DMMstatus == "No")
                        {
                            SQL_34970A.Update_DMM_Status(myuutdata.Options, "Yes", conStr);            //Yes = Lock     No = Unlock
                            break;
                        }

                        Thread.Sleep(5000);
                    }


                    //@@ Prompt user to turn off the leak detector and attach the cabbling @@//

                    step++;


                    //@@ Prompt user to turn on the unit @@//

                    step++;


                    //@@ Sets and leaves the Parallel_Enable_In value high @@//

                    step++;


                    Trace.WriteLine(iteSlot + "Startup wait...");
                    Thread.Sleep(30000);


                    //@@ Sends ?IOBOARD command to the unit @@//

                    step++;


                    //@@ Wait for the Ready_out line value to go HIGH @@//

                    step++;


                    //@@ Sends VENT bit on the appropriate output port. @@//

                    step++;


                    Trace.WriteLine(iteSlot + "Waits for unit to respond to new DI value...");
                    Thread.Sleep(10000);


                    //@@ Reads VENT_out bit on the appropriate input port. @@//

                    step++;


                    Thread.Sleep(5000);


                    //@@ Sets the value of the contra-flow mode crossover pressure in Torr @@//

                    Helper.DoThis(myLD, ref myTestInfo, "1.0E-3 INIT-CL-XFER", "ok", step, "ok");
                    step++;


                    //@@ Set Test_In @@//

                    step++;


                    Trace.WriteLine(iteSlot + "Waits for unit to respond to new DI value...");
                    Thread.Sleep(3000);


                    //@@ Verify Start_Out @@//

                    step++;


                    //@@ Verify Test_Out @@//

                    step++;


                    //@@ Wait for the START_OUT line value to go LOW @@//

                    step++;


                    //@@ Verify Test_Out @@//

                    step++;


                    //@@ Sets the value of the contra-flow mode crossover pressure in Torr @@//

                    Helper.DoThis(myLD, ref myTestInfo, "1.0E+1 INIT-CL-XFER", "ok", step, "ok");
                    step++;


                    //@@ Set RDSTDLK_IN High @@//

                    step++;


                    Trace.WriteLine(iteSlot + "Waits for unit to respond to new DI value...");
                    Thread.Sleep(1000);


                    //@@ Check STD valve state.vi @@//

                    step++;


                    //@@ Set RDSTDLK_IN low @@//

                    step++;


                    Trace.WriteLine(iteSlot + "Waits for unit to respond to new DI value...");
                    Thread.Sleep(1000);


                    //@@ Check STD valve state.vi @@//

                    step++;


                    Trace.WriteLine(iteSlot + "Waits for unit to respond to new DI value...");
                    Thread.Sleep(8000);


                    //@@ Set Hold_In @@//

                    step++;


                    Trace.WriteLine(iteSlot + "Waits for unit to respond to new DI value...");
                    Thread.Sleep(1000);


                    //@@ Verify Hold_Out @@//

                    step++;


                    Trace.WriteLine(iteSlot + "Waits for unit to respond to new DI value...");
                    Thread.Sleep(5000);


                    //@@ Set Test_In @@//

                    step++;


                    Trace.WriteLine(iteSlot + "Waits for unit to respond to new DI value...");
                    Thread.Sleep(15000);


                    //@@ Set Zero_In @@//

                    step++;


                    Trace.WriteLine(iteSlot + "Waits for unit to respond to new DI value...");
                    Thread.Sleep(10000);


                    //@@ Sets which type of calibration will be run if the CALIBRATE command is initiated.  Preceded by 0 or 1, 0 for FULL cal, 1 for FAST cal. @@//

                    Helper.DoThis(myLD, ref myTestInfo, "1 INIT-QUICK-CAL", "ok", step, "ok");
                    step++;


                    //@@ Set CAL_In @@//

                    step++;


                    Trace.WriteLine(iteSlot + "Waits for unit to respond to new DI value...");
                    Thread.Sleep(2000);


                    //@@ Verify CAL_Out @@//

                    step++;


                    //@@ Wait for CAL_Out line value to go LOW @@//

                    step++;


                    //@@ Verify CAL_Out_ok @@//

                    step++;


                    //@@ Sets which type of calibration will be run if the CALIBRATE command is initiated.  Preceded by 0 or 1, 0 for FULL cal, 1 for FAST cal. @@//

                    Helper.DoThis(myLD, ref myTestInfo, "0 INIT-QUICK-CAL", "ok", step, "ok");
                    step++;


                    //@@ Set AUTO_Manual_Range_In @@//

                    step++;


                    Trace.WriteLine(iteSlot + "Waits for unit to respond to new DI value...");
                    Thread.Sleep(2000);


                    //@@ Sends .AUTOMAN command to the unit @@//

                    Helper.DoThis(myLD, ref myTestInfo, ".AUTOMAN", "manual ok", step, "ok");
                    step++;


                    //@@ Set AUTO_Manual_Range_In @@//

                    step++;


                    Trace.WriteLine(iteSlot + "Waits for unit to respond to new DI value...");
                    Thread.Sleep(2000);


                    //@@ Sends .AUTOMAN command to the unit @@//

                    Helper.DoThis(myLD, ref myTestInfo, ".AUTOMAN", "automatic ok", step, "ok");
                    step++;


                    //@@ Sets the leak rate value for Reject Set Point #1. The helium leak rate value is in atm cc/sec. @@//

                    Helper.DoThis(myLD, ref myTestInfo, "1.0E-08 INIT-1REJECT", "ok", step, "ok");
                    step++;


                    //@@ Sets the leak rate value for Reject Set Point #2. The helium leak rate value is in atm cc/sec. @@//

                    Helper.DoThis(myLD, ref myTestInfo, "1.0E-08 INIT-2REJECT", "ok", step, "ok");
                    step++;


                    //@@ Sets the leak rate value for Reject Set Point #3. The helium leak rate value is in atm cc/sec. @@//

                    Helper.DoThis(myLD, ref myTestInfo, "1.0E-00 INIT-3REJECT", "ok", step, "ok");
                    step++;


                    //@@ Sets the leak rate value for Reject Set Point #4. The helium leak rate value is in atm cc/sec. @@//

                    Helper.DoThis(myLD, ref myTestInfo, "1.0E-08 INIT-4REJECT", "ok", step, "ok");
                    step++;


                    //@@ Pressure reject set point #1. @@//

                    Helper.DoThis(myLD, ref myTestInfo, "LOW-1REJECT", "ok", step, "ok");
                    step++;


                    //@@ Pressure reject set point #2. @@//

                    Helper.DoThis(myLD, ref myTestInfo, "LOW-2REJECT", "ok", step, "ok");
                    step++;


                    //@@ Pressure reject set point #3. @@//

                    Helper.DoThis(myLD, ref myTestInfo, "LOW-3REJECT", "ok", step, "ok");
                    step++;


                    //@@ Pressure reject set point #4. @@//

                    Helper.DoThis(myLD, ref myTestInfo, "LOW-4REJECT", "ok", step, "ok");
                    step++;


                    //@@ Turn ON reject set point #1 @@//

                    Helper.DoThis(myLD, ref myTestInfo, "ENABLE-1REJECT", "ok", step, "ok");
                    step++;


                    //@@ Turn ON reject set point #2 @@//

                    Helper.DoThis(myLD, ref myTestInfo, "ENABLE-2REJECT", "ok", step, "ok");
                    step++;


                    //@@ Turn ON reject set point #3 @@//

                    Helper.DoThis(myLD, ref myTestInfo, "ENABLE-3REJECT", "ok", step, "ok");
                    step++;


                    //@@ Turn ON reject set point #4 @@//

                    Helper.DoThis(myLD, ref myTestInfo, "ENABLE-4REJECT", "ok", step, "ok");
                    step++;


                    //@@ Set VENT_IN @@//

                    step++;


                    Trace.WriteLine(iteSlot + "Waits for unit to respond to new DI value...");
                    Thread.Sleep(10000);


                    //@@ Set TEST_IN @@//

                    step++;


                    Trace.WriteLine(iteSlot + "Waits for system leak rate to go below 8.0E-09...");
                    Thread.Sleep(35000);


                    //@@ Verify REJECT1_OUT @@//

                    step++;


                    //@@ Verify REJECT2_OUT @@//

                    step++;


                    //@@ Verify REJECT3_OUT @@//

                    step++;


                    //@@ Verify REJECT4_OUT @@//

                    step++;


                    //@@ Turn OFF reject set point #1 @@//

                    Helper.DoThis(myLD, ref myTestInfo, "DISABLE-1REJECT", "ok", step, "ok");
                    step++;


                    //@@ Turn OFF reject set point #2 @@//

                    Helper.DoThis(myLD, ref myTestInfo, "DISABLE-2REJECT", "ok", step, "ok");
                    step++;


                    //@@ Turn OFF reject set point #3 @@//

                    Helper.DoThis(myLD, ref myTestInfo, "DISABLE-3REJECT", "ok", step, "ok");
                    step++;


                    //@@ Turn OFF reject set point #4 @@//

                    Helper.DoThis(myLD, ref myTestInfo, "DISABLE-4REJECT", "ok", step, "ok");
                    step++;


                    //@@ Set PARALLEL_ENABLE_IN @@//

                    step++;


                    //Lorcfffdervvck DIO



                    //@@ Prompt user to disconnect the I/O tester @@//

                    step++;
                }

                break;
            }

            case "5.12.2 Wireless_Remote (Opt.)":
            {
                while (step <= myTestInfo.ResultsParams.NumResultParams)
                {
                    myTestInfo.ResultsParams[step].SpecMax = "Skip";
                    myTestInfo.ResultsParams[step].SpecMin = "Skip";
                    myTestInfo.ResultsParams[step].Nominal = "Skip";
                    myTestInfo.ResultsParams[step].Result  = "Skip";

                    step++;
                }

                break;
            }
            }
        }
예제 #21
0
 public void UserSetups(ref UUTData _uutData, ref CommonData _commonData)
 {
 }
예제 #22
0
        private void DoExperiment1(ref TestInfo myTestInfo, ref UUTData myUUTData, ref CommonData myCommonData)
        {
            try
            {
                var loop  = Convert.ToInt32(myTestInfo.TestParams[1].Value);
                var delay = Convert.ToInt32(myTestInfo.TestParams[2].Value);

                // Close all Test Valves
                InstrumentIO.CloseAllTestValve(mySw);
                Thread.Sleep(5000);
                InstrumentIO.OpenTestValve(mySw, 0);    // open NIST valve
                Thread.Sleep(5000);
                // Configure Thermocouple measurement
                InstrumentIO.ConfigureThermocouple(mySw);

                myTestInfo.ResultsParams = new PIResultsArray();
                List <PIResult> listOfPIResult = new List <PIResult>();
                for (int i = 0; i < loop; i++)
                {
                    listOfPIResult.Add(new PIResult
                    {
                        Label   = string.Format("NistLeakRate#{0}", i + 1),
                        SpecMin = "1E-7",
                        SpecMax = "2E-7",
                        Nominal = "1.5E-7",
                        Unit    = "std cc/sec"
                    });
                }
                for (int i = 0; i < loop; i++)
                {
                    listOfPIResult.Add(new PIResult
                    {
                        Label   = string.Format("NISTTemp#{0}", i + 1),
                        SpecMin = "15",
                        SpecMax = "30",
                        Nominal = "22.5",
                        Unit    = "Deg C"
                    });
                }
                for (int i = 0; i < loop; i++)
                {
                    listOfPIResult.Add(new PIResult
                    {
                        Label   = string.Format("UUTTemp#{0}", i + 1),
                        SpecMin = "15",
                        SpecMax = "30",
                        Nominal = "22.5",
                        Unit    = "Deg C"
                    });
                }
                for (int i = 0; i < loop; i++)
                {
                    listOfPIResult.Add(new PIResult
                    {
                        Label   = string.Format("UUTSensorTemp#{0}", i + 1),
                        SpecMin = "15",
                        SpecMax = "30",
                        Nominal = "22.5",
                        Unit    = "Deg C"
                    });
                }

                myTestInfo.ResultsParams.PIResArray      = listOfPIResult.ToArray();
                myTestInfo.ResultsParams.NumResultParams = listOfPIResult.Count;


                // Test start here
                for (int i = 1; i <= loop; i++)  // loop 5760 * 60 * 60  with 5sec delay = 8hrs
                {
                    /* Read
                     * (1) leak rate NIST,
                     * (2) Temp NIST
                     * (3) Temp UUT
                     * (4) Temp Sensor Board
                     */
                    var leakRate    = Convert.ToDouble(myLD.ReadLeakRate().Trim());
                    var nistTemp    = InstrumentIO.MeasureCalLeakTemp(mySw, 0);
                    var uutTemp     = InstrumentIO.MeasureCalLeakTemp(mySw, 1);
                    var uutSensTemp = InstrumentIO.MeasureBoardTemperature(mySw, myScope, 1);

                    Trace.WriteLine(string.Format("NIST Leak Rate #{0} = {1}std cc/sec   &    NIST Temp #{0} = {2} Deg C   &    DUT Temp #{0} = {3} Deg C   &   Board Temp #{0} = {4} Deg C", i, leakRate, nistTemp, uutTemp, uutSensTemp));
                    myTestInfo.ResultsParams[i].Result              = Math.Round(leakRate, 8).ToString();
                    myTestInfo.ResultsParams[i + loop].Result       = Math.Round(nistTemp, 3).ToString();
                    myTestInfo.ResultsParams[i + (loop * 2)].Result = Math.Round(uutTemp, 3).ToString();
                    myTestInfo.ResultsParams[i + (loop * 3)].Result = Math.Round(uutSensTemp, 3).ToString();

                    // Delay 5 seconds, maybe
                    Thread.Sleep(delay * 1000);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #23
0
        private void DoLeakRateTest(ref TestInfo myTestInfo, ref UUTData myUUTData, ref CommonData myCommonData)
        {
            try
            {
                var slope          = Convert.ToDouble(myTestInfo.TestParams[1].Value);
                var refTemp        = Convert.ToDouble(myTestInfo.TestParams[2].Value);
                var loop           = Convert.ToInt32(myTestInfo.TestParams[3].Value);
                var acquireDelay   = Convert.ToInt32(myTestInfo.TestParams[4].Value);
                var stabilizeDelay = Convert.ToInt32(myTestInfo.TestParams[5].Value);

                int slot = Convert.ToInt32(myCommonData.Slot);

                // Step #1: Measure leak rate and calculate normalized leak rate
                // Close all valves
                Trace.WriteLine("Verifying test valves are closed...");
                InstrumentIO.CloseAllTestValve(mySw);
                Thread.Sleep(3000);
                Trace.WriteLine("All valves are closed");
                // hold valve
                Trace.WriteLine("Set VS Leak Detector to HOLD mode");
                myLD.Hold();
                Thread.Sleep(3000);
                // Open Test Port
                Trace.WriteLine(String.Format("Open SLOT#{0} DUT's Test Valve", slot));
                InstrumentIO.OpenTestValve(mySw, slot);
                Thread.Sleep(2000);
                myLD.Rough();

                string status     = "";
                bool   isMidStage = myLD.WaitForFineTest(ref status);
                if (!isMidStage)
                {
                    myTestInfo.ResultsParams[1].Result = status;
                    Trace.WriteLine("Unable to set to MIDSTAGE state.");
                }

                bool isReadingStabilized = myLD.WaitForStabilizedReading(ref status);
                if (!isReadingStabilized)
                {
                    Trace.WriteLine("Timeout to get stable leak rate reading");
                }
                Thread.Sleep(stabilizeDelay * 1000);

                // Loop measurement for DUT's Leak Rate
                var listOfLeakRate  = new List <double>();
                var listOftemp      = new List <double>();
                var listOfBoardTemp = new List <double>();
                // Configure Thermocouple measurement
                InstrumentIO.ConfigureThermocouple(mySw);
                Trace.WriteLine(String.Format("Measuring DUT's Leak Rate and Temperature for {0} times.", loop));
                for (int i = 0; i < loop; i++)
                {
                    // read LeakRate
                    double leakRate  = Convert.ToDouble(myLD.ReadLeakRate());
                    var    dutTemp   = InstrumentIO.MeasureCalLeakTemp(mySw, slot);
                    var    boardTemp = InstrumentIO.MeasureBoardTemperature(mySw, myScope, slot);

                    Trace.WriteLine(string.Format("Leak Rate #{0} = {1}std cc/sec   &    DUT Temp #{0} = {2} Deg C   &   Board Temp #{0} = {3} Deg C", i + 1, leakRate, dutTemp, boardTemp));
                    listOfLeakRate.Add(leakRate);
                    listOftemp.Add(dutTemp);
                    listOfBoardTemp.Add(boardTemp);
                    Thread.Sleep(acquireDelay * 1000);     // delay in miliseconds
                }

                // calculate normalized leak rate
                var aveLeakRate = listOfLeakRate.Average();
                Trace.WriteLine("Average Leak Rate = " + aveLeakRate.ToString());

                var aveTemp = listOftemp.Average();
                Trace.WriteLine("Average DUT's Temperature = " + aveTemp.ToString());

                var aveBoardTemp = listOfBoardTemp.Average();
                Trace.WriteLine("Average Board's Temperature = " + aveBoardTemp.ToString());

                Trace.WriteLine(string.Format("Calculating DUT Normalized Leak Rate at {0} Deg Celcius reference temperature", refTemp));
                var normLeakRateDouble = TestHelper.CalculateNormLeakRate(slope, refTemp, aveLeakRate, aveTemp);
                Trace.WriteLine("Normalized Leak Rate = " + normLeakRateDouble.ToString());

                // store result
                var normLeakRate = Math.Round(normLeakRateDouble, 9);
                Trace.WriteLine("Normalized Leak Rate = " + normLeakRate.ToString());
                //myTestInfo.ResultsParams[1].Result = normLeakRate.ToString();
                myTestInfo.ResultsParams[1].Result = Math.Round(aveLeakRate, 9).ToString();

                // Step #2: Temperature measurement to get Factor (Delta DegC between board and cal leak can's temperature
                // Get Can's temp
                //var cansTemp = InstrumentIO.MeasureCalLeakTemp(mySw, slot);
                Trace.WriteLine("DUT Temperature (Thermocouple)  :  " + aveTemp.ToString());
                myTestInfo.ResultsParams[2].Result = Math.Round(aveTemp, 1).ToString();
                // Measure Board Temperature
                //InstrumentIO.SetupBoardTempMeasRoute(mySw, myScope, slot);   // setup route for BoardTemp supply and output 5V and TTL signal output

                myTestInfo.ResultsParams[3].Result = Math.Round(aveBoardTemp, 1).ToString();
                //InstrumentIO.DisconnectTempBoardMeasRoute(mySw, slot);
                Trace.WriteLine("DUT Temperature (PCB)           :  " + aveBoardTemp.ToString());
                // calc temp difference
                var deltaTemp = aveBoardTemp - aveTemp;
                Trace.WriteLine("Temperature Difference          :  " + deltaTemp.ToString());
                // store result
                myTestInfo.ResultsParams[4].Result = Math.Round(deltaTemp, 1).ToString();

                // Close Test Valve
                InstrumentIO.CloseTestValve(mySw, slot);

                // Set LeakRate and Factor properties to be used for averaging at the end of the test
                UUTLeakRate   = Math.Round(aveLeakRate, 9);//normLeakRateDouble;
                UUTTempFactor = deltaTemp;
                UUTTemp       = aveTemp;
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #24
0
        public static TestInfo DoSeq5_4(VSLeakDetector myLD, ref TestInfo MyTestInfo, ref UUTData myuutdata)
        {
            //VSLeakDetector myLD = new VSLeakDetector(comPort);
            //myLD.iteSlot = iteSlot;
            string  retval;
            Boolean status = false;
            int     step   = 1;

            Helper.comPort = comPort;

            try
            {
                switch (MyTestInfo.TestLabel)
                {
                case "5.4.1 uut_config":
                {
                    step = 1;
                    while (step <= MyTestInfo.ResultsParams.NumResultParams)
                    {
                        //@@ Enable Auto ranging mode @@//

                        Trace.WriteLine(iteSlot + "Enable auto ranging mode...");

                        status = Helper.DoThis(myLD, ref MyTestInfo, "AUTO", "ok", step, "ok");
                        step++;

                        Thread.Sleep(2000);


                        //@@ Turns the auto sequencer function OFF @@//

                        Trace.WriteLine(iteSlot + "Disable auto sequencer function...");

                        status = Helper.DoThis(myLD, ref MyTestInfo, "DISABLE-SEQUENCER", "ok", step, "ok");
                        step++;

                        Thread.Sleep(2000);


                        //@@ Set test preessure to 1.0 Torr @@//

                        Trace.WriteLine(iteSlot + "Set test pressure to unity");

                        status = Helper.DoThis(myLD, ref MyTestInfo, "10.0E-0 INIT-CL-XFER", "ok", step, "ok");
                        step++;

                        Thread.Sleep(2000);


                        /*@@ An integer that scales the leak rate to account for deviations in helium compression ratios
                         * between contraflow and midstage modes in fast turbo speed @@*/

                        Trace.WriteLine(iteSlot + "Scales the leak rate to account for deviations in helium compression ratios betwen Test & FineTest modes in fast turbo speed...");

                        status = Helper.DoThis(myLD, ref MyTestInfo, "90 INIT-FAST-VGAIN", "ok", step, "ok");
                        step++;

                        Thread.Sleep(2000);


                        //@@ Sets which type of calibration will be run if the CALIBRATE command is initiated.  Preceded by 0 or 1, 0 = FULL cal, 1 = FAST cal @@//

                        Trace.WriteLine(iteSlot + "Run full calibration...");

                        status = Helper.DoThis(myLD, ref MyTestInfo, "0 INIT-QUICK-CAL", "ok", step, "0");
                        step++;

                        Thread.Sleep(2000);


                        //@@ GETeeTCs @@//

                        Trace.WriteLine(iteSlot + "Send command: GETeeTCs...");

                        status = Helper.DoThis(myLD, ref MyTestInfo, "GETeeTCs", "ok", step, "ok");
                        step++;

                        Thread.Sleep(2000);


                        //@@ ON Softstart @@//

                        Trace.WriteLine(iteSlot + "Informs turbo to start with softstart ON...");

                        status = Helper.DoThis(myLD, ref MyTestInfo, "SOFTSTARTON", "ok", step, "ok");
                        step++;

                        Thread.Sleep(2000);


                        //@@ Prompt the operator to prepare to listen for the valves actuating @@//

                        Trace.WriteLine(iteSlot + "Ready to listen for the valves actuating...");

                        string display = "Seq 5.4.1: \nPlease prepare to listen for the valve actuating.\n\nEnter 'ok' to proceed the test once ready.";
                        retval = Helper.LabelDisplay(display);

                        if (retval == "ok")
                        {
                            MyTestInfo.ResultsParams[step].Result = "ok";
                            Trace.WriteLine(iteSlot + "Test point complete.");
                        }

                        else
                        {
                            MyTestInfo.ResultsParams[step].Result = "FAILED";
                            Trace.WriteLine(iteSlot + "Test point failed.");
                        }

                        step++;
                        Thread.Sleep(2000);


                        //@@ Open the vent valve and a sound shall be heard when changing state @@//

                        Trace.WriteLine(iteSlot + "Opening vent valve...");

                        status = Helper.DoThis(myLD, ref MyTestInfo, "VENT_VALVE OPEN", "ok", step, "ok");
                        step++;

                        Thread.Sleep(2000);


                        //@@ Verify audible run prompt @@//

                        Trace.WriteLine(iteSlot + "Verify whether the actuation is heard during the opening of the vent valve...");

                        display = "Seq 5.4.1: \nEnter 'ok' if the actuation is heard when the valve is opened.\n\nEnter 'no' if nothing is heard after the valve has opened.";
                        retval  = Helper.LabelDisplay(display);

                        if (retval == "ok")
                        {
                            MyTestInfo.ResultsParams[step].Result = "ok";
                            Trace.WriteLine(iteSlot + "Test point complete.");
                        }

                        else
                        {
                            MyTestInfo.ResultsParams[step].Result = "FAILED";
                            //throw new Exception("Test point failed.");
                        }

                        step++;
                        Thread.Sleep(2000);
                    }

                    break;
                }

                case "5.4.2 TestPortConvectorr_ATM":
                case "5.4.14 TestPortConvectorr_ATM":
                {
                    step = 1;
                    // wait for system ready first
                    Trace.WriteLine(iteSlot + "Waiting for system ready...");
                    var sysReady = Helper.Wait_SystemReady(myLD);
                    Trace.WriteLine(iteSlot + "... ready!");
                    Thread.Sleep(2000);         // delay two seconds
                                                //while (step <= MyTestInfo.ResultsParams.NumResultParams)
                    ///{
                    //@@ Sets the current test port thermocouple reading to represent atmospheric pressure when the test port is exposed to atmosphere @@//

                    Trace.WriteLine(iteSlot + "Sets the current test port thermocouple reading to ATM when exposing to atmosphere...");

                    status = Helper.DoThis(myLD, ref MyTestInfo, "TPTCATM", "ok", step, "ok");
                    step++;

                    Thread.Sleep(2000);


                    /*@@ Obtain pressure level. Reports two lines. each begins with a <cr><lf>.
                     * The first line consists of the words test port TC followed by a number in mTorr. The second line consists of the words system TC followed by a number in uTorr. @@*/

                    Trace.WriteLine(iteSlot + "Obtain and verify the TP and system pressure level...");

                    retval = Helper.SendCommand(myLD, ref status, "?PRESSURES", "ok");

                    if (status == true)
                    {
                        //Obtain test port pressure level
                        string[] response = retval.Split(new string[] { "(mTorr): ", "\r\nSpectrometer" }, StringSplitOptions.RemoveEmptyEntries);

                        //obtain system pressure level
                        string[] response2 = retval.Split(new string[] { "Spectrometer (uTorr): ", " ok\r\n" }, StringSplitOptions.RemoveEmptyEntries);

                        Pressure        = Convert.ToInt32(response[1]);
                        System_pressure = Convert.ToInt32(response2[1]);

                        Trace.WriteLine(iteSlot + "Pressure: " + Pressure + "mTorr   System Pressure: " + System_pressure + "uTorr");
                        // commented out below manual limit checking, use test executive to do the limit checking and display the result correctly
                        MyTestInfo.ResultsParams[2].Result = Pressure.ToString();
                        MyTestInfo.ResultsParams[3].Result = system_pressure.ToString();
                        //if (Pressure >= 700000 && Pressure <= 760000 && System_pressure < 2)
                        //{
                        //    MyTestInfo.ResultsParams[step].Result = "ok";
                        //    Trace.WriteLine(iteSlot + "Test point complete.");
                        //}
                        //else
                        //{
                        //    MyTestInfo.ResultsParams[step].Result = "FAILED";
                        //    //throw new Exception("Test point failed.");
                        //}
                    }
                    else
                    {
                        MyTestInfo.ResultsParams[step].Result = "FAILED";
                        throw new Exception("Test point failed.");
                    }

                    step++;
                    Thread.Sleep(5000);
                    //}
                }
                break;

                case "5.4.7 turbo_pump Init":
                {
                    step = 1;

                    while (step <= MyTestInfo.ResultsParams.NumResultParams)
                    {
                        //@@ Access full command @@//

                        Trace.WriteLine(iteSlot + "Access to full command...");

                        status = Helper.DoThis(myLD, ref MyTestInfo, "XYZZY", "ok", step, "ok");
                        step++;

                        Thread.Sleep(2000);


                        //@@ Verify the state of softstart @@//

                        Trace.WriteLine(iteSlot + "Verify the status of softstart...");

                        //status = Helper.DoThis(ref MyTestInfo, "?SOFTSTART", "on ok", step, "ok");
                        status = Helper.DoThis(myLD, ref MyTestInfo, "?SOFTSTART", new string[] { "on", "ok" }, step, "ok");          // Hairus changed to check array contains 26 Jul 17
                        Thread.Sleep(6000);

                        step++;

                        //(MOD: It is necessary to wait for the UUT to fully stabilized before roughing the system)

                        Trace.WriteLine(iteSlot + "Wait for system to get ready...");

                        Helper.Wait_SystemReady(myLD);


                        //@@ Causes the leak detector to begin roughing on the test port only @@//

                        Trace.WriteLine(iteSlot + "Rough the UUT...");

                        status = Helper.DoThis(myLD, ref MyTestInfo, "ROUGH", "ok", step, "ok");
                        step++;

                        Thread.Sleep(2000);


                        //@@ Obtain the details about the state of the turbo pump @@//

                        Trace.WriteLine(iteSlot + "Verify the status and condition of the turbo pump...");

                        retval = Helper.SendCommand(myLD, ref status, "?TURBO", "Turbo Ready", "Turbo No Fault");

                        if (status == true)
                        {
                            Trace.WriteLine(iteSlot + "Test point complete.");
                            MyTestInfo.ResultsParams[step].Result = "ok";

                            //string[] response = retval.Split(new string[] { "(RPM): ", " \r\nTurbo Temp" }, StringSplitOptions.RemoveEmptyEntries);
                            //Speed = Convert.ToInt32(response[1]);

                            string[] newResponse        = retval.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
                            string   turboSpeedResponse = newResponse.SingleOrDefault(x => x.Contains("(RPM)"));
                            string   speedText          = turboSpeedResponse.Split(':').LastOrDefault();
                            Speed = Convert.ToInt32(speedText);
                        }

                        else
                        {
                            MyTestInfo.ResultsParams[step].Result = "FAILED";
                            throw new Exception("Test point failed.");
                        }

                        step++;


                        //@@ Retrieve and verify the turbo pump speed in RPM @@//

                        Trace.WriteLine(iteSlot + "Verify the measured speed of the turbo pump in RPM...(Measured speed = " + Speed + ")");

                        if (Speed >= Convert.ToInt32(MyTestInfo.ResultsParams[step].SpecMin) && Speed <= Convert.ToInt32(MyTestInfo.ResultsParams[step].SpecMax))
                        {
                            MyTestInfo.ResultsParams[step].Result  = Convert.ToString(Speed);
                            MyTestInfo.ResultsParams[step].Nominal = Convert.ToString(Speed);

                            Trace.WriteLine(iteSlot + "Test point complete.");
                        }
                        else
                        {
                            MyTestInfo.ResultsParams[step].Result = "FAILED";
                            throw new Exception("Test point failed.");
                        }

                        step++;
                        Thread.Sleep(2000);
                    }

                    break;
                }

                case "5.4.10 Valve State":
                {
                    step = 1;

                    while (step <= MyTestInfo.ResultsParams.NumResultParams)
                    {
                        //@@ Prompt user to press ZERO if unit is stuck in CONTRAFLOW @@//

                        Trace.WriteLine(iteSlot + "Auto 'ZERO' if unit is stuck in TEST mode...");

                        status = Helper.Stuck_Contra(myLD);

                        if (status == true)
                        {
                            MyTestInfo.ResultsParams[step].Result = "ok";
                            Trace.WriteLine(iteSlot + "Test point complete.");
                        }

                        step++;


                        //@@ Turn softstart OFF @@//

                        Trace.WriteLine(iteSlot + "Informs turbo to start with softstart OFF...");

                        status = Helper.DoThis(myLD, ref MyTestInfo, "SOFTSTARTOFF", "ok", step, "ok");
                        step++;

                        Thread.Sleep(30000);


                        //@@ Verify Valve State @@//

                        Trace.WriteLine(iteSlot + "Verify the valve state...");

                        status = Helper.DoThis(myLD, ref MyTestInfo, "?VALVESTATE", "MIDSTAGE", step, "ok");
                        step++;
                    }

                    break;
                }

                case "5.4.11 IMG100_Test":
                {
recheck:
                    string XGSstatus = SQL_XGS.Read_XGS_status();
                    if (XGSstatus != "No")
                    {
                        MessageBox.Show("XGS locked", "warning", MessageBoxButtons.OK);
                        Thread.Sleep(5000);
                        goto recheck;
                    }


                    step = 1;
                    string slotNumber = myuutdata.Options;
                    string imgCode    = "IMG" + slotNumber;
                    string cnvCode    = "GATE" + slotNumber;
                    string comm       = "COM6";
                    //@@ IMG 100 Test, to ensure the pressure contained inside the UUT is below 5E-4 Torr @@//


                    // DB close IMG 100 YS WONG to add in
                    SQL_XGS.Update_XGS(slotNumber, "Yes");

                    WaitIMG100HighVacuumTest my_waitIMG100 = new WaitIMG100HighVacuumTest();
                    var pressure_reading = my_waitIMG100.GetHighVacuumReading(comm, "00", imgCode, cnvCode);

                    MyTestInfo.ResultsParams[step].Result = pressure_reading.ToString();



                    break;
                }

                case "5.4.12 TestPortConvectorr_Zero":
                {
                    step = 1;

                    //while (step <= MyTestInfo.ResultsParams.NumResultParams)
                    //{
                    //@@ Calibrate the test port convectorr gauge to 'zero' @@//

                    Trace.WriteLine(iteSlot + "Calibrate the test port convectorr gauge to ZERO...");

                    status = Helper.DoThis(myLD, ref MyTestInfo, "TPTCZERO", "ok", step, "ok");
                    step++;


                    //@@ Obtain system and test port pressure level @@//

                    Trace.WriteLine(iteSlot + "Obtain and verify the TP and system pressure level...");

                    retval = Helper.SendCommand(myLD, ref status, "?PRESSURES", "ok");

                    if (status == true)
                    {
                        string[] response  = retval.Split(new string[] { "(mTorr): ", "\r\nSpectrometer" }, StringSplitOptions.RemoveEmptyEntries);
                        string[] response2 = retval.Split(new string[] { "Spectrometer (uTorr): ", " ok\r\n" }, StringSplitOptions.RemoveEmptyEntries);

                        Pressure        = Convert.ToInt32(response[1]);
                        System_pressure = Convert.ToInt32(response2[1]);

                        Trace.WriteLine(iteSlot + "Pressure: " + Pressure + "mTorr   System Pressure: " + System_pressure + "uTorr");

                        //Verify the qualification of both pressure level
                        MyTestInfo.ResultsParams[step].Result = Pressure.ToString();
                        step++;
                        MyTestInfo.ResultsParams[step].Result = System_pressure.ToString();
                    }
                    else
                    {
                        MyTestInfo.ResultsParams[step].Result = "FAILED";
                        throw new Exception("Test point failed.");
                    }
                    // DB to open back IMG 100n
                    SQL_XGS.Update_XGS(myuutdata.Options, "No");
                    step++;
                    //}

                    break;
                }

                case "5.4.13 Vent to ATM":
                {
                    step = 1;


                    //@@ Vent to Atmosphere @@//

                    Trace.WriteLine(iteSlot + "Vent the UUT to atmosphere...");

                    status = Helper.DoThis(myLD, ref MyTestInfo, "VENT", "VENT ok", step, "ok");
                    step++;
checkagain:
                    retval = Helper.SendCommand(myLD, ref status, "?PRESSURES", "ok");

                    string[] resp     = retval.Split(new string[] { "(mTorr): ", "\r\nSpectrometer" }, StringSplitOptions.RemoveEmptyEntries);
                    int      Pressure = Convert.ToInt32(resp[1]);


                    Trace.WriteLine(iteSlot + "Pressure: " + Pressure + "mTorr   System Pressure: ");
                    // commented out below manual limit checking, use test executive to do the limit checking and display the result correctly
                    if (!(Pressure >= 700000 && Pressure <= 760000))
                    {
                        Thread.Sleep(2000);
                        goto checkagain;
                    }
                    // YS wong added to make sure vented properly

                    Thread.Sleep(1000);

                    //@@ Wait for UUT to vent to atmosphere @@//

                    Trace.WriteLine(iteSlot + "Wait for UUT to vent to atmosphere...");


                    MyTestInfo.ResultsParams[step].Result = "ok";

                    Trace.WriteLine(iteSlot + "Test point complete.");

                    step++;


                    //@@ Obtain pressure level @@//

                    Trace.WriteLine(iteSlot + "Obtain and verify the TP pressure level...");

                    retval = Helper.SendCommand(myLD, ref status, "?PRESSURES", "ok");

                    if (status == true)
                    {
                        string[] response = retval.Split(new string[] { "(mTorr): ", "\r\nSpectrometer" }, StringSplitOptions.RemoveEmptyEntries);

                        Pressure = Convert.ToInt32(response[1]);

                        Trace.WriteLine(iteSlot + "Pressure: " + Pressure + "mTorr");
                        MyTestInfo.ResultsParams[step].Result = Convert.ToString(Pressure);
                        Trace.WriteLine(iteSlot + "Test point complete.");
                    }
                    else
                    {
                        MyTestInfo.ResultsParams[step].Result = "FAILED";
                        //throw new Exception("Test point failed.");
                    }



                    break;
                }

                case "5.4.16 ReloadUUT":
                {
                    step = 1;


                    //@@ wait for the UUT to respond with its 'wake up' prompt after sending command 'RELOAD' @@//

                    Trace.WriteLine(iteSlot + "Reloading the UUT...");

                    status = Helper.Reload(myLD);

                    if (status == true)
                    {
                        MyTestInfo.ResultsParams[step].Result = "ok";
                    }
                    else
                    {
                        MyTestInfo.ResultsParams[step].Result = "FAILED";
                    }
                    step++;


                    //@@ After reload, wait for system ready. if the system is ready, value '-1' will be returned, else '0' . The timeout is 3 mins. @@//

                    Trace.WriteLine(iteSlot + "Wait for system to get ready...");

                    status = Helper.Wait_SystemReady(myLD);

                    if (status == true)
                    {
                        MyTestInfo.ResultsParams[step].Result = "ok";
                    }
                    else
                    {
                        MyTestInfo.ResultsParams[step].Result = "FAILED";
                    }
                    step++;


                    break;
                }

                case "5.4.17 Final Verification":
                {
                    step = 1;
                    //@@ Access to full command @@//

                    Trace.WriteLine(iteSlot + "Access to full command...");

                    status = Helper.DoThis(myLD, ref MyTestInfo, "XYZZY", "ok", step, "ok");
                    step++;


                    //@@ Verify softstart state @@//

                    Trace.WriteLine(iteSlot + "Verify the status of softstart...");

                    status = Helper.DoThis(myLD, ref MyTestInfo, "?SOFTSTART", "ok", step, "ok");

                    break;
                }
                }
            }

            catch (Exception ex)
            {
                Trace.WriteLine(ex.Message);
                Helper.Fail_Test(ref MyTestInfo, ex.Message, step);
                throw;
            }

            return(MyTestInfo);
        }
예제 #25
0
 /// When the iTestExec loaded this method will be invoked
 public void TestExecLoaded(ref UUTData _uutData, ref CommonData _commonData)
 {
 }
예제 #26
0
        public void Execute(ref TestInfo myTestInfo, ref UUTData myUUTData, ref CommonData myCommonData, List <double> listOfLeakRate, List <double> listOfTempFactor, List <double> listOfTemp)
        {
            try
            {
                var slope   = Convert.ToDouble(myTestInfo.TestParams[1].Value);
                var refTemp = Convert.ToDouble(myTestInfo.TestParams[2].Value);

                switch (myTestInfo.TestLabel)
                {
                case "FinalizeLeakAndFactor":
                {
                    Trace.WriteLine(string.Format("Total {0} measurements for DUT Leak Rate:-", listOfLeakRate.Count()));
                    for (int i = 0; i < listOfLeakRate.Count(); i++)
                    {
                        Trace.WriteLine(String.Format("     Leak Rate #{0} = {1} std cc/s", i + 1, listOfLeakRate[i]));
                    }
                    var averageLeak = listOfLeakRate.Average();
                    Trace.WriteLine("Average Leak Rate = " + averageLeak.ToString());
                    var averageLeakSci = Math.Round(averageLeak, 9);
                    Trace.WriteLine("Average Leak Rate = " + averageLeakSci.ToString());

                    Trace.WriteLine(string.Format("Total {0} measurements for DUT Temperature Factor:-", listOfTempFactor.Count()));
                    for (int i = 0; i < listOfTempFactor.Count(); i++)
                    {
                        Trace.WriteLine(String.Format("     Temp Factor #{0} = {1} deg C", i + 1, listOfTempFactor[i]));
                    }
                    var averageFactor = listOfTempFactor.Average();
                    Trace.WriteLine("Average Temp Factor = " + averageFactor.ToString());
                    var averageFactorSci = Math.Round(averageFactor, 2);
                    Trace.WriteLine("Average Temp Factor = " + averageFactorSci.ToString());

                    Trace.WriteLine(string.Format("Total {0} measurements for DUT Temperature :-", listOfTemp.Count()));
                    for (int i = 0; i < listOfTemp.Count(); i++)
                    {
                        Trace.WriteLine(String.Format("     Temperature #{0} = {1} deg C", i + 1, listOfTemp[i]));
                    }
                    var averageTemp = listOfTemp.Average();
                    Trace.WriteLine("Average Temp = " + averageTemp.ToString());
                    var averageTempSci = Math.Round(averageTemp, 2);
                    Trace.WriteLine("Average Temp = " + averageTempSci.ToString());

                    Trace.WriteLine(string.Format("Calculating DUT Normalized Leak Rate at {0} Deg Celcius reference temperature", refTemp));
                    var normLeakRateDouble = TestHelper.CalculateNormLeakRate(slope, refTemp, averageLeak, averageTemp);
                    Trace.WriteLine("Normalized Leak Rate = " + normLeakRateDouble.ToString());


                    myTestInfo.ResultsParams[1].Result = averageLeakSci.ToString();
                    myTestInfo.ResultsParams[2].Result = Math.Round(averageFactorSci, 1).ToString();
                    myTestInfo.ResultsParams[3].Result = Math.Round(averageTempSci, 1).ToString();
                    myTestInfo.ResultsParams[4].Result = Math.Round(normLeakRateDouble, 9).ToString();
                }
                break;

                case "SubmitSerialNumber":
                {
                }
                break;

                case "SubmitTestData":
                {
                }
                break;

                default:
                    break;
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #27
0
        public static TestInfo DoSeq5_12(VSLeakDetector myLD, ref TestInfo myTestInfo, ref UUTData myuutdata)
        {
            try
            {
                switch (myTestInfo.TestLabel)
                {
                case "5.12.1 Test_IOBoard (Opt.)":
                {
                    if (IsIOEnabled)
                    {
                        DoIOBoardTest(myLD, ref myTestInfo, ref myuutdata);
                    }
                    else
                    {
                        step = 1;
                        while (step <= myTestInfo.ResultsParams.NumResultParams)
                        {
                            myTestInfo.ResultsParams[step].SpecMax = "Skip";
                            myTestInfo.ResultsParams[step].SpecMin = "Skip";
                            myTestInfo.ResultsParams[step].Nominal = "Skip";
                            myTestInfo.ResultsParams[step].Result  = "Skip";

                            step++;
                        }
                    }
                }
                break;

                case "5.12.2 Wireless_Remote (Opt.)":
                {
                    if (IsWirelessEnabled)
                    {
                        DoWirelessTest(myLD, ref myTestInfo, ref myuutdata);
                    }
                    else
                    {
                        step = 1;
                        while (step <= myTestInfo.ResultsParams.NumResultParams)
                        {
                            myTestInfo.ResultsParams[step].SpecMax = "Skip";
                            myTestInfo.ResultsParams[step].SpecMin = "Skip";
                            myTestInfo.ResultsParams[step].Nominal = "Skip";
                            myTestInfo.ResultsParams[step].Result  = "Skip";

                            step++;
                        }
                    }
                }
                break;

                default:
                    break;
                }

                //if (mystartupform.Customer_opt == "IO Board")
                //{
                //    IOBoard(ref myTestInfo, ref myuutdata);
                //}

                //else if (mystartupform.Customer_opt == "Wireless Remote")
                //{
                //    Wireless_Remote(ref myTestInfo, ref myuutdata);
                //}

                //else if( mystartupform.Customer_opt == "Both")
                //{
                //    Both(ref myTestInfo, ref myuutdata);
                //}

                //else
                //{
                //    None(ref myTestInfo, ref myuutdata);
                //}
            }

            catch (Exception ex)
            {
                Trace.WriteLine(ex.Message);
                Helper.Fail_Test(ref myTestInfo, ex.Message, step);
                throw;
            }

            return(myTestInfo);
        }
예제 #28
0
        private void DoExternalCal(ref TestInfo myTestInfo, ref UUTData myUUTData, ref CommonData myCommonData)
        {
            try
            {
                var delay = Convert.ToInt32(myTestInfo.TestParams[1].Value);

                // Make sure all valve is closed.
                InstrumentIO.CloseAllTestValve(mySw);
                string retVal = string.Empty;

                // Rough vacuum
                Trace.WriteLine("Roughing in progress...");
                myLD.Rough();
                Thread.Sleep(10000);
                //bool isContraFlow = myLD.WaitForContraFlow(ref retVal);
                bool isMidStage = myLD.WaitForFineTest(ref retVal);
                if (!isMidStage)
                {
                    myTestInfo.ResultsParams[1].Result = retVal;
                    Trace.WriteLine("Unable to set to MIDSTAGE state.");
                }

                Thread.Sleep(5000);
                // Once in Fine-Test mode, let the leak rate to stabilize
                double zeroleakrate = Convert.ToDouble(myLD.ReadLeakRate());
                int    timerys      = 0;
                while (zeroleakrate > 5E-10)
                {
                    Thread.Sleep(1000);
                    zeroleakrate = Convert.ToDouble(myLD.ReadLeakRate());
                    Trace.WriteLine("calibration wait time: " + timerys);
                    timerys++;
                    if (timerys == 180)
                    {
                        Trace.WriteLine("Zero-ing");
                        myLD.Zero();
                        Thread.Sleep(2000);
                        //MessageBox.Show("to reach 5E-10 in 15 minutes","Fail",MessageBoxButtons.OK);
                        //myTestInfo.ResultsParams[1].Result = "FAIL";
                        break;
                    }
                }


                // Set LD to Hold state
                myLD.Hold();
                Thread.Sleep(5000);

                // Open NIST Valve
                Trace.WriteLine("Open NIST Test Valve.");
                InstrumentIO.OpenTestValve(mySw, 0);
                Thread.Sleep(1000);

                // Now set the LD to TEST mode
                var stat = myLD.Rough();
                Thread.Sleep(10000);
                isMidStage = myLD.WaitForFineTest(ref retVal);
                if (!isMidStage)
                {
                    myTestInfo.ResultsParams[1].Result = retVal;
                    Trace.WriteLine("Unable to set to MIDSTAGE state.");
                }
                else
                {
                    myTestInfo.ResultsParams[1].Result = "FINETEST";
                    // Delay 2 minutes for the LD to stabilize.
                    Trace.WriteLine("Waiting for the VS Leak Detector to stabilize in 2 minutes");
                    Thread.Sleep(delay * 1000);   // wait for 2 minutes (120,000 miliseconds)
                    Trace.WriteLine("VS Leak Detector is now stabilized");

                    var  stab       = "";
                    bool stabilized = myLD.WaitForStabilizedReading(ref stab);
                    if (stabilized)
                    {
                        Trace.WriteLine("Leak rate reading is stabilized!");
                    }
                    else
                    {
                        Trace.WriteLine("Timeout to get stable leak rate reading!");
                    }

                    // Now calibrate the VS Leak Detector.
                    string calStatus = myLD.Calibrate();        // Default timeout for calibration is 300seconds, change to overload method and provide new Timeout value
                    Thread.Sleep(10000);
                    bool isCalibrationOK = myLD.CalIsOK();
                    if (isCalibrationOK)
                    {
                        Trace.WriteLine("Last calibration status is OK");
                    }
                    else
                    {
                        Trace.WriteLine("Fail Calibration!!");
                    }

                    // Check the LeakRate
                    Trace.WriteLine("Read back the LeakRate from the VS Leak Detector");
                    var leakRate = Convert.ToDouble(myLD.ReadLeakRate().Trim());
                    Trace.WriteLine(string.Format("NIST LeakRate Measurement = {0}", leakRate));
                    var storedLeakRate = Convert.ToDouble(myLD.GetExternalLeakValue().Trim());
                    var leakDelta      = leakRate - storedLeakRate;//Math.Abs(storedLeakRate - leakRate);
                    Trace.WriteLine("Difference between measured and stored leak rate = " + leakDelta.ToString());

                    // Save Result
                    myTestInfo.ResultsParams[2].Result = leakRate.ToString();
                    double lowerLimit = storedLeakRate - 0.2E-7;
                    double upperLimit = storedLeakRate + 0.2E-7;
                    myTestInfo.ResultsParams[2].SpecMax = Math.Round(upperLimit, 9).ToString();
                    myTestInfo.ResultsParams[2].SpecMin = Math.Round(lowerLimit, 9).ToString();
                    myTestInfo.ResultsParams[3].Result  = Math.Round(leakDelta, 10).ToString();
                    if (leakDelta > 0.2E-7)   // If more than +-2 division.
                    {
                        // Calibrate fail.
                        // todo: do we need to recalibrate or just proceed.
                    }
                }

                // Close all Test Valves
                InstrumentIO.CloseAllTestValve(mySw);
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #29
0
 ///To set constant variable for testing purpose
 public void TestSetup(ref TestInfo myTestInfo, ref UUTData _uutData, ref CommonData _commonData)
 {
 }
예제 #30
0
 public static void DoWirelessTest(VSLeakDetector myLD, ref TestInfo myTestInfo, ref UUTData myuutdata)
 {
     try
     {
     }
     catch (Exception)
     {
         throw;
     }
 }