Esempio n. 1
0
        //---------------------------------------------------------------------------
        private void UserButton_Click_6(object sender, RoutedEventArgs e)
        {
            if (!m_bConnect || m_nAxis < 0)
            {
                return;
            }

            //mc_Acs.fn_SetBuffer(m_nAxis, true); //HOME

            int nHomeNo = MOTR.ManNoHome((EN_MOTR_ID)m_nAxis);

            if (!fn_UserMsg($"{STRING_MOTOR_ID[m_nAxis]} Motor Home?", EN_MSG_TYPE.Check))
            {
                return;
            }

            SEQ.fn_Reset();

            if (nHomeNo == 32) //Z-Axis
            {
                if (SEQ_SPIND.fn_IsExistTool() && !FM.fn_IsLvlMaster())
                {
                    fn_UserMsg("Please remove tool");
                    return;
                }
            }
            MAN.fn_ManProcOn(nHomeNo, true, false);
        }
        //---------------------------------------------------------------------------
        private void btToolCal_Click(object sender, RoutedEventArgs e)
        {
            //Auto Tool Calibration
            MAN.fn_ManProcOn((int)EN_MAN_LIST.MAN_0425, true, false);

            fn_WriteLog("[MASTER] Auto Tool Storage Calibration.");
        }
Esempio n. 3
0
        private void bn_AutoToolAlign_Click(object sender, RoutedEventArgs e)
        {
            //Auto Tool Calibration
            int cnt = 1;

            int.TryParse(tbCalCnt.Text, out cnt);
            fn_UpdateData();
            SEQ_SPIND._nAlignTestCount = cnt;
            MAN.fn_ManProcOn((int)EN_MAN_LIST.MAN_0425, true, false);

            fn_WriteLog("[MASTER] Auto Tool Storage Calibration.");
        }
Esempio n. 4
0
        //---------------------------------------------------------------------------
        private void lbAllHome_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            //
            if (fn_UserMsg("Do you want All Home?", EN_MSG_TYPE.Check))
            {
                //Home Seq.
                MAN.fn_ManProcOn((int)EN_MAN_LIST.MAN_0001, true, false);

                //Log
                fn_WriteLog("Click All Home");
            }
        }
Esempio n. 5
0
        //---------------------------------------------------------------------------
        private void btMove_PreviewMouseDown(object sender, MouseButtonEventArgs e)
        {
            if (!double.TryParse(tbSetPos.Text, out double dPos))
            {
                return;
            }

            if (dPos < 0)
            {
                return;
            }

            MAN._dDirectPos = dPos;

            int nManNo = (int)MOTR.ManNoDirect(EN_MOTR_ID.miSPD_X) + (25 * m_nSelMotr);

            MAN.fn_ManProcOn(nManNo, true, false);
        }
        //---------------------------------------------------------------------------
        private void btAutoCal_Click(object sender, RoutedEventArgs e)
        {
            int nCycle = 0;

            int.TryParse(lbCalCycle.Text, out nCycle);

            if (nCycle > 0 && nCycle < 20)
            {
                SEQ_SPIND._nTotalCalCycle = nCycle;
            }
            else
            {
                fn_UserMsg("Count 숫자를 확인하세요 (Count < 20)");
                return;
            }

            //Auto Calibration
            MAN.fn_ManProcOn((int)EN_MAN_LIST.MAN_0419, true, false);

            fn_WriteLog("[MASTER] Auto Calibration.");
        }
        //---------------------------------------------------------------------------
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            //
            Button selbtn  = sender as Button;
            int    nSelTag = Convert.ToInt32(selbtn.Tag);
            int    nTag    = 0;

            switch (nSelTag)
            {
            case 0:
                SUPPLY[0]._bSlurryReq = !SUPPLY[0]._bSlurryReq;
                //if (SUPPLY[0]._bSlurryReq)
                //{
                //    SEQ_POLIS.fn_SupplyUtil(EN_UTIL_KIND.Silica01);
                //}
                //else
                //{
                //    SEQ_POLIS.fn_StopAllUtil();
                //}
                break;

            case 1:
                SUPPLY[0]._bCleanReq = !SUPPLY[0]._bCleanReq;
                //if (SUPPLY[0]._bCleanReq)
                //{
                //    SEQ_POLIS.fn_SupplyUtil(EN_UTIL_KIND.Silica01);  //SEQ_POLIS.fn_SupplyUtil(EN_UTIL_KIND.DIWater);
                //}
                //else
                //{
                //    SEQ_POLIS.fn_StopAllUtil();
                //}
                break;

            case 2:
                nTag = (int)EN_MAN_LIST.MAN_0421;
                MAN.fn_ManProcOn(nTag, true, false);
                break;

            //case 3:
            //    SUPPLY[1]._bSlurryReq = !SUPPLY[1]._bSlurryReq;
            //    break;
            //case 4:
            //    SUPPLY[1]._bCleanReq = !SUPPLY[1]._bCleanReq;
            //    break;
            //case 5:
            //    SUPPLY[1]._bDrainvValve = !SUPPLY[1]._bDrainvValve;
            //    break;
            case 10:
                SUPPLY[1]._bSlurryReq = !SUPPLY[1]._bSlurryReq;
                //if (SUPPLY[1]._bSlurryReq)
                //{
                //    SEQ_POLIS.fn_SupplyUtil(EN_UTIL_KIND.Soap);
                //}
                //else
                //{
                //    SEQ_POLIS.fn_StopAllUtil();
                //}
                break;

            case 11:
                SUPPLY[1]._bCleanReq = !SUPPLY[1]._bCleanReq;
                //if (SUPPLY[0]._bCleanReq)
                //{
                //    SEQ_POLIS.fn_SupplyUtil(EN_UTIL_KIND.DIWater);
                //}
                //else
                //{
                //    SEQ_POLIS.fn_StopAllUtil();
                //}
                break;

            default:
                break;
            }
        }