Ejemplo n.º 1
0
        public bool CheckSafe(mi _eMotr, pv _ePstn, double _dOfsPos = 0)
        {
            double dDstPos = PM_GetValue(_eMotr, _ePstn) + _dOfsPos;

            if (MT_CmprPos(_eMotr, dDstPos))
            {
                return(true);
            }

            bool   bRet = true;
            string sMsg = "";

            if (_eMotr == mi.LODR_XPckr)
            {
                //if (!MT_GetStopInpos(mi.WSTG_YGrpr))
                //{
                //    sMsg = MT_GetName(mi.WSTG_YGrpr) + "is moving.";
                //    bRet = false;
                //}
            }
            else if (_eMotr == mi.LODR_XPshr)
            {
                if (!CL_Complete(ci.LODR_PshrRtrCwCCw))
                {
                    sMsg = CL_GetName(ci.LODR_PshrRtrCwCCw) + "is moving.";
                    bRet = false;
                }
            }
            else if (_eMotr == mi.LODR_YIndx)
            {
                if (!CL_Complete(ci.LODR_GuideOpCl, fb.Bwd))
                {
                    sMsg = CL_GetName(ci.LODR_GuideOpCl) + "is not Bwd";
                    bRet = false;
                }
            }
            else
            {
                sMsg = "Motor " + MT_GetName(_eMotr) + " is Not this parts.";
                bRet = false;
            }

            if (!bRet)
            {
                m_sCheckSafeMsg = sMsg;
                Trace(MT_GetName(_eMotr) + " " + sMsg);
                //메뉴얼 동작일때.
                if (Step.eSeq == sc.Idle)
                {
                    Log.ShowMessage(MT_GetName(_eMotr), sMsg);
                }
            }
            else
            {
                m_sCheckSafeMsg = "";
            }

            return(bRet);
        }
Ejemplo n.º 2
0
Archivo: ML.cs Proyecto: zoro-008/Works
 static public bool         MT_GetStopPos(mi _eMotrNo, pv _ePos, double _dOfs = 0.0)
 {
     if (!MT_GetStop(_eMotrNo))
     {
         return(false);
     }
     return(MT_CmprPos(_eMotrNo, (PM_GetValue(_eMotrNo, _ePos) + _dOfs)));
 }
Ejemplo n.º 3
0
        public bool CheckSafe(mi _eMotr, pv _ePstn, double _dOfsPos = 0)
        {
            double dDstPos = PM_GetValue(_eMotr, _ePstn) + _dOfsPos;

            if (MT_CmprPos(_eMotr, dDstPos))
            {
                return(true);
            }

            bool   bRet = true;
            string sMsg = "";

            //TOOL_ZVisn


            //if (_eMotr == mi.VISN_ZGrpr)
            //{
            //
            //
            //}
            //
            ////else if (_eMotr == mi.BARZ_ZPckr)
            ////{
            ////    //if (CL_GetCmd(ci.BARZ_YPckrFwBw)==fb.Fwd)
            ////    //{
            ////    //    sMsg = CL_GetName(ci.BARZ_YPckrFwBw) + " is Fwd.";
            ////    //    bRet = false;
            ////    //}
            //
            ////}
            //
            //else
            //{
            //    sMsg = "Motor " + MT_GetName(_eMotr) + " is Not this parts.";
            //    bRet = false;
            //}

            if (!bRet)
            {
                m_sCheckSafeMsg = sMsg;
                Trace(MT_GetName(_eMotr) + " " + sMsg);
                //메뉴얼 동작일때.
                if (Step.eSeq == 0)
                {
                    Log.ShowMessage(MT_GetName(_eMotr), sMsg);
                }
            }
            else
            {
                m_sCheckSafeMsg = "";
            }

            return(bRet);
        }
Ejemplo n.º 4
0
        public bool MoveMotrSlow(mi _eMotr, pv _ePstn, double _dOfsPos = 0)
        {
            if (!CheckSafe(_eMotr, _ePstn, _dOfsPos))
            {
                return(false);
            }
            double dDstPos = PM_GetValue(_eMotr, _ePstn) + _dOfsPos;

            MT_GoAbsSlow(_eMotr, dDstPos);
            return(true);
        }
Ejemplo n.º 5
0
        public bool CheckSafe(mi _eMotr, pv _ePstn, double _dOfsPos = 0)
        {
            double dDstPos = PM_GetValue(_eMotr, _ePstn) + _dOfsPos;

            if (MT_CmprPos(_eMotr, dDstPos))
            {
                return(true);
            }

            bool   bRet = true;
            string sMsg = "";

            //TOOL_ZVisn


            if (_eMotr == mi.STCK_ZStck)
            {
                //if (!MT_GetStopInpos(mi.TOOL_YGent))
                //{
                //    sMsg = MT_GetName(mi.TOOL_YGent) + " is moving.";
                //    bRet = false;
                //}
                //
                //if (!MT_GetStopInpos(mi.TOOL_XLeft))
                //{
                //    sMsg = MT_GetName(mi.TOOL_XLeft) + " is moving.";
                //    bRet = false;
                //}
            }

            else
            {
                sMsg = "Motor " + MT_GetName(_eMotr) + " is Not this parts.";
                bRet = false;
            }

            if (!bRet)
            {
                m_sCheckSafeMsg = sMsg;
                Log.Trace(MT_GetName(_eMotr), sMsg);
                //메뉴얼 동작일때.
                if (Step.eSeq == 0)
                {
                    Log.ShowMessage(MT_GetName(_eMotr), sMsg);
                }
            }
            else
            {
                m_sCheckSafeMsg = "";
            }

            return(bRet);
        }
Ejemplo n.º 6
0
        public bool CheckSafe(mi _eMotr, pv _ePstn, double _dOfsPos = 0)
        {
            double dDstPos = PM_GetValue(_eMotr, _ePstn) + _dOfsPos;

            if (MT_CmprPos(_eMotr, dDstPos))
            {
                return(true);
            }

            bool   bRet = true;
            string sMsg = "";

            //if (_eMotr == mi.IDXF_XFrnt)
            //{
            //    //if (!MT_GetStopInpos(mi.SSTG_YGrpr))
            //    //{
            //    //    sMsg = MT_GetName(mi.SSTG_YGrpr) + "is moving.";
            //    //    bRet = false;
            //    //}
            //}

            //else
            //{
            //    sMsg = "Motor " + MT_GetName(_eMotr) + " is Not this parts.";
            //    bRet = false;
            //}

            if (!bRet)
            {
                m_sCheckSafeMsg = sMsg;
                Trace(MT_GetName(_eMotr) + " " + sMsg);
                //메뉴얼 동작일때.
                if (Step.eSeq == sc.Idle)
                {
                    Log.ShowMessage(MT_GetName(_eMotr), sMsg);
                }
            }
            else
            {
                m_sCheckSafeMsg = "";
            }

            return(bRet);
        }
Ejemplo n.º 7
0
        public bool CheckSafe(mi _eMotr, pv _ePstn, double _dOfsPos = 0)
        {
            if (OM.MstOptn.bDebugMode)
            {
                return(true);
            }
            double dDstPos = PM_GetValue(_eMotr, _ePstn) + _dOfsPos;

            if (MT_CmprPos(_eMotr, dDstPos))
            {
                return(true);
            }

            bool   bRet = true;
            string sMsg = "";

            //if (_eMotr == mi.WORK_ZMvRear)
            //{
            //
            //}
            //else
            //{
            //    sMsg = "Motor " + MT_GetName(_eMotr) + " is Not this parts.";
            //    bRet = false;
            //}

            if (!bRet)
            {
                m_sCheckSafeMsg = sMsg;
                Trace(MT_GetName(_eMotr) + " " + sMsg);
                //메뉴얼 동작일때.
                if (Step.eSeq == sc.Idle)
                {
                    Log.ShowMessage(MT_GetName(_eMotr), sMsg);
                }
            }
            else
            {
                m_sCheckSafeMsg = "";
            }

            return(bRet);
        }
Ejemplo n.º 8
0
        //무브함수들의 리턴이 Done을 의미 한게 아니고 명령 전달이 됐는지 여부로 바꿈.
        //Done 확인을 위해서는 GetStop을 써야함.
        public bool MoveMotr(mi _eMotr, pv _ePstn, double _dOfsPos = 0)
        {
            if (!CheckSafe(_eMotr, _ePstn, _dOfsPos))
            {
                return(false);
            }

            double dDstPos = PM_GetValue(_eMotr, _ePstn) + _dOfsPos;

            if (Step.iCycle != 0)
            {
                MT_GoAbsRun(_eMotr, dDstPos);
            }
            else
            {
                MT_GoAbsMan(_eMotr, dDstPos);
            }
            return(true);
        }
Ejemplo n.º 9
0
        public bool CheckSafe(mi _eMotr, pv _ePstn, double _dOfsPos = 0)
        {
            double dDstPos = PM_GetValue(_eMotr, _ePstn) + _dOfsPos;

            if (MT_CmprPos(_eMotr, dDstPos))
            {
                return(true);
            }

            bool   bRet = true;
            string sMsg = "";

            if (_eMotr == mi.OUT_TRelB)
            {
            }
            else if (_eMotr == mi.OUT_TRelT)
            {
            }
            else if (_eMotr == mi.OUT_YGuid)
            {
            }

            if (!bRet)
            {
                m_sCheckSafeMsg = sMsg;
                Trace(MT_GetName(_eMotr) + " " + sMsg);
                //메뉴얼 동작일때.
                if (Step.eSeq == sc.Idle)
                {
                    Log.ShowMessage(MT_GetName(_eMotr), sMsg);
                }
            }
            else
            {
                m_sCheckSafeMsg = "";
            }

            return(bRet);
        }
Ejemplo n.º 10
0
 public static int GetValueSpdPer(mi _eAxisNo, pv _ePstnNo)
 {
     return(GetValueSpdPer((uint)_eAxisNo, (uint)_ePstnNo));
 }
Ejemplo n.º 11
0
Archivo: ML.cs Proyecto: zoro-008/Works
 static public int          PM_GetValueSpdPer(mi _eMotrNo, pv _iPstnValue)
 {
     return(PM.GetValueSpdPer((uint)_eMotrNo, (uint)_iPstnValue));
 }
Ejemplo n.º 12
0
Archivo: ML.cs Proyecto: zoro-008/Works
        //public void PW_



        static public double       PM_GetValue(mi _eMotrNo, pv _iPstnValue)
        {
            return(PM.GetValue((uint)_eMotrNo, (uint)_iPstnValue));
        }
Ejemplo n.º 13
0
Archivo: ML.cs Proyecto: zoro-008/Works
 static public bool         MT_CmprPos(mi _eMotrNo, pv _ePos, double _dRange = 0.0)
 {
     return(SM.MT.CmprPos((int)_eMotrNo, PM.GetValue((uint)_eMotrNo, (uint)_ePos), _dRange));
 }
Ejemplo n.º 14
0
Archivo: ML.cs Proyecto: zoro-008/Works
 static public void         MT_SetPos(mi _eMotrNo, pv _ePos)
 {
     SM.MT.SetPos((int)_eMotrNo, PM.GetValue((uint)_eMotrNo, (uint)_ePos));
 }
Ejemplo n.º 15
0
Archivo: ML.cs Proyecto: zoro-008/Works
 static public void         MT_GoAbsSlow(mi _eMotrNo, pv _ePos)
 {
     SM.MT.GoAbsSlow((int)_eMotrNo, PM.GetValue((uint)_eMotrNo, (uint)_ePos));
 }
Ejemplo n.º 16
0
Archivo: ML.cs Proyecto: zoro-008/Works
 static public void         MT_GoAbsMan(uint _eMotrNo, pv _ePos)
 {
     SM.MTR.GoAbsMan((int)_eMotrNo, PM.GetValue((uint)_eMotrNo, (uint)_ePos));
 }
Ejemplo n.º 17
0
 public static void SetValue(mi _uAxisNo, pv _uPstnNo, double _dValue)
 {
     SetValue((uint)_uAxisNo, (uint)_uPstnNo, _dValue);
 }
Ejemplo n.º 18
0
        public bool CheckSafe(mi _eMotr, pv _ePstn, double _dOfsPos = 0)
        {
            double dDstPos = PM_GetValue(_eMotr, _ePstn) + _dOfsPos;

            if (MT_CmprPos(_eMotr, dDstPos))
            {
                return(true);
            }

            bool   bRet = true;
            string sMsg = "";

            if (_eMotr == mi.TBLE_TTble)
            {
                if (CL_GetCmd(ci.TBLE_Grpr1FwBw) != fb.Bwd)
                {
                    sMsg = "Grpper 1번 동작 중!"; bRet = false;
                }
                if (CL_GetCmd(ci.TBLE_Grpr2FwBw) != fb.Bwd)
                {
                    sMsg = "Grpper 2번 동작 중!"; bRet = false;
                }
                if (CL_GetCmd(ci.TBLE_Grpr3FwBw) != fb.Bwd)
                {
                    sMsg = "Grpper 3번 동작 중!"; bRet = false;
                }
                if (CL_GetCmd(ci.TBLE_Grpr4FwBw) != fb.Bwd)
                {
                    sMsg = "Grpper 4번 동작 중!"; bRet = false;
                }
                if (CL_GetCmd(ci.TBLE_Grpr5FwBw) != fb.Bwd)
                {
                    sMsg = "Grpper 5번 동작 중!"; bRet = false;
                }
                if (CL_GetCmd(ci.TBLE_Grpr6FwBw) != fb.Bwd)
                {
                    sMsg = "Grpper 6번 동작 중!"; bRet = false;
                }
                if (CL_GetCmd(ci.LODR_RngGrpFwBw) != fb.Bwd)
                {
                    sMsg = "Loader Gripper 동작 중!"; bRet = false;
                }
                if (CL_GetCmd(ci.VISN_TurnGrpFwBw) != fb.Bwd)
                {
                    sMsg = "Vision Gripper 동작 중!"; bRet = false;
                }
                if (CL_GetCmd(ci.MARK_AlgnFwBw) != fb.Bwd)
                {
                    sMsg = "Mark Align 동작 중!"; bRet = false;
                }
                if (CL_GetCmd(ci.MARK_AlgnPinFwBw) != fb.Bwd)
                {
                    sMsg = "Mark Align Pin 동작 중!"; bRet = false;
                }
            }

            else
            {
                sMsg = "Motor " + MT_GetName(_eMotr) + " is Not this parts.";
                bRet = false;
            }

            if (!bRet)
            {
                m_sCheckSafeMsg = sMsg;
                Trace(MT_GetName(_eMotr) + " " + sMsg);
                //메뉴얼 동작일때.
                if (Step.eSeq == sc.Idle)
                {
                    Log.ShowMessage(MT_GetName(_eMotr), sMsg);
                }
            }
            else
            {
                m_sCheckSafeMsg = "";
            }

            return(bRet);
        }
Ejemplo n.º 19
0
 public static double GetValue(mi _eAxisNo, pv _ePstnNo)
 {
     return(GetValue((uint)_eAxisNo, (uint)_ePstnNo));
 }
Ejemplo n.º 20
0
        public bool CheckSafe(mi _eMotr, pv _ePstn, double _dOfsPos = 0)
        {
            double dDstPos = PM_GetValue(_eMotr, _ePstn) + _dOfsPos;

            if (MT_CmprPos(_eMotr, dDstPos))
            {
                return(true);
            }

            bool   bRet = true;
            string sMsg = "";

            //TOOL_ZVisn


            //if (_eMotr == mi.ULDR_XNzzl)
            //{


            //}
            //else if(_eMotr == mi.ULDR_XGrpr)
            //{

            //}
            //else if(_eMotr == mi.ULDR_YIndx)
            //{
            //    if(MT_GetCmdPos(mi.ULDR_ZNzzl) > PM.GetValue(mi.ULDR_ZNzzl , pv.ULDR_ZNzzlWait) + 10)
            //    {
            //        sMsg = MT_GetName(mi.ULDR_ZNzzl) + "is not wait Position";
            //        bRet = false;
            //    }
            //    if (CL_GetCmd(ci.ULDR_OutPshrFwBw) != fb.Bwd)
            //    {
            //        sMsg = CL_GetName(ci.ULDR_OutPshrFwBw) + "is not Bwd";
            //        bRet = false;
            //    }
            //}
            //else if(_eMotr == mi.ULDR_ZNzzl)
            //{

            //}
            //else if(_eMotr == mi.ULDR_ZPckr)
            //{

            //}
            //else
            //{
            //    sMsg = "Motor " + MT_GetName(_eMotr) + " is Not this parts.";
            //    bRet = false;
            //}

            if (!bRet)
            {
                m_sCheckSafeMsg = sMsg;
                Trace(MT_GetName(_eMotr) + " " + sMsg);
                //메뉴얼 동작일때.
                if (Step.eSeq == 0)
                {
                    Log.ShowMessage(MT_GetName(_eMotr), sMsg);
                }
            }
            else
            {
                m_sCheckSafeMsg = "";
            }

            return(bRet);
        }
Ejemplo n.º 21
0
        public bool CheckSafe(mi _eMotr, pv _ePstn, double _dOfsPos = 0)
        {
            double dDstPos = PM_GetValue(_eMotr, _ePstn) + _dOfsPos;

            if (MT_CmprPos(_eMotr, dDstPos))
            {
                return(true);
            }

            bool   bRet = true;
            string sMsg = "";

            bool bZPickFwd  = MT_CmprPos(mi.LODR_ZClmp, PM.GetValue(mi.LODR_ZClmp, pv.LODR_ZClmpPickFwd));
            bool bZPlaceFwd = MT_CmprPos(mi.LODR_ZClmp, PM.GetValue(mi.LODR_ZClmp, pv.LODR_ZClmpPlaceFwd));
            bool bZPickBwd  = MT_CmprPos(mi.LODR_ZClmp, PM.GetValue(mi.LODR_ZClmp, pv.LODR_ZClmpPickBwd));
            bool bZPlaceBwd = MT_CmprPos(mi.LODR_ZClmp, PM.GetValue(mi.LODR_ZClmp, pv.LODR_ZClmpPlaceBwd));

            bool bYWork = MT_CmprPos(mi.LODR_YClmp, PM.GetValue(mi.LODR_YClmp, pv.LODR_YClmpWork));
            bool bYWait = MT_CmprPos(mi.LODR_YClmp, PM.GetValue(mi.LODR_YClmp, pv.LODR_YClmpWait));
            bool bYNotW = !bYWork && !bYWait;

            bool bYFwd1 = MT_CmprPos(mi.LODR_YClmp, PM.GetValue(mi.LODR_YClmp, pv.LODR_YClmpPick)) &&
                          (MT_CmprPos(mi.LODR_ZClmp, PM.GetValue(mi.LODR_ZClmp, pv.LODR_ZClmpPickBwd)) ||
                           MT_CmprPos(mi.LODR_ZClmp, PM.GetValue(mi.LODR_ZClmp, pv.LODR_ZClmpPickFwd)) ||
                           MT_CmprPos(mi.LODR_ZClmp, PM.GetValue(mi.LODR_ZClmp, pv.LODR_ZClmpClampOn)));

            bool bYFwd2 = MT_CmprPos(mi.LODR_YClmp, PM.GetValue(mi.LODR_YClmp, pv.LODR_YClmpPlace)) &&
                          (MT_CmprPos(mi.LODR_ZClmp, PM.GetValue(mi.LODR_ZClmp, pv.LODR_ZClmpPlaceBwd)) ||
                           MT_CmprPos(mi.LODR_ZClmp, PM.GetValue(mi.LODR_ZClmp, pv.LODR_ZClmpPlaceFwd)) ||
                           MT_CmprPos(mi.LODR_ZClmp, PM.GetValue(mi.LODR_ZClmp, pv.LODR_ZClmpClampOff)));

            if (!CL_Complete(ci.LODR_PusherFwBw, fb.Bwd))
            {
                sMsg = "Need to Loader Pusher Bwd Position"; bRet = false;
            }
            if (IO_GetX(xi.PREB_PkgInDetect))
            {
                sMsg = "Pre Buffer In Sensor Detected"; bRet = false;
            }

            if (_eMotr == mi.LODR_YClmp)
            {
                if (_ePstn == pv.LODR_YClmpPick)
                {
                    if (!bZPickFwd)
                    {
                        sMsg = "Need to Loor Z Pick Fwd Position"; bRet = false;
                    }
                }
                if (_ePstn == pv.LODR_YClmpPlace)
                {
                    if (!bZPlaceFwd)
                    {
                        sMsg = "Need to Loor Z Place Fwd Position"; bRet = false;
                    }
                }
                if (_ePstn == pv.LODR_YClmpWait)
                {
                    if (!bYWork && !bZPickBwd && !bZPlaceBwd)
                    {
                        sMsg = "Need to Loor Z Pick or Place Bwd Position"; bRet = false;
                    }
                }
                if (_ePstn == pv.LODR_YClmpWork)
                {
                    if (!bYWait && !bZPickBwd && !bZPlaceBwd)
                    {
                        sMsg = "Need to Loor Z Pick or Place Bwd Position"; bRet = false;
                    }
                }
            }
            else if (_eMotr == mi.LODR_ZClmp)
            {
                if (_ePstn == pv.LODR_ZClmpPickBwd)
                {
                    if (!bYFwd1)
                    {
                        sMsg = "Need to Loor Y Z Pick Position"; bRet = false;
                    }
                }
                if (_ePstn == pv.LODR_ZClmpPickFwd)
                {
                    if (bYNotW && !bYFwd1)
                    {
                        sMsg = "Need to Loor Wait or Work Position"; bRet = false;
                    }
                }
                if (_ePstn == pv.LODR_ZClmpClampOn)
                {
                    if (!bYFwd1)
                    {
                        sMsg = "Need to Loor Y Z Pick Position"; bRet = false;
                    }
                }

                if (_ePstn == pv.LODR_ZClmpPlaceBwd)
                {
                    if (!bYFwd2)
                    {
                        sMsg = "Need to Loor Y Z Place Position"; bRet = false;
                    }
                }
                if (_ePstn == pv.LODR_ZClmpPlaceFwd)
                {
                    if (bYNotW && !bYFwd2)
                    {
                        sMsg = "Need to Loor Wait or Work Position"; bRet = false;
                    }
                }
                if (_ePstn == pv.LODR_ZClmpClampOff)
                {
                    if (!bYFwd2)
                    {
                        sMsg = "Need to Loor Y Z Place Position"; bRet = false;
                    }
                }

                if (_ePstn == pv.LODR_ZClmpWait)
                {
                    if (bYNotW)
                    {
                        sMsg = "Need to Loor Wait or Work Position"; bRet = false;
                    }
                }
                if (_ePstn == pv.LODR_ZClmpWorkStart)
                {
                    if (bYNotW)
                    {
                        sMsg = "Need to Loor Wait or Work Position"; bRet = false;
                    }
                }
            }

            else
            {
                sMsg = "Motor " + MT_GetName(_eMotr) + " is Not this parts.";
                bRet = false;
            }

            if (!bRet)
            {
                m_sCheckSafeMsg = sMsg;
                Trace(MT_GetName(_eMotr) + " " + sMsg);
                //메뉴얼 동작일때.
                if (Step.eSeq == sc.Idle)
                {
                    Log.ShowMessage(MT_GetName(_eMotr), sMsg);
                }
            }
            else
            {
                m_sCheckSafeMsg = "";
            }

            return(bRet);
        }