Пример #1
0
        public bool Init(EN_LAN_SEL _eLanSel, string _sParaFolderPath, Enum _eCyl, CDioMan _Dio)
        {
            m_eLangSel         = _eLanSel;
            m_sParaFolderPath  = _sParaFolderPath;
            Repeat.DelayRepeat = new CDelayTimer();

            Type  type      = _eCyl.GetType();
            Array arrayTemp = Enum.GetValues(type);

            m_iMaxCylinder = arrayTemp.Length - 1;
            if (m_iMaxCylinder < 0)
            {
                m_iMaxCylinder = 0;
            }

            m_aCylinder = new CCylinder[m_iMaxCylinder];

            DIO = _Dio;

            for (int i = 0; i < m_iMaxCylinder; i++)
            {
                m_aCylinder[i] = new CCylinder();
                //m_aCylinder[i].Init(_eLanSel,ref _Dio);
                m_aCylinder[i].Init(ref _Dio);
                m_aCylinder[i].Para.sEnum = arrayTemp.GetValue(i).ToString();
            }

            LoadSave(true);

            Repeat.DelayRepeat.Clear();

            return(true);
        }
Пример #2
0
        public bool Init(EN_LAN_SEL _eLanSel, string _sParaFolderPath, int _iMaxMtrCnt, EN_MOTR_SEL [] _eMotrSels, CDioMan _Dio)
        {
            m_eLangSel        = _eLanSel;
            m_sParaFolderPath = _sParaFolderPath;

            Dio = _Dio;

            Para = new CParaMotr   [_iMaxMtrCnt];
            Stat = new CStatMotr   [_iMaxMtrCnt];

            RptTimer = new CDelayTimer[_iMaxMtrCnt];
            CclTimer = new CCycleTimer[_iMaxMtrCnt];

            HomeDone = new bool[_iMaxMtrCnt];
            Homming  = new bool[_iMaxMtrCnt];
            //ParaSub = new object[_iMaxMtrCnt];
            Mtr = new IMotor[_iMaxMtrCnt];

            m_iMaxMotr = _iMaxMtrCnt;
            for (int i = 0; i < m_iMaxMotr; i++)
            {
                Para  [i] = new CParaMotr();
                Stat  [i] = new CStatMotr();

                RptTimer[i] = new CDelayTimer();
                CclTimer[i] = new CCycleTimer();

                HomeDone[i] = false;
                Homming [i] = false;

                if (_eMotrSels[i] == EN_MOTR_SEL.AXL)
                {
                    Mtr[i] = new MotionAXL.CMotor();
                }
                else if (_eMotrSels[i] == EN_MOTR_SEL.NMC2)
                {
                    Mtr[i] = new MotionNMC2.CMotor();
                }
                //else if (_eMotrSels[i] == EN_MOTR_SEL.EMCL)
                //{
                //Mtr[i] = new MotionEmcl.CMotor();
                //}
                else
                {
                    Log.ShowMessage("Err", "_eMotrSel is not defined");
                    return(false);
                }
                Mtr[i].Init();
            }

            LoadSaveAll(true);
            ApplyParaAll();

            return(true);
        }
Пример #3
0
        public bool Init(EN_LAN_SEL _eLanSel, string _sParaFolderPath, int _iMaxIn, int _iMaxOut, EN_DIO_SEL _eDioSel)
        {
            m_eLangSel        = _eLanSel;
            m_sParaFolderPath = _sParaFolderPath;
            m_aIn             = new TDIo[_iMaxIn];
            m_aOut            = new TDIo[_iMaxOut];

            m_iMaxIn  = _iMaxIn;
            m_iMaxOut = _iMaxOut;


            if (_eDioSel == EN_DIO_SEL.AXL)
            {
                Dio = new MotionAXL.CDio();
            }
            else if (_eDioSel == EN_DIO_SEL.NMC2)
            {
                Dio = new MotionNMC2.CDio();
            }
            else
            {
                Log.ShowMessage("Err", "_eDioSel is not defined");
                return(false);
            }

            Dio.Init();

            LoadSave(true);
            //LoadSave(false);


            for (int i = 0; i < m_iMaxIn; i++)
            {
                m_aIn[i].DelayOn  = new CDelayTimer();
                m_aIn[i].DelayOff = new CDelayTimer();
            }

            for (int i = 0; i < m_iMaxOut; i++)
            {
                m_aOut[i].DelayOn  = new CDelayTimer();
                m_aOut[i].DelayOff = new CDelayTimer();

                m_aOut[i].Stat.bAtrVal = GetY(i, true);
                m_aOut[i].Stat.bVtrVal = m_aOut[i].Stat.bAtrVal;
            }

            Log.Trace("SMDLL", "Init Finished");

            return(true);
        }
Пример #4
0
        public bool Init(EN_LAN_SEL _eLanSel, string _sParaFolderPath, CDioMan _Dio)
        {
            m_eLangSel        = _eLanSel;
            m_sParaFolderPath = _sParaFolderPath;
            DIO = _Dio;

            Para.LampInfo = new TLampInfo[(int)EN_SEQ_STAT.MAX_SEQ_STAT];

            //m_aAdd = new TPara[(int)EN_SEQ_STAT.MAX_SEQ_STAT];

            LoadSave(true);

            return(true);
        }
Пример #5
0
        public bool Init(EN_LAN_SEL _eLanSel, ref CDioMan _Dio)
        {
            m_eLangSel = _eLanSel;

            DIO = _Dio;

            //Para.iFwdXAdd = new int[MAX_X_CNT];
            //Para.iBwdXAdd = new int[MAX_X_CNT];

            Reset();

            //LoadSave(true);

            return(true);
        }
Пример #6
0
        public bool Init(EN_LAN_SEL _eLanSel, string _sParaFolderPath, int _iMaxIn, int _iMaxOut, int _iRangeAMin, int _iRangeAMax, EN_AIO_SEL _eAioSel)
        {
            m_eLangSel        = _eLanSel;
            m_sParaFolderPath = _sParaFolderPath;
            m_aIn             = new TAIo[_iMaxIn];
            m_aOut            = new TAIo[_iMaxOut];

            m_iMaxIn  = _iMaxIn;
            m_iMaxOut = _iMaxOut;


            if (_eAioSel == EN_AIO_SEL.AXL)
            {
                Aio = new MotionAXL.CAio(_iRangeAMin, _iRangeAMax);
            }
            else
            {
                Log.ShowMessage("Err", "_eAioSel is not defined");
                return(false);
            }

            Aio.Init();

            LoadSave(true);
            //LoadSave(false);


            //for (int i = 0 ; i < m_iMaxIn ; i++)
            //{
            //    m_aIn[i].DelayOn  = new CDelayTimer();
            //    m_aIn[i].DelayOff = new CDelayTimer();
            //}

            //for (int i = 0 ; i < m_iMaxOut ; i++)
            //{
            //    m_aOut[i].DelayOn  = new CDelayTimer();
            //    m_aOut[i].DelayOff = new CDelayTimer();

            //    m_aOut[i].Stat.dAtrValA = GetY(i, true);
            //    m_aOut[i].Stat.bVtrVal = m_aOut[i].Stat.bAtrVal;
            //}

            Log.Trace("SMDLL", "Init Finished");

            return(true);
        }
Пример #7
0
        /// <summary>
        /// 에러리스트 클래스 생성자 입니다.
        /// </summary>
        /// <param name="_iMaxErrCnt">에러카운트의 갯수 입니다.</param>
        ///
        public bool Init(EN_LAN_SEL _eLanSel, string _sParaFolderPath, Enum _eErr, bool _bUseErrPic)
        {
            //LoadSavePara(false);
            m_eLangSel        = _eLanSel;
            m_sParaFolderPath = _sParaFolderPath;
            m_bUseErrPic      = _bUseErrPic;

            FrmErr = new FormErr();

            Type  type      = _eErr.GetType();
            Array arrayTemp = Enum.GetValues(type);

            m_iMaxErr = arrayTemp.Length - 1;
            if (m_iMaxErr < 0)
            {
                m_iMaxErr = 0;
            }
            m_aErr = new TErr[m_iMaxErr];

            //m_iMaxErr = _iMaxErrCnt;
            for (int i = 0; i < m_iMaxErr; i++)
            {
                m_aErr[i].Para.sEnum = arrayTemp.GetValue(i).ToString();
                //m_aErr[i].Para = new TErrConfig();
                //m_aErr[i].Para.sEnum = i.ToString();
                m_aErr[i].Para.sName    = i.ToString();
                m_aErr[i].Para.sAction  = i.ToString();
                m_aErr[i].Para.sImgPath = i.ToString();

                m_aErr[i].Para.dRectLeft   = 0;
                m_aErr[i].Para.dRectTop    = 0;
                m_aErr[i].Para.dRectHeight = 0;
                m_aErr[i].Para.dRectWidth  = 0;

                m_aErr[i].Para.iErrorLevel = 0;

                m_aErr[i].Stat.sSubMsg = "";
                m_aErr[i].Stat.bOn     = false;
                m_aErr[i].Stat.bOnUp   = false;
                m_aErr[i].Stat.bOnDn   = false;
                m_aErr[i].Stat.bPreOn  = false;
            }
            LoadSave(true);
            return(true);
        }
Пример #8
0
        public bool Init(EN_LAN_SEL _eLanSel, string _sParaFolderPath, int _iMaxCylinder, CDioMan _Dio)
        {
            m_sParaFolderPath  = _sParaFolderPath;
            Repeat.DelayRepeat = new CDelayTimer();
            m_aCylinder        = new CCylinder[_iMaxCylinder];
            m_iMaxCylinder     = _iMaxCylinder;

            DIO = _Dio;

            for (int i = 0; i < m_iMaxCylinder; i++)
            {
                m_aCylinder[i] = new CCylinder();
                m_aCylinder[i].Init(_eLanSel, ref _Dio);
            }

            LoadSave(true);

            Repeat.DelayRepeat.Clear();

            return(true);
        }
Пример #9
0
        /// <summary>
        /// 에러리스트 클래스 생성자 입니다.
        /// </summary>
        /// <param name="_iMaxErrCnt">에러카운트의 갯수 입니다.</param>
        ///
        public bool Init(EN_LAN_SEL _eLanSel, string _sParaFolderPath, int _iMaxErrCnt, bool _bUseErrPic)
        {
            //LoadSavePara(false);
            m_eLangSel        = _eLanSel;
            m_sParaFolderPath = _sParaFolderPath;
            m_bUseErrPic      = _bUseErrPic;

            m_FrmErr = new FormErr();



            m_aErr = new TErr[_iMaxErrCnt];

            m_iMaxErr = _iMaxErrCnt;
            for (int i = 0; i < _iMaxErrCnt; i++)
            {
                //m_aErr[i].Para = new TErrConfig();
                m_aErr[i].Para.sEnum    = i.ToString();
                m_aErr[i].Para.sName    = i.ToString();
                m_aErr[i].Para.sAction  = i.ToString();
                m_aErr[i].Para.sImgPath = i.ToString();

                m_aErr[i].Para.dRectLeft   = 0;
                m_aErr[i].Para.dRectTop    = 0;
                m_aErr[i].Para.dRectHeight = 0;
                m_aErr[i].Para.dRectWidth  = 0;

                m_aErr[i].Para.iErrorLevel = 0;

                m_aErr[i].Stat.sSubMsg = "";
                m_aErr[i].Stat.bOn     = false;
                m_aErr[i].Stat.bOnUp   = false;
                m_aErr[i].Stat.bOnDn   = false;
                m_aErr[i].Stat.bPreOn  = false;
            }
            LoadSave(true);
            return(true);
        }
Пример #10
0
        public bool Init(EN_LAN_SEL _eLanSel, string _sParaFolderPath, EN_DIO_SEL _eDioSel, Enum _eX, Enum _eY)
        {
            m_eLangSel        = _eLanSel;
            m_sParaFolderPath = _sParaFolderPath;

            Type  type1      = _eX.GetType();
            Array arrayTemp1 = Enum.GetValues(type1);

            m_iMaxIn = arrayTemp1.Length - 1;
            if (m_iMaxIn < 0)
            {
                m_iMaxIn = 0;
            }

            Type  type2      = _eY.GetType();
            Array arrayTemp2 = Enum.GetValues(type2);

            m_iMaxOut = arrayTemp2.Length - 1;
            if (m_iMaxOut < 0)
            {
                m_iMaxOut = 0;
            }

            m_aIn  = new TDIo[m_iMaxIn];
            m_aOut = new TDIo[m_iMaxOut];

            if (_eDioSel == EN_DIO_SEL.AXL)
            {
                Dio = new MotionAXL.CDio();
            }
            else if (_eDioSel == EN_DIO_SEL.NMC2)
            {
                Dio = new MotionNMC2.CDio();
            }
            else if (_eDioSel == EN_DIO_SEL.COMI)
            {
                Dio = new MotionComizoa.CDio();
            }
            else
            {
                Log.ShowMessage("Err", "_eDioSel is not defined");
                return(false);
            }

            Dio.Init();

            for (int i = 0; i < m_iMaxIn; i++)
            {
                m_aIn[i].Para.sEnum = arrayTemp1.GetValue(i).ToString();
            }
            for (int i = 0; i < m_iMaxOut; i++)
            {
                m_aOut[i].Para.sEnum = arrayTemp2.GetValue(i).ToString();
            }

            LoadSave(true);
            //LoadSave(false);


            for (int i = 0; i < m_iMaxIn; i++)
            {
                m_aIn[i].DelayOn  = new CDelayTimer();
                m_aIn[i].DelayOff = new CDelayTimer();
            }

            for (int i = 0; i < m_iMaxOut; i++)
            {
                m_aOut[i].DelayOn  = new CDelayTimer();
                m_aOut[i].DelayOff = new CDelayTimer();

                m_aOut[i].Stat.bAtrVal = GetY(i, true);
                m_aOut[i].Stat.bVtrVal = m_aOut[i].Stat.bAtrVal;
            }

            Log.Trace("SMDLL", "IO Init Finished");

            return(true);
        }
Пример #11
0
        public bool Init(EN_LAN_SEL _eLanSel, string _sParaFolderPath, EN_AIO_SEL _eAioSel, Enum _eX, Enum _eY, int _iRangeAMin, int _iRangeAMax)
        {
            m_eLangSel        = _eLanSel;
            m_sParaFolderPath = _sParaFolderPath;
            AioSel            = _eAioSel;

            Type  type1      = _eX.GetType();
            Array arrayTemp1 = Enum.GetValues(type1);

            m_iMaxIn = arrayTemp1.Length - 1;
            if (m_iMaxIn < 0)
            {
                m_iMaxIn = 0;
            }

            Type  type2      = _eY.GetType();
            Array arrayTemp2 = Enum.GetValues(type2);

            m_iMaxOut = arrayTemp2.Length - 1;
            if (m_iMaxOut < 0)
            {
                m_iMaxOut = 0;
            }

            m_aIn  = new TAIo[m_iMaxIn];
            m_aOut = new TAIo[m_iMaxOut];

            if (_eAioSel == EN_AIO_SEL.AXL)
            {
                Aio = new MotionAXL.CAio(_iRangeAMin, _iRangeAMax);
            }
            else if (_eAioSel == EN_AIO_SEL.None)
            {
                return(false);
            }
            else
            {
                Log.ShowMessage("Err", "_eAioSel is not defined");
                return(false);
            }

            Aio.Init();

            //int iCnt = 0 ;
            //foreach ( Object obj in arrayTemp1 )  {
            //m_aIn[iCnt].Para.sEnum = obj.ToString();
            for (int i = 0; i < m_iMaxIn; i++)
            {
                m_aIn[i].Para.sEnum = arrayTemp1.GetValue(i).ToString();
            }
            for (int i = 0; i < m_iMaxOut; i++)
            {
                m_aOut[i].Para.sEnum = arrayTemp2.GetValue(i).ToString();
            }

            LoadSave(true);
            //LoadSave(false);


            //for (int i = 0 ; i < m_iMaxIn ; i++)
            //{
            //    m_aIn[i].DelayOn  = new CDelayTimer();
            //    m_aIn[i].DelayOff = new CDelayTimer();
            //}

            //for (int i = 0 ; i < m_iMaxOut ; i++)
            //{
            //    m_aOut[i].DelayOn  = new CDelayTimer();
            //    m_aOut[i].DelayOff = new CDelayTimer();

            //    m_aOut[i].Stat.dAtrValA = GetY(i, true);
            //    m_aOut[i].Stat.bVtrVal = m_aOut[i].Stat.bAtrVal;
            //}

            Log.Trace("SMDLL", "Init Finished");

            return(true);
        }