Example #1
0
        public void Update_Calculated_Vdata(DP173_or_Elgin model, Gamma_Set Set)
        {
            DP173_Model_Option_Form DP173 = (DP173_Model_Option_Form)Application.OpenForms["DP173_Model_Option_Form"];

            RGB_Double[,] Temp_Calculated_Vdata = Get_Calculated_Vdata(Set);
            double[] Temp_Calculated_Vreg1_Voltage = Get_Calculated_Vreg1_Voltage(Set);

            //-------------Added on 200316-----------
            if (model.band < 11)
            {
                //update Vreg1 , R/G/B AM2 Voltage
                if (model.gray == 0)
                {
                    int Dec_Vreg1 = DP173.DP173_Get_Normal_Initial_Vreg1(model.band, Set);//Current_Band Vreg1
                    Temp_Calculated_Vreg1_Voltage[model.band] = Imported_my_cpp_dll.DP173_Get_Vreg1_Voltage(Dec_Vreg1, DP173.Voltage_VREG1_REF2047, DP173.Voltage_VREG1_REF1635, DP173.Voltage_VREG1_REF1227, DP173.Voltage_VREG1_REF815, DP173.Voltage_VREG1_REF407, DP173.Voltage_VREG1_REF63, DP173.Voltage_VREG1_REF1);
                    Temp_Calculated_Vdata[model.band, model.gray].double_R = Imported_my_cpp_dll.DP173_Get_AM2_Gamma_Voltage(DP173.Voltage_VREG1_REF2047, Temp_Calculated_Vreg1_Voltage[model.band], model.Gamma.int_R);
                    Temp_Calculated_Vdata[model.band, model.gray].double_G = Imported_my_cpp_dll.DP173_Get_AM2_Gamma_Voltage(DP173.Voltage_VREG1_REF2047, Temp_Calculated_Vreg1_Voltage[model.band], model.Gamma.int_G);
                    Temp_Calculated_Vdata[model.band, model.gray].double_B = Imported_my_cpp_dll.DP173_Get_AM2_Gamma_Voltage(DP173.Voltage_VREG1_REF2047, Temp_Calculated_Vreg1_Voltage[model.band], model.Gamma.int_B);
                }
                //update R/G/B Normal Voltage
                else
                {
                    Temp_Calculated_Vdata[model.band, model.gray].double_R = Imported_my_cpp_dll.DP173_Get_GR_Gamma_Voltage(DP173.Voltage_VREG1_REF2047, Temp_Calculated_Vreg1_Voltage[model.band], model.R_AM1_Dec, Temp_Calculated_Vdata[model.band, (model.gray - 1)].double_R, model.Gamma.int_R, model.gray);
                    Temp_Calculated_Vdata[model.band, model.gray].double_G = Imported_my_cpp_dll.DP173_Get_GR_Gamma_Voltage(DP173.Voltage_VREG1_REF2047, Temp_Calculated_Vreg1_Voltage[model.band], model.G_AM1_Dec, Temp_Calculated_Vdata[model.band, (model.gray - 1)].double_G, model.Gamma.int_G, model.gray);
                    Temp_Calculated_Vdata[model.band, model.gray].double_B = Imported_my_cpp_dll.DP173_Get_GR_Gamma_Voltage(DP173.Voltage_VREG1_REF2047, Temp_Calculated_Vreg1_Voltage[model.band], model.B_AM1_Dec, Temp_Calculated_Vdata[model.band, (model.gray - 1)].double_B, model.Gamma.int_B, model.gray);
                }
            }
            //---------------------------------------
        }
Example #2
0
        public void Update_SET1_HBM_AM1_Hex()
        {
            DP173_Model_Option_Form model_option_form = (DP173_Model_Option_Form)Application.OpenForms["DP173_Model_Option_Form"];

            if (model_option_form.radioButton_AM1_Set_As_AM0_divided_by_2.Checked)
            {
                R_AM1_Hex = Convert.ToInt32(Math.Ceiling(Convert.ToInt32(R_AM0_Hex, 16) / 2.0)).ToString("X2");
                G_AM1_Hex = Convert.ToInt32(Math.Ceiling(Convert.ToInt32(G_AM0_Hex, 16) / 2.0)).ToString("X2");
                B_AM1_Hex = Convert.ToInt32(Math.Ceiling(Convert.ToInt32(B_AM0_Hex, 16) / 2.0)).ToString("X2");
            }
            else if (model_option_form.radioButton_AM1_Set_As_0x00.Checked)
            {
                R_AM1_Hex = "00";
                G_AM1_Hex = "00";
                B_AM1_Hex = "00";
            }
            else
            {
                //Get Set1 HBM AM1
                Form1 f1 = (Form1)Application.OpenForms["Form1"];
                f1.MX_OTP_Read(0, 40, "B3"); Thread.Sleep(50);
                string[] Hex = new string[40];
                for (int i = 0; i < 40; i++)
                {
                    Hex[i] = f1.dataGridView1.Rows[i].Cells[1].Value.ToString();
                }
                R_AM1_Hex = f1.dataGridView1.Rows[4].Cells[1].Value.ToString();
                G_AM1_Hex = f1.dataGridView1.Rows[17].Cells[1].Value.ToString();
                B_AM1_Hex = f1.dataGridView1.Rows[30].Cells[1].Value.ToString();
            }
            Update_AM1_Dec_From_AM1_Hex();
        }
Example #3
0
        public void Update_SET1_HBM_AM0_Hex()
        {
            DP173_Model_Option_Form model_option_form = (DP173_Model_Option_Form)Application.OpenForms["DP173_Model_Option_Form"];

            if (model_option_form.radioButton_AM0_0x00.Checked)
            {
                R_AM0_Hex = "00";
                G_AM0_Hex = "00";
                B_AM0_Hex = "00";
            }
            else
            {
                //Get Set1 HBM AM0
                Form1 f1 = (Form1)Application.OpenForms["Form1"];
                f1.MX_OTP_Read(0, 40, "B3"); Thread.Sleep(50);
                string[] Hex = new string[40];
                for (int i = 0; i < 40; i++)
                {
                    Hex[i] = f1.dataGridView1.Rows[i].Cells[1].Value.ToString();
                }
                R_AM0_Hex = f1.dataGridView1.Rows[5].Cells[1].Value.ToString();
                G_AM0_Hex = f1.dataGridView1.Rows[18].Cells[1].Value.ToString();
                B_AM0_Hex = f1.dataGridView1.Rows[31].Cells[1].Value.ToString();
            }
        }
Example #4
0
        public void IRC_G255_Verify_OC_Vars_Init()
        {
            DP173_Model_Option_Form model_option_form = (DP173_Model_Option_Form)Application.OpenForms["DP173_Model_Option_Form"];

            IRC_G255_OC_Try_Max_Count      = Convert.ToInt16(model_option_form.textBox_G255_IRC_OC_Max_Try.Text);
            G255_IRC_OC_Verify_Limit_Ratio = Convert.ToDouble(model_option_form.textBox_G255_IRC_OC_Verify_Limit_Ratio.Text);
            IRC_G255_OC_Try_Count          = 0;
        }
Example #5
0
        public void Update_Data_Voltages_And_Skip_Band_Measures(Gamma_Set Set, DP173_or_Elgin model)
        {
            Form1 f1 = (Form1)Application.OpenForms["Form1"];
            DP173_Dual_Engineering_Mornitoring DP173_form_Dual_engineer = (DP173_Dual_Engineering_Mornitoring)Application.OpenForms["DP173_Dual_Engineering_Mornitoring"];
            DP173_Model_Option_Form            DP173 = (DP173_Model_Option_Form)Application.OpenForms["DP173_Model_Option_Form"];

            if (model.oc_mode == OC_Single_Dual_Triple.Dual)
            {
                if (Set == Gamma_Set.Set3)
                {
                    f1.GB_Status_AppendText_Nextline("Set3 Band" + (model.band).ToString() + " Skip (Just Apply Gamma and Vreg1)", Color.Blue);
                    model.Vreg1 = DP173.DP173_Get_Normal_Initial_Vreg1(model.band, Gamma_Set.Set1);

                    for (int g = 0; g < 8; g++)
                    {
                        DP173_form_Dual_engineer.Dual_Copy_Set1_Measure_To_Set3_Measure(model.band, g);
                        Calculated_Vdata_Set3[model.band, g] = Calculated_Vdata_Set1[model.band, g];//Set1 Vdata
                    }
                    Calculated_Vreg1_Voltage_Set3[model.band] = Calculated_Vreg1_Voltage_Set1[model.band];
                }
                else if (Set == Gamma_Set.Set4)
                {
                    f1.GB_Status_AppendText_Nextline("Set4 Band" + (model.band).ToString() + " Skip (Just Apply Gamma and Vreg1)", Color.Blue);
                    model.Vreg1 = DP173.DP173_Get_Normal_Initial_Vreg1(model.band, Gamma_Set.Set2);

                    for (int g = 0; g < 8; g++)
                    {
                        DP173_form_Dual_engineer.Dual_Copy_Set2_Measure_To_Set4_Measure(model.band, g);
                        Calculated_Vdata_Set4[model.band, g] = Calculated_Vdata_Set2[model.band, g];//Set2 Vdata
                    }
                    Calculated_Vreg1_Voltage_Set4[model.band] = Calculated_Vreg1_Voltage_Set2[model.band];
                }
                else if (Set == Gamma_Set.Set6)
                {
                    f1.GB_Status_AppendText_Nextline("Set6 Band" + (model.band).ToString() + " Skip (Just Apply Gamma and Vreg1)", Color.Blue);
                    model.Vreg1 = DP173.DP173_Get_Normal_Initial_Vreg1(model.band, Gamma_Set.Set5);

                    for (int g = 0; g < 8; g++)
                    {
                        DP173_form_Dual_engineer.Dual_Copy_Set5_Measure_To_Set6_Measure(model.band, g);
                        Calculated_Vdata_Set6[model.band, g] = Calculated_Vdata_Set5[model.band, g];//Set5 Vdata
                    }
                    Calculated_Vreg1_Voltage_Set6[model.band] = Calculated_Vreg1_Voltage_Set5[model.band];
                }
            }
            else if (model.oc_mode == OC_Single_Dual_Triple.Triple)
            {
                if (Set == Gamma_Set.Set4)
                {
                    f1.GB_Status_AppendText_Nextline("Set4 Band" + (model.band).ToString() + " Skip (Just Apply Gamma and Vreg1)", Color.Blue);
                    model.Vreg1 = DP173.DP173_Get_Normal_Initial_Vreg1(model.band, Gamma_Set.Set1);

                    for (int g = 0; g < 8; g++)
                    {
                        DP173_form_Dual_engineer.Dual_Copy_Set1_Measure_To_Set4_Measure(model.band, g);
                        Calculated_Vdata_Set4[model.band, g] = Calculated_Vdata_Set1[model.band, g];//Set1 Vdata
                    }
                    Calculated_Vreg1_Voltage_Set4[model.band] = Calculated_Vreg1_Voltage_Set1[model.band];
                }
                else if (Set == Gamma_Set.Set5)
                {
                    f1.GB_Status_AppendText_Nextline("Set5 Band" + (model.band).ToString() + " Skip (Just Apply Gamma and Vreg1)", Color.Blue);
                    model.Vreg1 = DP173.DP173_Get_Normal_Initial_Vreg1(model.band, Gamma_Set.Set2);

                    for (int g = 0; g < 8; g++)
                    {
                        DP173_form_Dual_engineer.Dual_Copy_Set2_Measure_To_Set5_Measure(model.band, g);
                        Calculated_Vdata_Set5[model.band, g] = Calculated_Vdata_Set2[model.band, g];//Set2 Vdata
                    }
                    Calculated_Vreg1_Voltage_Set5[model.band] = Calculated_Vreg1_Voltage_Set2[model.band];
                }
                else if (Set == Gamma_Set.Set6)
                {
                    f1.GB_Status_AppendText_Nextline("Set6 Band" + (model.band).ToString() + " Skip (Just Apply Gamma and Vreg1)", Color.Blue);
                    model.Vreg1 = DP173.DP173_Get_Normal_Initial_Vreg1(model.band, Gamma_Set.Set3);

                    for (int g = 0; g < 8; g++)
                    {
                        DP173_form_Dual_engineer.Dual_Copy_Set3_Measure_To_Set6_Measure(model.band, g);
                        Calculated_Vdata_Set6[model.band, g] = Calculated_Vdata_Set3[model.band, g];//Set5 Vdata
                    }
                    Calculated_Vreg1_Voltage_Set6[model.band] = Calculated_Vreg1_Voltage_Set3[model.band];
                }
            }
        }
Example #6
0
        public DP173_or_Elgin(OC_Single_Dual_Triple mode)
        {
            DP173_Model_Option_Form model_option_form = (DP173_Model_Option_Form)Application.OpenForms["DP173_Model_Option_Form"];

            All_band_gray_Gamma = new RGB[14, 8]; //14ea Bands , 8ea Gray-points

            band                     = 0;
            gray                     = 0;
            loop_count               = 0;
            Vreg1_loop_count         = 0;
            this.loop_count_max      = model_option_form.Get_Max_Loop_Count();
            total_average_loop_count = 0;
            Initial_Vreg1            = 0;
            this.Skip_Lv             = model_option_form.Get_Skip_Lv();
            Prev_Band_Gray255_Gamma  = new RGB();

            Update_SET1_HBM_AM0_Hex();
            Update_SET1_HBM_AM1_Hex();

            //Onlt For Single Mode
            Gamma_Init     = new RGB();
            Cal_Gamma_Init = new RGB();

            //----they were global variables before---
            //Compensation related(RGB)
            Gamma      = new RGB();
            Measure    = new XYLv();
            Target     = new XYLv();
            Limit      = new XYLv();
            Extension  = new XYLv();
            Prev_Gamma = new RGB();

            //Vreg1 related
            Vreg1_Need_To_Be_Updated = false;
            Vreg1                  = 0;
            Diff_Vreg1             = 0;
            Prev_Vreg1             = 0;
            Vreg1_First_Gamma_Red  = 0;
            Vreg1_First_Gamma_Blue = 0;

            G255_First_Gamma_Red   = 0;
            G255_First_Gamma_Green = 0;
            G255_First_Gamma_Blue  = 0;

            //RGB Infinite_Loop_Detect
            Infinite       = false;
            Infinite_Count = 0;
            Temp_Gamma     = new RGB[6]; //A0,A1,A2,A3,A4,A5
            Diif_Gamma     = new RGB[5]; //(A1-A0),(A2-A1),(A3-A2),(A4-A3),(A5-A4)
            Temp           = new RGB();

            //RB Vreg1_Infinite_Loop_Detect
            Vreg1_Infinite       = false;
            Vreg1_Infinite_Count = 0;
            Vreg1_Value          = new int[3];
            Vreg1_Value_Temp     = 0;
            Vreg1_Temp_Gamma     = new RGB[4]; //A0,A1,A2,A3
            Vreg1_Diif_Gamma     = new RGB[3]; //(A1-A0),(A2-A1),(A3-A2)
            Vreg1_Temp           = new RGB();

            //dll-related variables
            Gamma_Out_Of_Register_Limit = false;
            Within_Spec_Limit           = false;

            Gamma_Register_Limit = 511;
            Vreg1_Register_Limit = 2047;

            oc_mode = mode;

            IRC_G255_OC_Try_Count          = 0;
            IRC_G255_OC_Try_Max_Count      = 0;
            G255_IRC_OC_Verify_Limit_Ratio = 1.0;
        }