示例#1
0
        private void evBwd_Click(object sender, EventArgs e)
        {
            string sText = ((Button)sender).Text;

            Log.Trace(m_sActrName, sText + " Button Clicked", ti.Frm);
            ML.CL_Move(m_iActrId, fb.Bwd);
        }
示例#2
0
        private void btCylinder1_Click(object sender, EventArgs e)
        {
            string sText = ((Button)sender).Text;

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

            int iBtnTag = Convert.ToInt32(((Button)sender).Tag);

            ML.CL_Move((ci)iBtnTag, ML.CL_GetCmd((ci)iBtnTag) == fb.Bwd ? fb.Fwd : fb.Bwd);
        }
示例#3
0
        private void evFwd_Click(object sender, EventArgs e)
        {
            string sText = ((Button)sender).Text;

            Log.Trace(m_sActrName + "_" + sText + " Button Clicked", ForContext.Frm);
            //if (SEQ.LDR.CheckSafe(m_iActrId, fb.Fwd , true) &&
            //    SEQ.PKR.CheckSafe(m_iActrId, fb.Fwd , true) &&
            //    SEQ.QCB.CheckSafe(m_iActrId, fb.Fwd , true) &&
            //    SEQ.SYR.CheckSafe(m_iActrId, fb.Fwd , true) &&
            //    SEQ.CHA.CheckSafe(m_iActrId, fb.Fwd , true))
            ML.CL_Move(m_iActrId, fb.Fwd);
        }
示例#4
0
        private void evFwd_Click(object sender, EventArgs e)
        {
            string sText = ((Button)sender).Text;

            Log.Trace(m_sActrName, sText + " Button Clicked", ti.Frm);
            if (SEQ.LODR.CheckSafe(m_iActrId, fb.Fwd, true) &&
                SEQ.PREB.CheckSafe(m_iActrId, fb.Bwd, true) &&
                SEQ.VSNZ.CheckSafe(m_iActrId, fb.Bwd, true) &&
                SEQ.PSTB.CheckSafe(m_iActrId, fb.Bwd, true) &&
                SEQ.ULDR.CheckSafe(m_iActrId, fb.Fwd, true))
            {
                ML.CL_Move(m_iActrId, fb.Fwd);
            }
        }
示例#5
0
        private void evBwd_Click(object sender, EventArgs e)
        {
            string sText = ((Button)sender).Text;

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

            if (SEQ.LODR.CheckSafe(m_iActrId, fb.Bwd, true) &&
                SEQ.TTBL.CheckSafe(m_iActrId, fb.Bwd, true) &&
                SEQ.VISN.CheckSafe(m_iActrId, fb.Bwd, true) &&
                SEQ.MARK.CheckSafe(m_iActrId, fb.Bwd, true) &&
                SEQ.ULDR.CheckSafe(m_iActrId, fb.Bwd, true) &&
                SEQ.REJM.CheckSafe(m_iActrId, fb.Bwd, true) &&
                SEQ.REJV.CheckSafe(m_iActrId, fb.Bwd, true))
            {
                ML.CL_Move(m_iActrId, fb.Bwd);
            }
        }
示例#6
0
        private void btAction_Click(object sender, EventArgs e)
        {
            fb sCylderPos = 0;

            if (ML.CL_GetCmd(m_iActrId) == 0)
            {
                sCylderPos = fb.Fwd;
            }
            else
            {
                sCylderPos = fb.Bwd;
            }

            ML.CL_Move(m_iActrId, sCylderPos);

            string sMsg = "FrameCyl Form_Cylinder Move Button Click" + ML.CL_GetName(m_iActrId).ToString();

            sMsg += ML.CL_GetCmd(m_iActrId) == 0 ? "(Fwd)" : "(Bwd)";

            //Log.Trace("Operator", sMsg);
            Log.Trace(sMsg, ti.Frm);
        }
示例#7
0
        private void btCyl_Click(object sender, EventArgs e)
        {
            string sText = ((Label)sender).Text;

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

            Label iSelLabel = sender as Label;

            if (iSelLabel == null)
            {
                return;
            }

            if (SEQ._bRun)
            {
                return;
            }


            int iSel = Convert.ToInt32(iSelLabel.Tag);

            ML.CL_Move(iSel, ML.CL_GetCmd(iSel) == fb.Fwd ? fb.Bwd : fb.Fwd);
        }
示例#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 && _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);
        }
示例#9
0
文件: Loader.cs 项目: zoro-008/Works
        //public int iLDRSplyCnt = 0;
        public bool CycleManSupply()
        {
            String sTemp;

            if (m_tmCycle.OnDelay(Step.iCycle != 0 && Step.iCycle == PreStep.iCycle && CheckStop() && !OM.MstOptn.bDebugMode, 10000))
            {
                sTemp = string.Format("Time Out Step.iCycle={0:00}", Step.iCycle);
                sTemp = m_sPartName + " " + Step.eSeq.ToString() + sTemp;
                ER_SetErr(ei.PRT_CycleTO, sTemp);
                Trace(sTemp);
                return(true);
            }

            if (Step.iCycle != PreStep.iCycle)
            {
                sTemp = string.Format("Cycle Step.iCycle={0:00}", Step.iCycle);
                Trace(sTemp);
            }

            PreStep.iCycle = Step.iCycle;

            if (Stat.bReqStop)
            {
                //return true ;
            }

            int r, c = -1;

            switch (Step.iCycle)
            {
            default:
                sTemp = string.Format("Cycle Default Clear Step.iCycle={0:00}", Step.iCycle);
                //if(Step.iCycle != PreStep.iCycle)Trace(m_sPartName.c_str(), sTemp.c_str());
                return(true);

            case 10:

                MoveCyl(ci.LODR_GuideOpCl, fb.Bwd);
                MoveCyl(ci.LODR_PckrFwBw, fb.Bwd);
                MoveMotr(mi.LODR_XPshr, pv.LODR_XPshrWait);
                ML.CL_Move(ci.ULDR_OutPshrFwBw, fb.Bwd);
                Step.iCycle++;
                return(false);

            case 11:
                if (!CL_Complete(ci.LODR_GuideOpCl, fb.Bwd))
                {
                    return(false);
                }
                if (!CL_Complete(ci.LODR_PckrFwBw, fb.Bwd))
                {
                    return(false);
                }

                MoveCyl(ci.LODR_RngJigFwBw, fb.Bwd);
                Step.iCycle++;
                return(false);

            case 12:
                if (!CL_Complete(ci.LODR_RngJigFwBw, fb.Bwd))
                {
                    return(false);
                }
                if (!CL_Complete(ci.ULDR_OutPshrFwBw, fb.Bwd))
                {
                    return(false);
                }
                Step.iCycle++;
                return(false);

            case 13:
                if (!MT_GetStopInpos(mi.LODR_XPshr))
                {
                    return(false);
                }
                MoveMotr(mi.LODR_YIndx, pv.LODR_YIndxWait);
                MT_GoAbsMan(mi.ULDR_YIndx, PM.GetValue(mi.ULDR_YIndx, pv.ULDR_YIndxWait));
                Step.iCycle++;
                return(false);

            case 14:
                if (!MT_GetStopInpos(mi.LODR_YIndx))
                {
                    return(false);
                }
                if (!MT_GetStopInpos(mi.ULDR_YIndx))
                {
                    return(false);
                }
                MoveCyl(ci.LODR_PshrRtrCwCCw, fb.Bwd);
                Step.iCycle++;
                return(false);

            case 15:
                if (!CL_Complete(ci.LODR_PshrRtrCwCCw, fb.Bwd))
                {
                    return(false);
                }
                Step.iCycle = 0;
                return(true);
            }
        }