Exemplo n.º 1
0
        void refresh()
        {
            if (this.InvokeRequired)
            {
                refresh_Call d = new refresh_Call(refresh);
                this.BeginInvoke(d, new object[] { });
            }
            else
            {
                if (mc.user.logInDone == true)
                {
                    groupBox1.Visible = true;
                }
                else
                {
                    groupBox1.Visible = false;
                }

                if (mc.user.logInDone)
                {
                    TB_CurrentUserName.Text = mc.user.logInUserName;
                }
                else
                {
                    TB_CurrentUserName.Text = "";
                }

                LB_.Focus();
            }
        }
Exemplo n.º 2
0
        void refresh()
        {
            if (this.InvokeRequired)
            {
                refresh_Call d = new refresh_Call(refresh);
                this.BeginInvoke(d, new object[] { });
            }
            else
            {
                TB_SFZSpeed.Text     = mc.sf.Z.config.speed.rate.ToString();
                TB_1stDownPitch.Text = mc.para.SF.firstDownPitch.value.ToString();
                TB_1stDownVel.Text   = mc.para.SF.firstDownVel.value.ToString();
                TB_2ndUpPitch.Text   = mc.para.SF.secondUpPitch.value.ToString();
                TB_2ndUpVel.Text     = mc.para.SF.secondUpVel.value.ToString();
                TB_DownPitch.Text    = mc.para.SF.downPitch.value.ToString();
                TB_DownVel.Text      = mc.para.SF.downVel.value.ToString();

                if (mc.para.SF.useBlow.value == (int)ON_OFF.ON)
                {
                    BT_UseBlow_SelectOnOff.Text  = BT_UseBlow_SelectOnOff_On.Text;
                    BT_UseBlow_SelectOnOff.Image = Properties.Resources.Yellow_LED;
                }
                else
                {
                    BT_UseBlow_SelectOnOff.Text  = BT_UseBlow_SelectOnOff_Off.Text;
                    BT_UseBlow_SelectOnOff.Image = Properties.Resources.YellowLED_OFF;
                }

                if (mc.para.SF.useMGZ1.value == (int)ON_OFF.ON)
                {
                    BT_UseMGZ1_SelectOnOff.Text  = BT_UseMGZ1_SelectOnOff_On.Text;
                    BT_UseMGZ1_SelectOnOff.Image = Properties.Resources.Yellow_LED;
                }
                else
                {
                    BT_UseMGZ1_SelectOnOff.Text  = BT_UseMGZ1_SelectOnOff_Off.Text;
                    BT_UseMGZ1_SelectOnOff.Image = Properties.Resources.YellowLED_OFF;
                }

                if (mc.para.SF.useMGZ2.value == (int)ON_OFF.ON)
                {
                    BT_UseMGZ2_SelectOnOff.Text  = BT_UseMGZ2_SelectOnOff_On.Text;
                    BT_UseMGZ2_SelectOnOff.Image = Properties.Resources.Yellow_LED;
                }
                else
                {
                    BT_UseMGZ2_SelectOnOff.Text  = BT_UseMGZ2_SelectOnOff_Off.Text;
                    BT_UseMGZ2_SelectOnOff.Image = Properties.Resources.YellowLED_OFF;
                }

                LB_.Focus();
            }
        }
Exemplo n.º 3
0
        void refresh()
        {
            if (this.InvokeRequired)
            {
                refresh_Call d = new refresh_Call(refresh);
                this.BeginInvoke(d, new object[] { });
            }
            else
            {
                TB_BoardSizeX.Text = mc.para.MT.boardSize.x.value.ToString();
                TB_BoardSizeY.Text = mc.para.MT.boardSize.y.value.ToString();

                TB_PadSizeX.Text = mc.para.MT.padSize.x.value.ToString();
                TB_PadSizeY.Text = mc.para.MT.padSize.y.value.ToString();
                TB_PadSizeT.Text = mc.para.MT.padSize.h.value.ToString();

                TB_PadCountX.Text = mc.para.MT.padCount.x.value.ToString();
                TB_PadCountY.Text = mc.para.MT.padCount.y.value.ToString();

                TB_PadPitchX.Text = mc.para.MT.padPitch.x.value.ToString();
                TB_PadPitchY.Text = mc.para.MT.padPitch.y.value.ToString();

                TB_EdgeToPadCenterX.Text = mc.para.MT.edgeToPadCenter.x.value.ToString();
                TB_EdgeToPadCenterY.Text = mc.para.MT.edgeToPadCenter.y.value.ToString();


                TB_LidSizeX.Text = mc.para.MT.lidSize.x.value.ToString();
                TB_LidSizeY.Text = mc.para.MT.lidSize.y.value.ToString();
                TB_LidSizeH.Text = mc.para.MT.lidSize.h.value.ToString();

                TB_PAD_CHECK_LIMIT.Text       = mc.para.MT.padCheckLimit.value.ToString();
                TB_PAD_CHECK_CENTERLIMIT.Text = mc.para.MT.padCheckCenterLimit.value.ToString();
                TB_LID_CHECK_SIZELIMIT.Text   = mc.para.MT.lidSizeLimit.value.ToString();
                TB_LID_CHECK_LIMIT.Text       = mc.para.MT.lidCheckLimit.value.ToString();

                TB_PedestalSizeX.Text = mc.para.MT.pedestalSize.x.value.ToString();
                TB_PedestalSizeY.Text = mc.para.MT.pedestalSize.y.value.ToString();

                TB_ToolSizeX.Text = mc.para.MT.flatCompenToolSize.x.value.ToString();
                TB_ToolSizeY.Text = mc.para.MT.flatCompenToolSize.y.value.ToString();

                LB_.Focus();
            }
        }
        void refresh()
        {
            if (this.InvokeRequired)
            {
                refresh_Call d = new refresh_Call(refresh);
                this.BeginInvoke(d, new object[] { });
            }
            else
            {
                if (selectedHead == (int)UnitCodeHead.HD1)
                {
                    BT_HeadSelect.Text = BT_HeadSelect_Head1.Text;
                }
                else if (selectedHead == (int)UnitCodeHead.HD2)
                {
                    BT_HeadSelect.Text = BT_HeadSelect_Head2.Text;
                }

                if (mode == SELECT_FIND_MODEL.ULC_CORNER1)
                {
                    passScore   = mc.para.ULC.modelCorner1.passScore.value.ToString();
                    angleStart  = mc.para.ULC.modelCorner1.angleStart.value.ToString();
                    angleExtent = mc.para.ULC.modelCorner1.angleExtent.value.ToString();
                    exposure    = mc.para.ULC.modelCorner1.exposureTime.value.ToString();
                    lightCh1    = mc.para.ULC.modelCorner1.light.ch1.value.ToString();
                    lightCh2    = mc.para.ULC.modelCorner1.light.ch2.value.ToString();

                    LB_SelectModel.Text = BT_SelectModel_C1.Text;

                    if (mc.para.ULC.modelCorner1.isCreate.value == (int)BOOL.TRUE)
                    {
                        LB_Model_Created.BackColor = Color.Transparent;
                        LB_Model_Created.Text      = "Model Created";
                    }
                    else
                    {
                        LB_Model_Created.BackColor = Color.Red;
                        LB_Model_Created.Text      = "Model Uncreated";
                    }
                }
                if (mode == SELECT_FIND_MODEL.ULC_CORNER2)
                {
                    passScore           = mc.para.ULC.modelCorner2.passScore.value.ToString();
                    angleStart          = mc.para.ULC.modelCorner2.angleStart.value.ToString();
                    angleExtent         = mc.para.ULC.modelCorner2.angleExtent.value.ToString();
                    exposure            = mc.para.ULC.modelCorner2.exposureTime.value.ToString();
                    lightCh1            = mc.para.ULC.modelCorner2.light.ch1.value.ToString();
                    lightCh2            = mc.para.ULC.modelCorner2.light.ch2.value.ToString();
                    LB_SelectModel.Text = BT_SelectModel_C2.Text;

                    if (mc.para.ULC.modelCorner2.isCreate.value == (int)BOOL.TRUE)
                    {
                        LB_Model_Created.BackColor = Color.Transparent;
                        LB_Model_Created.Text      = "Model Created";
                    }
                    else
                    {
                        LB_Model_Created.BackColor = Color.Red;
                        LB_Model_Created.Text      = "Model Uncreated";
                    }
                }
                if (mode == SELECT_FIND_MODEL.ULC_CORNER3)
                {
                    passScore           = mc.para.ULC.modelCorner3.passScore.value.ToString();
                    angleStart          = mc.para.ULC.modelCorner3.angleStart.value.ToString();
                    angleExtent         = mc.para.ULC.modelCorner3.angleExtent.value.ToString();
                    exposure            = mc.para.ULC.modelCorner3.exposureTime.value.ToString();
                    lightCh1            = mc.para.ULC.modelCorner3.light.ch1.value.ToString();
                    lightCh2            = mc.para.ULC.modelCorner3.light.ch2.value.ToString();
                    LB_SelectModel.Text = BT_SelectModel_C3.Text;

                    if (mc.para.ULC.modelCorner3.isCreate.value == (int)BOOL.TRUE)
                    {
                        LB_Model_Created.BackColor = Color.Transparent;
                        LB_Model_Created.Text      = "Model Created";
                    }
                    else
                    {
                        LB_Model_Created.BackColor = Color.Red;
                        LB_Model_Created.Text      = "Model Uncreated";
                    }
                }
                if (mode == SELECT_FIND_MODEL.ULC_CORNER4)
                {
                    passScore           = mc.para.ULC.modelCorner4.passScore.value.ToString();
                    angleStart          = mc.para.ULC.modelCorner4.angleStart.value.ToString();
                    angleExtent         = mc.para.ULC.modelCorner4.angleExtent.value.ToString();
                    exposure            = mc.para.ULC.modelCorner4.exposureTime.value.ToString();
                    lightCh1            = mc.para.ULC.modelCorner4.light.ch1.value.ToString();
                    lightCh2            = mc.para.ULC.modelCorner4.light.ch2.value.ToString();
                    LB_SelectModel.Text = BT_SelectModel_C4.Text;

                    if (mc.para.ULC.modelCorner4.isCreate.value == (int)BOOL.TRUE)
                    {
                        LB_Model_Created.BackColor = Color.Transparent;
                        LB_Model_Created.Text      = "Model Created";
                    }
                    else
                    {
                        LB_Model_Created.BackColor = Color.Red;
                        LB_Model_Created.Text      = "Model Uncreated";
                    }
                }

                TB_PassScore.Text     = passScore;
                TB_AngleStart.Text    = angleStart;
                TB_AngleExtent.Text   = angleExtent;
                TB_ExposureTime.Text  = exposure;
                TB_Lighiting_Ch1.Text = lightCh1;
                TB_Lighiting_Ch2.Text = lightCh2;
                TB_CropArea.Text      = mc.para.ULC.cropArea.value.ToString();

                TB_ULC_RETRYNUM.Text = mc.para.ULC.failretry.value.ToString();

                if ((int)mc.para.ULC.chamferuse.value == 0)
                {
                    BT_CHAMFER_USE.Text = "OFF"; BT_CHAMFER_USE.Image = Properties.Resources.YellowLED_OFF;
                }
                else
                {
                    BT_CHAMFER_USE.Text = "ON"; BT_CHAMFER_USE.Image = Properties.Resources.Yellow_LED;
                }

                if ((int)mc.para.ULC.checkcircleuse.value == 0)
                {
                    BT_CHECK_CIRCLE.Text = "OFF"; BT_CHECK_CIRCLE.Image = Properties.Resources.YellowLED_OFF;
                }
                else
                {
                    BT_CHECK_CIRCLE.Text = "ON"; BT_CHECK_CIRCLE.Image = Properties.Resources.Yellow_LED;
                }

                if (mc.para.ULC.detectDirection.value == 0)
                {
                    BT_DetectDirection.Text = BT_DetectDirection_13.Text;
                }
                else
                {
                    BT_DetectDirection.Text = BT_DetectDirection_24.Text;
                }

                //TB_CHAMFER_INDEX.Text = mc.para.ULC.chamferindex.value.ToString();
                if (mc.para.ULC.chamferindex.value == 0)
                {
                    BT_ChamferNumber.Text  = BT_ChamferNumber_1.Text;
                    BT_ChamferNumber.Image = BT_ChamferNumber_1.Image;
                }
                else if (mc.para.ULC.chamferindex.value == 1)
                {
                    BT_ChamferNumber.Text  = BT_ChamferNumber_2.Text;
                    BT_ChamferNumber.Image = BT_ChamferNumber_2.Image;
                }
                else if (mc.para.ULC.chamferindex.value == 2)
                {
                    BT_ChamferNumber.Text  = BT_ChamferNumber_3.Text;
                    BT_ChamferNumber.Image = BT_ChamferNumber_3.Image;
                }
                else if (mc.para.ULC.chamferindex.value == 3)
                {
                    BT_ChamferNumber.Text  = BT_ChamferNumber_4.Text;
                    BT_ChamferNumber.Image = BT_ChamferNumber_4.Image;
                }

                if (mc.para.ULC.chamferShape.value == 0)
                {
                    BT_ChamferCheckMethod.Text = BT_ChamferCheckMethod_Chamfer.Text;
                    LB_ChamferDiameter.Visible = false; TB_ChamferDiameter.Visible = false;
                    LB_ChamferLength.Visible   = true; TB_ChamferLength.Visible = true;
                }
//              else
//              {
//                  BT_ChamferCheckMethod.Text = BT_ChamferCheckMethod_Circle.Text;
//                  LB_ChamferDiameter.Visible = true; TB_ChamferDiameter.Visible = true;
//                  LB_ChamferLength.Visible = false; TB_ChamferLength.Visible = false;
//              }

                TB_ChamferDiameter.Text = mc.para.ULC.chamferDiameter.value.ToString();
                TB_ChamferLength.Text   = mc.para.ULC.chamferLength.value.ToString();
                TB_ChamferScore.Text    = mc.para.ULC.chamferPassScore.value.ToString();

                if (mc.para.ULC.checkCirclePos.value == 0)
                {
                    BT_BottomCheckPos.Text = BT_BottomCheckPos_Corner.Text;
                }
                else
                {
                    BT_BottomCheckPos.Text = BT_BottomCheckPos_Side.Text;
                }

                TB_CircleDiameter.Text = mc.para.ULC.circleDiameter.value.ToString();
                TB_CircleScore.Text    = mc.para.ULC.circlePassScore.value.ToString();

                if (mc.para.ULC.imageSave.value == 0)
                {
                    BT_ImageSave.Text = BT_ImageSave_None.Text;
                }
                else if (mc.para.ULC.imageSave.value == 1)
                {
                    BT_ImageSave.Text = BT_ImageSave_Error.Text;
                }
                else
                {
                    BT_ImageSave.Text = BT_ImageSave_All.Text;
                }

                if (mc.para.ULC.model.algorism.value == (int)MODEL_ALGORISM.NCC)
                {
                    BT_AlgorismSelect.Text   = BT_AlgorismSelect_NccModel.Text;
                    LB_Model_Created.Visible = false;
                    hWC_Model.Visible        = false;

                    HOperatorSet.ClearWindow(hWC_Model.HalconID);
                    if (mc.para.ULC.model.isCreate.value == (int)BOOL.TRUE)
                    {
                        try
                        {
                            HTuple sizeX, sizeY, ratio;
                            sizeX = mc.ulc.cam.model[(int)ULC_MODEL.PKG_NCC].createColumn2 - mc.ulc.cam.model[(int)ULC_MODEL.PKG_NCC].createColumn1;
                            sizeY = mc.ulc.cam.model[(int)ULC_MODEL.PKG_NCC].createRow2 - mc.ulc.cam.model[(int)ULC_MODEL.PKG_NCC].createRow1;
                            ratio = sizeY / sizeX;
                            double height;
                            height           = hWC_Model.Width * ratio;
                            hWC_Model.Height = (int)height;
                            HOperatorSet.SetPart(hWC_Model.HalconID, 0, 0, mc.ulc.cam.model[(int)ULC_MODEL.PKG_NCC].createRow2 - mc.ulc.cam.model[(int)ULC_MODEL.PKG_NCC].createRow1, mc.ulc.cam.model[(int)ULC_MODEL.PKG_NCC].createColumn2 - mc.ulc.cam.model[(int)ULC_MODEL.PKG_NCC].createColumn1);
                            HOperatorSet.DispImage(mc.ulc.cam.model[(int)ULC_MODEL.PKG_NCC].CropDomainImage, hWC_Model.HalconID);
                        }
                        catch
                        {
                        }
                    }
                }
                else if (mc.para.ULC.model.algorism.value == (int)MODEL_ALGORISM.SHAPE)
                {
                    BT_AlgorismSelect.Text   = BT_AlgorismSelect_ShapeModel.Text;
                    LB_Model_Created.Visible = false;
                    hWC_Model.Visible        = false;

                    HOperatorSet.ClearWindow(hWC_Model.HalconID);
                    if (mc.para.ULC.model.isCreate.value == (int)BOOL.TRUE)
                    {
                        try
                        {
                            HTuple sizeX, sizeY, ratio;
                            sizeX = mc.ulc.cam.model[(int)ULC_MODEL.PKG_SHAPE].createColumn2 - mc.ulc.cam.model[(int)ULC_MODEL.PKG_SHAPE].createColumn1;
                            sizeY = mc.ulc.cam.model[(int)ULC_MODEL.PKG_SHAPE].createRow2 - mc.ulc.cam.model[(int)ULC_MODEL.PKG_SHAPE].createRow1;
                            ratio = sizeY / sizeX;
                            double height;
                            height           = hWC_Model.Width * ratio;
                            hWC_Model.Height = (int)height;
                            HOperatorSet.SetPart(hWC_Model.HalconID, 0, 0, mc.ulc.cam.model[(int)ULC_MODEL.PKG_SHAPE].createRow2 - mc.ulc.cam.model[(int)ULC_MODEL.PKG_SHAPE].createRow1, mc.ulc.cam.model[(int)ULC_MODEL.PKG_SHAPE].createColumn2 - mc.ulc.cam.model[(int)ULC_MODEL.PKG_SHAPE].createColumn1);
                            HOperatorSet.DispImage(mc.ulc.cam.model[(int)ULC_MODEL.PKG_SHAPE].CropDomainImage, hWC_Model.HalconID);
                        }
                        catch
                        {
                        }
                    }
                }
                else if (mc.para.ULC.model.algorism.value == (int)MODEL_ALGORISM.RECTANGLE)
                {
                    BT_AlgorismSelect.Text   = BT_AlgorismSelect_RectangleModel.Text;
                    LB_Model_Created.Visible = false;
                    hWC_Model.Visible        = false;
                }
                else if (mc.para.ULC.model.algorism.value == (int)MODEL_ALGORISM.CIRCLE)
                {
                    BT_AlgorismSelect.Text   = BT_AlgorismSelect_CircleModel.Text;
                    LB_Model_Created.Visible = false;
                    hWC_Model.Visible        = false;
                }

                // user parameter -> camera parameter
                mc.ulc.cam.rectangleCenter.chamferFindFlag     = (int)mc.para.ULC.chamferuse.value;
                mc.ulc.cam.rectangleCenter.chamferFindIndex    = (int)mc.para.ULC.chamferindex.value;
                mc.ulc.cam.rectangleCenter.chamferFindMethod   = (int)mc.para.ULC.chamferShape.value;
                mc.ulc.cam.rectangleCenter.chamferFindLength   = mc.para.ULC.chamferLength.value;
                mc.ulc.cam.rectangleCenter.chamferFindDiameter = mc.para.ULC.chamferDiameter.value;

                mc.ulc.cam.rectangleCenter.bottomCircleFindFlag  = (int)mc.para.ULC.checkcircleuse.value;
                mc.ulc.cam.rectangleCenter.bottomCirclePos       = (int)mc.para.ULC.checkCirclePos.value;
                mc.ulc.cam.rectangleCenter.bottomCircleDiameter  = mc.para.ULC.circleDiameter.value;
                mc.ulc.cam.rectangleCenter.bottomCirclePassScore = mc.para.ULC.circlePassScore.value;

                if (mc.para.ULC.orientationUse.value == 0)
                {
                    BT_ORIENTATION_USE.Text = "OFF"; BT_ORIENTATION_USE.Image = Properties.Resources.YellowLED_OFF;
                }
                else
                {
                    BT_ORIENTATION_USE.Text = "ON"; BT_ORIENTATION_USE.Image = Properties.Resources.Yellow_LED;
                }

                if (mc.para.ULC.modelHSOrientation.algorism.value == (int)MODEL_ALGORISM.NCC)
                {
                    BT_ORIENTATION_METHOD.Text = BT_ORIENTATION_METHOD_NCC.Text;
                }
                else if (mc.para.ULC.modelHSOrientation.algorism.value == (int)MODEL_ALGORISM.SHAPE)
                {
                    BT_ORIENTATION_METHOD.Text = BT_ORIENTATION_METHOD_SHAPE.Text;
                }

                TB_ORIENTATION_PASS_SCORE.Text = mc.para.ULC.modelHSOrientation.passScore.value.ToString();
                LB_.Focus();
            }
        }
Exemplo n.º 5
0
        void refresh()
        {
            if (this.InvokeRequired)
            {
                refresh_Call d = new refresh_Call(refresh);
                this.BeginInvoke(d, new object[] { });
            }
            else
            {
                #region search
                if (mc.para.HD.place.search.enable.value == (int)ON_OFF.ON)
                {
                    LB_Search1st_Level.Visible     = true; TB_Search1st_Level.Visible = true;
                    LB_Search1st_Speed.Visible     = true; TB_Search1st_Speed.Visible = true;
                    LB_Search1st_Delay.Visible     = true; TB_Search1st_Delay.Visible = true;
                    BT_Search1st_SelectOnOff.Text  = BT_Search1st_SelectOnOff_On.Text;
                    BT_Search1st_SelectOnOff.Image = Properties.Resources.Yellow_LED;
                    TB_Search1st_Level.Text        = mc.para.HD.place.search.level.value.ToString();
                    TB_Search1st_Speed.Text        = mc.para.HD.place.search.vel.value.ToString();
                    TB_Search1st_Delay.Text        = mc.para.HD.place.search.delay.value.ToString();
                }
                if (mc.para.HD.place.search.enable.value == (int)ON_OFF.OFF)
                {
                    LB_Search1st_Level.Visible     = false; TB_Search1st_Level.Visible = false;
                    LB_Search1st_Speed.Visible     = false; TB_Search1st_Speed.Visible = false;
                    LB_Search1st_Delay.Visible     = false; TB_Search1st_Delay.Visible = false;
                    BT_Search1st_SelectOnOff.Text  = BT_Search1st_SelectOnOff_Off.Text;
                    BT_Search1st_SelectOnOff.Image = Properties.Resources.YellowLED_OFF;
                }
                #endregion

                #region forceTracking
                if (mc.para.HD.place.forceTracking.enable.value == (int)ON_OFF.ON)
                {
                    LB_ForceTracking_Speed.Visible     = true; TB_ForceTracking_Speed.Visible = true;
                    BT_ForceTracking_SelectOnOff.Text  = BT_ForceTracking_SelectOnOff_On.Text;
                    BT_ForceTracking_SelectOnOff.Image = Properties.Resources.Yellow_LED;
                    LB_ForceTracking_Force.Visible     = true; TB_ForceTracking_Force.Visible = true;
                    TB_ForceTracking_Force.Text        = mc.para.HD.place.forceTracking.force.value.ToString();
                    TB_ForceTracking_Speed.Text        = mc.para.HD.place.forceTracking.vel.value.ToString();
                }
                if (mc.para.HD.place.forceTracking.enable.value == (int)ON_OFF.OFF)
                {
                    LB_ForceTracking_Force.Visible     = false; TB_ForceTracking_Force.Visible = false;
                    LB_ForceTracking_Speed.Visible     = false; TB_ForceTracking_Speed.Visible = false;
                    BT_ForceTracking_SelectOnOff.Text  = BT_ForceTracking_SelectOnOff_Off.Text;
                    BT_ForceTracking_SelectOnOff.Image = Properties.Resources.YellowLED_OFF;
                }
                #endregion
                #region search2
                if (mc.para.HD.place.search2.enable.value == (int)ON_OFF.ON)
                {
                    LB_Search2nd_Level.Visible     = true; TB_Search2nd_Level.Visible = true;
                    LB_Search2nd_Speed.Visible     = true; TB_Search2nd_Speed.Visible = true;
                    LB_Search2nd_Delay.Visible     = true; TB_Search2nd_Delay.Visible = true;
                    BT_Search2nd_SelectOnOff.Text  = BT_Search2nd_SelectOnOff_On.Text;
                    BT_Search2nd_SelectOnOff.Image = Properties.Resources.Yellow_LED;
                    TB_Search2nd_Level.Text        = mc.para.HD.place.search2.level.value.ToString();
                    TB_Search2nd_Speed.Text        = mc.para.HD.place.search2.vel.value.ToString();
                    TB_Search2nd_Delay.Text        = mc.para.HD.place.search2.delay.value.ToString();
                }
                if (mc.para.HD.place.search2.enable.value == (int)ON_OFF.OFF)
                {
                    LB_Search2nd_Level.Visible     = false; TB_Search2nd_Level.Visible = false;
                    LB_Search2nd_Speed.Visible     = false; TB_Search2nd_Speed.Visible = false;
                    LB_Search2nd_Delay.Visible     = false; TB_Search2nd_Delay.Visible = false;
                    BT_Search2nd_SelectOnOff.Text  = BT_Search2nd_SelectOnOff_Off.Text;
                    BT_Search2nd_SelectOnOff.Image = Properties.Resources.YellowLED_OFF;
                }
                #endregion

                if (mc.swcontrol.setupMode == 0)
                {
                    TB_Delay.Text           = mc.para.HD.place.delay.value.ToString();
                    TS_SUCTION_MODE.Visible = false;
                }
                else
                {
                    TB_Delay.Text           = mc.para.HD.place.delay.value.ToString();
                    TS_SUCTION_MODE.Visible = true;
                }
                TB_Force.Text       = mc.para.HD.place.force.value.ToString();
                TB_AirForce.Text    = mc.para.HD.place.airForce.value.ToString();
                TB_PRESS_FORCE.Text = mc.para.HD.press.force.value.ToString();
                TB_PRESS_TIME.Text  = mc.para.HD.press.pressTime.value.ToString();

                #region driver
                if (mc.para.HD.place.driver.enable.value == (int)ON_OFF.ON)
                {
                    LB_Drive1st_Level.Visible     = true; TB_Drive1st_Level.Visible = true;
                    LB_Drive1st_Speed.Visible     = true; TB_Drive1st_Speed.Visible = true;
                    LB_Drive1st_Delay.Visible     = true; TB_Drive1st_Delay.Visible = true;
                    BT_Drive1st_SelectOnOff.Text  = BT_Drive1st_SelectOnOff_On.Text;
                    BT_Drive1st_SelectOnOff.Image = Properties.Resources.Yellow_LED;
                    TB_Drive1st_Level.Text        = mc.para.HD.place.driver.level.value.ToString();
                    TB_Drive1st_Speed.Text        = mc.para.HD.place.driver.vel.value.ToString();
                    TB_Drive1st_Delay.Text        = mc.para.HD.place.driver.delay.value.ToString();

                    if (mc.para.HD.place.driver.level.value < (300 - mc.para.HD.place.forceOffset.z.value - mc.para.HD.place.offset.z.value))
                    {
                        mc.message.inform("1st Drive Level is automatically changed to " + (300 - mc.para.HD.place.forceOffset.z.value - mc.para.HD.place.offset.z.value).ToString());
                        mc.para.HD.place.driver.level.value = 300 - mc.para.HD.place.forceOffset.z.value - mc.para.HD.place.offset.z.value;
                    }
                }
                if (mc.para.HD.place.driver.enable.value == (int)ON_OFF.OFF)
                {
                    LB_Drive1st_Level.Visible     = false; TB_Drive1st_Level.Visible = false;
                    LB_Drive1st_Speed.Visible     = false; TB_Drive1st_Speed.Visible = false;
                    LB_Drive1st_Delay.Visible     = false; TB_Drive1st_Delay.Visible = false;
                    BT_Drive1st_SelectOnOff.Text  = BT_Drive1st_SelectOnOff_Off.Text;
                    BT_Drive1st_SelectOnOff.Image = Properties.Resources.YellowLED_OFF;
                }
                #endregion

                #region driver2
                if (mc.para.HD.place.driver2.enable.value == (int)ON_OFF.ON)
                {
                    LB_Drive2nd_Level.Visible     = true; TB_Drive2nd_Level.Visible = true;
                    LB_Drive2nd_Speed.Visible     = true; TB_Drive2nd_Speed.Visible = true;
                    LB_Drive2nd_Delay.Visible     = true; TB_Drive2nd_Delay.Visible = true;
                    BT_Drive2nd_SelectOnOff.Text  = BT_Drive2nd_SelectOnOff_On.Text;
                    BT_Drive2nd_SelectOnOff.Image = Properties.Resources.Yellow_LED;
                    TB_Drive2nd_Level.Text        = mc.para.HD.place.driver2.level.value.ToString();
                    TB_Drive2nd_Speed.Text        = mc.para.HD.place.driver2.vel.value.ToString();
                    TB_Drive2nd_Delay.Text        = mc.para.HD.place.driver2.delay.value.ToString();
                }
                if (mc.para.HD.place.driver2.enable.value == (int)ON_OFF.OFF)
                {
                    LB_Drive2nd_Level.Visible     = false; TB_Drive2nd_Level.Visible = false;
                    LB_Drive2nd_Speed.Visible     = false; TB_Drive2nd_Speed.Visible = false;
                    LB_Drive2nd_Delay.Visible     = false; TB_Drive2nd_Delay.Visible = false;
                    BT_Drive2nd_SelectOnOff.Text  = BT_Drive2nd_SelectOnOff_Off.Text;
                    BT_Drive2nd_SelectOnOff.Image = Properties.Resources.YellowLED_OFF;
                }
                #endregion

                #region offset
                TB_ForceOffset_Z.Text    = mc.para.HD.place.forceOffset.z.value.ToString();
                TB_PositionOffset_X.Text = mc.para.HD.place.offset.x.value.ToString();
                TB_PositionOffset_Y.Text = mc.para.HD.place.offset.y.value.ToString();
                TB_PositionOffset_Z.Text = mc.para.HD.place.offset.z.value.ToString();
                TB_PositionOffset_T.Text = mc.para.HD.place.offset.t.value.ToString();

                TB_PositionOffset_X2.Text = mc.para.HD.place.offset2.x.value.ToString();
                TB_PositionOffset_Y2.Text = mc.para.HD.place.offset2.y.value.ToString();
                TB_PositionOffset_T2.Text = mc.para.HD.place.offset2.t.value.ToString();
                #endregion

                #region suction
                if (mc.para.HD.place.suction.mode.value == (int)PLACE_SUCTION_MODE.SEARCH_LEVEL_OFF)
                {
                    BT_SuctionMode_Select.Text             = BT_SuctionMode_Select_SearchLevelOff.Text;
                    LB_SuctionMode_Level.Visible           = true; TB_SuctionMode_Level.Visible = true;
                    LB_SuctionMode_SuctionOffDelay.Visible = false; TB_SuctionMode_SuctionOffDelay.Visible = false;
                    TB_SuctionMode_Level.Text = mc.para.HD.place.suction.level.value.ToString();
                    TB_SuctionMode_Purse.Text = mc.para.HD.place.suction.purse.value.ToString();
                }
                if (mc.para.HD.place.suction.mode.value == (int)PLACE_SUCTION_MODE.PLACE_LEVEL_OFF)
                {
                    BT_SuctionMode_Select.Text             = BT_SuctionMode_Select_PlaceLevelOff.Text;
                    LB_SuctionMode_Level.Visible           = false; TB_SuctionMode_Level.Visible = false;
                    LB_SuctionMode_SuctionOffDelay.Visible = false; TB_SuctionMode_SuctionOffDelay.Visible = false;
                    TB_SuctionMode_Purse.Text = mc.para.HD.place.suction.purse.value.ToString();
                }
                if (mc.para.HD.place.suction.mode.value == (int)PLACE_SUCTION_MODE.PLACE_END_OFF)
                {
                    BT_SuctionMode_Select.Text             = BT_SuctionMode_Select_PlaceEndOff.Text;
                    LB_SuctionMode_Level.Visible           = false; TB_SuctionMode_Level.Visible = false;
                    LB_SuctionMode_SuctionOffDelay.Visible = true; TB_SuctionMode_SuctionOffDelay.Visible = true;
                    TB_SuctionMode_SuctionOffDelay.Text    = mc.para.HD.place.suction.delay.value.ToString();
                    TB_SuctionMode_Purse.Text = mc.para.HD.place.suction.purse.value.ToString();
                }
                if (mc.para.HD.place.suction.mode.value == (int)PLACE_SUCTION_MODE.PLACE_UP_OFF)
                {
                    BT_SuctionMode_Select.Text             = BT_SuctionMode_Select_PlaceUpOff.Text;
                    LB_SuctionMode_Level.Visible           = false; TB_SuctionMode_Level.Visible = false;
                    LB_SuctionMode_SuctionOffDelay.Visible = true; TB_SuctionMode_SuctionOffDelay.Visible = true;
                    TB_SuctionMode_SuctionOffDelay.Text    = mc.para.HD.place.suction.delay.value.ToString();
                    TB_SuctionMode_Purse.Text = mc.para.HD.place.suction.purse.value.ToString();
                }

                #endregion

                #region missCheck
                if (mc.para.HD.place.missCheck.enable.value == (int)ON_OFF.ON)
                {
                    BT_MissCheck_SelectOnOff.Text  = BT_MissCheck_SelectOnOff_On.Text;
                    BT_MissCheck_SelectOnOff.Image = Properties.Resources.Yellow_LED;
                }
                if (mc.para.HD.place.missCheck.enable.value == (int)ON_OFF.OFF)
                {
                    BT_MissCheck_SelectOnOff.Text  = BT_MissCheck_SelectOnOff_Off.Text;
                    BT_MissCheck_SelectOnOff.Image = Properties.Resources.YellowLED_OFF;
                }
                #endregion

                #region preForce
                //if (mc.para.HD.place.preForce.enable.value == (int)ON_OFF.ON)
                //{
                //    BT_PreForce_Select.Text = BT_PreForceChange_SelectOn.Text;
                //}
                //if (mc.para.HD.place.preForce.enable.value == (int)ON_OFF.OFF)
                //{
                //    BT_PreForce_Select.Text = BT_PreForceChange_SelectOff.Text;
                //}
                #endregion

                #region z down distance
                TB_DownDistance.Text = Math.Round(mc.hd.tool.tPos.z[0].XY_MOVING - mc.hd.tool.tPos.z[0].PLACE).ToString();
                #endregion

                TB_PressTiltLimit.Text = mc.para.HD.place.pressTiltLimit.value.ToString();

                LB_.Focus();
            }
        }
Exemplo n.º 6
0
        void refresh()
        {
            if (this.InvokeRequired)
            {
                refresh_Call d = new refresh_Call(refresh);
                this.BeginInvoke(d, new object[] { });
            }
            else
            {
                TB_TrayReverseXPos.Text        = mc.para.CV.trayReverseXPos.value.ToString();
                TB_TrayReverseYPos.Text        = mc.para.CV.trayReverseYPos.value.ToString();
                TB_REVERSE_PATTERN_SCORE1.Text = mc.para.HDC.modelTrayReversePattern1.passScore.value.ToString();

                TB_TrayReverseXPos2.Text       = mc.para.CV.trayReverseXPos2.value.ToString();
                TB_TrayReverseYPos2.Text       = mc.para.CV.trayReverseYPos2.value.ToString();
                TB_REVERSE_PATTERN_SCORE2.Text = mc.para.HDC.modelTrayReversePattern2.passScore.value.ToString();

                TB_LOADING_CONV_SPEED.Text   = mc.para.CV.loadingConveyorSpeed.value.ToString();
                TB_UNLOADING_CONV_SPEED.Text = mc.para.CV.unloadingConveyorSpeed.value.ToString();
                TB_WORK_CONV_SPEED.Text      = mc.para.CV.workConveyorSpeed.value.ToString();

                TB_TrayInpos_Delay.Text = mc.para.CV.trayInposDelay.value.ToString();
                TB_Stopper_Delay.Text   = mc.para.CV.StopperDelay.value.ToString();

                if ((int)mc.para.CV.trayReverseUse.value == 0)
                {
                    BT_TrayReverseUse.Text = "OFF"; BT_TrayReverseUse.Image = Properties.Resources.YellowLED_OFF;
                }
                else
                {
                    BT_TrayReverseUse.Text = "ON"; BT_TrayReverseUse.Image = Properties.Resources.Yellow_LED;
                }

                if ((int)mc.para.CV.trayReverseResult.value == 0)
                {
                    BT_TrayReverseResult.Text = "OFF"; BT_TrayReverseResult.Image = Properties.Resources.YellowLED_OFF;
                }
                else
                {
                    BT_TrayReverseResult.Text = "ON"; BT_TrayReverseResult.Image = Properties.Resources.Yellow_LED;
                }

                if ((int)mc.para.CV.trayReverseCheckMethod1.value == 0)
                {
                    BT_TrayReverseResult.Enabled = true;
                    TS_PATTERN_PARA1.Enabled     = false;
                    BT_CHECK_METHOD1.Text        = BT_USE_LASER.ToString();
                }
                else
                {
                    BT_TrayReverseResult.Enabled = false;
                    TS_PATTERN_PARA1.Enabled     = true;
                    BT_CHECK_METHOD1.Text        = BT_USE_PATTERN.ToString();
                }

                if ((int)mc.para.CV.trayReverseUse2.value == 0)
                {
                    BT_TrayReverseUse2.Text = "OFF"; BT_TrayReverseUse2.Image = Properties.Resources.YellowLED_OFF;
                }
                else
                {
                    BT_TrayReverseUse2.Text = "ON"; BT_TrayReverseUse2.Image = Properties.Resources.Yellow_LED;
                }

                if ((int)mc.para.CV.trayReverseResult2.value == 0)
                {
                    BT_TrayReverseResult2.Text = "OFF"; BT_TrayReverseResult2.Image = Properties.Resources.YellowLED_OFF;
                }
                else
                {
                    BT_TrayReverseResult2.Text = "ON"; BT_TrayReverseResult2.Image = Properties.Resources.Yellow_LED;
                }

                if ((int)mc.para.CV.trayReverseCheckMethod2.value == 0)
                {
                    BT_TrayReverseResult2.Enabled = true;
                    TS_PATTERN_PARA2.Enabled      = false;
                    BT_CHECK_METHOD2.Text         = BT_USE_LASER2.ToString();
                }
                else
                {
                    BT_TrayReverseResult2.Enabled = false;
                    TS_PATTERN_PARA2.Enabled      = true;
                    BT_CHECK_METHOD2.Text         = BT_USE_PATTERN2.ToString();
                }

                if ((int)mc.para.CV.homingSkip.value == 0)
                {
                    BT_ConvHomingSkip.Text = "OFF"; BT_ConvHomingSkip.Image = Properties.Resources.YellowLED_OFF;
                }
                else
                {
                    BT_ConvHomingSkip.Text = "ON"; BT_ConvHomingSkip.Image = Properties.Resources.Yellow_LED;
                }

                LB_.Focus();
            }
        }
Exemplo n.º 7
0
        void refresh()
        {
            if (this.InvokeRequired)
            {
                refresh_Call d = new refresh_Call(refresh);
                this.BeginInvoke(d, new object[] { });
            }
            else
            {
                if (mc.para.ETC.autoDoorControlUse.value == 0)
                {
                    BT_AutoDoorLockUse.Text = "OFF"; BT_AutoDoorLockUse.Image = Properties.Resources.YellowLED_OFF;
                }
                else
                {
                    BT_AutoDoorLockUse.Text = "ON"; BT_AutoDoorLockUse.Image = Properties.Resources.Yellow_LED;
                }
                if (mc.para.ETC.doorServoControlUse.value == 0)
                {
                    BT_DoorServoControlUse.Text = "OFF"; BT_DoorServoControlUse.Image = Properties.Resources.YellowLED_OFF;
                }
                else
                {
                    BT_DoorServoControlUse.Text = "ON"; BT_DoorServoControlUse.Image = Properties.Resources.Yellow_LED;
                }
                if (mc.para.ETC.passwordProtect.value == 0)
                {
                    BT_PasswordProtect.Text = "OFF"; BT_PasswordProtect.Image = Properties.Resources.YellowLED_OFF;
                }
                else
                {
                    BT_PasswordProtect.Text = "ON"; BT_PasswordProtect.Image = Properties.Resources.Yellow_LED;
                }
                if (mc.para.ETC.mccLogUse.value == 0)
                {
                    BT_MCCLogUse.Text = "OFF"; BT_MCCLogUse.Image = Properties.Resources.YellowLED_OFF;
                }
                else
                {
                    BT_MCCLogUse.Text = "ON"; BT_MCCLogUse.Image = Properties.Resources.Yellow_LED;
                }

                if (mc.para.ETC.unloaderControl.value == 0)
                {
                    BT_UnloaderControl.Text = "OFF"; BT_UnloaderControl.Image = Properties.Resources.YellowLED_OFF;
                }
                else
                {
                    BT_UnloaderControl.Text = "ON"; BT_UnloaderControl.Image = Properties.Resources.Yellow_LED;
                }

                if (mc.para.ETC.preMachine.value == (int)PRE_MC.INSPECTION)
                {
                    BT_PRE_MC.Text = BT_PREMC_ISP.Text;
                }
                else if (mc.para.ETC.preMachine.value == (int)PRE_MC.ATTACH)
                {
                    BT_PRE_MC.Text = BT_PREMC_ATTACH.Text;
                }
                else if (mc.para.ETC.preMachine.value == (int)PRE_MC.DISPENSER)
                {
                    BT_PRE_MC.Text = BT_PREMC_DISPENSOR.Text;
                }

                if (mc.para.ETC.useHeadMode.value == (int)UnitCodeHead.HD1)
                {
                    BT_USE_HEAD.Text = BT_HEAD_ONLY_1.Text;
                }
                else if (mc.para.ETC.useHeadMode.value == (int)UnitCodeHead.HD2)
                {
                    BT_USE_HEAD.Text = BT_HEAD_ONLY_2.Text;
                }
                else if (mc.para.ETC.useHeadMode.value == (int)UnitCodeHead.HD_MAX)
                {
                    BT_USE_HEAD.Text = BT_HEAD_DUAL.Text;
                }

                TB_HD.Text   = (mc.hd.tool.X.config.speed.rate * 100).ToString();
                TB_HD_X.Text = mc.hd.tool.X.config.speed.rate.ToString();
                TB_HD_Y.Text = mc.hd.tool.Y.config.speed.rate.ToString();
                TB_HD_T.Text = mc.hd.tool.T[0].config.speed.rate.ToString();
                TB_HD_Z.Text = mc.hd.tool.Z[0].config.speed.rate.ToString();

                //TB_PD.Text = (mc.pd.X.config.speed.rate * 100).ToString();
                //TB_PD_X.Text = mc.pd.X.config.speed.rate.ToString();
                //TB_PD_Y.Text = mc.pd.Y.config.speed.rate.ToString();
                //TB_PD_W.Text = mc.pd.W.config.speed.rate.ToString();

                TB_SF.Text    = (mc.sf.Z.config.speed.rate * 100).ToString();
                TB_SF_Z.Text  = mc.sf.Z.config.speed.rate.ToString();
                TB_SF_Z2.Text = mc.sf.Z2.config.speed.rate.ToString();

                TB_CV.Text   = (mc.cv.W.config.speed.rate * 100).ToString();
                TB_CV_W.Text = mc.cv.W.config.speed.rate.ToString();

                if (ClassChangeLanguage.mcLanguage == (int)LANGUAGE.KOREAN)
                {
                    BT_LANGUAGE.Text = BT_LAN_KOREAN.Text;
                }
                else if (ClassChangeLanguage.mcLanguage == (int)LANGUAGE.ENGLISH)
                {
                    BT_LANGUAGE.Text = BT_LAN_ENGLISH.Text;
                }

                LB_.Focus();
            }
        }
Exemplo n.º 8
0
        void refresh()
        {
            if (this.InvokeRequired)
            {
                refresh_Call d = new refresh_Call(refresh);
                this.BeginInvoke(d, new object[] { });
            }
            else
            {
                recipeName         = mc.para.ETC.recipeName.description;
                TB_RecipeName.Text = recipeName;

                //TB_Speed_HD.Text = (mc.hd.tool.X.config.speed.rate * 100).ToString();	// X축만 Display하도록 되어 있는데, 사실 모든 축에 대해서 개별로 Display하도록 만들어야 한다.
                //TB_Speed_PD.Text = (mc.pd.X.config.speed.rate * 100).ToString();

                if (mc.para.ETC.refCompenUse.value == 0)
                {
                    BT_RefCompenUse.Text = "OFF"; BT_RefCompenUse.Image = Properties.Resources.YellowLED_OFF;
                }
                else
                {
                    BT_RefCompenUse.Text = "ON"; BT_RefCompenUse.Image = Properties.Resources.Yellow_LED;
                }
                TB_RefCompenLimit.Text   = mc.para.ETC.refCompenLimit.value.ToString();
                TB_RefCompenTrayNum.Text = mc.para.ETC.refCompenTrayNum.value.ToString();

                if (mc.para.ETC.forceCompenUse.value == 0)
                {
                    BT_ForceCompenUse.Text = "OFF"; BT_ForceCompenUse.Image = Properties.Resources.YellowLED_OFF;
                }
                else
                {
                    BT_ForceCompenUse.Text = "ON"; BT_ForceCompenUse.Image = Properties.Resources.Yellow_LED;
                }
                TB_ForceCompenLimit.Text   = mc.para.ETC.forceCompenLimit.value.ToString();
                TB_ForceCompenValue.Text   = mc.para.ETC.forceCompenSet.value.ToString();
                TB_ForceCompenTrayNum.Text = mc.para.ETC.forceCompenTrayNum.value.ToString();

                if (mc.para.ETC.flatCompenUse.value == 0)
                {
                    BT_FlatCompenUse.Text = "OFF"; BT_FlatCompenUse.Image = Properties.Resources.YellowLED_OFF;
                }
                else
                {
                    BT_FlatCompenUse.Text = "ON"; BT_FlatCompenUse.Image = Properties.Resources.Yellow_LED;
                }
                TB_FlatCompenLimit.Text = mc.para.ETC.flatCompenLimit.value.ToString();
                //TB_FlatCompenToolSizeX.Text = mc.para.ETC.flatCompenToolSizeX.value.ToString();
                //TB_FlatCompenToolSizeY.Text = mc.para.ETC.flatCompenToolSizeY.value.ToString();
                TB_FlatCompenOffset.Text    = mc.para.ETC.flatCompenOffset.value.ToString();
                TB_FlatPedestatlOffset.Text = mc.para.ETC.flatPedestalOffset.value.ToString();
                TB_FlatCompenTrayNum.Text   = mc.para.ETC.flatCompenTrayNum.value.ToString();

                if (mc.para.ETC.epoxyLifetimeUse.value == 0)
                {
                    BT_EpoxyLifetimeUse.Text = "OFF"; BT_EpoxyLifetimeUse.Image = Properties.Resources.YellowLED_OFF;
                }
                else
                {
                    BT_EpoxyLifetimeUse.Text = "ON"; BT_EpoxyLifetimeUse.Image = Properties.Resources.Yellow_LED;
                }
                TB_EpoxyLifetimeHour.Text   = mc.para.ETC.epoxyLifetimeHour.value.ToString();
                TB_EpoxyLifetimeMinute.Text = mc.para.ETC.epoxyLifetimeMinute.value.ToString();

                if (mc.para.ETC.placeTimeForceCheckUse.value == 0)
                {
                    BT_PlaceTimeForceUse.Text = "OFF"; BT_PlaceTimeForceUse.Image = Properties.Resources.YellowLED_OFF;
                }
                else
                {
                    BT_PlaceTimeForceUse.Text = "ON"; BT_PlaceTimeForceUse.Image = Properties.Resources.Yellow_LED;
                }

                if (mc.para.ETC.placeTimeForceCheckMethod.value == 0)
                {
                    BT_PlaceForceCheck.Text = BT_PlaceForceCheck_Display.Text;
                }
                else
                {
                    BT_PlaceForceCheck.Text = BT_PlaceForceCheck_Alarm.Text;
                }

                TB_PlaceForceHighLimit.Text         = mc.para.ETC.placeForceHighLimit.value.ToString();
                TB_PlaceForceLowLimit.Text          = mc.para.ETC.placeForceLowLimit.value.ToString();
                TB_PlaceTimeForceErrorDuration.Text = mc.para.ETC.placeTimeForceErrorDuration.value.ToString();

                if (mc.para.ETC.lastTubeAlarmUse.value == 0)
                {
                    BT_LastTubeCheckUse.Text  = "OFF";
                    BT_LastTubeCheckUse.Image = Properties.Resources.YellowLED_OFF;
                }
                else
                {
                    BT_LastTubeCheckUse.Text  = "ON";
                    BT_LastTubeCheckUse.Image = Properties.Resources.Yellow_LED;
                }

                if (mc.para.ETC.usePlaceForceTracking.value == 0)
                {
                    BT_UsePlaceForceTracking.Text  = "OFF";
                    BT_UsePlaceForceTracking.Image = Properties.Resources.YellowLED_OFF;
                }
                else
                {
                    BT_UsePlaceForceTracking.Text  = "ON";
                    BT_UsePlaceForceTracking.Image = Properties.Resources.Yellow_LED;
                }

                if (mc.para.ETC.useWasteCountLimit.value == 0)
                {
                    BT_UseWasteCountLimit.Text = "OFF"; BT_UseWasteCountLimit.Image = Properties.Resources.YellowLED_OFF;
                }
                else
                {
                    BT_UseWasteCountLimit.Text = "ON"; BT_UseWasteCountLimit.Image = Properties.Resources.Yellow_LED;
                }

                if (mc.para.ETC.useAutoTiltCheck.value == 0)
                {
                    BT_USE_AUTO_TILT_CHECK.Text = "OFF"; BT_USE_AUTO_TILT_CHECK.Image = Properties.Resources.YellowLED_OFF;
                }
                else
                {
                    BT_USE_AUTO_TILT_CHECK.Text = "ON"; BT_USE_AUTO_TILT_CHECK.Image = Properties.Resources.Yellow_LED;
                }

                TB_WasteCountLimit.Text = mc.para.ETC.wasteCountLimit.value.ToString();
                TB_CurrWasteCount.Text  = mc.para.ETC.wasteCount.value.ToString();

                LB_.Focus();
            }
        }
Exemplo n.º 9
0
        void refresh()
        {
            if (this.InvokeRequired)
            {
                refresh_Call d = new refresh_Call(refresh);
                this.BeginInvoke(d, new object[] { });
            }
            else
            {
                #region search
                if (mc.para.HD.pick.search.enable.value == (int)ON_OFF.ON)
                {
                    LB_Search1st_Level.Visible     = true; TB_Search1st_Level.Visible = true;
                    LB_Search1st_Speed.Visible     = true; TB_Search1st_Speed.Visible = true;
                    LB_Search1st_Delay.Visible     = true; TB_Search1st_Delay.Visible = true;
                    BT_Search1st_SelectOnOff.Text  = BT_Search1st_SelectOnOff_On.Text;
                    BT_Search1st_SelectOnOff.Image = Properties.Resources.Yellow_LED;
                    TB_Search1st_Level.Text        = mc.para.HD.pick.search.level.value.ToString();
                    TB_Search1st_Speed.Text        = mc.para.HD.pick.search.vel.value.ToString();
                    TB_Search1st_Delay.Text        = mc.para.HD.pick.search.delay.value.ToString();
                }
                if (mc.para.HD.pick.search.enable.value == (int)ON_OFF.OFF)
                {
                    LB_Search1st_Level.Visible     = false; TB_Search1st_Level.Visible = false;
                    LB_Search1st_Speed.Visible     = false; TB_Search1st_Speed.Visible = false;
                    LB_Search1st_Delay.Visible     = false; TB_Search1st_Delay.Visible = false;
                    BT_Search1st_SelectOnOff.Text  = BT_Search1st_SelectOnOff_Off.Text;
                    BT_Search1st_SelectOnOff.Image = Properties.Resources.YellowLED_OFF;
                }
                #endregion

                #region search2
                if (mc.para.HD.pick.search2.enable.value == (int)ON_OFF.ON)
                {
                    LB_Search2nd_Level.Visible     = true; TB_Search2nd_Level.Visible = true;
                    LB_Search2nd_Speed.Visible     = true; TB_Search2nd_Speed.Visible = true;
                    LB_Search2nd_Delay.Visible     = true; TB_Search2nd_Delay.Visible = true;
                    BT_Search2nd_SelectOnOff.Text  = BT_Search2nd_SelectOnOff_On.Text;
                    BT_Search2nd_SelectOnOff.Image = Properties.Resources.Yellow_LED;
                    TB_Search2nd_Level.Text        = mc.para.HD.pick.search2.level.value.ToString();
                    TB_Search2nd_Speed.Text        = mc.para.HD.pick.search2.vel.value.ToString();
                    TB_Search2nd_Delay.Text        = mc.para.HD.pick.search2.delay.value.ToString();
                }
                if (mc.para.HD.pick.search2.enable.value == (int)ON_OFF.OFF)
                {
                    LB_Search2nd_Level.Visible     = false; TB_Search2nd_Level.Visible = false;
                    LB_Search2nd_Speed.Visible     = false; TB_Search2nd_Speed.Visible = false;
                    LB_Search2nd_Delay.Visible     = false; TB_Search2nd_Delay.Visible = false;
                    BT_Search2nd_SelectOnOff.Text  = BT_Search2nd_SelectOnOff_Off.Text;
                    BT_Search2nd_SelectOnOff.Image = Properties.Resources.YellowLED_OFF;
                }
                #endregion

                TB_Delay.Text = mc.para.HD.pick.delay.value.ToString();
                TB_Force.Text = mc.para.HD.pick.force.value.ToString();

                #region driver
                if (mc.para.HD.pick.driver.enable.value == (int)ON_OFF.ON)
                {
                    LB_Drive1st_Level.Visible     = true; TB_Drive1st_Level.Visible = true;
                    LB_Drive1st_Speed.Visible     = true; TB_Drive1st_Speed.Visible = true;
                    LB_Drive1st_Delay.Visible     = true; TB_Drive1st_Delay.Visible = true;
                    BT_Drive1st_SelectOnOff.Text  = BT_Drive1st_SelectOnOff_On.Text;
                    BT_Drive1st_SelectOnOff.Image = Properties.Resources.Yellow_LED;
                    TB_Drive1st_Level.Text        = mc.para.HD.pick.driver.level.value.ToString();
                    TB_Drive1st_Speed.Text        = mc.para.HD.pick.driver.vel.value.ToString();
                    TB_Drive1st_Delay.Text        = mc.para.HD.pick.driver.delay.value.ToString();
                }
                if (mc.para.HD.pick.driver.enable.value == (int)ON_OFF.OFF)
                {
                    LB_Drive1st_Level.Visible     = false; TB_Drive1st_Level.Visible = false;
                    LB_Drive1st_Speed.Visible     = false; TB_Drive1st_Speed.Visible = false;
                    LB_Drive1st_Delay.Visible     = false; TB_Drive1st_Delay.Visible = false;
                    BT_Drive1st_SelectOnOff.Text  = BT_Drive1st_SelectOnOff_Off.Text;
                    BT_Drive1st_SelectOnOff.Image = Properties.Resources.YellowLED_OFF;
                }
                #endregion

                #region driver2
                if (mc.para.HD.pick.driver2.enable.value == (int)ON_OFF.ON)
                {
                    LB_Drive2nd_Level.Visible     = true; TB_Drive2nd_Level.Visible = true;
                    LB_Drive2nd_Speed.Visible     = true; TB_Drive2nd_Speed.Visible = true;
                    LB_Drive2nd_Delay.Visible     = true; TB_Drive2nd_Delay.Visible = true;
                    BT_Drive2nd_SelectOnOff.Text  = BT_Drive2nd_SelectOnOff_On.Text;
                    BT_Drive2nd_SelectOnOff.Image = Properties.Resources.Yellow_LED;
                    TB_Drive2nd_Level.Text        = mc.para.HD.pick.driver2.level.value.ToString();
                    TB_Drive2nd_Speed.Text        = mc.para.HD.pick.driver2.vel.value.ToString();
                    TB_Drive2nd_Delay.Text        = mc.para.HD.pick.driver2.delay.value.ToString();
                }
                if (mc.para.HD.pick.driver2.enable.value == (int)ON_OFF.OFF)
                {
                    LB_Drive2nd_Level.Visible     = false; TB_Drive2nd_Level.Visible = false;
                    LB_Drive2nd_Speed.Visible     = false; TB_Drive2nd_Speed.Visible = false;
                    LB_Drive2nd_Delay.Visible     = false; TB_Drive2nd_Delay.Visible = false;
                    BT_Drive2nd_SelectOnOff.Text  = BT_Drive2nd_SelectOnOff_Off.Text;
                    BT_Drive2nd_SelectOnOff.Image = Properties.Resources.YellowLED_OFF;
                }
                #endregion

                #region offset
                if (mc.swcontrol.mechanicalRevision == 0)
                {
                    BT_PositionOffset_SelectSF.Text = slectOffsetSF.ToString();
                }
                else
                {
                    if (slectOffsetSF == UnitCodeSF.SF5)
                    {
                        BT_PositionOffset_SelectSF.Text = UnitCodeSF.SF3.ToString();
                    }
                    else if (slectOffsetSF == UnitCodeSF.SF6)
                    {
                        BT_PositionOffset_SelectSF.Text = UnitCodeSF.SF4.ToString();
                    }
                    else
                    {
                        BT_PositionOffset_SelectSF.Text = slectOffsetSF.ToString();
                    }
                }

                TB_PositionOffset_X.Text = mc.para.HD.pick.offset[(int)slectOffsetSF].x.value.ToString();
                TB_PositionOffset_Y.Text = mc.para.HD.pick.offset[(int)slectOffsetSF].y.value.ToString();
                //TB_PositionOffset_Z.Text = mc.para.HD.pick.offset[(int)slectOffsetSF].z.value.ToString();
                TB_PickOffsetZ1.Text = mc.para.HD.pick.offset[0].z.value.ToString();
                TB_PickOffsetZ2.Text = mc.para.HD.pick.offset[1].z.value.ToString();
                TB_PickOffsetZ3.Text = mc.para.HD.pick.offset[2].z.value.ToString();
                TB_PickOffsetZ4.Text = mc.para.HD.pick.offset[3].z.value.ToString();
                TB_PickOffsetZ5.Text = mc.para.HD.pick.offset[4].z.value.ToString();
                TB_PickOffsetZ6.Text = mc.para.HD.pick.offset[5].z.value.ToString();
                TB_PickOffsetZ7.Text = mc.para.HD.pick.offset[6].z.value.ToString();
                TB_PickOffsetZ8.Text = mc.para.HD.pick.offset[7].z.value.ToString();
                #endregion

                #region suction
                if (mc.para.HD.pick.suction.mode.value == (int)PICK_SUCTION_MODE.MOVING_LEVEL_ON)
                {
                    BT_SuctionMode_Select.Text   = BT_SuctionMode_Select_MovingLevelOn.Text;
                    LB_SuctionMode_Level.Visible = false; TB_SuctionMode_Level.Visible = false;
                }
                if (mc.para.HD.pick.suction.mode.value == (int)PICK_SUCTION_MODE.SEARCH_LEVEL_ON)
                {
                    BT_SuctionMode_Select.Text   = BT_SuctionMode_Select_SearchLevelOn.Text;
                    LB_SuctionMode_Level.Visible = true; TB_SuctionMode_Level.Visible = true;
                    TB_SuctionMode_Level.Text    = mc.para.HD.pick.suction.level.value.ToString();
                }
                if (mc.para.HD.pick.suction.mode.value == (int)PICK_SUCTION_MODE.PICK_LEVEL_ON)
                {
                    BT_SuctionMode_Select.Text   = BT_SuctionMode_Select_PickLevelOn.Text;
                    LB_SuctionMode_Level.Visible = false; TB_SuctionMode_Level.Visible = false;
                }
                if (mc.para.HD.pick.suction.check.value == (int)ON_OFF.ON)
                {
                    BT_SuctionCheck_SelectOnOff.Text  = BT_SuctionCheck_SelectOnOff_On.Text;
                    BT_SuctionCheck_SelectOnOff.Image = Properties.Resources.Yellow_LED;
                    TB_SuctionCheck_Time.Text         = mc.para.HD.pick.suction.checkLimitTime.value.ToString();
                    LB_SuctionCheck_Limit.Visible     = true; TB_SuctionCheck_Time.Visible = true;
                    TB_SuctionCheckLimit_HD1.Text     = mc.para.HD.pick.pickupVacLimit[(int)UnitCodeHead.HD1].value.ToString();
                    TB_SuctionCheckLimit_HD2.Text     = mc.para.HD.pick.pickupVacLimit[(int)UnitCodeHead.HD2].value.ToString();
                    LB_SuctionCheckLimit_HD1.Visible  = true; TB_SuctionCheckLimit_HD1.Visible = true;
                    LB_SuctionCheckLimit_HD2.Visible  = true; TB_SuctionCheckLimit_HD2.Visible = true;
                    toolStripSeparator4.Visible       = true; toolStripSeparator11.Visible = true; toolStripSeparator35.Visible = true;
                }
                if (mc.para.HD.pick.suction.check.value == (int)ON_OFF.OFF)
                {
                    BT_SuctionCheck_SelectOnOff.Text  = BT_SuctionCheck_SelectOnOff_Off.Text;
                    BT_SuctionCheck_SelectOnOff.Image = Properties.Resources.YellowLED_OFF;
                    LB_SuctionCheck_Limit.Visible     = false; TB_SuctionCheck_Time.Visible = false;
                    LB_SuctionCheckLimit_HD1.Visible  = false; TB_SuctionCheckLimit_HD1.Visible = false;
                    LB_SuctionCheckLimit_HD2.Visible  = false; TB_SuctionCheckLimit_HD2.Visible = false;
                    toolStripSeparator4.Visible       = false; toolStripSeparator11.Visible = false; toolStripSeparator35.Visible = false;
                }
                #endregion

                #region missCheck
                if (mc.para.HD.pick.missCheck.enable.value == (int)ON_OFF.ON)
                {
                    BT_MissCheck_SelectOnOff.Text  = BT_MissCheck_SelectOnOff_On.Text;
                    BT_MissCheck_SelectOnOff.Image = Properties.Resources.Yellow_LED;
                    TB_MissCheck_Retry.Text        = mc.para.HD.pick.missCheck.retry.value.ToString();
                    LB_MissCheck_Retry.Visible     = true; TB_MissCheck_Retry.Visible = true;
                }
                if (mc.para.HD.pick.missCheck.enable.value == (int)ON_OFF.OFF)
                {
                    BT_MissCheck_SelectOnOff.Text  = BT_MissCheck_SelectOnOff_Off.Text;
                    BT_MissCheck_SelectOnOff.Image = Properties.Resources.YellowLED_OFF;
                    LB_MissCheck_Retry.Visible     = false; TB_MissCheck_Retry.Visible = false;
                }
                #endregion

                #region shake motion
                if (mc.para.HD.pick.shake.enable.value == (int)ON_OFF.ON)
                {
                    BT_ShakeUse_OnOff.Text  = BT_ShakeUse_OnOff_On.Text;
                    BT_ShakeUse_OnOff.Image = Properties.Resources.Yellow_LED;
                    TB_ShakeCount.Text      = mc.para.HD.pick.shake.count.value.ToString();
                    TB_ShakeDist.Text       = mc.para.HD.pick.shake.level.value.ToString();
                    TB_ShakeSpeed.Text      = mc.para.HD.pick.shake.speed.value.ToString();
                    TB_ShakeDelay.Text      = mc.para.HD.pick.shake.delay.value.ToString();
                    TB_ShakeCount.Visible   = true; TB_ShakeDist.Visible = true;
                    LB_ShakeCount.Visible   = true; LB_ShakeDist.Visible = true;
                    TB_ShakeSpeed.Visible   = true; TB_ShakeDelay.Visible = true;
                    LB_ShakeSpeed.Visible   = true; LB_ShakeDelay.Visible = true;
                }
                if (mc.para.HD.pick.shake.enable.value == (int)ON_OFF.OFF)
                {
                    BT_ShakeUse_OnOff.Text  = BT_ShakeUse_OnOff_Off.Text;
                    BT_ShakeUse_OnOff.Image = Properties.Resources.YellowLED_OFF;
                    TB_ShakeCount.Visible   = false; TB_ShakeDist.Visible = false;
                    LB_ShakeCount.Visible   = false; LB_ShakeDist.Visible = false;
                    TB_ShakeSpeed.Visible   = false; TB_ShakeDelay.Visible = false;
                    LB_ShakeSpeed.Visible   = false; LB_ShakeDelay.Visible = false;
                }
                #endregion

                TB_WasteDelay.Text = mc.para.HD.pick.wasteDelay.value.ToString();

                LB_.Focus();
            }
        }