| | |
| | | _taskService.TaskCompleted(task.TaskNum); |
| | | |
| | | } |
| | | device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode); |
| | | for (int i = 0; i < 3; i++) |
| | | { |
| | | device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode); |
| | | Thread.Sleep(100); |
| | | } |
| | | } |
| | | |
| | | } |
| | | WriteDebug("RGVç¶æè¯»åæ¥å¿", $"èæºï¼:{device.GetValue<R_ConveyorLineDB, bool>(R_ConveyorLineDB.Online)}ï¼ç©ºé²ï¼{device.GetValue<R_ConveyorLineDB, bool>(R_ConveyorLineDB.Free)}ï¼æ è´§ï¼{!device.GetValue<R_ConveyorLineDB, bool>(R_ConveyorLineDB.Goods)}ï¼ä»»å¡å·ä¸º0ï¼{device.GetValue<R_ConveyorLineDB, int>(R_ConveyorLineDB.TaskNum) == 0}ï¼æ æ
é{!device.GetValue<R_ConveyorLineDB, bool>(R_ConveyorLineDB.Alarm)}"); |
| | | if (device.GetValue<R_ConveyorLineDB, bool>(R_ConveyorLineDB.Online) && device.GetValue<R_ConveyorLineDB, bool>(R_ConveyorLineDB.Free) && !device.GetValue<R_ConveyorLineDB, bool>(R_ConveyorLineDB.Goods) && device.GetValue<R_ConveyorLineDB, int>(R_ConveyorLineDB.TaskNum) == 0 && !device.GetValue<R_ConveyorLineDB, bool>(R_ConveyorLineDB.Alarm)) |
| | | { |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.TaskType >= TaskTypeEnum.Inbound.ObjToInt() && x.TaskState == TaskStatusEnum.RGV_NEW.ObjToInt()); |
| | | if (task != null) |
| | | { |
| | | //åå
¥RGVä»»å¡ |
| | | device.SetValue(W_ConveyorLineDB.TaskNo, task.TaskNum, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.StartPos, task.SourceAddress, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.TaskType, 2, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode); |
| | | _taskService.UpdateTask(task, TaskStatusEnum.RGV_Executing); |
| | | //åå
¥RGVå
¥åºä»»å¡ |
| | | for (int i = 0; i < 3; i++) |
| | | { |
| | | device.SetValue(W_ConveyorLineDB.TaskNo, task.TaskNum, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.StartPos, task.SourceAddress, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.TaskType, 2, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode); |
| | | _taskService.UpdateTask(task, TaskStatusEnum.RGV_Executing); |
| | | } |
| | | WriteDebug(device.DeviceName, $"å
¥åºRGVä»»å¡å·{task.TaskNum}å·²åå
¥"); |
| | | } |
| | | Dt_Task task1 = _taskRepository.QueryFirst(x => x.TaskType >= TaskTypeEnum.Outbound.ObjToInt()&& x.TaskType <= TaskTypeEnum.Inbound.ObjToInt() && x.TaskState == TaskStatusEnum.RGV_Execute.ObjToInt()); |
| | | if (task1 != null) |
| | | else |
| | | { |
| | | //åå
¥RGVä»»å¡ |
| | | device.SetValue(W_ConveyorLineDB.TaskNo, task1.TaskNum, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.StartPos, task1.SourceAddress, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.TaskType, 2, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.EndPos, task1.NextAddress, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode); |
| | | |
| | | _taskService.UpdateTask(task1, TaskStatusEnum.RGV_Executing); |
| | | WriteDebug(device.DeviceName, $"åºåºRGVä»»å¡å·{task1.TaskNum}å·²åå
¥"); |
| | | Dt_Task task1 = _taskRepository.QueryFirst(x => x.TaskType >= TaskTypeEnum.Outbound.ObjToInt() && x.TaskType <= TaskTypeEnum.Inbound.ObjToInt() && x.TaskState == TaskStatusEnum.RGV_Execute.ObjToInt()); |
| | | //åå
¥RGVåºåºä»»å¡ |
| | | if (task1 != null) |
| | | { |
| | | for (int i = 0; i < 3; i++) |
| | | { |
| | | device.SetValue(W_ConveyorLineDB.TaskNo, task1.TaskNum, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.StartPos, task1.SourceAddress, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.TaskType, 2, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.EndPos, task1.NextAddress, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode); |
| | | } |
| | | _taskService.UpdateTask(task1, TaskStatusEnum.RGV_Executing); |
| | | WriteDebug(device.DeviceName, $"åºåºRGVä»»å¡å·{task1.TaskNum}å·²åå
¥"); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | if (device.GetValue<R_ConveyorLineDB, bool>(R_ConveyorLineDB.ACK)) |