/// <summary> /// 根据任务ID,进行装货操作 /// </summary> /// <param name="taskid"></param> /// <param name="carid"></param> /// <param name="result"></param> /// <returns></returns> public bool DoLoad(int taskid, int carid, out string result) { if (taskid == 0 || carid == 0) { result = "任务ID,车ID不能为零"; return(false); } NDCItem item = Items.Find(c => { return(c._mTask.TASKID == taskid && c.CARRIERID == carid); }); if (item == null) { result = "找不到任务ID:" + taskid + ",小车:" + carid + "的任务."; return(false); } if (item.PLCStatus == NDCPlcStatus.Loading) { LoadItemList.Remove(item._mTask.NDCINDEX); //通知WCS NoticeWcsOnLoad?.Invoke(item._mTask.TASKID, item.CARRIERID + ""); result = "小车已经启动辊台了"; return(true); } if (item.PLCStatus != NDCPlcStatus.LoadReady) { result = "小车未准备好接货"; return(false); } if (!LoadItemList.Contains(item._mTask.NDCINDEX)) { LoadItemList.Add(item._mTask.NDCINDEX); result = ""; return(true); } result = taskid + "的装货已经请求过了"; return(false); }
internal override void _NoticeWcsLoading(int taskid, string agvid) { NoticeWcsOnLoad?.Invoke(taskid, agvid); }