Example #1
0
        /// <summary>
        ///发送报文,堆垛机返回序列号错误,或Buffer已满
        /// </summary>
        /// <param name="state"></param>
        private void NCK(object state)
        {
            Dictionary <string, string> msg = (Dictionary <string, string>)state;

            //序列号出错,重新发送报文
            if (msg["FaultIndicator"] == "1")
            {
                if (msg["SequenceNo"] != "0001")
                {
                    //重置流水号为0;
                    SysStationDal dal = new SysStationDal();
                    dal.ResetSQueNo();
                    //重新发送SYN
                    SendSYN();
                    NCK001 = 0;
                }
                else
                {
                    if (NCK001 == 100)
                    {
                        //重新发送SYN
                        SendSYN();
                        NCK001 = 0;
                    }
                    else
                    {
                        CraneThreadStart();
                    }
                }
            }
        }
Example #2
0
        /// <summary>
        ///发送报文,堆垛机返回序列号错误,或Buffer已满
        /// </summary>
        /// <param name="state"></param>
        private void NCK(object state)
        {
            Dictionary <string, string> msg = (Dictionary <string, string>)state;

            if (msg["FaultIndicator"] == "1")  //序列号出错,重新发送报文
            {
                if (msg["SequenceNo"] != "0001")
                {
                    //重置流水号为0;
                    SysStationDal dal = new SysStationDal();
                    dal.ResetSQueNo();
                    //重新发送SYN
                    WriteToService("Crane", "DUM", "<00000CRAN30THOK01SYN0000000>");
                    NCK001 = 0;
                }
                else
                {
                    if (NCK001 == 100)
                    {
                        WriteToService("Crane", "DUM", "<00000CRAN30THOK01SYN0000000>");
                        NCK001 = 0;
                    }
                    else
                    {
                        CraneThreadStart();
                    }
                }
            }
        }