|
|
@@ -292,17 +292,17 @@ namespace BPA.SingleDevice.Business |
|
|
|
case MoveConveyerStep.Moveing: |
|
|
|
if (moveCompleteTrig) |
|
|
|
{ |
|
|
|
logService.LogRunInfo($"控制传送带移动结束。"); |
|
|
|
|
|
|
|
logService.LogRunInfo($"控制传送带移动结束,复位传送带移动指令,开始更新配方工位。"); |
|
|
|
Conveyer.InitalMoveParam(); |
|
|
|
global.MoveConveyerStep = MoveConveyerStep.MoveComplete; |
|
|
|
} |
|
|
|
break; |
|
|
|
|
|
|
|
case MoveConveyerStep.MoveComplete: |
|
|
|
Conveyer.InitalMoveParam(); |
|
|
|
UpdateRecipe(); |
|
|
|
global.MoveConveyerStep = MoveConveyerStep.WaitMove; |
|
|
|
//不会执行该步骤,会直接跳出循环。 |
|
|
|
if (UpdateRecipeCurrentSataion()) |
|
|
|
{ |
|
|
|
global.MoveConveyerStep = MoveConveyerStep.WaitMove; |
|
|
|
} |
|
|
|
break; |
|
|
|
} |
|
|
|
//} |
|
|
@@ -458,6 +458,28 @@ namespace BPA.SingleDevice.Business |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary>刷新配方的当前工站。</summary> |
|
|
|
private bool UpdateRecipeCurrentSataion() |
|
|
|
{ |
|
|
|
bool result = true; |
|
|
|
foreach (var item in CurrentRecipes) |
|
|
|
{ |
|
|
|
if (item.CurrentStation < 5 && item.IsMakeComplete[item.CurrentStation - 1]==true) |
|
|
|
{ |
|
|
|
if (Conveyer.HaveVessel[item.CurrentStation]) |
|
|
|
{ |
|
|
|
item.CurrentStation++; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
logService.LogRunInfo($"未检测到配方【{item.Name}】在工位【{item.CurrentStation + 1}】的容器到位信号,请检查。"); |
|
|
|
Task.Delay(3000).Wait(); |
|
|
|
result = false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>适用于多配方的配料。</summary> |
|
|
|
private void Batching() |
|
|
|