From b0dc67521357683e2efe70a8897d3362de79a5b8 Mon Sep 17 00:00:00 2001 From: ZhaoGang <15196688790@163.com> Date: Mon, 7 Aug 2023 14:45:58 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E6=94=B9=E4=B8=BA=E5=87=BA=E9=A4=90?= =?UTF-8?q?=E4=BC=98=E5=85=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Control_MorkSUpgradedVer.cs | 43 +++++++++++++++++-- .../GVL_MorkSUpgradedVer.cs | 8 +++- 2 files changed, 46 insertions(+), 5 deletions(-) diff --git a/BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer.cs b/BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer.cs index 2f7c165c..c3a85226 100644 --- a/BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer.cs +++ b/BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer.cs @@ -387,6 +387,12 @@ namespace BPASmartClient.MorkSUpgradedVer mORKS.nsm.ElementAt(i).NoodleCookerStatus = mORKS.NoodleCookerStatus[i]; } + //if (Status?.status?["PLC.PLCMachine.IsConnected"] is bool connected) + //{ + // mORKS.IsConnected = connected; + //} + + } /// @@ -489,7 +495,9 @@ namespace BPASmartClient.MorkSUpgradedVer OrderChange(orderLocInfo.SuborderId, ORDER_STATUS.COOKING); //DeviceProcessLogShow($"订单【{mORKS.TakeBowlId}】执行取碗控制,位置:[{orderLocInfo.Loc}]"); - DeviceProcessLogShow($"订单【{orderLocInfo.SuborderId}】执行取碗控制,位置:[{orderLocInfo.Loc}]"); + //2023-8-5修改修改取碗打印日志。 + //DeviceProcessLogShow($"订单【{orderLocInfo.SuborderId}】执行取碗控制,位置:[{orderLocInfo.Loc}]"); + DeviceProcessLogShow($"执行取碗控制,位置:[{orderLocInfo.Loc}]"); mORKS.TakeBowlInterlock = true; } @@ -758,6 +766,21 @@ namespace BPASmartClient.MorkSUpgradedVer mORKS.RobotOutDinnigLock = false; } + //2023-8-7:检测上升沿修改为延时。 + //if (DelayRTrig.GetInstance("AllowFallNoodle").Start(mORKS.AllowInvertedFace, 500)) + //{ + // //mORKS.IngredientsCompleteId = mORKS.TakeBowlId; + // mORKS.IngredientsCompleteName = mORKS.TakeBowName; + // mORKS.IngredientsCompleteSortNum = mORKS.TakeBowSortNum; + // mORKS.TakeBowSortNum = 0; + // mORKS.TakeBowlId = string.Empty; + // mORKS.TakeBowName = string.Empty; + // //DeviceProcessLogShow($"碗到位,允许到面,{mORKS.IngredientsCompleteId}"); + // DeviceProcessLogShow($"碗到位,允许倒面。"); + // mORKS.TakeBowlInterlock = false; + // mORKS.RobotOutDinnigLock = false; + //} + //取餐完成逻辑处理 if (RTrig.GetInstance("CompleteChange1").Start(mORKS.DiningComplete) && mORKS.CookCompleteFlatBit == true) { @@ -784,7 +807,7 @@ namespace BPASmartClient.MorkSUpgradedVer mORKS.TakeNoodleInterlock = false; mORKS.AllowTakeNoodle = false; mORKS.TurntableInterlock = false; - DeviceProcessLogShow("机器人取面完成信号检测"); + DeviceProcessLogShow("检测到机器人取面完成信号"); } int OutMealRequstCount = mORKS.CookNoodleCom.Where(p => p == true).ToList().Count; @@ -797,9 +820,21 @@ namespace BPASmartClient.MorkSUpgradedVer mORKS.PriorityJudgment = Delay.GetInstance("取餐优先级判断").Start(mORKS.TurntableLocLists.Count > 0 && !mORKS.TurntableLowPosition, 4); //mORKS.RobotTaskInterlock = OutMealRequstCount > 0 && mORKS.AllowInvertedFace && (mlCount >= 2 || mORKS.RBTakeNoodleTask.Count == 0 || mORKS.PriorityJudgment); //mORKS.RobotTaskInterlock = isok && mORKS.AllowInvertedFace && (mlCount >= 2 || mORKS.RBTakeNoodleTask.Count == 0 || mORKS.PriorityJudgment); - mORKS.RobotTaskInterlock = mORKS.AllowInvertedFace && (mlCount >= 6 || mORKS.RBTakeNoodleTask.Count == 0 || mORKS.PriorityJudgment); + + //2023-8-5注释修改,并联出餐请求,出餐优先。 + //mORKS.RobotTaskInterlock = mORKS.AllowInvertedFace && (mlCount >= 6 || mORKS.RBTakeNoodleTask.Count == 0 || mORKS.PriorityJudgment); + mORKS.RobotTaskInterlock = mORKS.AllowInvertedFace && (OutMealRequstCount>=1 /*|| mlCount >= 6*/ || mORKS.RBTakeNoodleTask.Count == 0 || mORKS.PriorityJudgment); + //2023-8-7 添加PLC连接状态指示。 + //if (RTrig.GetInstance("IsConnected").Start(mORKS.IsConnected)) + //{ + // DeviceProcessLogShow("设备已连接。"); + //} + //if (TTrig.GetInstance("IsConnected").Start(mORKS.IsConnected)) + //{ + // DeviceProcessLogShow("设备已断开连接。"); + //} } /// /// 语音提醒取餐 @@ -872,7 +907,7 @@ namespace BPASmartClient.MorkSUpgradedVer } /// - /// 设置取面位置 + /// 设置出餐位置 /// /// private void SetTakeNoodleLoc(ushort loc) diff --git a/BPASmartClient.MorkSUpgradedVer/GVL_MorkSUpgradedVer.cs b/BPASmartClient.MorkSUpgradedVer/GVL_MorkSUpgradedVer.cs index 638c1cda..628eeb59 100644 --- a/BPASmartClient.MorkSUpgradedVer/GVL_MorkSUpgradedVer.cs +++ b/BPASmartClient.MorkSUpgradedVer/GVL_MorkSUpgradedVer.cs @@ -18,6 +18,12 @@ namespace BPASmartClient.MorkSUpgradedVer [VariableMonitor("允许运行")] public bool AllowRun { get; set; } + /// + /// 设备连接状态 + /// + //[VariableMonitor("设备连接状态")] + //public bool IsConnected { get; set; } + /// /// 优先级判断 /// @@ -31,7 +37,7 @@ namespace BPASmartClient.MorkSUpgradedVer public bool RobotTaskInterlock { get; set; } /// - /// 取碗互锁信号 + /// 取碗互锁信号,False:可取碗,反之为True. /// [VariableMonitor("取碗互锁信号")] public bool TakeBowlInterlock { get; set; }