Example #1
0
        private void nextSeq(CaseVTM nSeq)
        {
/*            rLib.resetCmd();*/
            if (nSeq >= 0)
            {
                nSeqNo = (int)nSeq;
            }
        }
Example #2
0
        public void Run()
        {
            if (!isAcceptRun())
            {
                return;
            }
            if (nSeqNo != nPreSeqNo)
            {
                resetCmd();
            }
            nPreSeqNo = nSeqNo;

            CaseVTM seqCase = (CaseVTM)nSeqNo;

            alwaysCheck();

            RUN_MODE RunMode = RecipeMgr.Inst.TempRcp.eRunMode; //현재 레시피

            if (RunMode == RUN_MODE.ONLY_LAMI)
            {
                //현재 진행 모드가 라미 모드일 경우 진행하지 않기 위함
                return;
            }


            switch (seqCase)
            {
            case CaseVTM.Initialze:
                break;

            case CaseVTM.Check_Interlock:
                break;

            case CaseVTM.Check_Status:

                //웨이퍼 로딩 상태 확인
                ReqStatus = CheckStatusReqeust();
                if (ReqStatus == ReqStatus_VTM.LOADLOCK_LOAD)
                {
                    //Pickup Loadlock
                    Working_Arm = ARM.UPPER;
                    nextSeq(CaseVTM.Check_LL_Pickup);
                }
                else if (ReqStatus == ReqStatus_VTM.LOAD_PMC)
                {
                    //Load PMC Seq
                    Working_Arm = ARM.UPPER;
                    nextSeq(CaseVTM.Start_VTM_Load_PMC);
                }
                else if (ReqStatus == ReqStatus_VTM.UNLOAD_PMC)
                {
                    //Unload Seq
                    Working_Arm = ARM.LOWER;
                    nextSeq(CaseVTM.Start_VTM_Unload_PMC);
                }
                else if (ReqStatus == ReqStatus_VTM.UNLOAD_BONDED)
                {
                    Working_Arm = ARM.LOWER;

                    nextSeq(CaseVTM.Check_LL_Place);
                }
                else
                {
                    //요청이 없을 경우 대기하자
                }
                return;

            /////////////////////////////////
            //VTM Pickup LL -> Load PMC
            /////////////////////////////////

            case CaseVTM.Check_WaferStatus:
                break;


            case CaseVTM.Check_LL_Pickup:
                //Loadlock이 동작 중인지 확인
                if (GlobalVariable.interlock.bLLMoving)
                {
                    return;
                }
                GlobalVariable.interlock.bLLMoving = true;
                break;

            case CaseVTM.Move_LL_Move_Pickup:
                //Pickup LL
                //GlobalSeq.autoRun.procLoadlock.Move(MotionPos.Pos3);
                GlobalSeq.autoRun.procLoadlock.MoveExit((int)MotionPos.Pos3);

                strLog = string.Format("Loadlock VTM Pickup Move Start -> {0}, {1}", Working_Stage.ToString(), Working_Arm.ToString());
                AddMessage(strLog);
                break;

            case CaseVTM.Compl_LL_Move_Pickup:
                if (GlobalSeq.autoRun.procLoadlock.CheckMoveDone((int)MotionPos.Pos3) == false)
                {
                    return;
                }


                strLog = string.Format("Loadlock VTM Pickup Move End -> {0}, {1}", Working_Stage.ToString(), Working_Arm.ToString());
                AddMessage(strLog);
                break;


            case CaseVTM.Start_VTM_Pickup_LL:

                break;

            case CaseVTM.Set_Pumping_Pickup_LL:

                GlobalSeq.autoRun.prcVTM.Pmc.GetStatus(CTC_STATUS.CTCRunMode, ref status);
                if (status == (short)CTC_RunMode.ModeAtm)
                {
                    break;
                }

                //Loadlock Pumping 상태로 만든다.
                fRet = GlobalSeq.autoRun.procLoadlock.Loadlock_Pumping();
                if (fRet == fn.success)
                {
                    break;
                }
                else if (fRet == fn.busy)
                {
                    return;
                }
                else
                {
                    //Error
                    return;
                }

            case CaseVTM.Door_Open_Pickup_LL:

                //VTM Door Open
                GlobalVariable.io.VTM_Door_Open();
                break;

            case CaseVTM.Check_Open_Pickup_LL:

                //VTM Door Open Check
                if (GlobalVariable.io.Check_VTM_Door_Open() == false)
                {
                    //타임아웃 체크
                    return;
                }
                break;


            case CaseVTM.Move_VTM_Pickup_LL:

                Working_Stage = VtmStage.LL;
                Working_Arm   = ARM.UPPER;

                //VTM Pickup/Place 시 부분동작으로 변경 함

                if (GlobalSeq.autoRun.procLoadlock.SetBlock() == false)
                {
                    return;
                }
                MoveRobot(Working_Stage, Working_Arm, true);     //Arm Fold 이동
                //MoveRobot(Working_Stage, Working_Arm, false); //Arm Fold 이동

                strLog = string.Format("VTM Robot Pickup Move Start -> {0}, {1}", Working_Stage.ToString(), Working_Arm.ToString());
                AddMessage(strLog);
                break;

            case CaseVTM.Move_VTM_Pickup_LL_Check:
                if (CheckComplete() != fn.success)
                {
                    return;
                }
                break;

            case CaseVTM.Move_VTM_Pickup_LL_Stretch:
                //if (CheckComplete() != fn.success) return;
                MoveRobot_Stretch(Working_Stage, Working_Arm, UPDOWN_POS.DOWN);
                break;

            case CaseVTM.Move_VTM_Pickup_LL_Stretch_Check:
                if (CheckComplete() != fn.success)
                {
                    return;
                }
                break;

            case CaseVTM.Move_VTM_Pickup_LL_HandUp:
                MoveRobot_HandUp(Working_Stage, Working_Arm);
                break;

            case CaseVTM.Move_VTM_Pickup_LL_HandUp_Check:
                if (CheckComplete() != fn.success)
                {
                    return;
                }
                break;

            case CaseVTM.Move_VTM_Pickup_LL_Fold:
                MoveRobot_Fold(Working_Stage, Working_Arm, UPDOWN_POS.UP);
                break;

            case CaseVTM.Move_VTM_Pickup_LL_Fold_Check:
                if (CheckComplete() != fn.success)
                {
                    return;
                }
                GlobalSeq.autoRun.procLoadlock.UnBlock();
                break;

            case CaseVTM.Compl_VTM_Pickup_LL:

                strLog = string.Format("VTM Robot Pickup Move End -> {0}, {1}", Working_Stage.ToString(), Working_Arm.ToString());
                AddMessage(strLog);
                break;

            case CaseVTM.Door_Close_Pickup_LL:

                //VTM Door Close
                GlobalVariable.io.VTM_Door_Close();

                break;

            case CaseVTM.Check_Close_Pickup_LL:

                //VTM Door Close Check
                if (GlobalVariable.io.Check_VTM_Door_Close() == false)
                {
                    //타임아웃 체크
                    return;
                }
                break;

            case CaseVTM.End_VTM_Pickup_LL:
                GlobalVariable.seqShared.LoadingLoadLockToVtm(WaferType.CARRIER, (HAND)Working_Arm);
                //GlobalVariable.seqShared.LoadingLoadLockToVtm(WaferType.DEVICE, (HAND)Working_Arm);

                GlobalVariable.interlock.bLLMoving   = false;
                GlobalVariable.interlock.bLLUsed_VTM = false;     //Loadlock 사용 해제 Flag

                //Loadlock 픽업 후 리턴
                nextSeq(CaseVTM.Check_Interlock);
                break;

            /////////////////////////////////
            //VTM Load PMC
            /////////////////////////////////
            case CaseVTM.Start_VTM_Load_PMC:

                strLog = string.Format("VTM PMC Load Move Start -> {0}, {1}", Working_Stage.ToString(), Working_Arm.ToString());
                AddMessage(strLog);

                break;

            case CaseVTM.Set_Pumping_Load_PMC:

                GlobalSeq.autoRun.prcVTM.Pmc.GetStatus(CTC_STATUS.CTCRunMode, ref status);
                if (status == (short)CTC_RunMode.ModeAtm)
                {
                    break;
                }

                //PMC에 Vacuum 상태를 확인한다.
                fRet = GlobalSeq.autoRun.procLoadlock.VTM_Pumping();
                if (fRet == fn.success)
                {
                    break;
                }
                else if (fRet == fn.busy)
                {
                    return;
                }
                else
                {
                    //Error
                    return;
                }

            ////Convectron Sensor On Check
            //if (GlobalVariable.io.ReadInput(GlobalVariable.io.I_VacuumTm_ConvectronRy_1) == true
            //    && GlobalVariable.io.ReadInput(GlobalVariable.io.I_VacuumTm_ConvectronRy_2) == true)
            //{
            //    //조건이 맞으면 다음 케이스로 넘긴다
            //    break;
            //}
            //else
            //{
            //    //Error
            //    return;
            //}

            case CaseVTM.Door_Open_Load_PMC:

                //PMC Door Open
                GlobalVariable.io.BD_Door_Open();
                break;

            case CaseVTM.Check_Open_Load_PMC:

                //PMC Door Open Check
                if (GlobalVariable.io.Check_BD_Door_Open() == false)
                {
                    //타임아웃 체크
                    return;
                }
                break;

            case CaseVTM.Move_VTM_Load_PMC:
                if (Load_PMC(Working_Arm) != fn.success)
                {
                    return;
                }
                break;

            case CaseVTM.Compl_VTM_Load_PMC:
                break;

            case CaseVTM.Door_Close_Load_PMC:

                //PMC Door Close
                GlobalVariable.io.BD_Door_Close();

                break;

            case CaseVTM.Check_Close_Load_PMC:

                //PMC Door Close Check
                if (GlobalVariable.io.Check_BD_Door_Close() == false)
                {
                    //타임아웃 체크
                    return;
                }
                break;

            case CaseVTM.End_VTM_Load_PMC:
                GlobalVariable.seqShared.LoadingVtmToBonder((HAND)Working_Arm);

                strLog = string.Format("VTM PMC Load Move End -> {0}, {1}", Working_Stage.ToString(), Working_Arm.ToString());
                AddMessage(strLog);
                break;

            case CaseVTM.Set_Recipe:

                break;

            case CaseVTM.Start_Process:

                //Set Process Start
                GlobalVariable.interlock.bBondingProcess = true;

                strLog = string.Format("Pmc Process On -> {0}, {1}", Working_Stage.ToString(), Working_Arm.ToString());
                AddMessage(strLog);

                nextSeq(CaseVTM.Check_Interlock);
                return;


            /////////////////////////////////
            //VTM Unload PMC
            /////////////////////////////////
            case CaseVTM.Start_VTM_Unload_PMC:

                strLog = string.Format("VTM PMC Unload Move Start -> {0}, {1}", Working_Stage.ToString(), Working_Arm.ToString());
                AddMessage(strLog);
                break;

            case CaseVTM.Set_Pumping_Unload_PMC:

                GlobalSeq.autoRun.prcVTM.Pmc.GetStatus(CTC_STATUS.CTCRunMode, ref status);
                if (status == (short)CTC_RunMode.ModeAtm)
                {
                    break;
                }

                //PMC에 Vacuum 상태를 확인한다.
                fRet = GlobalSeq.autoRun.procLoadlock.VTM_Pumping();
                if (fRet == fn.success)
                {
                    break;
                }
                else if (fRet == fn.busy)
                {
                    return;
                }
                else
                {
                    //Error
                    return;
                }

            case CaseVTM.Door_Open_Unload_PMC:

                //PMC Door Open
                GlobalVariable.io.BD_Door_Open();

                break;

            case CaseVTM.Check_Open_Unload_PMC:

                //PMC Door Open Check
                if (GlobalVariable.io.Check_BD_Door_Open() == false)
                {
                    //타임아웃 체크
                    return;
                }
                break;

            case CaseVTM.Move_VTM_Unload_PMC:
                Working_Arm = ARM.LOWER;     //언로드 시 Lower Hand
                if (Unload_PMC(Working_Arm) != fn.success)
                {
                    return;
                }

                strLog = string.Format("VTM PMC Unload Move End -> {0}, {1}", Working_Stage.ToString(), Working_Arm.ToString());
                AddMessage(strLog);
                break;

            case CaseVTM.Compl_VTM_Unload_PMC:
                break;

            case CaseVTM.Door_Close_Unload_PMC:

                //Door Close
                GlobalVariable.io.BD_Door_Close();
                break;

            case CaseVTM.Check_Close_Unload_PMC:

                //Door Close Check
                if (GlobalVariable.io.Check_BD_Door_Close() == false)
                {
                    //타임아웃 체크
                    return;
                }
                break;

            case CaseVTM.End_VTM_Unload_PMC:

                //데이터 이동
                GlobalVariable.seqShared.LoadingBonderToVtm((HAND)Working_Arm);

                nextSeq(CaseVTM.Check_Interlock);
                return;

            case CaseVTM.Check_LL_Place:
                //Loadlock이 동작 중인지 확인
                if (GlobalVariable.interlock.bLLMoving)
                {
                    return;
                }
                GlobalVariable.interlock.bLLMoving   = true;
                GlobalVariable.interlock.bLLUsed_VTM = true;     //Loadlock 사용 Flag

                break;

            case CaseVTM.Move_LL_Move_Place:
                //BD Place -> Unload
                //GlobalSeq.autoRun.procLoadlock.Move(MotionPos.Pos1);
                GlobalSeq.autoRun.procLoadlock.MoveExit((int)MotionPos.Pos1);

                strLog = string.Format("Loadlock VTM Place Move Start -> {0}, {1}", Working_Stage.ToString(), Working_Arm.ToString());
                AddMessage(strLog);
                break;

            case CaseVTM.Compl_LL_Move_Place:
                // if (GlobalSeq.autoRun.procLoadlock.CheckComplete() != fn.success) return;
                if (GlobalSeq.autoRun.procLoadlock.CheckMoveDone((int)MotionPos.Pos1) == false)
                {
                    return;
                }

                strLog = string.Format("Loadlock VTM Place Move End -> {0}, {1}", Working_Stage.ToString(), Working_Arm.ToString());
                AddMessage(strLog);
                break;

            case CaseVTM.Start_VTM_Place_LL:
                if (Working_Arm != ARM.LOWER)
                {
                    //Hand Fail
                    return;
                }
                break;

            case CaseVTM.Set_Pumping_Place_LL:

                GlobalSeq.autoRun.prcVTM.Pmc.GetStatus(CTC_STATUS.CTCRunMode, ref status);
                if (status == (short)CTC_RunMode.ModeAtm)
                {
                    break;
                }

                //Loadlock Pumping 상태로 만든다.
                fRet = GlobalSeq.autoRun.procLoadlock.Loadlock_Pumping();
                if (fRet == fn.success)
                {
                    break;
                }
                else if (fRet == fn.busy)
                {
                    return;
                }
                else
                {
                    //Error
                    return;
                }

            case CaseVTM.Door_Open_Place_LL:

                //VTM Door Open
                GlobalVariable.io.VTM_Door_Open();

                break;

            case CaseVTM.Check_Open_Place_LL:

                //VTM Door Open Check
                if (GlobalVariable.io.Check_VTM_Door_Open() == false)
                {
                    //타임아웃 체크
                    return;
                }
                break;

            case CaseVTM.Move_VTM_Place_LL:
                Working_Stage = VtmStage.Bonded;
                if (GlobalSeq.autoRun.procLoadlock.SetBlock() == false)
                {
                    return;
                }
                //MoveRobot(Working_Stage, Working_Arm, false);

                MoveRobot(Working_Stage, Working_Arm, true);     //Hand Fold 이동

                strLog = string.Format("VTM Robot Place Move Start -> {0}, {1}", Working_Stage.ToString(), Working_Arm.ToString());
                AddMessage(strLog);
                break;

            case CaseVTM.Move_VTM_Place_LL_Check:
                if (CheckComplete() != fn.success)
                {
                    return;
                }
                break;

            case CaseVTM.Move_VTM_Place_LL_Stretch:
                MoveRobot_Stretch(Working_Stage, Working_Arm, UPDOWN_POS.UP);
                break;

            case CaseVTM.Move_VTM_Place_LL_Stretch_Check:
                if (CheckComplete() != fn.success)
                {
                    return;
                }
                break;

            case CaseVTM.Move_VTM_Place_LL_HandDown:
                MoveRobot_HandDown(Working_Stage, Working_Arm);
                break;

            case CaseVTM.Move_VTM_Place_LL_HandDown_Check:
                if (CheckComplete() != fn.success)
                {
                    return;
                }
                break;

            case CaseVTM.Move_VTM_Place_LL_Fold:
                MoveRobot_Fold(Working_Stage, Working_Arm, UPDOWN_POS.DOWN);
                break;

            case CaseVTM.Move_VTM_Place_LL_Fold_Check:
                if (CheckComplete() != fn.success)
                {
                    return;
                }
                GlobalSeq.autoRun.procLoadlock.UnBlock();
                break;

            case CaseVTM.Compl_VTM_Place_LL:
                strLog = string.Format("VTM Robot Place Move End -> {0}, {1}", Working_Stage.ToString(), Working_Arm.ToString());
                AddMessage(strLog);
                break;

            case CaseVTM.Door_Close_Place_LL:

                //VTM Door Close
                GlobalVariable.io.VTM_Door_Close();
                break;

            case CaseVTM.Check_Close_Place_LL:

                //VTM Door Close Check
                if (GlobalVariable.io.Check_VTM_Door_Close() == false)
                {
                    //타임아웃 체크
                    return;
                }
                break;


            case CaseVTM.End_VTM_Place_LL:
                //데이터 이동
                GlobalVariable.seqShared.LoadingVtmToLoadlock(WaferType.BONDED, (HAND)Working_Arm);
                GlobalVariable.interlock.bLLMoving = false;

                //본딩 완료 된 웨이퍼 LL에 언로딩 하고
                //LL에 투입된 웨이퍼 있는지 확인
                //있으면 Pickup 하자, Exchange

                if (GlobalVariable.seqShared.IsInLoadLock((int)WaferType.DEVICE) == true &&
                    GlobalVariable.seqShared.IsInLoadLock((int)WaferType.CARRIER) == true &&
                    GlobalVariable.seqShared.IsInVTM(HAND.UPPER) == false)
                {
                    //Pickup Loadlock
                    Working_Arm = ARM.UPPER;
                    nextSeq(CaseVTM.Check_LL_Pickup);
                    return;
                }
                else
                {
                    //Loadlock 사용 해제
                    GlobalVariable.interlock.bLLUsed_VTM = false;
                    nextSeq(CaseVTM.Check_Interlock);
                    return;
                }
                return;
            }
            nSeqNo++;
        }