| | |
| | | using HslCommunication; |
| | | using System; |
| | | using System.Threading; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common; |
| | | using WIDESEA_Common.LoctionEnum; |
| | | using WIDESEA_Common.Tools; |
| | |
| | | |
| | | if (Interlocked.Exchange(ref _readTSJDOWNSignalsoFTSJ, 1) == 0) |
| | | { |
| | | |
| | | Task.Run(() => |
| | | { |
| | | try |
| | | { |
| | | VOLContext Context = new VOLContext(); |
| | |
| | | if (a==1) |
| | | { |
| | | agvRepository.Add(agvtask, true); |
| | | WriteDBLog.Info($"负极提升机下料任务生成").Write($"生成任务:{agvtask.agv_tasknum},终点货位【{ware_Locations.upper_code}】状态:托盘光电检测:{ware_Locations.tpgd},状态:{ware_Locations.location_state},更新时间:{ware_Locations.wireless_time}", $"负极提升机下料任务生成"); |
| | | WriteDBLog.Info($"负极提升机下料任务生成").Write($"----------------任务生成成功 {DateTime.Now} -------------- {Environment.NewLine}", $"负极提升机下料任务生成"); |
| | | //WriteDBLog.Info($"负极提升机下料任务生成").Write($"生成任务:{agvtask.agv_tasknum},终点货位【{ware_Locations.upper_code}】状态:托盘光电检测:{ware_Locations.tpgd},状态:{ware_Locations.location_state},更新时间:{ware_Locations.wireless_time}", $"负极提升机下料任务生成"); |
| | | //WriteDBLog.Info($"负极提升机下料任务生成").Write($"----------------任务生成成功 {DateTime.Now} -------------- {Environment.NewLine}", $"负极提升机下料任务生成"); |
| | | } |
| | | //WriteLog.GetLog("设备呼叫").Write($"设备 {plc.PLCDescroption} 呼叫成功,任务{agvtask.agv_tasknum}生成", "设备呼叫"); |
| | | } |
| | |
| | | |
| | | |
| | | } |
| | | catch (Exception) |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | throw; |
| | | WriteLog.GetLog().Write($"负极提升机下料:{DateTime.Now} --------------{ex}", $"负极提升机下料调度"); |
| | | } |
| | | finally |
| | | { |
| | | |
| | | Interlocked.Exchange(ref _readTSJDOWNSignalsoFTSJ, 0); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | } |
| | | |