Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 3
0
        public bool Init(string _sParaFolderPath, CDioMan _Dio)
        {
            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);
        }
Esempio n. 4
0
        //public bool Init(EN_LAN_SEL _eLanSel,ref CDioMan _Dio)
        public bool Init(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);
        }
Esempio n. 5
0
        public static void Init(TPara _tPara)
        {
            ERR = new CErrMan();
            ERR.Init(_tPara.eLanSel,
                     _tPara.sParaFolderPath,
                     _tPara.Err.eErr,
                     _tPara.Err.bUseErrPic);

            DIO = new CDioMan();
            DIO.Init(_tPara.eLanSel,
                     _tPara.sParaFolderPath,
                     _tPara.Dio.eDioSel,
                     _tPara.Dio.eX,
                     _tPara.Dio.eY);

            AIO = new CAioMan();
            AIO.Init(_tPara.eLanSel,
                     _tPara.sParaFolderPath,
                     _tPara.Aio.eAioSel,
                     _tPara.Aio.eX,
                     _tPara.Aio.eY,
                     _tPara.Aio.iRangeAMin,
                     _tPara.Aio.iRangeAMax);

            CYL = new CCylinderMan();
            CYL.Init(_tPara.eLanSel,
                     _tPara.sParaFolderPath,
                     _tPara.Cyl.eCyl,
                     DIO);

            MTR = new CMotrMan();
            MTR.Init(_tPara.eLanSel,
                     _tPara.sParaFolderPath,
                     _tPara.Mtr.eMtrSel,
                     _tPara.Mtr.eMtr,
                     DIO);

            TWL = new CTowerLampMan();
            TWL.Init(_tPara.eLanSel,
                     _tPara.sParaFolderPath,
                     DIO);

            FrmLogOn   = new FormLogOn();
            FrmDllMain = new FormDllMain(_tPara.iWidth, _tPara.iHeight, _tPara.eLanSel, _tPara.bTabHides);

            Log.StartLogMan();
        }
Esempio n. 6
0
        public static void Init(TPara _tPara)
        {
            ER = new CErrMan();
            ER.Init(_tPara.eLanSel,
                    _tPara.sParaFolderPath,
                    _tPara.iCntErr,
                    _tPara.bUseErrPic);

            IO = new CDioMan();
            IO.Init(_tPara.eLanSel,
                    _tPara.sParaFolderPath,
                    _tPara.iCntDIn,
                    _tPara.iCntDOut,
                    _tPara.eDio);

            AIO = new CAioMan();
            AIO.Init(_tPara.eLanSel,
                     _tPara.sParaFolderPath,
                     _tPara.iCntAIn,
                     _tPara.iCntAOut,
                     _tPara.iRangeAMin,
                     _tPara.iRangeAMax,
                     _tPara.eAio);

            CL = new CCylinderMan();
            CL.Init(_tPara.eLanSel,
                    _tPara.sParaFolderPath,
                    _tPara.iCntCylinder,
                    IO);

            MT = new CMotrMan();
            MT.Init(_tPara.eLanSel,
                    _tPara.sParaFolderPath,
                    _tPara.iCntMotr,
                    _tPara.eMotors,
                    IO);

            TL = new CTowerLampMan();
            TL.Init(_tPara.sParaFolderPath,
                    IO);

            FrmLogOn   = new FormLogOn();
            FrmDllMain = new FormDllMain(_tPara.iWidth, _tPara.iHeight, _tPara.bTabHides);

            Log.StartLogMan();
        }
Esempio n. 7
0
        //bool          m_bUse    ;
        public bool Init(EN_LAN_SEL _eLanSel, string _sParaFolderPath, CDioMan _Dio, bool _bUse = true)
        {
            m_eLangSel        = _eLanSel;
            m_sParaFolderPath = _sParaFolderPath;
            DIO = _Dio;
            //m_bUse = _bUse;
            Para.LampInfo = new TLampInfo[(int)EN_SEQ_STAT.MAX_SEQ_STAT];

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

            LoadSave(true);
            if (!_bUse)
            {
                Para.bUse = _bUse;
            }

            return(true);
        }
Esempio n. 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);
        }