Example #1
0
        /// <summary>
        /// 获取小车是否到位标识
        /// 对于100型其实是判断分户盒是否被扫到(100型可以认为是2个虚拟小车容器)
        /// 对于200型是小车到位
        /// </summary>
        /// <returns></returns>
        public bool GetCubeReady()
        {
            SortingTaskArrive sortingTaskArrive = SortingTaskArrive.GetSortingTaskArrive("0");

            //后期要改成判断PLC队尾的订单序号
            //如果PLC序号大于我队尾的序号表示小车已经移动到位


            if (sortingTaskArrive.Value == "1")
            {
                sortingTaskArrive.Value = "0";
                sortingTaskArrive.Save();
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #2
0
        /// <summary>
        /// 保存混仓卷烟在皮带上的数量
        /// </summary>
        private static void SaveDynamicBoxPutNum()
        {
            try
            {
                OperateOpcAndSoft     operateOpcAndSoft = new OperateOpcAndSoft();
                Dictionary <int, int> putoutnums        = operateOpcAndSoft.GetDynamicBoxPutNum();

                SortingTaskArrive sortingtaskarrive = SortingTaskArrive.GetSortingTaskArrive("0");

                if (Convert.ToInt32(sortingtaskarrive.Value) != putoutnums[73])
                {
                    sortingtaskarrive.ADDRESSCODE = "73";
                    sortingtaskarrive.Value       = putoutnums[73].ToString();
                    sortingtaskarrive.Save();
                }
            }
            catch
            {
            }
        }
Example #3
0
        private void btnissued_Click(object sender, EventArgs e)
        {
            //CSortingTask_OnTaskMoved(null, null);
            //SortingLineTaskQueue.GetInstance().Move();

            ////当前AB区的任务已完成
            //SortingTaskIssued sortingTaskIssued = SortingTaskIssued.GetSortingTaskIssued("0");
            //sortingTaskIssued.PLCFLAG = 0;
            //sortingTaskIssued.Save();

            //SoundPlayer player = new SoundPlayer();
            //player.SoundLocation = Application.StartupPath + "\\Sound\\订单完成.wav";
            //player.Load();
            //player.Play();


            //修改到达信息,分户完成
            SortingTaskArrive sortingTaskArrive = SortingTaskArrive.GetSortingTaskArrive("0");

            sortingTaskArrive.Value = "1";
            sortingTaskArrive.Save();
        }