Пример #1
0
        /// <summary>
        /// 添加AGV到地图上
        /// </summary>
        /// <param name="agvname"></param>
        /// <param name="site"></param>
        /// <param name="rate"></param>
        public static void AddAgvToModule(string agvname, int site = 23, float rate = 0)
        {
            MPoint p = LineDateCenter.GetMPointOnLine(site, rate);

            if (p != null)
            {
                _agvModules.Add(new AgvModule(agvname, new Point(p.X, p.Y), site));
                AgvSiteMaster.AddAgvSiteRate(agvname, site, rate);
            }
        }
Пример #2
0
        private void ReReadConfBtn_Click(object sender, EventArgs e)
        {
            anminateTimer.Enabled = false;
            xml = new XmlAnalyze();
            xml.DoAnalyze();

            ModuleControl.AddLinesToModule(xml._lineDatas);
            AgvLineMaster.AddLine(xml.AgvLineList);

            LineDateCenter.AddLineData();
            anminateTimer.Enabled = true;
        }
Пример #3
0
        /// <summary>
        /// 更新AGV当前所在位置
        /// </summary>
        /// <param name="name"></param>
        /// <param name="siteid"></param>
        /// <param name="rate"></param>
        public static void UpdateAgvSite(string name, int siteid, float rate)
        {
            AgvModule agv = _agvModules.Find(c => { return(c._name.Equals(name)); });

            if (agv != null)
            {
                point = LineDateCenter.GetMPointOnLine(siteid, rate);
                if (point != null)
                {
                    agv.Update(new Point(point.X, point.Y));
                }
            }
        }
Пример #4
0
        private void AnminationForm_Load(object sender, EventArgs e)
        {
            anmination = new Anmination(imageList);

            xml = new XmlAnalyze();
            xml.DoAnalyze();

            ModuleControl.AddLinesToModule(xml._lineDatas);
            AgvLineMaster.AddLine(xml.AgvLineList);

            LineDateCenter.AddLineData();

            InitDispConfig();
        }
Пример #5
0
        private void AnminationForm_Load(object sender, EventArgs e)
        {
            anmination = new Anmination(imageList);

            xml = new XmlAnalyze();
            xml.DoAnalyze();

            ModuleControl.AddLinesToModule(xml._lineDatas);
            AgvLineMaster.AddLine(xml.AgvLineList);

            LineDateCenter.AddLineData();



            ModuleControl.AddAgvToModuleNew("AGV011", 12, 1);
            ModuleControl.AddAgvToModuleNew("AGV012", 12, 5, 22);
            ModuleControl.AddAgvToModuleNew("AGV013", 12, 2, 50);
            ModuleControl.AddAgvToModuleNew("AGV014", 12, 3, 70);
            ModuleControl.AddAgvToModuleNew("AGV02", 15, 1);
            ModuleControl.AddAgvToModuleNew("AGV03", 15, 8, 30);
            ModuleControl.AddAgvToModuleNew("AGV04", 15, 6, 40);
            ModuleControl.AddAgvToModuleNew("AGV05", 15, 71, 55);
        }