优化empty料仓上下料盘逻辑

1、初始化和上料盘完成时,先夹住再松开
2、当取料盘时,先夹住,抓住料盘之后再松开
3、放料盘完成后,夹一下然后分开
master
lhiven 11 months ago
parent ed93576c44
commit 726bba1296

@ -84,6 +84,7 @@ namespace Rs.MotionPlat.Flow.NormalFlow
if (HasTray()) if (HasTray())
{ {
HoldTray(); HoldTray();
LooseTray();
Status = EStockStatus.Ready; Status = EStockStatus.Ready;
MessageQueue.Instance.Insert("ready"); MessageQueue.Instance.Insert("ready");
return; return;

@ -98,7 +98,8 @@ namespace Rs.MotionPlat.Flow.NormalFlow
switch (outStockStep) switch (outStockStep)
{ {
case EOutStockFlowStep.: case EOutStockFlowStep.:
StockModule.ClampTrayCylinder(EIoOperate.Open, StockIndex,GetClassName()); //StockModule.ClampTrayCylinder(EIoOperate.Open, StockIndex,GetClassName());
StockManager.OpenTray(StockIndex);
stopwatch.Restart(); stopwatch.Restart();
outStockStep = EOutStockFlowStep.; outStockStep = EOutStockFlowStep.;
break; break;
@ -198,7 +199,8 @@ namespace Rs.MotionPlat.Flow.NormalFlow
switch (inStockStep) switch (inStockStep)
{ {
case EInStockFlowStep.: case EInStockFlowStep.:
StockModule.ClampTrayCylinder(EIoOperate.Open, StockIndex, GetClassName()); //StockModule.ClampTrayCylinder(EIoOperate.Open, StockIndex, GetClassName());
StockManager.OpenTray(StockIndex);
stopwatch.Restart(); stopwatch.Restart();
inStockStep = EInStockFlowStep.; inStockStep = EInStockFlowStep.;
break; break;

@ -26,7 +26,7 @@ namespace Rs.MotionPlat.Flow
, ,
, ,
, ,
, //等待夹磁气缸松开,
, ,
, ,
, ,
@ -171,6 +171,10 @@ namespace Rs.MotionPlat.Flow
case ETakeTrayFlowStep.: case ETakeTrayFlowStep.:
if (Ops.IsStop("TakeTrayX") || GlobalVar.VirtualAxis) if (Ops.IsStop("TakeTrayX") || GlobalVar.VirtualAxis)
{ {
if(fromTray== ETrayType.Empty)
{
StockManager.CloseTray(fromStockIndex);
}
AxisPosPrint.PrintTakeTrayXCurrentPos($"已运动到料仓{m_fromTray}取料盘位上方", GetClassName()); AxisPosPrint.PrintTakeTrayXCurrentPos($"已运动到料仓{m_fromTray}取料盘位上方", GetClassName());
step = ETakeTrayFlowStep.; step = ETakeTrayFlowStep.;
} }
@ -199,9 +203,10 @@ namespace Rs.MotionPlat.Flow
//打开真空 //打开真空
TakeTrayModule.VacOperation(EIoOperate.Open,GetClassName()); TakeTrayModule.VacOperation(EIoOperate.Open,GetClassName());
//松开夹爪 //松开夹爪
StockModule.ClampTrayCylinder(EIoOperate.Open, fromStockIndex,GetClassName()); //StockModule.ClampTrayCylinder(EIoOperate.Open, fromStockIndex,GetClassName());
StockManager.OpenTray(fromStockIndex);
stopwatch.Restart(); stopwatch.Restart();
step = ETakeTrayFlowStep.; step = ETakeTrayFlowStep.;
} }
else if (stopwatch.ElapsedMilliseconds > 5000) else if (stopwatch.ElapsedMilliseconds > 5000)
{ {
@ -219,26 +224,26 @@ namespace Rs.MotionPlat.Flow
} }
break; break;
case ETakeTrayFlowStep.: //case ETakeTrayFlowStep.等待夹磁气缸松开:
if(Ops.IsOn($"料仓夹磁气缸{fromStockIndex}原位")) // if(Ops.IsOn($"料仓夹磁气缸{fromStockIndex}原位"))
{ // {
step = ETakeTrayFlowStep.; // step = ETakeTrayFlowStep.取料盘完成抬起;
} // }
else if(stopwatch.ElapsedMilliseconds>5000) // else if(stopwatch.ElapsedMilliseconds>5000)
{ // {
alarmEntity = AlarmCollection.Get($"料仓{fromStockIndex}夹磁气缸原位异常"); // alarmEntity = AlarmCollection.Get($"料仓{fromStockIndex}夹磁气缸原位异常");
if (alarmEntity != null) // if (alarmEntity != null)
{ // {
Msgbox.ShowDialog(alarmEntity, EButtonType.Retry); // Msgbox.ShowDialog(alarmEntity, EButtonType.Retry);
step = ETakeTrayFlowStep.; // step = ETakeTrayFlowStep.等待夹磁气缸松开;
} // }
else // else
{ // {
Msg.ShowError($"料仓{fromStockIndex}夹磁气缸原位异常"); // Msg.ShowError($"料仓{fromStockIndex}夹磁气缸原位异常");
} // }
stopwatch.Restart(); // stopwatch.Restart();
} // }
break; // break;
case ETakeTrayFlowStep.: case ETakeTrayFlowStep.:
TakeTrayModule.CylinderGoUp(GetClassName()); TakeTrayModule.CylinderGoUp(GetClassName());
stopwatch.Restart(); stopwatch.Restart();
@ -525,6 +530,11 @@ namespace Rs.MotionPlat.Flow
logInfo = GetClassName() + $"放料盘完成"; logInfo = GetClassName() + $"放料盘完成";
MessageQueue.Instance.Insert(logInfo); MessageQueue.Instance.Insert(logInfo);
step = ETakeTrayFlowStep.; step = ETakeTrayFlowStep.;
if(toTray== ETrayType.Empty)
{
StockManager.CloseTray(toStockIndex);
StockManager.OpenTray(toStockIndex);
}
//if (mLoadUnloadType == ELoadUnloadType.Load) //if (mLoadUnloadType == ELoadUnloadType.Load)
//{ //{
// StockManager.Instance.Load(m_toTray, EStockTrayLoadMode.AfterTakeTray); // StockManager.Instance.Load(m_toTray, EStockTrayLoadMode.AfterTakeTray);

Loading…
Cancel
Save