Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="plc"></param>
        /// <param name="oper"></param>
        public F_ExcTask(F_PLCLine plc, EnumOper oper, string startSite, string endSite)
        {
            _plc = plc;

            _operType = oper;

            _startSite = startSite;

            _endSite = endSite;
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="plc"></param>
        /// <param name="oper"></param>
        public F_ExcTask(F_PLCLine plc, EnumOper oper, string startSite, string endSite)
        {
            _plc = plc;

            _operType = oper;

            _startSite = startSite;

            _endSite = endSite;

            _objID = this.GetHashCode();
        }
Exemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="plc"></param>
        /// <param name="oper"></param>
        public F_ExcTask(F_PLCLine plc, EnumOper oper, string startSite, string endSite)
        {
            _plc = plc;

            _operType = oper;

            _startSite = startSite;

            _endSite = endSite;

            _objID = this.GetHashCode();// int.Parse(DateTime.Now.ToString("yyyyMMddHHmmss", System.Globalization.DateTimeFormatInfo.InvariantInfo));
        }
Exemplo n.º 4
0
        /// <summary>
        /// 检查线边辊台PLC连接状态
        /// </summary>
        public void CheckPlcStatus()
        {
            while (true)
            {
                Thread.Sleep(5000);

                List <DeviceBackImf> devsList = WcfMainHelper.GetDevList();

                foreach (var dev in devsList)
                {
                    if (dev.DevType == "WK_PLC" && !dev.IsAlive)
                    {
                        F_PLCLine plc = new F_PLCLine(dev.DevId);

                        plc.SendOrdr(0, 0);
                    }
                }
            }
        }