优化反复弹最后一盘料的问题

master
lhiven 1 year ago
parent 6ff5229e2d
commit 79b80e986c

@ -1738,52 +1738,26 @@ namespace Rs.MotionPlat.Flow
} }
else else
{ {
//if(!endInputClicked) if (Ops.IsOn("2号料仓缺盘光电检测"))
{ {
//这里检测到料盘种已经没有产品了,需要切盘 logInfo = GetClassName() + $"{curTask.FromType.ToString()}盘无料,准备切换料盘";
bool skip = false; MessageQueue.Instance.Insert(logInfo);
while (!skip) TakeTrayFlow.Instance.Take(ETrayType.Input, ETrayType.Empty1,
{ () =>
if (Ops.IsOn("2号料仓缺盘光电检测"))
{ {
logInfo = GetClassName() + $"{curTask.FromType.ToString()}盘无料,准备切换料盘"; Task.Run(() =>
MessageQueue.Instance.Insert(logInfo); {
TakeTrayFlow.Instance.Take(ETrayType.Input, ETrayType.Empty1, StockManager.Instance.GetStock(ETrayType.Input).Load(EStockTrayLoadMode.Whole, null);
() => });
{ }, null,
Task.Run(() => () =>
{
StockManager.Instance.GetStock(ETrayType.Input).Load(EStockTrayLoadMode.Whole, null);
});
}, null,
() =>
{
Task.Run(() =>
{
StockManager.Instance.GetStock(ETrayType.Empty1).Unload(EStockTrayUnLoadMode.Whole, null);
});
});
StockManager.Instance.GetStock(ETrayType.Input).WaitFinished();
skip = true;
//logInfo = "Input料仓最后一盘料请确认是否继续上料?";
//msgBox = MsgBox.ShowDialog(111, logInfo, (ETipButton.Yes | ETipButton.No), new Dictionary<ETipButton, string>() { { ETipButton.Yes, "是|Yes" }, { ETipButton.No, "结束上料|EndInput" } });
//if (msgBox.Button == ETipButton.Yes)
//{
// //flowStep = EDischargeFlowStep.到取料位上方;
//}
//else
//{
// //结束上料
// endInputClicked = true;
// TestCenter.Instance.EndInput();
// skip = true;
//}
}
else
{ {
Task.Run(() =>
} {
} StockManager.Instance.GetStock(ETrayType.Empty1).Unload(EStockTrayUnLoadMode.Whole, null);
});
});
StockManager.Instance.GetStock(ETrayType.Input).WaitFinished();
} }
flowStep = EDischargeFlowStep.; flowStep = EDischargeFlowStep.;
} }

@ -261,7 +261,7 @@ namespace Rs.MotionPlat
Process proc = Process.GetCurrentProcess(); Process proc = Process.GetCurrentProcess();
if (proc != null) if (proc != null)
{ {
long userdMem = proc.PrivateMemorySize64; long userdMem = proc.WorkingSet64;
lblMemory.Text = $"Mem:{(userdMem/1024)/1024} MB"; lblMemory.Text = $"Mem:{(userdMem/1024)/1024} MB";
} }
} }

Loading…
Cancel
Save