Exemple #1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            LoadNewModulesToMenuItem(context.GeneralInformation.AddNewModules);

            controlform = new ControlCardLogForm();
            showlog     = new ShowLog(controlform.PrintLog);

            string[] ActionFileName = context.GeneralInformation.ActionFileName.Split('|');
            LoadFormAction = RefelectionHelper.CreatRefelectObj <IAction>(ActionFileName[0], ActionFileName[1]);

            LoadFormAction.PrinterLog = showlog.OutputLog;

            LoadFormAction.InitialHardWare();

            Task.Run(() => { LoadFormAction.FixtureReset(ControlCardInfomation.AxisCard); });
        }
Exemple #2
0
        public bool InitialHardWare()
        {
            context = Context.GetInstance();

            string[] AxisFilePath = context.ControlCard.ModuleInformation.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);

            ControlcardObj = RefelectionHelper.CreatRefelectObj <IAxisCard>(AxisFilePath[0], AxisFilePath[1]);

            ControlcardObj.ShowLog = PrinterLog;

            if (!ControlcardObj.InitialAxisCard())
            {
                PrinterLog("初始化轴卡失败!!", WriteLogType.Error);
                return(false);
            }

            PrinterLog("轴卡初始化成功!!", WriteLogType.Action);

            return(true);
        }