Commit 8fcfd6e8 LN

代码优化

1 个父辈 629b4700
此文件类型无法预览
20200817
20200825
入料模块获取库位号时不等待料串上升到位。
当是首盘料时,如果到达出料口4且空闲中,抓料到皮带线。
20200817
紧急出料从入料NG口出
分盘料从入料4出
......
......@@ -947,6 +947,12 @@ namespace OnlineStore.DeviceLibrary
InLog("料盘移栽" + MoveInfo.SLog + ":上料机构下降, 托盘号【" + currTrayNum + "】,更新托盘信息 :" + LastPosParam.ToShortStr());
TrayManager.UpdateTrayInfo(currTrayNum, true, ReelType.InStore, LastPosParam, LastPosParam.NgMsg);
SServerManager.SendPosToStoreCheck(Name, LastPosParam);
if (IOValue(IO_Type.SL_AxisLocationCheck).Equals(IO_VALUE.LOW) && MoveInfo.ShelfNoTray.Equals(false))
{
InLog("获取库位" + MoveInfo.SLog + ": 上料轴开始慢速上升到P3点,不等待结果");
BatchAxisToP3(false,false);
}
}
else if (MoveInfo.IsTimeOut(180))
{
......@@ -994,6 +1000,14 @@ namespace OnlineStore.DeviceLibrary
{
if (getPosTask == null || getPosTask.IsCompleted)
{
if (axisCheckTimer != null && axisCheckTimer.Enabled)
{
InLog("料盘移栽" + MoveInfo.SLog + ":批量轴还未停止运动,停止批量轴运动 ");
}
BatchAxisStopCheck();
//如果批量轴还在运动中,停止运动
ACServerManager.SuddenStop(BatchAxis.Config);
InLog("料盘移栽" + MoveInfo.SLog + ":上料横移机构上升已到位 ");
CheckHasTray();
}
......@@ -1135,11 +1149,11 @@ namespace OnlineStore.DeviceLibrary
});
if (IOValue(IO_Type.SL_AxisLocationCheck).Equals(IO_VALUE.LOW) && MoveInfo.ShelfNoTray.Equals(false))
{
InLog("获取库位" + MoveInfo.SLog + ": 上料轴开始慢速上升到P3点" );
BatchAxisToP3(false);
}
//if (IOValue(IO_Type.SL_AxisLocationCheck).Equals(IO_VALUE.LOW) && MoveInfo.ShelfNoTray.Equals(false))
//{
// InLog("获取库位" + MoveInfo.SLog + ": 上料轴开始慢速上升到P3点" );
// BatchAxisToP3(false);
//}
}
private void FI_29_CylinderUp()
......@@ -1356,7 +1370,7 @@ namespace OnlineStore.DeviceLibrary
}
}
private void BatchAxisToP3(bool isFirstMove = true)
private void BatchAxisToP3(bool isFirstMove = true, bool isWait = true)
{
int targetP3 = Config.BatchAxisP3;
int targetSpeed = Config.BatchAxis_P3Speed;
......@@ -1374,11 +1388,14 @@ namespace OnlineStore.DeviceLibrary
}
//targetSpeed = Config.BatchAxis_P3Speed / 2;
}
MoveInfo.TimeOutSeconds = 200;
MoveInfo.CanWhileCount = 0;
// 需要增加定时器,获取验证信号并停止伺服
StartMovePosition = BatchAxis.GetAclPosition();
MoveInfo.WaitList.Add(WaitResultInfo.WaitBatchAxis(Config.Batch_Axis, targetP3, targetSpeed));
if (isWait)
{
MoveInfo.TimeOutSeconds = 200;
MoveInfo.CanWhileCount = 0;
MoveInfo.WaitList.Add(WaitResultInfo.WaitBatchAxis(Config.Batch_Axis, targetP3, targetSpeed));
}
Config.Batch_Axis.TargetPosition = targetP3;
BatchAxis.AbsMove(null, targetP3, targetSpeed);
//开始检测信号
......
......@@ -226,6 +226,11 @@ namespace OnlineStore.DeviceLibrary
outMsg = "优先线且空闲";
return inoup;
}
else if (lineNum.Equals(4) && kongxian)
{
outMsg = "出料4空闲";
return inoup;
}
else if (LineManager.Line.ProvidingCanUse(firstLine).Equals(false) && kongxian && LineNotBusy())
{
outMsg = "优先线不可用";
......
......@@ -188,6 +188,7 @@ namespace OnlineStore.DeviceLibrary
if (ho_Image != null)
{
ho_Image.Dispose();
ho_Image = null;
}
}
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!