Esempio n. 1
0
        /// <summary>
        /// 执行函数
        /// </summary>
        public void DoWork()
        {
            if (!AppConfig.IsSendTarEnable())
            {
                return;
            }

            List <IDev> devs = IDevManager.IGetDevs();

            if (devs == null)
            {
                return;
            }

            foreach (var item in devs)
            {
                if (item.IsAlive && item.CurTar == "0" && item.IsRunning && item.RunTime >= AppConfig.RunTime())
                {
                    if (!_ignoreSiteList.Contains(item.SiteMark))
                    {
                        item.ISendTar(AppConfig.SendTarNum());
                    }
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void timer1_Tick()
        {
            string IP = "";

            while (true)
            {
                Thread.Sleep(1000);

                try
                {
                    IP = AppConfig.GetIPAdress();

                    JtWcfMainHelper.InitPara(IP, "", "");

                    JtWcfTaskHelper.InitPara(IP, "", "");

                    _mainConnected = JtWcfMainHelper.IsConnected;

                    _taskConnected = JtWcfTaskHelper.IsConnected;

                    IDevManager.ISetDevBacks(JtWcfMainHelper.GetDevList());

                    DoWork();
                }
                catch { }
            }
        }
Esempio n. 3
0
        /// <summary>
        ///
        /// </summary>
        public void DoWork()
        {
            ///清除无效绑定
            ClearOutDate();

            _devList = IDevManager.IGetDevs();

            ///设置绑定设备
            foreach (var item in _devList)
            {
                ///绑定的临近地标
                CheckInDate(item);
            }

            FunThread_Tick();

            ///当AGV处于待命地标且不等于绑定点的地标时,AGV自启动
            foreach (var item in WaitDic.Values)
            {
                if (item.BandingDev != null)
                {
                    if (IsDevOnWaitSite(item.BandingDev))
                    {
                        if (item.BandingDev.SiteMark != item.SiteMark)
                        {
                            if (item == _WP1)
                            {
                                item.BandingDev.ISendTar(AppConfig.GetWPTarNum());
                            }

                            item.BandingDev.ISendRun("处于待命地标但不等于目的地");
                        }
                    }
                }
            }
        }