示例#1
0
        public bool CheckSafe(ci _eActr, fb _eFwd, bool _bChecked = false)
        {
            if (CL_Complete(_eActr, _eFwd))
            {
                return(true);
            }

            String sMsg = "";
            bool   bRet = true;

            if (_eActr == ci.PREB_StprUpDn)
            {
            }
            else if (!_bChecked)
            {
                sMsg = "Cylinder " + CL_GetName(_eActr) + " is Not this parts.";
                bRet = false;
            }

            if (!bRet)
            {
                m_sCheckSafeMsg = sMsg;
                Trace(CL_GetName(_eActr) + " " + sMsg);
                if (Step.iCycle == 0)
                {
                    Log.ShowMessage(CL_GetName(_eActr), sMsg);
                }
            }
            else
            {
                m_sCheckSafeMsg = "";
            }

            return(bRet);
        }
示例#2
0
        public bool CheckSafe(ci _eActr, fb _eFwd, bool _bChecked = false)
        {
            if (CL_Complete(_eActr, _eFwd))
            {
                return(true);
            }

            String sMsg = "";
            bool   bRet = true;

            if (_eActr == ci.VISN_FixRtrCwCCw)
            {
                //if(_bFwd == EN_CYLINDER_POS.cpFwd) {
                //if(!bExistSply /*|| !bSRT_ZTop*/) {sMsg = string ("Tray 센서 감지중!"); bRet = false ;}
                //}
            }

            else if (_eActr == ci.VISN_GrpRtrCwCCw)
            {
                //if(_bFwd == EN_CYLINDER_POS.cpFwd) {
                //if(!bExistSply /*|| !bSRT_ZTop*/) {sMsg = string ("Tray 센서 감지중!"); bRet = false ;}
                //}
            }

            else if (_eActr == ci.VISN_TurnGrpFwBw)
            {
                //if(_bFwd == EN_CYLINDER_POS.cpFwd) {
                //if(!bExistSply /*|| !bSRT_ZTop*/) {sMsg = string ("Tray 센서 감지중!"); bRet = false ;}
                //}
            }
            else if (_eActr == ci.VISN_TurnRtrCwCCw)
            {
                //if(_bFwd == EN_CYLINDER_POS.cpFwd) {
                //if(!bExistSply /*|| !bSRT_ZTop*/) {sMsg = string ("Tray 센서 감지중!"); bRet = false ;}
                //}
            }

            else if (!_bChecked)
            {
                sMsg = "Cylinder " + CL_GetName(_eActr) + " is Not this parts.";
                bRet = false;
            }

            if (!bRet)
            {
                m_sCheckSafeMsg = sMsg;
                Trace(CL_GetName(_eActr) + " " + sMsg);
                if (Step.iCycle == 0)
                {
                    Log.ShowMessage(CL_GetName(_eActr), sMsg);
                }
            }
            else
            {
                m_sCheckSafeMsg = "";
            }

            return(bRet);
        }
示例#3
0
文件: Loader.cs 项目: zoro-008/Works
        public bool CheckSafe(ci _eActr, fb _eFwd, bool _bChecked = false)
        {
            if (CL_Complete(_eActr, _eFwd))
            {
                return(true);
            }

            String sMsg = "";
            bool   bRet = true;

            bool bMov = !MT_GetStop(mi.LODR_ZClmp) || !MT_GetStop(mi.LODR_YClmp);

            if (_eActr == ci.LODR_PusherFwBw)
            {
                if (bMov)
                {
                    sMsg = "Loader motor is moving"; bRet = false;
                }
            }
            else if (_eActr == ci.LODR_ClampUpDn)
            {
                if (!SEQ._bRun && Step.iCycle == 0)
                {
                    if (_eFwd == fb.Bwd && (IO_GetX(xi.LODR_MgzDetect1) || IO_GetX(xi.LODR_MgzDetect2)))
                    {
                        if (Log.ShowMessageModal("Confirm", "Mgz sensor is detected , Open the Mgz?") != System.Windows.Forms.DialogResult.Yes)
                        {
                            return(false);
                        }
                    }
                }
            }

            else if (!_bChecked)
            {
                sMsg = "Cylinder " + CL_GetName(_eActr) + " is Not this parts.";
                bRet = false;
            }

            if (!bRet)
            {
                m_sCheckSafeMsg = sMsg;
                Trace(CL_GetName(_eActr) + " " + sMsg);
                if (Step.iCycle == 0)
                {
                    Log.ShowMessage(CL_GetName(_eActr), sMsg);
                }
            }
            else
            {
                m_sCheckSafeMsg = "";
            }

            return(bRet);
        }
示例#4
0
        //무브함수들의 리턴이 Done을 의미 한게 아니고 명령 전달이 됐는지 여부로 바꿈.
        //Done 확인을 위해서는 GetStop을 써야함.
        public bool MoveCyl(ci _eActr, fb _eFwd)
        {
            if (!CheckSafe(_eActr, _eFwd))
            {
                return(false);
            }

            CL_Move(_eActr, _eFwd);

            return(true);
        }
示例#5
0
        public bool CheckSafe(ci _eActr, fb _eFwd)
        {
            if (CL_Complete(_eActr, _eFwd))
            {
                return(true);
            }

            String sMsg = "";
            bool   bRet = true;

            if (_eActr == ci.IDXR_ClampUpDn)
            {
                if (_eFwd == fb.Fwd)
                {
                    if (CL_Complete(ci.IDXR_ClampClOp, fb.Fwd))
                    {
                        sMsg = "Rear Index is Close";
                        bRet = false;
                    }
                }
            }
            else if (_eActr == ci.IDXR_ClampClOp)
            {
                //if(_bFwd == EN_CYLINDER_POS.cpFwd) {
                //if(!bExistSply /*|| !bSRT_ZTop*/) {sMsg = string ("Tray 센서 감지중!"); bRet = false ;}
                //}
            }

            else
            {
                sMsg = "Cylinder " + CL_GetName(_eActr) + " is Not this parts.";
                bRet = false;
            }

            if (!bRet)
            {
                m_sCheckSafeMsg = sMsg;
                Log.Trace(CL_GetName(_eActr), sMsg);
                if (Step.iCycle == 0)
                {
                    Log.ShowMessage(CL_GetName(_eActr), sMsg);
                }
            }
            else
            {
                m_sCheckSafeMsg = "";
            }

            return(bRet);
        }
示例#6
0
        private void btAction_Click(object sender, EventArgs e)
        {
            fb sCylderPos = 0;

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

            SM.CL_Move(m_iActrId, sCylderPos);

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

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

            Log.Trace("Operator", sMsg);
        }
示例#7
0
        public bool CheckSafe(ci _eActr, fb _eFwd)
        {
            if (CL_Complete(_eActr, _eFwd))
            {
                return(true);
            }

            String sMsg = "";
            bool   bRet = true;

            //if(_eActr == ci.INDX_DoorClOp){
            //    if(_eFwd == fb.Fwd) {
            //        if(CL_Complete(ci.INDX_TrayFeedFwBw, fb.Fwd))
            //        {
            //            sMsg = "Feeder가 전진해 있습니다.";
            //            bRet = false ;
            //        }
            //    }
            //}

            if (!bRet)
            {
                m_sCheckSafeMsg = sMsg;
                Log.Trace(CL_GetName(_eActr), sMsg);
                if (Step.iCycle == 0)
                {
                    Log.ShowMessage(CL_GetName(_eActr), sMsg);
                }
            }
            else
            {
                m_sCheckSafeMsg = "";
            }

            return(bRet);
        }
示例#8
0
文件: ML.cs 项目: zoro-008/Works
 static public bool              CL_Move(ci _eCylNo, fb _eCmd)
 {
     return(SM.CL.Move((int)_eCylNo, (EN_CYLINDER_POS)_eCmd));
 }
示例#9
0
        public bool CheckSafe(ci _eActr, fb _eFwd)
        {
            if (CL_Complete(_eActr, _eFwd))
            {
                return(true);
            }

            String sMsg = "";
            bool   bRet = true;

            if (_eActr == ci.STCK_RailClOp)
            {
                //if(_bFwd == EN_CYLINDER_POS.cpFwd) {
                //if(!bExistSply /*|| !bSRT_ZTop*/) {sMsg = string ("Tray 센서 감지중!"); bRet = false ;}
                //}
            }

            else if (_eActr == ci.STCK_RailTrayUpDn)
            {
                //if(_bFwd == EN_CYLINDER_POS.cpFwd) {
                //if(!bExistSply /*|| !bSRT_ZTop*/) {sMsg = string ("Tray 센서 감지중!"); bRet = false ;}
                //}
            }

            else if (_eActr == ci.STCK_StackStprUpDn)
            {
                //if(_bFwd == EN_CYLINDER_POS.cpFwd) {
                //if(!bExistSply /*|| !bSRT_ZTop*/) {sMsg = string ("Tray 센서 감지중!"); bRet = false ;}
                //}
            }
            else if (_eActr == ci.STCK_StackOpCl)
            {
                //if(_bFwd == EN_CYLINDER_POS.cpFwd) {
                //if(!bExistSply /*|| !bSRT_ZTop*/) {sMsg = string ("Tray 센서 감지중!"); bRet = false ;}
                //}
            }
            else if (_eActr == ci.BARZ_BrcdStprUpDn)
            {
                //if(_bFwd == EN_CYLINDER_POS.cpFwd) {
                //if(!bExistSply /*|| !bSRT_ZTop*/) {sMsg = string ("Tray 센서 감지중!"); bRet = false ;}
                //}
            }
            else if (_eActr == ci.BARZ_BrcdTrayUpDn)
            {
                //if(_bFwd == EN_CYLINDER_POS.cpFwd) {
                //if(!bExistSply /*|| !bSRT_ZTop*/) {sMsg = string ("Tray 센서 감지중!"); bRet = false ;}
                //}
            }
            else
            {
                sMsg = "Cylinder " + CL_GetName(_eActr) + " is Not this parts.";
                bRet = false;
            }

            if (!bRet)
            {
                m_sCheckSafeMsg = sMsg;
                Log.Trace(CL_GetName(_eActr), sMsg);
                if (Step.iCycle == 0)
                {
                    Log.ShowMessage(CL_GetName(_eActr), sMsg);
                }
            }
            else
            {
                m_sCheckSafeMsg = "";
            }

            return(bRet);
        }
示例#10
0
文件: Loader.cs 项目: zoro-008/Works
        //public bool CyclePick()
        //{
        //    String sTemp;
        //    if (m_tmCycle.OnDelay(Step.iCycle != 0 && Step.iCycle == PreStep.iCycle && CheckStop() &&!OM.MstOptn.bDebugMode, 5000))
        //    {
        //        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_PckrRtrCwCCw , fb.Fwd);
        //            MoveMotr(mi.LODR_XPckr , pv.LODR_XPckrPlce);

        //            Step.iCycle++;
        //            return false;

        //        case 11:
        //            if(!CL_Complete(ci.LODR_PckrRtrCwCCw , fb.Fwd))return false;
        //            if(!MT_GetStopInpos(mi.LODR_XPckr))return false;
        //            MoveCyl(ci.LODR_GrpRtrCwCCw , fb.Bwd);
        //            MoveCyl(ci.LODR_RngGrpFwBw  , fb.Bwd);
        //            Step.iCycle++;
        //            return false;

        //        case 12:
        //            if(!CL_Complete(ci.LODR_RngGrpFwBw , fb.Bwd))return false;
        //            if(!CL_Complete(ci.LODR_GrpRtrCwCCw, fb.Bwd))return false;
        //            MoveMotr(mi.LODR_XPckr , pv.LODR_XPckrPick);
        //            Step.iCycle++;
        //            return false;

        //        case 13:
        //            if (!MT_GetStopPos(mi.LODR_XPckr, pv.LODR_XPckrPick)) return false;
        //            MT_GoAbsVel(mi.LODR_XPckr, PM.GetValue(mi.LODR_XPckr , pv.LODR_XPckrPick) + 2, 10);
        //            Step.iCycle++;
        //            return false;

        //        case 14:
        //            if (!MT_GetStopInpos(mi.LODR_XPckr)) return false;
        //            MoveCyl(ci.LODR_RngGrpFwBw , fb.Fwd);
        //            IO_SetY(yi.LODR_PickrVac , false);
        //            Step.iCycle++;
        //            return false;

        //        case 15:
        //            if (!CL_Complete(ci.LODR_RngGrpFwBw, fb.Fwd)) return false;
        //            MoveMotr(mi.LODR_XPckr , pv.LODR_XPckrPickRtt);
        //            Step.iCycle++;
        //            return false;

        //        case 16:
        //            if(!MT_GetStopInpos(mi.LODR_XPckr))return false;
        //            MoveCyl(ci.LODR_GrpRtrCwCCw , fb.Fwd);
        //            Step.iCycle++;
        //            return false;

        //        case 17:
        //            if(!CL_Complete(ci.LODR_GrpRtrCwCCw , fb.Fwd))return false;
        //            MoveMotr(mi.LODR_XPckr, pv.LODR_XPckrPlce);
        //            Step.iCycle++;
        //            return false;

        //        case 18:
        //            if(!MT_GetStopInpos(mi.LODR_XPckr))return false;
        //            //MoveCyl(ci.LODR_RngGrpFwBw , fb.Bwd);
        //            Step.iCycle++;
        //            return false;

        //        case 19:
        //            //if(!CL_Complete(ci.LODR_RngGrpFwBw, fb.Bwd))return false;
        //            DM.ShiftData(ri.PLDR, ri.TLDR);
        //            Step.iCycle = 0;
        //            return true;



        //    }
        //}

        public bool CheckSafe(ci _eActr, fb _eFwd, bool _bChecked = false)
        {
            if (CL_Complete(_eActr, _eFwd))
            {
                return(true);
            }

            String sMsg = "";
            bool   bRet = true;

            if (_eActr == ci.LODR_GrpRtrCwCCw)
            {
                //if(_bFwd == EN_CYLINDER_POS.cpFwd) {
                //if(!bExistSply /*|| !bSRT_ZTop*/) {sMsg = string ("Tray 센서 감지중!"); bRet = false ;}
                //}
            }
            else if (_eActr == ci.LODR_GuideOpCl)
            {
            }
            else if (_eActr == ci.LODR_PckrRtrCwCCw)
            {
            }
            else if (_eActr == ci.LODR_PshrRtrCwCCw)
            {
                if (MT_GetCmdPos(mi.LODR_XPshr) > PM.GetValue(mi.LODR_XPshr, pv.LODR_XPshrWait) + 10)
                {
                    sMsg = MT_GetName(mi.LODR_XPshr) + "is not Wait Position";
                    bRet = false;
                }
            }
            else if (_eActr == ci.LODR_RngGrpFwBw)
            {
            }
            else if (_eActr == ci.LODR_PckrFwBw)
            {
                if (_eFwd == fb.Fwd && CL_GetCmd(ci.LODR_RngJigFwBw) != fb.Fwd)
                {
                    sMsg = CL_GetName(ci.LODR_RngJigFwBw) + "is not Fwd";
                    bRet = false;
                }
            }
            else if (_eActr == ci.LODR_RngJigFwBw)
            {
                if (_eFwd == fb.Bwd && CL_GetCmd(ci.LODR_PckrFwBw) != fb.Bwd)
                {
                    sMsg = CL_GetName(ci.LODR_PckrFwBw) + "is Fwd";
                    bRet = false;
                }

                if (CL_GetCmd(ci.LODR_GuideOpCl) != fb.Bwd)
                {
                    sMsg = CL_GetName(ci.LODR_GuideOpCl) + "is not Bwd";
                    bRet = false;
                }
            }
            else if (!_bChecked)
            {
                sMsg = "Cylinder " + CL_GetName(_eActr) + " is Not this parts.";
                bRet = false;
            }

            if (!bRet)
            {
                m_sCheckSafeMsg = sMsg;
                Trace(CL_GetName(_eActr) + " " + sMsg);
                if (Step.iCycle == 0)
                {
                    Log.ShowMessage(CL_GetName(_eActr), sMsg);
                }
            }
            else
            {
                m_sCheckSafeMsg = "";
            }

            return(bRet);
        }
示例#11
0
文件: ML.cs 项目: zoro-008/Works
 static public bool              CL_Move(uint _eCylNo, fb _eCmd)
 {
     return(SM.CYL.Move((int)_eCylNo, (EN_CYL_POS)_eCmd));
 }
示例#12
0
文件: ML.cs 项目: zoro-008/Works
 static public bool              CL_Complete(int _eCylNo, fb _eCmd)
 {
     return(SM.CYL.Complete((int)_eCylNo, (EN_CYL_POS)_eCmd));
 }
示例#13
0
    /// <summary>
    /// lấy tên người chơi
    /// </summary>
    /// <param name="result"></param>
    //private void GetUserInfoCallback(IGraphResult result)
    //{
    //    if (result.Error != null)
    //    {
    //        print(result.Error);
    //        return;
    //    }

    //    name.text = string.Format("{0}", result.ResultDictionary["name"]);
    //    print(result);
    //    if (isadspanel == false)
    //    {
    //        checkLogin();
    //    }

    //}


    // Use this for initialization
    void Start()
    {
        checkloging = this;
    }
示例#14
0
        public bool CheckSafe(ci _eActr, fb _eFwd, bool _bChecked = false)
        {
            if (CL_Complete(_eActr, _eFwd))
            {
                return(true);
            }

            String sMsg = "";
            bool   bRet = true;

            if (_eActr == ci.TBLE_Grpr1FwBw)
            {
                //if(_eFwd == fb.Fwd) {
                //    if(CL_Complete(ci.IDXR_ClampClOp, fb.Fwd))
                //    {
                //        sMsg = "Rear Index is Close";
                //        bRet = false ;
                //    }
                //}
            }
            else if (_eActr == ci.TBLE_Grpr2FwBw)
            {
                //if(_bFwd == EN_CYLINDER_POS.cpFwd) {
                //if(!bExistSply /*|| !bSRT_ZTop*/) {sMsg = string ("Tray 센서 감지중!"); bRet = false ;}
                //}
            }
            else if (_eActr == ci.TBLE_Grpr2FwBw)
            {
                //if(_bFwd == EN_CYLINDER_POS.cpFwd) {
                //if(!bExistSply /*|| !bSRT_ZTop*/) {sMsg = string ("Tray 센서 감지중!"); bRet = false ;}
                //}
            }
            else if (_eActr == ci.TBLE_Grpr3FwBw)
            {
                //if(_bFwd == EN_CYLINDER_POS.cpFwd) {
                //if(!bExistSply /*|| !bSRT_ZTop*/) {sMsg = string ("Tray 센서 감지중!"); bRet = false ;}
                //}
            }
            else if (_eActr == ci.TBLE_Grpr4FwBw)
            {
                //if(_bFwd == EN_CYLINDER_POS.cpFwd) {
                //if(!bExistSply /*|| !bSRT_ZTop*/) {sMsg = string ("Tray 센서 감지중!"); bRet = false ;}
                //}
            }
            else if (_eActr == ci.TBLE_Grpr5FwBw)
            {
                //if(_bFwd == EN_CYLINDER_POS.cpFwd) {
                //if(!bExistSply /*|| !bSRT_ZTop*/) {sMsg = string ("Tray 센서 감지중!"); bRet = false ;}
                //}
            }
            else if (_eActr == ci.TBLE_Grpr6FwBw)
            {
                //if(_bFwd == EN_CYLINDER_POS.cpFwd) {
                //if(!bExistSply /*|| !bSRT_ZTop*/) {sMsg = string ("Tray 센서 감지중!"); bRet = false ;}
                //}
            }
            else if (_eActr == ci.LODR_RngGrpFwBw)
            {
            }
            else if (_eActr == ci.VISN_TurnGrpFwBw)
            {
            }
            else if (_eActr == ci.MARK_AlgnFwBw)
            {
            }
            else if (_eActr == ci.MARK_AlgnPinFwBw)
            {
            }

            else if (!_bChecked)
            {
                sMsg = "Cylinder " + CL_GetName(_eActr) + " is Not this parts.";
                bRet = false;
            }

            if (!bRet)
            {
                m_sCheckSafeMsg = sMsg;
                Trace(CL_GetName(_eActr) + " " + sMsg);
                if (Step.iCycle == 0)
                {
                    Log.ShowMessage(CL_GetName(_eActr), sMsg);
                }
            }
            else
            {
                m_sCheckSafeMsg = "";
            }

            return(bRet);
        }
示例#15
0
 static public bool            CL_Complete(ci _eCylNo, fb _eCmd)
 {
     return(SML.CL.Complete((int)_eCylNo, (EN_CYLINDER_POS)_eCmd));
 }