Exemple #1
0
        /// <summary>
        /// 显示出错烟仓打出量
        /// 用于数码管非出错烟仓填0
        /// </summary>
        /// <param name="o"></param>
        /// <returns></returns>
        public Dictionary <int, int> GetTaskOutNum(object o)
        {
            Dictionary <int, int> senDictionary = new Dictionary <int, int>();

            for (int i = 1; i <= 84; i++)
            {
                senDictionary.Add(i, 0);
            }

            PutTaskNum puttasknum = new PutTaskNum();
            PlcValue   readValue  = new PlcValue();

            readValue = plc.GetPlcValue(puttasknum[Convert.ToInt32(o)]);
            //如果是双仓
            if (AppUtil.Put2LineBox.Contains(o.ToString()))
            {
                //数量要显示到单仓上
                senDictionary[Convert.ToInt32(o) - 1] = Convert.ToInt32(readValue.Value);
            }
            else
            {
                senDictionary[Convert.ToInt32(o)] = Convert.ToInt32(readValue.Value);
            }

            return(senDictionary);
        }
Exemple #2
0
        /// <summary>
        /// 只获取当前仓道的打出量
        /// </summary>
        /// <param name="lineboxcode"></param>
        /// <returns></returns>
        public int GetTaskOutNum(int lineboxcode)
        {
            PutTaskNum puttasknum = new PutTaskNum();
            PlcValue   readValue  = new PlcValue();

            readValue = plc.GetPlcValue(puttasknum[lineboxcode]);
            return(Convert.ToInt32(readValue.Value));
        }