Commit 96f28d98 LN

空出时环形线不出库。日志修改。

1 个父辈 d92a4a4a
...@@ -215,11 +215,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -215,11 +215,11 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
LogUtil.error("BoxAutoPoint ToolTimer_Elapsed 出错:未找到" + MoveInfo.MoveStep + "的处理"); LogUtil.error(LogName + "BoxAutoPoint ToolTimer_Elapsed 出错:未找到" + MoveInfo.MoveStep + "的处理");
} }
}catch(Exception ex) }catch(Exception ex)
{ {
LogUtil.error("BoxAutoPoint ToolTimer_Elapsed 出错:" + ex.ToString()); LogUtil.error(LogName + "BoxAutoPoint ToolTimer_Elapsed 出错:" + ex.ToString());
} }
isInProcesss = false; isInProcesss = false;
} }
......
...@@ -107,14 +107,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -107,14 +107,14 @@ namespace OnlineStore.DeviceLibrary
if (AutoStartIndex >= 0 && AutoStartIndex < PositionNumList.Count) if (AutoStartIndex >= 0 && AutoStartIndex < PositionNumList.Count)
{ {
newIndex = AutoStartIndex; newIndex = AutoStartIndex;
LogUtil.info( Name + "下一个索引不存在,重新开始自动盘点,索引【" + AutoStartIndex + "】"); LogInfo( "下一个索引不存在,重新开始自动盘点,索引【" + AutoStartIndex + "】");
} }
else else
{ {
autoNext = false; autoNext = false;
readDITimer.Enabled = false; readDITimer.Enabled = false;
autoMsg = "自动盘点结束!"; autoMsg = "自动盘点结束!";
LogUtil.info( Name + "下一个索引不存在,自动盘点结束!"); LogInfo( "下一个索引不存在,自动盘点结束!");
//回待机位 //回待机位
MoveToP1(); MoveToP1();
} }
...@@ -124,7 +124,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -124,7 +124,7 @@ namespace OnlineStore.DeviceLibrary
autoPositionIndex = newIndex; autoPositionIndex = newIndex;
string posid = PositionNumList[autoPositionIndex]; string posid = PositionNumList[autoPositionIndex];
InOutPosInfo inoutinfo = new InOutPosInfo(autoInoutCode, posid); InOutPosInfo inoutinfo = new InOutPosInfo(autoInoutCode, posid);
LogUtil.info( Name + "自动进入下一个仓位:posid=" + posid); LogInfo( "自动进入下一个仓位:posid=" + posid);
autoMsg = "自动盘点:" + posid; autoMsg = "自动盘点:" + posid;
StartInventoryMove(new InOutParam(inoutinfo)); StartInventoryMove(new InOutParam(inoutinfo));
...@@ -153,7 +153,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -153,7 +153,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error( Name + " 启动盘点库位【" + posId + "】出错,找不到库位信息"); LogUtil.error( Name + " 启动盘点库位【" + posId + "】出错,找不到库位信息");
return; return;
} }
LogUtil.info( Name + " 启动盘点库位【" + posId + "】"); LogInfo( " 启动盘点库位【" + posId + "】");
storeRunStatus = StoreRunStatus.Busy; storeRunStatus = StoreRunStatus.Busy;
storeStatus = StoreStatus.CheckPosMove; storeStatus = StoreStatus.CheckPosMove;
MoveInfo.NewMove(StoreMoveType.CheckPosition, param); MoveInfo.NewMove(StoreMoveType.CheckPosition, param);
...@@ -175,7 +175,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -175,7 +175,7 @@ namespace OnlineStore.DeviceLibrary
private void CheckPositionLog(string msg) private void CheckPositionLog(string msg)
{ {
string posId = MoveInfo.MoveParam != null ? "【" + MoveInfo.MoveParam.PosInfo.PosId + "】" : " "; string posId = MoveInfo.MoveParam != null ? "【" + MoveInfo.MoveParam.PosInfo.PosId + "】" : " ";
LogUtil.info( posId + MoveInfo.MoveStep + " " + msg); LogInfo( posId + MoveInfo.MoveStep + " " + msg);
} }
} }
} }
...@@ -117,7 +117,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -117,7 +117,7 @@ namespace OnlineStore.DeviceLibrary
int errorCount = Math.Abs(outCount - InOut_P1); int errorCount = Math.Abs(outCount - InOut_P1);
if (errorCount <= Config.InOut_Axis.CanErrorCountMin) if (errorCount <= Config.InOut_Axis.CanErrorCountMin)
{ {
LogUtil.info("进出轴当前位置:" + outCount + ",已经在P1["+ InOut_P1 + "],不需要再回P1"); LogUtil.error(Name+ "进出轴当前位置:" + outCount + ",已经在P1["+ InOut_P1 + "],不需要再回P1");
} }
else else
{ {
...@@ -303,7 +303,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -303,7 +303,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(Name + " 启动入库【" + posId + "】出错,叉子料盘检测有料"); LogUtil.error(Name + " 启动入库【" + posId + "】出错,叉子料盘检测有料");
return; return;
} }
LogUtil.info(Name + " 启动入库【" + posId + "】"); LogInfo( " 启动入库【" + posId + "】");
storeRunStatus = StoreRunStatus.Busy; storeRunStatus = StoreRunStatus.Busy;
storeStatus = StoreStatus.InStoreExecute; storeStatus = StoreStatus.InStoreExecute;
MoveInfo.NewMove(StoreMoveType.InStore, param); MoveInfo.NewMove(StoreMoveType.InStore, param);
...@@ -538,7 +538,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -538,7 +538,7 @@ namespace OnlineStore.DeviceLibrary
{ {
TimeSpan span = DateTime.Now - startInStoreTime; TimeSpan span = DateTime.Now - startInStoreTime;
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosInfo.PosId : ""; string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosInfo.PosId : "";
LogUtil.info(Name + " 【" + posId + "】 整个入库流程结束,耗时【" + FormUtil.GetSpanStr(span) + "】!"); LogInfo( " 【" + posId + "】 整个入库流程结束,耗时【" + FormUtil.GetSpanStr(span) + "】!");
MoveInfo.EndMove(); MoveInfo.EndMove();
storeRunStatus = StoreRunStatus.Runing; storeRunStatus = StoreRunStatus.Runing;
//设备连接,入库后,BOX恢复原始状态 //设备连接,入库后,BOX恢复原始状态
...@@ -547,7 +547,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -547,7 +547,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
LogUtil.info(Name + " 入库,moveStatus=" + MoveInfo.MoveStep + ",没有对应的处理!"); LogInfo( " 入库,moveStatus=" + MoveInfo.MoveStep + ",没有对应的处理!");
} }
} }
...@@ -577,7 +577,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -577,7 +577,7 @@ namespace OnlineStore.DeviceLibrary
return false; return false;
} }
storeStatus = StoreStatus.OutStoreExecute; storeStatus = StoreStatus.OutStoreExecute;
LogUtil.info( Name + "启动出库【" + posId + "】 " ); LogInfo( "启动出库【" + posId + "】 " );
storeRunStatus = StoreRunStatus.Busy; storeRunStatus = StoreRunStatus.Busy;
MoveInfo.NewMove(StoreMoveType.OutStore, param); MoveInfo.NewMove(StoreMoveType.OutStore, param);
...@@ -797,16 +797,27 @@ namespace OnlineStore.DeviceLibrary ...@@ -797,16 +797,27 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.SO_27_CheckTray)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.SO_27_CheckTray))
{ {
bool isCancel = false;
if (IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW))
{ {
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosInfo.PosId : ""; string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosInfo.PosId : "";
string barcode = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosInfo.barcode : ""; string barcode = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosInfo.barcode : "";
CodeMsg = "" + posId + "_" + barcode + "_空出"; CodeMsg = "" + posId + "_" + barcode + "_空出";
LogUtil.error(CodeMsg + ",取消出库任务"); LogUtil.error(CodeMsg + ",取消出库任务");
StoreManager.cancelOutTask(barcode); StoreManager.cancelOutTask(barcode);
isCancel = true;
} }
SO_28_GoBack(); else
{
//发送消息给流水线
SendOutStoreEnd(MoveInfo);
}
MoveInfo.NextMoveStep(StoreMoveStep.SO_28_GoBack);
OutStoreLog("出库:轴2至P1(待机点)[" + MoveInfo.MoveParam.MoveP.UpDown_P1 + "] ,关闭舱门");
ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.MoveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
CloseDoor();
} }
else if (MoveInfo.MoveStep == StoreMoveStep.SO_28_GoBack) else if (MoveInfo.MoveStep == StoreMoveStep.SO_28_GoBack)
{ {
...@@ -829,7 +840,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -829,7 +840,7 @@ namespace OnlineStore.DeviceLibrary
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosInfo.PosId : ""; string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosInfo.PosId : "";
storeStatus = StoreStatus.StoreOnline; storeStatus = StoreStatus.StoreOnline;
LogUtil.info(Name + " 【" + posId + "】 整个出库流程结束,耗时【" + FormUtil.GetSpanStr(span) + "】!"); LogInfo( " 【" + posId + "】 整个出库流程结束,耗时【" + FormUtil.GetSpanStr(span) + "】!");
MoveInfo.EndMove(); MoveInfo.EndMove();
storeRunStatus = StoreRunStatus.Runing; storeRunStatus = StoreRunStatus.Runing;
InOutEndProcess(StoreMoveType.OutStore); InOutEndProcess(StoreMoveType.OutStore);
...@@ -853,19 +864,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -853,19 +864,11 @@ namespace OnlineStore.DeviceLibrary
{ {
if (OutCheckAlarm()) if (OutCheckAlarm())
{ {
LogUtil.info(Name + "执行用户操作:忽略检测信号,继续出库"); LogInfo( "执行用户操作:忽略检测信号,继续出库");
MoveInfo.EndStepWait(); MoveInfo.EndStepWait();
} }
} }
private void SO_28_GoBack()
{
MoveInfo.NextMoveStep(StoreMoveStep.SO_28_GoBack);
OutStoreLog("出库:轴2至P1(待机点)["+ MoveInfo.MoveParam.MoveP.UpDown_P1 + "] ,关闭舱门");
ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.MoveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
CloseDoor();
//发送消息给流水线
SendOutStoreEnd(MoveInfo);
}
private void SO_21_ToDoorP() private void SO_21_ToDoorP()
{ {
LineMoveP moveP = MoveInfo.MoveParam.MoveP; LineMoveP moveP = MoveInfo.MoveParam.MoveP;
...@@ -958,13 +961,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -958,13 +961,13 @@ namespace OnlineStore.DeviceLibrary
if (AutoStartIndex >= 0 && AutoStartIndex < PositionNumList.Count) if (AutoStartIndex >= 0 && AutoStartIndex < PositionNumList.Count)
{ {
newIndex = AutoStartIndex; newIndex = AutoStartIndex;
LogUtil.info(Name + "下一个索引不存在,重新开始自动出入库,索引【" + AutoStartIndex + "】"); LogInfo( "下一个索引不存在,重新开始自动出入库,索引【" + AutoStartIndex + "】");
} }
else else
{ {
autoNext = false; autoNext = false;
autoMsg = "自动出入库结束!"; autoMsg = "自动出入库结束!";
LogUtil.info(Name + "下一个索引不存在,自动 出入库结束!"); LogInfo( "下一个索引不存在,自动 出入库结束!");
return; return;
} }
} }
...@@ -974,21 +977,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -974,21 +977,21 @@ namespace OnlineStore.DeviceLibrary
//判断是否需要重置 //判断是否需要重置
if (CurrInOutACount >= Config.Box_ResetACount) if (CurrInOutACount >= Config.Box_ResetACount)
{ {
LogUtil.info(Name + "自动进入下一个出库:posid=" + posid + ",当时已经出入库" + CurrInOutACount + "次,需要重置BOX,先把出库信息存入排队列表中"); LogInfo( "自动进入下一个出库:posid=" + posid + ",当时已经出入库" + CurrInOutACount + "次,需要重置BOX,先把出库信息存入排队列表中");
Reset(false); Reset(false);
autoMsg = "自动出库:" + posid; autoMsg = "自动出库:" + posid;
AddWaitOutInfo(inoutinfo); AddWaitOutInfo(inoutinfo);
} }
//else if (CurrInOutCount >= Config.Box_ResetMCount) //else if (CurrInOutCount >= Config.Box_ResetMCount)
//{ //{
// LogUtil.info(Name + "自动进入下一个出库:posid=" + posid + ",当时已经出入库" + CurrInOutCount + "次,需要重置BOX旋转轴,先把出库信息存入排队列表中"); // LogInfo( "自动进入下一个出库:posid=" + posid + ",当时已经出入库" + CurrInOutCount + "次,需要重置BOX旋转轴,先把出库信息存入排队列表中");
// //ResetMiddleAxis(false); // //ResetMiddleAxis(false);
// autoMsg = "自动出库:" + posid; // autoMsg = "自动出库:" + posid;
// AddWaitOutInfo(inoutinfo); // AddWaitOutInfo(inoutinfo);
//} //}
else else
{ {
LogUtil.info(Name + "自动进入下一个出库:posid=" + posid); LogInfo( "自动进入下一个出库:posid=" + posid);
autoMsg = "自动出库:" + posid; autoMsg = "自动出库:" + posid;
StartOutStoreMove(new InOutParam(inoutinfo)); StartOutStoreMove(new InOutParam(inoutinfo));
} }
...@@ -1001,13 +1004,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -1001,13 +1004,13 @@ namespace OnlineStore.DeviceLibrary
if (AutoStartIndex >= 0 && AutoStartIndex < PositionNumList.Count) if (AutoStartIndex >= 0 && AutoStartIndex < PositionNumList.Count)
{ {
newIndex = AutoStartIndex; newIndex = AutoStartIndex;
LogUtil.info(Name + "下一个索引不存在,重新开始自动出入库,索引【" + AutoStartIndex + "】"); LogInfo( "下一个索引不存在,重新开始自动出入库,索引【" + AutoStartIndex + "】");
} }
else else
{ {
autoNext = false; autoNext = false;
autoMsg = "自动出入库结束!"; autoMsg = "自动出入库结束!";
LogUtil.info(Name + "下一个索引不存在,自动 出入库结束!"); LogInfo( "下一个索引不存在,自动 出入库结束!");
return; return;
} }
} }
...@@ -1015,7 +1018,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1015,7 +1018,7 @@ namespace OnlineStore.DeviceLibrary
string posid = PositionNumList[newIndex]; string posid = PositionNumList[newIndex];
InOutPosInfo inoutinfo = new InOutPosInfo(autoInoutCode, posid); InOutPosInfo inoutinfo = new InOutPosInfo(autoInoutCode, posid);
LogUtil.info(Name + "自动进入下一个入库:posid=" + posid); LogInfo( "自动进入下一个入库:posid=" + posid);
autoMsg = "自动入库:" + posid; autoMsg = "自动入库:" + posid;
StartInStoreMove(new InOutParam(inoutinfo)); StartInStoreMove(new InOutParam(inoutinfo));
} }
...@@ -1029,12 +1032,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -1029,12 +1032,12 @@ namespace OnlineStore.DeviceLibrary
private void InStoreLog(string msg) private void InStoreLog(string msg)
{ {
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosInfo.PosId : ""; string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosInfo.PosId : "";
LogUtil.info( "【" + posId + "】" + msg ); LogUtil.info( Name+ "【" + posId + "】" + msg );
} }
private void OutStoreLog(string msg) private void OutStoreLog(string msg)
{ {
string posId = MoveInfo.MoveParam != null ? "【" + MoveInfo.MoveParam.PosInfo.PosId + "】" : " "; string posId = MoveInfo.MoveParam != null ? "【" + MoveInfo.MoveParam.PosInfo.PosId + "】" : " ";
LogUtil.info( posId + MoveInfo.MoveStep + " " + msg ); LogUtil.info( Name+ posId + MoveInfo.MoveStep + " " + msg );
} }
} }
} }
...@@ -214,7 +214,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -214,7 +214,7 @@ namespace OnlineStore.DeviceLibrary
protected void ACAxisHomeMove(ConfigMoveAxis moveAxis) protected void ACAxisHomeMove(ConfigMoveAxis moveAxis)
{ {
moveAxis.TargetPosition = 0; moveAxis.TargetPosition = 0;
LogUtil.info(moveAxis.DisplayStr + "speed[" + moveAxis.HomeHighSpeed + "]开始原点返回"); LogUtil.debug (moveAxis.DisplayStr + "speed[" + moveAxis.HomeHighSpeed + "]开始原点返回");
MoveInfo.WaitList.Add(WaitResultInfo.WaitAxis(moveAxis, true)); MoveInfo.WaitList.Add(WaitResultInfo.WaitAxis(moveAxis, true));
AxisManager.instance.HomeMove(moveAxis.DeviceName, (short)moveAxis.GetAxisValue(), moveAxis.HomeHighSpeed, moveAxis.HomeLowSpeed, moveAxis.HomeAddSpeed); AxisManager.instance.HomeMove(moveAxis.DeviceName, (short)moveAxis.GetAxisValue(), moveAxis.HomeHighSpeed, moveAxis.HomeLowSpeed, moveAxis.HomeAddSpeed);
} }
...@@ -243,7 +243,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -243,7 +243,7 @@ namespace OnlineStore.DeviceLibrary
//判断是否需要重新运动 //判断是否需要重新运动
if (MoveInfo.CanWhileCount > 0) if (MoveInfo.CanWhileCount > 0)
{ {
LogUtil.error(moveAxis.DisplayStr + "目标位置[" + targetPosition + "]当前位置[" + outCount + LogUtil.error(Name + moveAxis.DisplayStr + "目标位置[" + targetPosition + "]当前位置[" + outCount +
"],误差过大,重新开始运动,剩余[" + MoveInfo.CanWhileCount + "]次"); "],误差过大,重新开始运动,剩余[" + MoveInfo.CanWhileCount + "]次");
AxisManager.instance.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed,moveAxis.AddSpeed,moveAxis.DelSpeed); AxisManager.instance.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed,moveAxis.AddSpeed,moveAxis.DelSpeed);
MoveInfo.CanWhileCount--; MoveInfo.CanWhileCount--;
...@@ -272,7 +272,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -272,7 +272,7 @@ namespace OnlineStore.DeviceLibrary
//判断是否需要重新运动 //判断是否需要重新运动
if (MoveInfo.CanWhileCount > 0) if (MoveInfo.CanWhileCount > 0)
{ {
LogUtil.error( moveAxis.DisplayStr + "收到原点完成信号,当前位置[" + outCount + "],重新回原点,剩余[" + MoveInfo.CanWhileCount + "]次"); LogUtil.error(Name+ moveAxis.DisplayStr + "收到原点完成信号,当前位置[" + outCount + "],重新回原点,剩余[" + MoveInfo.CanWhileCount + "]次");
//LogUtil.error( StoreName + moveAxis.DisplayStr + "重新回原点"); //LogUtil.error( StoreName + moveAxis.DisplayStr + "重新回原点");
AxisManager.instance.HomeMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), moveAxis.HomeHighSpeed, moveAxis.HomeLowSpeed, moveAxis.HomeAddSpeed); AxisManager.instance.HomeMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), moveAxis.HomeHighSpeed, moveAxis.HomeLowSpeed, moveAxis.HomeAddSpeed);
MoveInfo.CanWhileCount--; MoveInfo.CanWhileCount--;
......
 // 机器状态 顶灯显示  空出时不发送给环形线出库。
日志修改,增加box名称。
// 机器状态 顶灯显示
// 绿 黄 红 // 绿 黄 红
//机器复位中 闪 灭 灭 //机器复位中 闪 灭 灭
//机器待机中 亮 灭 灭 //机器待机中 亮 灭 灭
......
...@@ -274,7 +274,7 @@ namespace HuichuanLibrary ...@@ -274,7 +274,7 @@ namespace HuichuanLibrary
} }
else else
{ {
ShowLog(" Axis[" + axisNo + "] SetSingleAxMvPara ptpVel [" + ptpVel + "] ptpAcc [" + ptpAcc + "] ptpDec [" + ptpDec + "] OK"); DebugLog(" Axis[" + axisNo + "] SetSingleAxMvPara ptpVel [" + ptpVel + "] ptpAcc [" + ptpAcc + "] ptpDec [" + ptpDec + "] OK");
return true; return true;
} }
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!