Esempio n. 1
0
        //Manual Processing.
        public static bool SetManCycle(mc _iNo)
        {
            m_iCrntManNo = m_iManNo;

            if (_iNo < 0)
            {
                Log.ShowMessage("ERROR", "Wrong Manual No"); return(false);
            }
            if (_iNo >= mc.MAX_MANUAL_CYCLE)
            {
                Log.ShowMessage("ERROR", "Wrong Manual No"); return(false);
            }
            if (m_iManNo != mc.NoneCycle)
            {
                Log.ShowMessage("ERROR", "Doing Manual Cycle"); return(false);
            }
            if (SEQ._bRun)
            {
                Log.ShowMessage("ERROR", "Autorunning"); return(false);
            }
            if (_iNo > mc.STCK_Home && !SEQ.InspectHomeDone())
            {
                return(false);
            }

            //   mcLDR_RHome
            m_bManSetting = true; //SetManCycle함수는 화면 쓰레드. 업데이트 함수에서 다른쓰레드로 들어와서 갱신하기에 플레그 걸어 막아둠.    //   mcIDX_Home
            m_iManNo      = _iNo;

            //   mcLTL_Home
            //   mcRTL_Home

            //SM.ER.SetDisp(true);jinseop

            bool bRet = true;                                                                                                                //   mcSTG_Home

            //   mcULD_Home
            /********************/
            /********************/
            if (m_iManNo == mc.NoneCycle)
            {
                bRet = false;
            }
            else if (m_iManNo == mc.AllHome)
            {
            }
            else if (m_iManNo == mc.LODR_Home)
            {
            }
            else if (m_iManNo == mc.TOOL_Home)
            {
            }
            else if (m_iManNo == mc.BARZ_Home)
            {
            }
            else if (m_iManNo == mc.IDXR_Home)
            {
            }
            else if (m_iManNo == mc.IDXF_Home)
            {
            }
            else if (m_iManNo == mc.STCK_Home)
            {
            }

            else if (m_iManNo == mc.LODR_CycleSply)
            {
                if (SM.CL_GetCmd(ci.IDXR_ClampUpDn) == fb.Fwd && SM.MT_GetCmdPos(mi.IDXR_XRear) < OM.CmnOptn.dIdxRSplyPos)
                {
                    Log.ShowMessage("Warring", "Rear Index Clamp is Up!");
                    bRet = false;
                }
                if (SM.CL_GetCmd(ci.IDXF_ClampUpDn) == fb.Fwd && SM.MT_GetCmdPos(mi.IDXF_XFrnt) < OM.CmnOptn.dIdxFSplyPos)
                {
                    Log.ShowMessage("Warring", "Front Index Clamp is Up!");
                    bRet = false;
                }
            }

            else if (m_iManNo == mc.IDXF_CycleGet)
            {
                if (!SM.MT_CmprPos(mi.IDXR_XRear, SM.PM_GetValue(mi.IDXR_XRear, pv.IDXR_XRearWait), 1.0))
                {
                    Log.ShowMessage("Warring", "Rear Index is not in wait Position.");
                    bRet = false;
                }
            }
            else if (m_iManNo == mc.IDXF_CycleBarcode)
            {
                if (!SM.MT_CmprPos(mi.IDXR_XRear, SM.PM_GetValue(mi.IDXR_XRear, pv.IDXR_XRearWait), 1.0))
                {
                    Log.ShowMessage("Warring", "Rear Index is not in wait Position.");
                    bRet = false;
                }
                if (!DM.ARAY[ri.IDXR].CheckAllStat(cs.None))
                {
                    Log.ShowMessage("Warring", "Rear IndexData Exist!");
                    bRet = false;
                }
                if (SM.CL_GetCmd(ci.IDXR_ClampUpDn) == fb.Fwd)
                {
                    Log.ShowMessage("Warring", "Rear Index Clamp is Up!");
                    bRet = false;
                }
            }
            else if (m_iManNo == mc.IDXF_CycleOut)
            {
                if (!SM.MT_CmprPos(mi.IDXR_XRear, SM.PM_GetValue(mi.IDXR_XRear, pv.IDXR_XRearWait), 1.0))
                {
                    Log.ShowMessage("Warring", "Rear Index is not in wait Position.");
                    bRet = false;
                }
                if (!DM.ARAY[ri.OUTZ].CheckAllStat(cs.None))
                {
                    Log.ShowMessage("Warring", "OutZone Data Exist!");
                    bRet = false;
                }

                if (!DM.ARAY[ri.IDXR].CheckAllStat(cs.None))
                {
                    Log.ShowMessage("Warring", "Rear IndexData Exist!");
                    bRet = false;
                }
                if (SM.CL_GetCmd(ci.IDXR_ClampUpDn) == fb.Fwd)
                {
                    Log.ShowMessage("Warring", "Rear Index Clamp is Up!");
                    bRet = false;
                }
            }


            else if (m_iManNo == mc.IDXR_CycleGet)
            {
                if (!SM.MT_CmprPos(mi.IDXF_XFrnt, SM.PM_GetValue(mi.IDXF_XFrnt, pv.IDXF_XFrntWait), 1.0))
                {
                    Log.ShowMessage("Warring", "Front Index is not in wait Position.");
                    bRet = false;
                }
            }
            else if (m_iManNo == mc.IDXR_CycleBarcode)
            {
                if (!SM.MT_CmprPos(mi.IDXF_XFrnt, SM.PM_GetValue(mi.IDXF_XFrnt, pv.IDXF_XFrntWait), 1.0))
                {
                    Log.ShowMessage("Warring", "Front Index is not in wait Position.");
                    bRet = false;
                }

                if (!DM.ARAY[ri.IDXF].CheckAllStat(cs.None))
                {
                    Log.ShowMessage("Warring", "Front IndexData Exist!");
                    bRet = false;
                }
                if (SM.CL_GetCmd(ci.IDXF_ClampUpDn) == fb.Fwd)
                {
                    Log.ShowMessage("Warring", "Front Index Clamp is Up!");
                    bRet = false;
                }
            }
            else if (m_iManNo == mc.IDXR_CycleOut)
            {
                if (!SM.MT_CmprPos(mi.IDXF_XFrnt, SM.PM_GetValue(mi.IDXF_XFrnt, pv.IDXF_XFrntWait), 1.0))
                {
                    Log.ShowMessage("Warring", "Front Index is not in wait Position.");
                    bRet = false;
                }
                if (!DM.ARAY[ri.OUTZ].CheckAllStat(cs.None))
                {
                    Log.ShowMessage("Warring", "OutZone Data Exist!");
                    bRet = false;
                }

                if (!DM.ARAY[ri.IDXF].CheckAllStat(cs.None))
                {
                    Log.ShowMessage("Warring", "Front IndexData Exist!");
                    bRet = false;
                }
                if (SM.CL_GetCmd(ci.IDXF_ClampUpDn) == fb.Fwd)
                {
                    Log.ShowMessage("Warring", "Front Index Clamp is Up!");
                    bRet = false;
                }
            }
            else if (m_iManNo == mc.TOOL_CycleVisn)
            {
            }
            else if (m_iManNo == mc.TOOL_CycleNGPick)
            {
            }
            else if (m_iManNo == mc.TOOL_CycleNGPlace)
            {
            }
            else if (m_iManNo == mc.TOOL_CycleGoodPick)
            {
            }
            else if (m_iManNo == mc.TOOL_CycleGoodPlace)
            {
            }

            else if (m_iManNo == mc.STCK_CycleToStack)
            {
            }
            else if (m_iManNo == mc.STCK_CycleStack)
            {
            }
            else if (m_iManNo == mc.STCK_CycleOut)
            {
            }

            else if (m_iManNo == mc.BARZ_CycleBarPick)
            {
            }
            else if (m_iManNo == mc.BARZ_CycleBarPlace)
            {
            }
            else if (m_iManNo == mc.BARZ_CycleOut)
            {
            }
            if (!bRet)
            {
                Init();
            }

            /********************/
            /* 처리..           */
            /********************/

            if (m_iManNo == mc.NoneCycle)
            {
            }
            else if (m_iManNo == mc.AllHome)
            {
                SM.MT_SetServoAll(true);
                SEQ.LODR.InitHomeStep();
                SEQ.TOOL.InitHomeStep();
                SEQ.BARZ.InitHomeStep();
                SEQ.IDXR.InitHomeStep();
                SEQ.IDXF.InitHomeStep();
                SEQ.STCK.InitHomeStep();
            }
            else if (m_iManNo == mc.LODR_Home)
            {
                SM.MT_SetServoAll(true); SEQ.LODR.InitHomeStep();
            }
            else if (m_iManNo == mc.TOOL_Home)
            {
                SM.MT_SetServoAll(true); SEQ.TOOL.InitHomeStep();
            }
            else if (m_iManNo == mc.BARZ_Home)
            {
                SM.MT_SetServoAll(true); SEQ.BARZ.InitHomeStep();
            }
            else if (m_iManNo == mc.IDXR_Home)
            {
                SM.MT_SetServoAll(true); SEQ.IDXR.InitHomeStep();
            }
            else if (m_iManNo == mc.IDXF_Home)
            {
                SM.MT_SetServoAll(true); SEQ.IDXF.InitHomeStep();
            }
            else if (m_iManNo == mc.STCK_Home)
            {
                SM.MT_SetServoAll(true); SEQ.STCK.InitHomeStep();
            }

            else if (m_iManNo == mc.LODR_CycleSply)
            {
                SEQ.LODR.InitCycleStep();
            }

            else if (m_iManNo == mc.IDXF_CycleGet)
            {
                SEQ.IDXF.InitCycleStep();
            }
            else if (m_iManNo == mc.IDXF_CycleBarcode)
            {
                SEQ.IDXF.InitCycleStep();
            }
            else if (m_iManNo == mc.IDXF_CycleOut)
            {
                SEQ.IDXF.InitCycleStep();
            }
            else if (m_iManNo == mc.IDXR_CycleGet)
            {
                SEQ.IDXR.InitCycleStep();
            }
            else if (m_iManNo == mc.IDXR_CycleBarcode)
            {
                SEQ.IDXR.InitCycleStep();
            }
            else if (m_iManNo == mc.IDXR_CycleOut)
            {
                SEQ.IDXR.InitCycleStep();
            }

            else if (m_iManNo == mc.TOOL_CycleVisn)
            {
                SEQ.TOOL.InitCycleStep();
            }
            else if (m_iManNo == mc.TOOL_CycleNGPick)
            {
                SEQ.TOOL.InitCycleStep();
            }
            else if (m_iManNo == mc.TOOL_CycleNGPlace)
            {
                SEQ.TOOL.InitCycleStep();
            }
            else if (m_iManNo == mc.TOOL_CycleGoodPick)
            {
                SEQ.TOOL.InitCycleStep();
            }
            else if (m_iManNo == mc.TOOL_CycleGoodPlace)
            {
                SEQ.TOOL.InitCycleStep();
            }

            else if (m_iManNo == mc.STCK_CycleToStack)
            {
                SEQ.STCK.InitCycleStep();
            }
            else if (m_iManNo == mc.STCK_CycleStack)
            {
                SEQ.STCK.InitCycleStep();
            }
            else if (m_iManNo == mc.STCK_CycleOut)
            {
                SEQ.STCK.InitCycleStep();
            }

            else if (m_iManNo == mc.BARZ_CycleBarPick)
            {
                SEQ.BARZ.InitCycleStep();
            }
            else if (m_iManNo == mc.BARZ_CycleBarPlace)
            {
                SEQ.BARZ.InitCycleStep();
            }
            else if (m_iManNo == mc.BARZ_CycleOut)
            {
                SEQ.BARZ.InitCycleStep();
            }

            //else if (m_iManNo == mBARZ_CycleBarPick  c.TOOL_SubsAlignVisn ) { SEQ.TOOL.InitCycleStep(); }
            //else if (m_iManNo == mBARZ_CycleBarPlace c.TOOL_WafrAlignVisn ) { SEQ.TOOL.InitCycleStep(); }
            //else if (m_iManNo == mBARZ_CycleOut      c.WSTG_WaferGet      ) { SEQ.WSTG.InitCycleStep(); }
            //else if (m_iManNo == mc.TOOL_Eject         ) { SEQ.TOOL.InitCycleStep(); }
            //else if (m_iManNo == mc.TOOL_DispCheck     ) { SEQ.TOOL.InitCycleStep(); }
            //else if (m_iManNo == mc.TOOL_HghtCheck     ) { SEQ.TOOL.InitCycleStep(); }
            //else if (m_iManNo == mc.WSTG_ExpdWork      ) { SML.MT.GoAbsRun((int)mi.WSTG_ZExpd, PM.GetValue(mi.WSTG_ZExpd, pv.WSTG_ZExpdWork));}
            //else if (m_iManNo == mc.SSTG_SubsRailConv  ) { SEQ.SSTG.InitCycleStep(); }
            //else if (m_iManNo == mc.SSTG_WafrRailConv  ) { SEQ.WSTG.InitCycleStep(); }
            //else if (m_iManNo == mc.SSTG_SubsRailHome  ) { SML.MT.GoHome((int)mi.SSTG_XRail); }


            //else if (m_iManNo == mc.PCK_CyclePick    ) {SEQ.PCK.InitCycleStep(); }
            //else if (m_iManNo == mc.PCK_CycleVisn    ) {SEQ.PCK.InitCycleStep(); }
            //else if (m_iManNo == mc.PCK_CyclePrnt    ) {SEQ.PCK.InitCycleStep(); }
            //else if (m_iManNo == mc.PCK_CyclePlce    ) {SEQ.PCK.InitCycleStep(); }

            //else if (m_iManNo == mc.IDX_CycleSupply  ) {SEQ.IDX.InitCycleStep(); }
            //else if (m_iManNo == mc.IDX_CycleWork    ) {SEQ.IDX.InitCycleStep(); }
            //else if (m_iManNo == mc.IDX_CycleOut     ) {SEQ.IDX.InitCycleStep(); }
            //else if (m_iManNo == mc.IDX_LtPitchMove  ) {SML.MT.GoIncMan((int)mi.IDX_X,  OM.DevInfo.dTrayColPitch);}
            //else if (m_iManNo == mc.IDX_RtPitchMove  ) {SML.MT.GoIncMan((int)mi.IDX_X, -OM.DevInfo.dTrayColPitch);}


            m_bManSetting = false; //m_bManSetting 중요함 리턴전에 꼭 펄스 시켜야함. 쓰레드가 달라서. ::Update에서 m_iManNo=0이 되므로 주의.
            return(true);
        }