Просмотр исходного кода

1. 改为出餐优先

煮面机(新)
ZhaoGang 1 год назад
Родитель
Сommit
b0dc675213
2 измененных файлов: 46 добавлений и 5 удалений
  1. +39
    -4
      BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer.cs
  2. +7
    -1
      BPASmartClient.MorkSUpgradedVer/GVL_MorkSUpgradedVer.cs

+ 39
- 4
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;
//}

}

/// <summary>
@@ -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("设备已断开连接。");
//}
}
/// <summary>
/// 语音提醒取餐
@@ -872,7 +907,7 @@ namespace BPASmartClient.MorkSUpgradedVer
}

/// <summary>
/// 设置取面位置
/// 设置出餐位置
/// </summary>
/// <param name="loc"></param>
private void SetTakeNoodleLoc(ushort loc)


+ 7
- 1
BPASmartClient.MorkSUpgradedVer/GVL_MorkSUpgradedVer.cs Просмотреть файл

@@ -18,6 +18,12 @@ namespace BPASmartClient.MorkSUpgradedVer
[VariableMonitor("允许运行")]
public bool AllowRun { get; set; }

/// <summary>
/// 设备连接状态
/// </summary>
//[VariableMonitor("设备连接状态")]
//public bool IsConnected { get; set; }

/// <summary>
/// 优先级判断
/// </summary>
@@ -31,7 +37,7 @@ namespace BPASmartClient.MorkSUpgradedVer
public bool RobotTaskInterlock { get; set; }

/// <summary>
/// 取碗互锁信号
/// 取碗互锁信号,False:可取碗,反之为True.
/// </summary>
[VariableMonitor("取碗互锁信号")]
public bool TakeBowlInterlock { get; set; }


Загрузка…
Отмена
Сохранить