Esempio n. 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            int iBtnTag = Convert.ToInt32(((Button)sender).Tag);

            SEQ.Reset();


            switch (iBtnTag)
            {
            //case 1: DM.ARAY[(int)ri.PCK].SetStat(cs.None);
            //        DM.ARAY[(int)ri.IDX1].ChangeStat(cs.Working, cs.Unkwn);
            //        DM.ARAY[(int)ri.IDX2].ChangeStat(cs.Working, cs.Unkwn);
            //        DM.ARAY[(int)ri.IDX3].ChangeStat(cs.Working, cs.Unkwn);
            //        SEQ._bBtnStart = true; break;

            //case 2: SEQ._bBtnStart = true; break;

            //case 3: if (DM.ARAY[(int)ri.IDX1].GetCntStat(cs.Working) != 0) DM.ARAY[(int)ri.IDX1].ChangeStat(cs.Unkwn, cs.Empty);
            //        if (DM.ARAY[(int)ri.IDX2].GetCntStat(cs.Working) != 0) DM.ARAY[(int)ri.IDX2].ChangeStat(cs.Unkwn, cs.Empty);
            //        if (DM.ARAY[(int)ri.IDX3].GetCntStat(cs.Working) != 0) DM.ARAY[(int)ri.IDX3].ChangeStat(cs.Unkwn, cs.Empty);
            //        SEQ._bBtnStart = true; break;

            //case 4: DM.ARAY[(int)ri.IDX1].ChangeStat(cs.Unkwn, cs.Empty);
            //        DM.ARAY[(int)ri.IDX2].ChangeStat(cs.Unkwn, cs.Empty);
            //        DM.ARAY[(int)ri.IDX3].ChangeStat(cs.Unkwn, cs.Empty);
            //        SEQ._bBtnStart = true; break;

            case 5: this.Hide(); break;
            }
            //SEQ.PCK.bPickMiss = false;
            this.Hide();
        }
Esempio n. 2
0
        private void btExit_Click(object sender, EventArgs e)
        {
            string sText = ((Button)sender).Text;

            Log.Trace(sFormText + sText + " Button Clicked", ti.Frm);

            //OM.EqpStat.dLastIDXRPos = ML.MT_GetEncPos(mi.IDXR_XRear);
            //OM.EqpStat.dLastIDXFPos = ML.MT_GetEncPos(mi.IDXF_XFrnt);

            if (Log.ShowMessageModal("Confirm", "Do you want to exit the program ?") != DialogResult.Yes)
            {
                return;
            }
            Log.Trace("Program End", ti.Sts);

            SEQ.Close();
            FrmOperation.Close();
            FrmDevice.Close();
            FrmDeviceSet.Close();
            FrmMaster.Close();
            FrmOption.Close();


            Close();
        }
Esempio n. 3
0
        private void btExit_Click(object sender, EventArgs e)
        {
            if (COracle.bMakingDMC1List)
            {
                Log.ShowMessage("OracleDB", "Please Wait for Finish Making DMC1 List!");
                return;
            }
            if (COracle.bMakingPanelList)
            {
                Log.ShowMessage("OracleDB", "Please Wait for Finish Making PanelID List!");
                return;
            }



            //if (Log.ShowMessageModal("Confirm", "프로그램을 종료하시겠습니까?") != DialogResult.Yes) return;
            if (Log.ShowMessageModal("Confirm", "Are you sure you want to exit the program?") != DialogResult.Yes)
            {
                return;
            }
            SEQ.Close();
            FrmOperation.Close();
            FrmDevice.Close();
            FrmDeviceSet.Close();
            FrmMaster.Close();
            FrmOption.Close();

            Close();
        }
Esempio n. 4
0
        private void btAllReset_Click(object sender, EventArgs e)
        {
            string sText = ((Button)sender).Text;

            Log.Trace(sFormText + sText + " Button Clicked", ti.Frm);

            SEQ.Reset();
        }
Esempio n. 5
0
        private void btExit_Click(object sender, EventArgs e)
        {
            SEQ.Close();
            FrmOperation.Close();
            FrmDevice.Close();
            FrmDeviceSet.Close();
            FrmMaster.Close();
            FrmOption.Close();


            Close();
        }
Esempio n. 6
0
        public FormMain()
        {
            //this.TopMost = true;
            SEQ.Init();
            OM.LoadLastInfo();
            //VC.Init();

            InitializeComponent();

            m_iActivePage = 0;


            FrmOperation = new FormOperation(pnBase);
            FrmVision    = new FormVision(pnBase);
            FrmDevice    = new FormDevice(this);
            FrmDeviceSet = new FormDeviceSet(pnBase);
            FrmSPC       = new FormSPC(pnBase);
            FrmOption    = new FormOption(pnBase);

            FrmMaster = new FormMaster();

            FrmDevice.TopLevel = false;
            FrmDevice.Parent   = pnBase;

            lbDevice.Text = OM.GetCrntDev().ToString();

            lbLotNo.Text = LOT.GetLotNo();
            lbName.Text  = Eqp.sEqpName; //OM.EqpOptn.sModelName;

            ShowPage(0);                 //Operation.

            tmUpdate.Enabled = true;

            //SM.IO.SetY((int)yi.ETC_MainAirSol, true);

            //if (SM.CL.GetCmd((int)ai.IDX_Hold1UpDn) == EN_CYLINDER_POS.cpFwd)
            //{
            //    SM.CL.Move((int)ai.IDX_Hold1UpDn, EN_CYLINDER_POS.cpFwd);
            //}
            //if (SM.CL.GetCmd((int)ai.IDX_Hold2UpDn) != 0)
            //{
            //    SM.CL.Move((int)ai.IDX_Hold2UpDn, EN_CYLINDER_POS.cpFwd);
            //}
        }
Esempio n. 7
0
        public FormMain()
        {
            //this.TopMost = true;
            SEQ.Init();
            OM.LoadLastInfo();

            InitializeComponent();

            m_iActivePage = 0;


            FrmOperation = new FormOperation(pnBase);
            FrmDevice    = new FormDevice(this);
            FrmDeviceSet = new FormDeviceSet(pnBase);
            FrmSPC       = new FormSPC(pnBase);
            FrmOption    = new FormOption(pnBase);

            FrmMaster    = new FormMaster();
            FrmVccOption = new FormVccOption();

            FrmVer          = new FormVer();
            FrmVer.TopLevel = true;

            FrmDevice.TopLevel = false;
            FrmDevice.Parent   = pnBase;

            lbDevice.Text = OM.GetCrntDev().ToString();

            lbLotNo.Text = LOT.GetLotNo();
            lbName.Text  = Eqp.sEqpName;

            //파일 버전 보여주는 부분
            string sFileVersion = System.Windows.Forms.Application.ProductVersion;

            lbVer.Text = "Ver " + sFileVersion;

            ShowPage(0);//Operation.

            //MainSol
            //SM.IO.SetY((int)yi.ETC_MainAirSol, true);

            tmUpdate.Enabled = true;
        }
Esempio n. 8
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.HomeEnd && !SEQ.InspectHomeDone())
            {
                return(false);
            }

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


            bool bRet = true;

            //   mcULD_Home
            /********************/
            /********************/
            if (m_iManNo == mc.NoneCycle)
            {
                bRet = false;
            }
            else if (m_iManNo == mc.AllHome)
            {
            }



            if (!bRet)
            {
                Init();
            }

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

            if (m_iManNo == mc.NoneCycle)
            {
            }
            else if (m_iManNo == mc.AllHome)
            {
                ML.MT_SetServoAll(true);
                SEQ.WRK.InitHomeStep();
                SEQ.OUT.InitHomeStep();
            }
            else if (m_iManNo == mc.StepCut)
            {
                m_iManStep = 10;
            }
            else if (m_iManNo == mc.Move5mm)
            {
                m_iManStep = 10;
            }
            else if (m_iManNo == mc.Move100mm)
            {
                m_iManStep = 10;
            }

            //else if (m_iManNo == mc.XRAY_CycleAging       ) {SEQ.XRAY.InitCycleStep();                        }

            //else if (m_iManNo == mc.USBC_CycleConnect     ) {SEQ.USBC.InitCycleStep();                        }

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

            //if (m_iManNo != mc.AllHome && m_iManNo != mc.SLD_Home ) SEQ.InspectHomeDone();

            SEQ.InspectLightGrid();

            bool r1, r2, r3, r4, r5, r6;

            r1 = r2 = r3 = r4 = r5 = r6 = false;

            //Check Alarm.
            if (ML.ER_IsErr())
            {
                Init(); return;
            }

            //Cycle Step.
            if (m_iManNo == mc.AllHome)
            {
                r1 = SEQ.WRK.CycleHome();
                r2 = SEQ.OUT.CycleHome();
                if (!r1 || !r2)
                {
                    return;
                }
                m_iManNo = (int)mc.NoneCycle;

                Log.ShowMessage("Confirm", "All Home Finished!");

                m_iCrntManNo = m_iManNo;
            }



            else if (m_iManNo == mc.StepCut)
            {
                if (CycleManWork(   ))
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.Move5mm)
            {
                if (CycleManMove(5))
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.Move100mm)
            {
                if (CycleManMove(10))
                {
                    m_iManNo = mc.NoneCycle;
                }
            }

            else
            {
                m_iManNo = mc.NoneCycle;
            }                                 //여기서 갱신됌.

            //Ok.
            return;
        }
Esempio n. 10
0
        public static void Update()
        {
            if (m_iManNo == mc.NoneCycle)
            {
                return;
            }
            if (m_bManSetting)
            {
                return;
            }

            //if (m_iManNo != mc.AllHome && m_iManNo != mc.SLD_Home ) SEQ.InspectHomeDone();

            SEQ.InspectLightGrid();

            bool r1, r2, r3, r4, r5, r6;

            r1 = r2 = r3 = r4 = r5 = r6 = false;

            //Check Alarm.
            //if (SM.ER_IsErr()) { Init(); return; }
            //Cycle Step.
            if (m_iManNo == mc.AllHome)
            {
                r1 = SEQ.TOOL.CycleHome();
                if (!r1)
                {
                    return;
                }
                r2 = SEQ.BARZ.CycleHome();
                r3 = SEQ.LODR.CycleHome();
                r4 = SEQ.IDXR.CycleHome();
                r5 = SEQ.IDXF.CycleHome();
                r6 = SEQ.STCK.CycleHome();

                if (!r1 || !r2 || !r3 || !r4 || !r5 || !r6)
                {
                    return;
                }
                m_iManNo = (int)mc.NoneCycle;

                if (SM.MT_GetHomeDoneAll())
                {
                    Log.ShowMessage("Confirm", "All Home Finished!");
                }

                m_iCrntManNo = m_iManNo;
            }

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

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

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

            else if (m_iManNo == mc.TOOL_CycleVisn)
            {
                if (SEQ.TOOL.CycleVision())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.TOOL_CycleNGPick)
            {
                if (SEQ.TOOL.CycleNGPick())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.TOOL_CycleNGPlace)
            {
                if (SEQ.TOOL.CycleNGPlace())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.TOOL_CycleGoodPick)
            {
                if (SEQ.TOOL.CycleGoodPick())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.TOOL_CycleGoodPlace)
            {
                if (SEQ.TOOL.CycleGoodPlace())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }

            else if (m_iManNo == mc.STCK_CycleToStack)
            {
                if (SEQ.STCK.CycleToStack())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.STCK_CycleStack)
            {
                if (SEQ.STCK.CycleStack())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.STCK_CycleOut)
            {
                if (SEQ.STCK.CycleOut())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }

            else if (m_iManNo == mc.BARZ_CycleBarPick)
            {
                if (SEQ.BARZ.CycleBarPick())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.BARZ_CycleBarPlace)
            {
                if (SEQ.BARZ.CycleBarPlace())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.BARZ_CycleOut)
            {
                if (SEQ.BARZ.CycleOut())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }


            else
            {
                m_iManNo = mc.NoneCycle;
            }                                 //여기서 갱신됌.

            //Ok.
            return;
        }
Esempio n. 11
0
 private void button4_Click_1(object sender, EventArgs e)
 {
     SEQ.Reset();
 }
Esempio n. 12
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.ULDR_Home && !SEQ.InspectHomeDone())
            {
                return(false);
            }

            //LOL if (!SML.IO.GetX((int)xi.ETC_MainAir)            ) { Log.ShowMessage("ERROR", "Main Air is Not Supply"); return false; }

            //Check Alarm.
            //LOL if (SML.ER.IsErr()) { Init(); return false; } //아 밑에 처리 하는 애 때문에 잠시 이렇게 함.          //test

            //    if(!IO_GetX(xETC_MainPower) ) {FM_MsgOk("ERR","Power On Plz");      return false ;} //test
            //if (!ML.IO.GetX((int)EN_INPUT_ID.xETC_MainAirChk)) { MessageBox.Show("Check Main Air!", "ERROR"); return false; } //test
            //   mcLDR_RHome
            m_bManSetting = true; //SetManCycle함수는 화면 쓰레드. 업데이트 함수에서 다른쓰레드로 들어와서 갱신하기에 플레그 걸어 막아둠.    //   mcIDX_Home
            m_iManNo      = _iNo;

            //   mcLTL_Home
            //   mcRTL_Home

            //ML.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.PREB_Home)
            {
            }
            else if (m_iManNo == mc.HEAD_Home)
            {
            }
            else if (m_iManNo == mc.PSTB_Home)
            {
            }
            else if (m_iManNo == mc.ULDR_Home)
            {
            }

            else if (m_iManNo == mc.LODR_Wait)
            {
            }
            else if (m_iManNo == mc.LODR_Supply)
            {
            }
            else if (m_iManNo == mc.LODR_Pick)
            {
            }
            else if (m_iManNo == mc.LODR_Work)
            {
            }
            else if (m_iManNo == mc.LODR_Drop)
            {
            }

            else if (m_iManNo == mc.VSNZ_Wait)
            {
            }
            else if (m_iManNo == mc.VSNZ_Stt)
            {
            }
            else if (m_iManNo == mc.VSNZ_Move)
            {
            }
            else if (m_iManNo == mc.VSNZ_Insp)
            {
            }
            else if (m_iManNo == mc.VSNZ_Next)
            {
            }

            else if (m_iManNo == mc.PSTB_Wait)
            {
            }
            else if (m_iManNo == mc.PSTB_Stt)
            {
            }
            else if (m_iManNo == mc.PSTB_In)
            {
            }
            else if (m_iManNo == mc.PSTB_Work)
            {
                SEQ.PSTB.CopyArray(); if (SEQ.PSTB.ArayMark.GetCntStat(cs.Fail) == 0)
                {
                    Log.ShowMessage("Error", "There is no Fail on PostBufferZone"); bRet = false;
                }
            }
            else if (m_iManNo == mc.PSTB_Out)
            {
            }
            else if (m_iManNo == mc.PSTB_Next)
            {
            }
            else if (m_iManNo == mc.PSTB_Replace)
            {
            }


            else if (m_iManNo == mc.ULDR_Wait)
            {
            }
            else if (m_iManNo == mc.ULDR_Supply)
            {
            }
            else if (m_iManNo == mc.ULDR_Pick)
            {
            }
            else if (m_iManNo == mc.ULDR_Work)
            {
            }
            else if (m_iManNo == mc.ULDR_Drop)
            {
            }

            if (!bRet)
            {
                Init();
            }

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

            if (m_iManNo == mc.NoneCycle)
            {
            }
            else if (m_iManNo == mc.AllHome)
            {
                ML.MT_SetServoAll(true);
                SEQ.LODR.InitHomeStep();
                SEQ.PREB.InitHomeStep();
                SEQ.VSNZ.InitHomeStep();
                SEQ.PSTB.InitHomeStep();
                SEQ.ULDR.InitHomeStep();
            }
            else if (m_iManNo == mc.LODR_Home)
            {
                ML.MT_SetServoAll(true); SEQ.LODR.InitHomeStep();
            }
            else if (m_iManNo == mc.PREB_Home)
            {
                ML.MT_SetServoAll(true); SEQ.PREB.InitHomeStep();
            }
            else if (m_iManNo == mc.HEAD_Home)
            {
                ML.MT_SetServoAll(true); SEQ.VSNZ.InitHomeStep();
            }
            else if (m_iManNo == mc.PSTB_Home)
            {
                ML.MT_SetServoAll(true); SEQ.PSTB.InitHomeStep();
            }
            else if (m_iManNo == mc.ULDR_Home)
            {
                ML.MT_SetServoAll(true); SEQ.ULDR.InitHomeStep();
            }

            else if (m_iManNo == mc.LODR_Wait)
            {
                SEQ.LODR.InitCycleStep();
            }
            else if (m_iManNo == mc.LODR_Supply)
            {
                SEQ.LODR.InitCycleStep();
            }
            else if (m_iManNo == mc.LODR_Pick)
            {
                SEQ.LODR.InitCycleStep();
            }
            else if (m_iManNo == mc.LODR_Work)
            {
                SEQ.LODR.InitCycleStep();
            }
            else if (m_iManNo == mc.LODR_Drop)
            {
                SEQ.LODR.InitCycleStep();
            }

            else if (m_iManNo == mc.VSNZ_Wait)
            {
                SEQ.VSNZ.InitCycleStep();
            }
            else if (m_iManNo == mc.VSNZ_Stt)
            {
                SEQ.VSNZ.InitCycleStep();
            }
            else if (m_iManNo == mc.VSNZ_Move)
            {
                SEQ.VSNZ.InitCycleStep();
            }
            else if (m_iManNo == mc.VSNZ_Insp)
            {
                SEQ.VSNZ.InitCycleStep();
            }
            else if (m_iManNo == mc.VSNZ_Next)
            {
                SEQ.VSNZ.InitCycleStep();
            }

            else if (m_iManNo == mc.PSTB_Wait)
            {
                SEQ.PSTB.InitCycleStep();
            }
            else if (m_iManNo == mc.PSTB_Stt)
            {
                SEQ.PSTB.InitCycleStep();
            }
            else if (m_iManNo == mc.PSTB_In)
            {
                SEQ.PSTB.InitCycleStep();
            }
            else if (m_iManNo == mc.PSTB_Work)
            {
                SEQ.PSTB.InitCycleStep();
            }
            else if (m_iManNo == mc.PSTB_Out)
            {
                SEQ.PSTB.InitCycleStep();
            }
            else if (m_iManNo == mc.PSTB_Next)
            {
                SEQ.PSTB.InitCycleStep();
            }
            else if (m_iManNo == mc.PSTB_Replace)
            {
                SEQ.PSTB.InitCycleStep();
            }

            else if (m_iManNo == mc.ULDR_Wait)
            {
                SEQ.ULDR.InitCycleStep();
            }
            else if (m_iManNo == mc.ULDR_Supply)
            {
                SEQ.ULDR.InitCycleStep();
            }
            else if (m_iManNo == mc.ULDR_Pick)
            {
                SEQ.ULDR.InitCycleStep();
            }
            else if (m_iManNo == mc.ULDR_Work)
            {
                SEQ.ULDR.InitCycleStep();
            }
            else if (m_iManNo == mc.ULDR_Drop)
            {
                SEQ.ULDR.InitCycleStep();
            }

            m_bManSetting = false; //m_bManSetting 중요함 리턴전에 꼭 펄스 시켜야함. 쓰레드가 달라서. ::Update에서 m_iManNo=0이 되므로 주의.
            return(true);
        }
Esempio n. 13
0
        public static void Update()
        {
            if (m_iManNo == mc.NoneCycle)
            {
                Stop = false;
                return;
            }
            if (m_bManSetting)
            {
                return;
            }

            //if (m_iManNo != mc.AllHome && m_iManNo != mc.SLD_Home ) SEQ.InspectHomeDone();

            if (!OM.MstOptn.bDebugMode)
            {
                SEQ.InspectLightGrid();
            }

            //Check Alarm.
            if (ML.ER_IsErr())
            {
                Init(); return;
            }
            //Cycle Step.
            if (m_iManNo == mc.AllHome)
            {
                bool r1 = SEQ.LODR.CycleHome();
                bool r2 = SEQ.PREB.CycleHome();
                bool r3 = SEQ.VSNZ.CycleHome();
                bool r4 = SEQ.PSTB.CycleHome();
                bool r5 = SEQ.ULDR.CycleHome();

                if (!r1 || !r2 || !r3 || !r4 || !r5)
                {
                    return;
                }
                if (ML.ER_IsErr())
                {
                    Init(); return;
                }
                m_iManNo = (int)mc.NoneCycle;
                Log.ShowMessage("Confirm", "All Homing Finished!");
                m_iCrntManNo = m_iManNo;
            }

            else if (m_iManNo == mc.LODR_Home)
            {
                if (SEQ.LODR.CycleHome())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.PREB_Home)
            {
                if (SEQ.PREB.CycleHome())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.HEAD_Home)
            {
                if (SEQ.VSNZ.CycleHome())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.PSTB_Home)
            {
                if (SEQ.PSTB.CycleHome())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.ULDR_Home)
            {
                if (SEQ.ULDR.CycleHome())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }

            else if (m_iManNo == mc.LODR_Wait)
            {
                if (SEQ.LODR.CycleWait())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.LODR_Supply)
            {
                if (SEQ.LODR.CycleSupply())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.LODR_Pick)
            {
                if (SEQ.LODR.CyclePick())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.LODR_Work)
            {
                if (SEQ.LODR.CycleWork())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.LODR_Drop)
            {
                if (SEQ.LODR.CycleDrop())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }

            else if (m_iManNo == mc.VSNZ_Wait)
            {
                if (SEQ.VSNZ.CycleWait())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.VSNZ_Stt)
            {
                if (SEQ.VSNZ.CycleWorkStart())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.VSNZ_Move)
            {
                if (SEQ.VSNZ.CycleMove())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.VSNZ_Insp)
            {
                if (SEQ.VSNZ.CycleInsp())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.VSNZ_Next)
            {
                if (SEQ.VSNZ.CycleNext())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }

            else if (m_iManNo == mc.PSTB_Wait)
            {
                if (SEQ.PSTB.CycleWait(true))
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.PSTB_Stt)
            {
                if (SEQ.PSTB.CycleWait(false))
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.PSTB_In)
            {
                if (SEQ.PSTB.CycleIn())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.PSTB_Work)
            {
                if (SEQ.PSTB.CycleWork())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.PSTB_Out)
            {
                if (SEQ.PSTB.CycleOut())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.PSTB_Next)
            {
                if (SEQ.PSTB.CycleNext())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.PSTB_Replace)
            {
                if (SEQ.PSTB.CycleReplace())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }

            else if (m_iManNo == mc.ULDR_Wait)
            {
                if (SEQ.ULDR.CycleWait())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.ULDR_Supply)
            {
                if (SEQ.ULDR.CycleSupply())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.ULDR_Pick)
            {
                if (SEQ.ULDR.CyclePick())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.ULDR_Work)
            {
                if (SEQ.ULDR.CycleWork())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.ULDR_Drop)
            {
                if (SEQ.ULDR.CycleDrop())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }

            else
            {
                m_iManNo = mc.NoneCycle;
            }                                 //여기서 갱신됌.

            //Ok.
            return;
        }
Esempio n. 14
0
        public static void Update()
        {
            if (m_iManNo == mc.NoneCycle)
            {
                return;
            }
            if (m_bManSetting)
            {
                return;
            }

            //if (m_iManNo != mc.AllHome && m_iManNo != mc.SLD_Home ) SEQ.InspectHomeDone();

            SEQ.InspectLightGrid();

            bool r1, r2, r3, r4, r5, r6, r7;

            r1 = r2 = r3 = r4 = r5 = r6 = r7 = false;

            //Check Alarm.
            if (ML.ER_IsErr())
            {
                Init(); return;
            }
            //Cycle Step.
            if (m_iManNo == mc.AllHome)
            {
                r2 = SEQ.TTBL.CycleHome();
                if (!r2)
                {
                    return;
                }
                r1 = SEQ.LODR.CycleHome();
                r3 = SEQ.VISN.CycleHome();
                r4 = SEQ.MARK.CycleHome();
                r5 = SEQ.ULDR.CycleHome();
                r6 = SEQ.REJM.CycleHome();
                r7 = SEQ.REJV.CycleHome();

                if (!r1 || !r2 || !r3 || !r4 || !r5 || !r6 || !r7)
                {
                    return;
                }
                m_iManNo = (int)mc.NoneCycle;

                Log.ShowMessage("Confirm", "All Home Finished!");

                m_iCrntManNo = m_iManNo;
            }

            else if (m_iManNo == mc.LODR_Home)
            {
                if (SEQ.LODR.CycleHome())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.TTBL_Home)
            {
                if (SEQ.TTBL.CycleHome())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.VISN_Home)
            {
                if (SEQ.VISN.CycleHome())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.MARK_Home)
            {
                if (SEQ.MARK.CycleHome())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.ULDR_Home)
            {
                if (SEQ.ULDR.CycleHome())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.REJM_Home)
            {
                if (SEQ.REJM.CycleHome())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.REJV_Home)
            {
                if (SEQ.REJV.CycleHome())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }

            else if (m_iManNo == mc.LODR_CycleHold)
            {
                if (SEQ.LODR.CycleHold())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.LODR_CyclePush)
            {
                if (SEQ.LODR.CyclePush())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.LODR_CyclePick)
            {
                if (SEQ.PLDR.CycleWork())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.LODR_ManLotSupply)
            {
                if (SEQ.LODR.CycleManSupply())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }

            else if (m_iManNo == mc.TTBL_CycleMove)
            {
                if (SEQ.TTBL.CycleMove())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }

            else if (m_iManNo == mc.VISN_CycleWork)
            {
                if (SEQ.VISN.CycleWork())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }

            else if (m_iManNo == mc.MARK_CycleWork)
            {
                if (SEQ.MARK.CycleWork())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.MARK_CycleManChage)
            {
                if (SEQ.MARK.CycleManChange())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }

            else if (m_iManNo == mc.ULDR_CycleMove)
            {
                if (SEQ.ULDR.CycleMove())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.ULDR_CycleDlvr)
            {
                if (SEQ.PULD.CycleWork())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.ULDR_CyclePick)
            {
                if (SEQ.ULDR.CyclePick())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.ULDR_CyclePlce)
            {
                if (SEQ.ULDR.CyclePlce())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.ULDR_CyclePaint)
            {
                if (SEQ.ULDR.CyclePaint())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }

            else if (m_iManNo == mc.RJEM_CycleWork)
            {
                if (SEQ.REJM.CycleReject())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }

            else if (m_iManNo == mc.RJEV_CycleWork)
            {
                if (SEQ.REJV.CycleReject())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }

            //else { m_iManNo = mc.NoneCycle; } //여기서 갱신됌.

            //Ok.
            return;
        }
Esempio n. 15
0
        public static void Update()
        {
            if (m_iManNo == mc.NoneCycle)
            {
                return;
            }
            if (m_bManSetting)
            {
                return;
            }

            if (m_iManNo != mc.AllHome && (m_iManNo != mc.IDX_Home))
            {
                SEQ.InspectHomeDone();
            }

            SEQ.InspectLightGrid();

            bool r1, r2;     //, r3, r4, r5, r6, r7, r8, r9;

            r1 = r2 = false; // r3 = r4 = r5 = r6 = r7 = r8 = r9 = false;

            //Check Alarm.
            if (SML.ER.IsErr())
            {
                Init(); return;
            }                                                   //test
            //Cycle Step.
            if (m_iManNo == mc.AllHome)
            {
                r1 = SEQ.IDX.CycleHome();

                if (!r1)
                {
                    return;
                }

                m_iManNo = (int)mc.NoneCycle;

                Log.ShowMessage("Confirm", "All Home Finished!");

                m_iCrntManNo = m_iManNo;
            }

            else if (m_iManNo == mc.IDX_Home)
            {
                if (SEQ.IDX.CycleHome())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.IDX_CycleWork)
            {
                if (SEQ.IDX.CycleWork())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.IDX_CycleOut)
            {
                if (SEQ.IDX.CycleOut())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }
            else if (m_iManNo == mc.IDX_CycleManSttWait)
            {
                if (SEQ.IDX.CycleManSttWait())
                {
                    m_iManNo = mc.NoneCycle;
                }
            }

            else
            {
                m_iManNo = mc.NoneCycle;
            }                                 //여기서 갱신됌.

            //Ok.
            return;
        }
Esempio n. 16
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 && _iNo != mc.LODR_ManLotSupply)
            {
                Log.ShowMessage("ERROR", "Autorunning"); return(false);
            }
            if (_iNo > mc.AllHome && !SEQ.InspectHomeDone())
            {
                return(false);
            }

            //LOL if (!SML.IO.GetX((int)xi.ETC_MainAir)            ) { Log.ShowMessage("ERROR", "Main Air is Not Supply"); return false; }

            //Check Alarm.
            //LOL if (SML.ER.IsErr()) { Init(); return false; } //아 밑에 처리 하는 애 때문에 잠시 이렇게 함.          //test

            //    if(!IO_GetX(xETC_MainPower) ) {FM_MsgOk("ERR","Power On Plz");      return false ;} //test
            //if (!ML.IO.GetX((int)EN_INPUT_ID.xETC_MainAirChk)) { MessageBox.Show("Check Main Air!", "ERROR"); return false; } //test
            //   mcLDR_RHome
            m_bManSetting = true; //SetManCycle함수는 화면 쓰레드. 업데이트 함수에서 다른쓰레드로 들어와서 갱신하기에 플레그 걸어 막아둠.    //   mcIDX_Home
            m_iManNo      = _iNo;

            //   mcLTL_Home
            //   mcRTL_Home

            //ML.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.TTBL_Home)
            {
            }
            else if (m_iManNo == mc.VISN_Home)
            {
            }
            else if (m_iManNo == mc.MARK_Home)
            {
            }
            else if (m_iManNo == mc.ULDR_Home)
            {
            }
            else if (m_iManNo == mc.REJM_Home)
            {
            }
            else if (m_iManNo == mc.REJV_Home)
            {
            }

            else if (m_iManNo == mc.LODR_CycleHold)
            {
            }
            else if (m_iManNo == mc.LODR_CyclePush)
            {
            }
            else if (m_iManNo == mc.LODR_CyclePick)
            {
            }
            else if (m_iManNo == mc.LODR_ManLotSupply)
            {
            }


            else if (m_iManNo == mc.TTBL_CycleMove)
            {
            }
            else if (m_iManNo == mc.TTBL_CLAllFwd)
            {
                if (!ML.MT_GetStop(mi.TBLE_TTble))
                {
                    bRet = false;
                }
            }
            else if (m_iManNo == mc.TTBL_CLAllBwd)
            {
                if (!ML.MT_GetStop(mi.TBLE_TTble))
                {
                    bRet = false;
                }
            }

            else if (m_iManNo == mc.VISN_CycleWork)
            {
            }

            else if (m_iManNo == mc.MARK_CycleWork)
            {
            }
            else if (m_iManNo == mc.MARK_CycleManChage)
            {
            }

            else if (m_iManNo == mc.ULDR_CycleMove)
            {
            }
            else if (m_iManNo == mc.ULDR_CycleDlvr)
            {
            }
            else if (m_iManNo == mc.ULDR_CyclePick)
            {
            }
            else if (m_iManNo == mc.ULDR_CyclePlce)
            {
            }
            else if (m_iManNo == mc.ULDR_CyclePaint)
            {
            }

            else if (m_iManNo == mc.RJEM_CycleWork)
            {
            }

            else if (m_iManNo == mc.RJEV_CycleWork)
            {
            }

            if (!bRet)
            {
                Init();
            }

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

            if (m_iManNo == mc.NoneCycle)
            {
            }
            else if (m_iManNo == mc.AllHome)
            {
                ML.MT_SetServoAll(true);
                SEQ.LODR.InitHomeStep();
                SEQ.TTBL.InitHomeStep();
                SEQ.VISN.InitHomeStep();
                SEQ.MARK.InitHomeStep();
                SEQ.ULDR.InitHomeStep();
                SEQ.REJM.InitHomeStep();
                SEQ.REJV.InitHomeStep();
            }
            else if (m_iManNo == mc.LODR_Home)
            {
                ML.MT_SetServoAll(true); SEQ.LODR.InitHomeStep();
            }
            else if (m_iManNo == mc.TTBL_Home)
            {
                ML.MT_SetServoAll(true); SEQ.TTBL.InitHomeStep();
            }
            else if (m_iManNo == mc.VISN_Home)
            {
                ML.MT_SetServoAll(true); SEQ.VISN.InitHomeStep();
            }
            else if (m_iManNo == mc.MARK_Home)
            {
                ML.MT_SetServoAll(true); SEQ.MARK.InitHomeStep();
            }
            else if (m_iManNo == mc.ULDR_Home)
            {
                ML.MT_SetServoAll(true); SEQ.ULDR.InitHomeStep();
            }
            else if (m_iManNo == mc.REJM_Home)
            {
                ML.MT_SetServoAll(true); SEQ.REJM.InitHomeStep();
            }
            else if (m_iManNo == mc.REJV_Home)
            {
                ML.MT_SetServoAll(true); SEQ.REJV.InitHomeStep();
            }

            else if (m_iManNo == mc.LODR_CycleHold)
            {
                SEQ.LODR.InitCycleStep();
            }
            else if (m_iManNo == mc.LODR_CyclePush)
            {
                SEQ.LODR.InitCycleStep();
            }
            else if (m_iManNo == mc.LODR_CyclePick)
            {
                SEQ.PLDR.InitCycleStep();
            }
            else if (m_iManNo == mc.LODR_ManLotSupply)
            {
                SEQ.LODR.InitCycleStep();
            }

            else if (m_iManNo == mc.TTBL_CycleMove)
            {
                SEQ.TTBL.InitCycleStep();
            }
            else if (m_iManNo == mc.TTBL_CLAllFwd)
            {
                ML.CL_Move(ci.TBLE_Grpr1FwBw, fb.Fwd);
                ML.CL_Move(ci.TBLE_Grpr2FwBw, fb.Fwd);
                ML.CL_Move(ci.TBLE_Grpr3FwBw, fb.Fwd);
                ML.CL_Move(ci.TBLE_Grpr4FwBw, fb.Fwd);
                ML.CL_Move(ci.TBLE_Grpr5FwBw, fb.Fwd);
                ML.CL_Move(ci.TBLE_Grpr6FwBw, fb.Fwd);
                m_iManNo = mc.NoneCycle;
            }
            else if (m_iManNo == mc.TTBL_CLAllBwd)
            {
                ML.CL_Move(ci.TBLE_Grpr1FwBw, fb.Bwd);
                ML.CL_Move(ci.TBLE_Grpr2FwBw, fb.Bwd);
                ML.CL_Move(ci.TBLE_Grpr3FwBw, fb.Bwd);
                ML.CL_Move(ci.TBLE_Grpr4FwBw, fb.Bwd);
                ML.CL_Move(ci.TBLE_Grpr5FwBw, fb.Bwd);
                ML.CL_Move(ci.TBLE_Grpr6FwBw, fb.Bwd);
                m_iManNo = mc.NoneCycle;
            }

            else if (m_iManNo == mc.VISN_CycleWork)
            {
                SEQ.VISN.InitCycleStep();
            }

            else if (m_iManNo == mc.MARK_CycleWork)
            {
                SEQ.MARK.InitCycleStep();
            }
            else if (m_iManNo == mc.MARK_CycleManChage)
            {
                SEQ.MARK.InitCycleStep();
            }

            else if (m_iManNo == mc.ULDR_CycleMove)
            {
                SEQ.ULDR.InitCycleStep();
            }
            else if (m_iManNo == mc.ULDR_CycleDlvr)
            {
                SEQ.PULD.InitCycleStep();
            }
            else if (m_iManNo == mc.ULDR_CyclePick)
            {
                SEQ.ULDR.InitCycleStep();
            }
            else if (m_iManNo == mc.ULDR_CyclePlce)
            {
                SEQ.ULDR.InitCycleStep();
            }
            else if (m_iManNo == mc.ULDR_CyclePaint)
            {
                SEQ.ULDR.InitCycleStep();
            }

            else if (m_iManNo == mc.RJEM_CycleWork)
            {
                SEQ.REJM.InitCycleStep();
            }

            else if (m_iManNo == mc.RJEV_CycleWork)
            {
                SEQ.REJV.InitCycleStep();
            }

            m_bManSetting = false; //m_bManSetting 중요함 리턴전에 꼭 펄스 시켜야함. 쓰레드가 달라서. ::Update에서 m_iManNo=0이 되므로 주의.
            return(true);
        }
Esempio n. 17
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.AllHome && !SEQ.InspectHomeDone())
            {
                return(false);
            }

            //Check Alarm.
            //if (SM.ER.IsErr()) { Init(); return false; } //아 밑에 처리 하는 애 때문에 잠시 이렇게 함.          //test

            //    if(!IO_GetX(xETC_MainPower) ) {FM_MsgOk("ERR","Power On Plz");      return false ;} //test
            //if (!SM.IO.GetX((int)EN_INPUT_ID.xETC_MainAirChk)) { MessageBox.Show("Check Main Air!", "ERROR"); return false; } //test
            m_bStdCalPick = false; //   mcLDR_FHome
            //   mcLDR_RHome
            m_bManSetting = true;  //SetManCycle함수는 화면 쓰레드. 업데이트 함수에서 다른쓰레드로 들어와서 갱신하기에 플레그 걸어 막아둠.    //   mcIDX_Home
            m_iManNo      = _iNo;

            //   mcLTL_Home
            //   mcRTL_Home

            //SM.ER.SetDisp(true);

            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.IDX_Home)
            {
            }


            else if (m_iManNo == mc.IDX_CycleWork)
            {
            }
            else if (m_iManNo == mc.IDX_CycleOut)
            {
            }
            //else if (m_iManNo == mc.IDX_CycleSupply    ) { }
            else if (m_iManNo == mc.IDX_CycleManSttWait)
            {
            }

            else if (m_iManNo == mc.IDX_HolderFwd)
            {
            }
            else if (m_iManNo == mc.IDX_HolderBwd)
            {
            }
            else if (m_iManNo == mc.IDX_CutterFwd)
            {
            }
            else if (m_iManNo == mc.IDX_CutterBwd)
            {
            }

            if (!bRet)
            {
                Init();
            }

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

            if (m_iManNo == mc.NoneCycle)
            {
            }
            else if (m_iManNo == mc.AllHome)
            {
                SM.MT_SetServoAll(true);
                SEQ.IDX.InitHomeStep();
                //SEQ.PCK.InitHomeStep();
                //LTL.InitHomeStep();
                //RTL.InitHomeStep();
                //STG.InitHomeStep();
                //ULD.InitHomeStep();
            }
            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_CycleManSttWait)
            {
                SEQ.IDX.InitCycleStep();
            }

            else if (m_iManNo == mc.IDX_HolderFwd)
            {
                SM.CL_Move(ci.IDX_Hold1UpDn, fb.Fwd);
                SM.CL_Move(ci.IDX_Hold2UpDn, fb.Fwd);
                SM.CL_Move(ci.IDX_TwstLtDnUp, fb.Fwd);
                SM.CL_Move(ci.IDX_TwstRtDnUp, fb.Fwd);
            }
            else if (m_iManNo == mc.IDX_HolderBwd)
            {
                SM.CL_Move(ci.IDX_Hold1UpDn, fb.Bwd);
                SM.CL_Move(ci.IDX_Hold2UpDn, fb.Bwd);
                SM.CL_Move(ci.IDX_TwstLtDnUp, fb.Bwd);
                SM.CL_Move(ci.IDX_TwstRtDnUp, fb.Bwd);
            }
            else if (m_iManNo == mc.IDX_CutterFwd)
            {
                SM.CL_Move(ci.IDX_CutLtFwBw, fb.Fwd);
                SM.CL_Move(ci.IDX_CutRtFwBw, fb.Fwd);
                SM.CL_Move(ci.IDX_CutterDnUp, fb.Fwd);
                SM.CL_Move(ci.IDX_CutBaseUpDn, fb.Fwd);
            }
            else if (m_iManNo == mc.IDX_CutterBwd)
            {
                SM.CL_Move(ci.IDX_CutLtFwBw, fb.Bwd);
                SM.CL_Move(ci.IDX_CutRtFwBw, fb.Bwd);
                SM.CL_Move(ci.IDX_CutterDnUp, fb.Bwd);
                SM.CL_Move(ci.IDX_CutBaseUpDn, fb.Bwd);
            }

            m_bManSetting = false; //m_bManSetting 중요함 리턴전에 꼭 펄스 시켜야함. 쓰레드가 달라서. ::Update에서 m_iManNo=0이 되므로 주의.
            return(true);
        }
Esempio n. 18
0
 private void btAllReset_Click(object sender, EventArgs e)
 {
     SEQ.Reset();
 }
Esempio n. 19
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);
        }