Commit c69fef58 LN

增加托盘号打印

1 个父辈 05697aa1
...@@ -22,6 +22,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -22,6 +22,7 @@ namespace OnlineStore.DeviceLibrary
///移栽装置后面分为两条移动线 ///移栽装置后面分为两条移动线
/// </summary> /// </summary>
public LineMoveInfo SecondMoveInfo = null; public LineMoveInfo SecondMoveInfo = null;
private int trayCount = 0;
/// <summary> /// <summary>
/// 上一个盘号 /// 上一个盘号
/// </summary> /// </summary>
...@@ -193,6 +194,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -193,6 +194,7 @@ namespace OnlineStore.DeviceLibrary
} }
protected void ResetClearData() protected void ResetClearData()
{ {
trayCount = 0;
SetWarnMsg(""); SetWarnMsg("");
alarmType = LineAlarmType.None; alarmType = LineAlarmType.None;
preTrayNum = 0; preTrayNum = 0;
...@@ -265,9 +267,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -265,9 +267,11 @@ namespace OnlineStore.DeviceLibrary
internal bool UpdateTrayNum() internal bool UpdateTrayNum()
{ {
trayCount++;
//此处先对托盘号进行验证 //此处先对托盘号进行验证
preTrayNum = currTrayNum; preTrayNum = currTrayNum;
currTrayNum = RFIDManager.GetTrayNum(DeviceID, true); currTrayNum = RFIDManager.GetTrayNum(DeviceID, true);
LogInfo("编号" + trayCount + "***************上个托盘[" + preTrayNum + "]当前托盘[" + currTrayNum + "]");
return true; return true;
} }
......
...@@ -188,15 +188,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -188,15 +188,16 @@ namespace OnlineStore.DeviceLibrary
break; break;
case LineMoveStep.FR_02_BatchAxisHome: case LineMoveStep.FR_02_BatchAxisHome:
MoveInfo.NextMoveStep(LineMoveStep.FR_03_BatchAxisToP2); MoveInfo.NextMoveStep(LineMoveStep.FR_03_BatchAxisToP2);
LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ":提升伺服下降到P2点,升降伺服上升到待机点"); LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ":提升伺服下降到P2点,");
MoveInfo.TimeOutSeconds = 120; MoveInfo.TimeOutSeconds = 120;
BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP2, Config.BatchAxis_P2Speed); BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP2, Config.BatchAxis_P2Speed);
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
break; break;
case LineMoveStep.FR_03_BatchAxisToP2: case LineMoveStep.FR_03_BatchAxisToP2:
MoveInfo.NextMoveStep(LineMoveStep.FR_04_LocationCylinder_Down); MoveInfo.NextMoveStep(LineMoveStep.FR_04_LocationCylinder_Down);
LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ": 放开定位气缸"); LogInfo(MoveInfo.MoveType + ":" + MoveInfo.SLog + ": 放开定位气缸,升降伺服到P1");
TrayLCylinderAfter(MoveInfo); TrayLCylinderAfter(MoveInfo);
Thread.Sleep(50);
UpdownAxis.AbsMove(MoveInfo, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed);
break; break;
case LineMoveStep.FR_04_LocationCylinder_Down: case LineMoveStep.FR_04_LocationCylinder_Down:
......
...@@ -1019,7 +1019,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1019,7 +1019,7 @@ namespace OnlineStore.DeviceLibrary
} }
if (NeedSaveParam&&LineManager.Line.runStatus>=LineRunStatus.HomeMoving&& LineManager.Line.CanProcessLine()) if (NeedSaveParam&&LineManager.Line.runStatus>=LineRunStatus.HomeMoving&& LineManager.Line.CanProcessLine())
{ {
LogInfo(" 托盘【" + info.ToStr() + "】不需要出入库" ); LogInfo(" 【" + info.ToStr() + "】不需要出入库" );
} }
} }
catch (Exception ex) catch (Exception ex)
......
...@@ -271,11 +271,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -271,11 +271,15 @@ namespace OnlineStore.DeviceLibrary
public void SetWarnMsg(string msg="") public void SetWarnMsg(string msg="")
{ {
WarnMsg = msg;
if (String.IsNullOrEmpty(WarnMsg).Equals(false)) if (String.IsNullOrEmpty(WarnMsg).Equals(false))
{ {
LogUtil.error( WarnMsg); LogUtil.error(msg);
}
if (WarnMsg.Equals(msg))
{
LogUtil.error(msg,105);
} }
WarnMsg = msg;
} }
public static string GetRunStr(LineStatus ls, LineRunStatus runs) public static string GetRunStr(LineStatus ls, LineRunStatus runs)
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!