Esempio n. 1
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. 2
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. 3
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);
        }
Esempio n. 4
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);
        }
Esempio n. 5
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);

            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();
        }