Exemple #1
0
        //**************************************************************************************************
        //                                            Z_th
        //**************************************************************************************************

        #region Z_th

        private void Button_Zth_signle_Click(object sender, EventArgs e)
        {
            //TTA-Mess-File erzeugen erzeugen
            myTTA = new TTA_measurement()
            {
                MyRack = rthTEC_Rack1,
                MyDAQ  = DAQ_Unit,
                GUI    = this,
            };

            //Plots initisieren
            Graph_new_Measurment_for_TTA(myTTA);

            //Spectrum einstellen
            DAQ_Unit.Setting_for_TTA();
            DAQ_Unit.Setting_Trigger(rthTEC_Rack1);

            //Backroundworker definieren
            myBackroundWorker = new BackgroundWorker()
            {
                WorkerSupportsCancellation = true,
            };

            //Aufgabe definieren
            myBackroundWorker.DoWork += new DoWorkEventHandler((state, args) =>
            {
                bool noError = true;

                //Messen --> aktuell noch DEMO
                if (noError)
                {
                    noError = myTTA.Start_Single_TTA();
                }

                //Daten konvertieren und abarbeiten
                if (noError)
                {
                    noError = myTTA.Convert_Data();
                }

                //Graphen plotten
                if (noError)
                {
                    Add_Series_to_Data(myTTA);
                    Update_Voltage_Plots_for_TTA();
                }

                //UI wieder aktiviern
                Set_Old_Enable_Status();
            }
                                                               );

            //Alle Knöpfe deaktiveren
            Disable_All_Controlls();

            //Backroundworker starten
            myBackroundWorker.RunWorkerAsync();
        }
Exemple #2
0
        private void Button_Auto_Zth_Click(object sender, EventArgs e)
        {
            //Abfrage ob alle nötigen Geräte angeschlossen (BSP alt)

            /*
             * if (!Is_Spectrum_Activ()    ) { return; }
             * if (!Is_Heller_Activ()      ) { return; }
             * if (!Is_Power_Supply_Activ()) { return; }
             * if (!Is_XYZ_Aktive()        ) { return; }
             * if (!Is_Directory_Correct() ) { return; }
             * if (!Is_FileName_Correct()  ) { return; }
             * if (!Is_Gerber_Correct()    ) { return; }
             */


            //TTA-Mess-File erzeugen erzeugen
            TTA_measurement myTTA = new TTA_measurement()
            {
                MyRack             = rthTEC_Rack1,
                MyDAQ              = DAQ_Unit,
                MyXYZ              = myXYZ,
                Output_File_Folder = myFileSetting.readBox_FileFolder1.MyPath,
                Output_File_Name   = myFileSetting.readBox_FileFolder1.MyFileName,
                GUI        = this,
                MyMovement = myFileSetting.readBox_Movement1.Movements_XYA
            };

            //Plots initisieren
            Graph_new_Measurment_for_TTA(myTTA);

            //Spectrum einstellen
            DAQ_Unit.Setting_for_TTA();
            DAQ_Unit.Setting_Trigger(rthTEC_Rack1);

            //Backroundworker definieren
            myBackroundWorker = new BackgroundWorker()
            {
                WorkerSupportsCancellation = true,
            };

            //Aufgabe definieren
            myBackroundWorker.DoWork += new DoWorkEventHandler((state, args) =>
            {
                //Messung für alle starten


                //spectrum1.Measure_TTA_Several_Cycles_DEMO(myTTA, this);
                DAQ_Unit.Measure_TTA_Several_Cycles(myTTA, this);

                //Daten konvertieren und abarbeiten
                myTTA.Convert_Data();

                //Graphen plotten
                Add_Series_to_Data(myTTA);
                Update_Voltage_Plots_for_TTA();

                //UI wieder aktiviern
                Set_Old_Enable_Status();
            }
                                                               );

            //Alle Knöpfe deaktiveren
            Disable_All_Controlls();

            //Backroundworker starten
            myBackroundWorker.RunWorkerAsync();
        }