Browse Source

煮面机程序优化

样式分支
pry 2 years ago
parent
commit
02e0954abb
2 changed files with 16 additions and 9 deletions
  1. +16
    -8
      BPASmartClient.MorkS/Control_Morks.cs
  2. +0
    -1
      FryPot_DosingSystem/FryPot_DosingSystem.csproj

+ 16
- 8
BPASmartClient.MorkS/Control_Morks.cs View File

@@ -115,10 +115,10 @@ namespace BPASmartClient.MorkS
WriteRecipeBoms(); WriteRecipeBoms();
} }
}); });
} }
private void OrderChange(string subid, ORDER_STATUS oRDER_STATUS) private void OrderChange(string subid, ORDER_STATUS oRDER_STATUS)
{ {
var res = mORKS.doOrderEvents.FirstOrDefault(p => p.MorkOrder.SuborderId == subid); var res = mORKS.doOrderEvents.FirstOrDefault(p => p.MorkOrder.SuborderId == subid);
@@ -362,7 +362,7 @@ namespace BPASmartClient.MorkS
{ {
if (ushort.TryParse(item.BatchingLoc, out ushort loc)) if (ushort.TryParse(item.BatchingLoc, out ushort loc))
{ {
DeviceProcessLogShow($"位置:={loc},检测开关1:{alarm.Supply1_LossBowl},检测开关1:{alarm.Supply2_LossBowl}");
//DeviceProcessLogShow($"位置:={loc},检测开关1:{alarm.Supply1_LossBowl},检测开关1:{alarm.Supply2_LossBowl}");
if (loc == 10 && !alarm.Supply1_LossBowl) if (loc == 10 && !alarm.Supply1_LossBowl)
{ {
BowLoc = loc; BowLoc = loc;
@@ -375,10 +375,14 @@ namespace BPASmartClient.MorkS
} }
} }
} }
if (mORKS.TakeBowlTask.TryDequeue(out OrderLocInfo orderLocInfo))

if (BowLoc >= 10 && BowLoc <= 11)
{ {
orderLocInfo.Loc = BowLoc;
BowlControl(orderLocInfo);
if (mORKS.TakeBowlTask.TryDequeue(out OrderLocInfo orderLocInfo))
{
orderLocInfo.Loc = BowLoc;
BowlControl(orderLocInfo);
}
} }
} }
} }
@@ -597,9 +601,13 @@ namespace BPASmartClient.MorkS


int OutMealRequstCount = mORKS.CookNoodlesComplete.Where(p => p == true).ToList().Count; int OutMealRequstCount = mORKS.CookNoodlesComplete.Where(p => p == true).ToList().Count;
int mlCount = mORKS.NoodleCookerStatus.Where(p => p == true).ToList().Count; int mlCount = mORKS.NoodleCookerStatus.Where(p => p == true).ToList().Count;
int index = Array.FindIndex(mORKS.CookNodelId, p => p == mORKS.IngredientsCompleteId);

bool isok = index >= 0 && index < mORKS.CookNoodlesComplete.Length && mORKS.CookNoodlesComplete[index];


mORKS.PriorityJudgment = Delay.GetInstance("取餐优先级判断").Start(mORKS.TurntableLocLists.Count > 0 && !mORKS.TurntableLowerLimit, 4); mORKS.PriorityJudgment = Delay.GetInstance("取餐优先级判断").Start(mORKS.TurntableLocLists.Count > 0 && !mORKS.TurntableLowerLimit, 4);
mORKS.RobotTaskInterlock = OutMealRequstCount > 0 && mORKS.AllowFallNoodle && (mlCount >= 2 || mORKS.RBTakeNoodleTask.Count == 0 || mORKS.PriorityJudgment);
//mORKS.RobotTaskInterlock = OutMealRequstCount > 0 && mORKS.AllowFallNoodle && (mlCount >= 2 || mORKS.RBTakeNoodleTask.Count == 0 || mORKS.PriorityJudgment);
mORKS.RobotTaskInterlock = isok && mORKS.AllowFallNoodle && (mlCount >= 2 || mORKS.RBTakeNoodleTask.Count == 0 || mORKS.PriorityJudgment);




} }


+ 0
- 1
FryPot_DosingSystem/FryPot_DosingSystem.csproj View File

@@ -16,7 +16,6 @@
</ItemGroup> </ItemGroup>


<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="6.0.6" />
<PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" /> <PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" />
<PackageReference Include="NModbus" Version="3.0.72" /> <PackageReference Include="NModbus" Version="3.0.72" />
</ItemGroup> </ItemGroup>


Loading…
Cancel
Save