예제 #1
0
        public TestModeEquipmentParameters[] GetCurrentEquipmentInf(string EquipmentID)
        {
            TestModeEquipmentParameters[] pEquipmentStruct;
            DataTable DtEquipmentParameter = new DataTable();


            string Selectconditions = null;
            string StrTableName     = "TopoEquipment";


            StrTableName = "TopoEquipmentParameter";

            Selectconditions = "select * from " + StrTableName + " where PID= " + EquipmentID + " order by ID";

            DtEquipmentParameter = MyDataio.GetDataTable(Selectconditions, StrTableName);

            pEquipmentStruct = new TestModeEquipmentParameters[DtEquipmentParameter.Rows.Count];

            SortedList <string, string> MyEquipmentInfList = new SortedList <string, string>();

            int i = 0;

            foreach (DataRow drEquipmentParameter in DtEquipmentParameter.Rows)
            {
                pEquipmentStruct[i].FiledName    = drEquipmentParameter["Item"].ToString().Trim().ToUpper();
                pEquipmentStruct[i].DefaultValue = drEquipmentParameter["ItemValue"].ToString().Trim().ToUpper();
                i++;
            }
            return(pEquipmentStruct);
        }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
//            FLEX86100 tempScope = (ATS_Driver.FLEX86100)pflowControl.MyEquipList["FLEX86100_7_SCOPE"];
//            tempScope.SetMaskAlignMethod(1);
//            tempScope.SetMode(0);//0="EYE"
//            tempScope.MaskONOFF(false);
//            tempScope.SetRunTilOff();
//            tempScope.RunStop(true);
//            tempScope.OpenOpticalChannel(true)
//;//true is OPTChannel or ELEChannel
//            tempScope.AutoScale();
//            tempScope.CenterEye();
//            tempScope.AutoScale();
//            tempScope.SetruntilMod(700, 1);
//            tempScope.RunStop(true);
//            tempScope.ClearDisplay();
//            tempScope.DisplayER();
//            tempScope.DisplayEyeAmplitude();
//            tempScope.DisplayCrossing();
//            Thread.Sleep(1000);
//            tempScope.ClearDisplay();
//            Thread.Sleep(1000);
//            tempScope.WaitUntilComplete();
//             byte  marginVaulue = tempScope.MaskTest();
//            tempScope.SetruntilMod(0, 0);
//            tempScope.RunStop(false);
//            tempScope.ClearMesures();
//            tempScope.RunStop(true);
//            tempScope.SetruntilMod(0, 0);
//            tempScope.AutoScale();
//            Thread.Sleep(1000);
//          double   apWat = tempScope.GetAveragePowerWatt();
//          double jitterRMS = tempScope.GetJitterRMS();
//          double jitterPP = tempScope.GetJitterPP();
//          double riseTime = tempScope.GetRisetime();
//          double fallTime = tempScope.GetFalltime();
//          double crossing = tempScope.GetCrossing();
//          double er = tempScope.GetEratio();
//          double apDBM = tempScope.GetAveragePowerdbm();


            TestModeEquipmentParameters[] psstruct1 = new TestModeEquipmentParameters[16];
            //MP1800ED ed = new MP1800ED();

            psstruct1[0].FiledName     = "Addr";
            psstruct1[0].DefaultValue  = "1";
            psstruct1[1].FiledName     = "IOType";
            psstruct1[1].DefaultValue  = "GPIB";
            psstruct1[2].FiledName     = "Reset";
            psstruct1[2].DefaultValue  = "false";
            psstruct1[3].FiledName     = "Name";
            psstruct1[3].DefaultValue  = "MP1800ED";
            psstruct1[4].FiledName     = "CURRENTCHANNEL";
            psstruct1[4].DefaultValue  = "1";
            psstruct1[5].FiledName     = "SLOT";
            psstruct1[5].DefaultValue  = "3";
            psstruct1[6].FiledName     = "TOTALCHANNELS";
            psstruct1[6].DefaultValue  = "4";
            psstruct1[7].FiledName     = "DATAINPUTINTERFACE";
            psstruct1[7].DefaultValue  = "2";
            psstruct1[8].FiledName     = "PRBSLENGTH";
            psstruct1[8].DefaultValue  = "31";
            psstruct1[9].FiledName     = "ERRORRESULTZOOM";
            psstruct1[9].DefaultValue  = "1";
            psstruct1[10].FiledName    = "EDGATINGMODE";
            psstruct1[10].DefaultValue = "1";
            psstruct1[11].FiledName    = "EDGATINGUNIT";
            psstruct1[11].DefaultValue = "0";
            psstruct1[12].FiledName    = "EDGATINGTIME";
            psstruct1[12].DefaultValue = "5";

            //ed.Initialize(psstruct1);
            //ed.Configure();
            //ed.ChangeChannel("1");
            //ed.AutoAlaign(true);
        }