Commit 30029a9c LN

1

1 个父辈 87bd6e54
......@@ -80,7 +80,7 @@ namespace OnlineStore.Common
if (lastErrorLogTime.ContainsKey(type))
{
TimeSpan span = DateTime.Now - lastErrorLogTime[type];
if (span.TotalSeconds > 3)
if (span.TotalSeconds > 5)
{
lastErrorLogTime.Remove(type);
lastErrorLogTime.Add(type, DateTime.Now);
......
......@@ -119,7 +119,7 @@ namespace OnlineStore.Common
}
catch (Exception ex)
{
LogUtil.error( "Connect to " + serverIP + ":" + serverPort + " fail!" + ex.ToString(), 3);
LogUtil.error( "Connect to " + serverIP + ":" + serverPort + " fail!" + ex.ToString(), 1003);
//m_clientSocket = null;
}
}
......@@ -233,7 +233,7 @@ namespace OnlineStore.Common
}
catch (Exception ex)
{
LogUtil.error( "socket received error:" + ex.ToString(), 4);
LogUtil.error( "socket received error:" + ex.ToString(), 1004);
}
}
}
......
......@@ -10,7 +10,7 @@ PRO,0,上料流水线出口AGV小车站号名称,AgvOutName,D8,,,,,
AXIS,0,提升上料轴,Batch_Axis,7,COM5,0,,,
PRO,0,提升上料轴上升待机点 P1,BatchAxisP1,23400000,,,,,
PRO,0,提升上料轴下降位置P2,BatchAxisP2,0,,,,,
PRO,0,提升上料缓慢上升目标位置P3,BatchAxisP3,20930000,,,,,
PRO,0,提升上料缓慢上升目标位置P3,BatchAxisP3,20450000,,,,,
PRO,0,提升上料轴目标速度,BatchAxis_TargetSpeed,1500,,,,,
PRO,0,提升上料轴加速度,BatchAxis_AddSpeed,400,,,,,
PRO,0,提升上料轴减速度,BatchAxis_DelSpeed,400,,,,,
......@@ -24,8 +24,8 @@ PRO,0,提升上料轴高度转换系数(1mm对应的脉冲),Height_ChangeValue,38000,,,,,
,,,,,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,8,COM5,0,,,
PRO,0,移栽上下轴待机点 P1,UpDownAxisP1,2000,,,,,
PRO,0,移栽上下轴P2移栽机构下降位置,UpDownP2List,0=90000,,,,,
PRO,0,移栽上下轴P3放料位置,UpDownAxisP3,200000,,,,,
PRO,0,移栽上下轴P2移栽机构下降位置,UpDownP2List,0=158000,,,,,
PRO,0,移栽上下轴P3放料位置,UpDownAxisP3,310000,,,,,
PRO,0,移栽上下轴目标速度,UpdownAxis_TargetSpeed,150,,,,,
PRO,0,移栽上下轴加速度,UpdownAxis_AddSpeed,400,,,,,
PRO,0,移栽上下轴减速度,UpdownAxis_DelSpeed,400,,,,,
......
......@@ -465,7 +465,7 @@ namespace OnlineStore.DeviceLibrary
{
WarnMsg = moveInfo.Name + "[" + moveInfo.MoveType + "][" + moveInfo.MoveStep + "]等待[" + NotOkMsg
+ "]超时[" + Math.Round(span.TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg, DeviceID + 18);
LogUtil.error(WarnMsg, DeviceID + 15);
Alarm(LineAlarmType.IoSingleTimeOut);
}
......
......@@ -291,7 +291,10 @@ namespace OnlineStore.DeviceLibrary
}
return;
}
if (isInSuddenDown || isNoAirCheck)
{
return;
}
if (IOValue(IO_Type.SL_Reset_BTN).Equals(IO_VALUE.HIGH))
{
if (alarmType.Equals(LineAlarmType.None))
......@@ -314,9 +317,8 @@ namespace OnlineStore.DeviceLibrary
}
BusyMoveProcess();
//判断流水线打开了才可以运行
if (MoveInfo.MoveType.Equals(LineMoveType.None))
{
if (MoveInfo.MoveType.Equals(LineMoveType.None)&&alarmType.Equals(LineAlarmType.None))
{
if ( Config.IsCanOut.Equals(0))
{
StartInStoreP();
......@@ -326,7 +328,7 @@ namespace OnlineStore.DeviceLibrary
StartOutStoreP();
}
}
if ( SecondMoveInfo.MoveType.Equals(LineMoveType.None))
if (SecondMoveInfo.MoveType.Equals(LineMoveType.None) && alarmType.Equals(LineAlarmType.None))
{
StartCheckFixture();
}
......
......@@ -68,7 +68,7 @@ namespace OnlineStore.DeviceLibrary
TrayManager.UpdateSWState(Config.SidesWayNum, 1);
}
}
else if (IOValue(IO_Type.SW_StopCheck).Equals(IO_VALUE.HIGH) && (isTestNeed || isNeedTray))
else if (Config.SidesWayNum .Equals(2)&& IOValue(IO_Type.SW_StopCheck).Equals(IO_VALUE.HIGH) && (isTestNeed || isNeedTray))
{
//判断是否是需要的托盘
if (NeedCurrTray())
......@@ -334,7 +334,7 @@ namespace OnlineStore.DeviceLibrary
if (span.TotalSeconds > 180)
{
WarnMsg = SecondMoveInfo.Name + "[" + SecondMoveInfo.MoveType + "][" + SecondMoveInfo.MoveStep + "]等待横移机构空闲超时[" + Math.Round(span.TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg, DeviceID + 19);
LogUtil.error(WarnMsg, DeviceID + 11);
Alarm(LineAlarmType.IoSingleTimeOut);
}
}
......@@ -651,7 +651,7 @@ namespace OnlineStore.DeviceLibrary
if (span.TotalSeconds > 180)
{
WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveType + "][" + MoveInfo.MoveStep + "]等待空托盘到达超时[" + Math.Round(span.TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg, DeviceID + 19);
LogUtil.error(WarnMsg, DeviceID + 12);
Alarm(LineAlarmType.IoSingleTimeOut);
}
}
......@@ -897,8 +897,8 @@ namespace OnlineStore.DeviceLibrary
if (Config.IsCanOut.Equals(1))
{
//此托盘是紧急出料盘,需要通过料架出库
bool debugNeed = IsDebug && runStatus >= LineRunStatus.HomeMoving;
bool isJinji = info.EmergencyOut && info.IsFull && runStatus >= LineRunStatus.HomeMoving;
bool debugNeed = IsDebug && runStatus >= LineRunStatus.Runing;
bool isJinji = info.EmergencyOut && info.IsFull && runStatus >= LineRunStatus.Runing;
if (debugNeed || isJinji )
{
......@@ -909,11 +909,11 @@ namespace OnlineStore.DeviceLibrary
//判断是否有料架,是否可以出库
if (IOValue(IO_Type.SL_Location_Check).Equals(IO_VALUE.LOW))
{
LogInfo("托盘【" + info.ToStr() + "】需要出库,但是无料架暂不处理");
LogUtil.error(Name+" 【" + info.ToStr() + "】需要出库,但是无料架暂不处理",DeviceID+16);
}
else if (OutStoreHeight < 0)
{
LogInfo("托盘【" + info.ToStr() + "】需要出库,但是料架没准备好暂不处理");
LogUtil.error(Name + " 【" + info.ToStr() + "】需要出库,但是料架没准备好暂不处理", DeviceID + 17);
}
else
{
......
......@@ -204,7 +204,7 @@ namespace OnlineStore.DeviceLibrary
{
WarnMsg = Name + " 等待" + NotOkMsg + "超时";
Alarm(LineAlarmType.IoSingleTimeOut);
LogUtil.error(checkWaitInfo.Name + ":" + checkWaitInfo.MoveStep + "等待" + NotOkMsg + "超时", 14);
LogUtil.error(checkWaitInfo.Name + ":" + checkWaitInfo.MoveStep + "等待" + NotOkMsg + "超时", 101);
}
isOk = false;
break;
......@@ -252,7 +252,7 @@ namespace OnlineStore.DeviceLibrary
{
checkWaitInfo.EndStepWait();
}
else if (span.TotalSeconds > checkWaitInfo.TimeOutSeconds)
else if (span.TotalSeconds > checkWaitInfo.TimeOutSeconds&&alarmType.Equals(LineAlarmType.None))
{
WarnMsg = checkWaitInfo.Name + "[" + checkWaitInfo.MoveStep + "][" + NotOkMsg + "]已等待[" + Math.Round(span.TotalSeconds, 1) + "]秒";
LogUtil.error(WarnMsg, 100);
......
......@@ -234,8 +234,10 @@ namespace OnlineStore.DeviceLibrary
internal static bool CanMoveSidesWay(int swNum)
{
int status = 0;
if (SidesWayStateMap.ContainsKey(swNum))
{
status = SidesWayStateMap[swNum];
if (SidesWayStateMap[swNum].Equals(1))
{
return true;
......@@ -257,7 +259,7 @@ namespace OnlineStore.DeviceLibrary
{
return true;
}
if (swNum.Equals(2) && equip.alarmType.Equals(LineAlarmType.None).Equals(false))
if (status.Equals(0)&& swNum.Equals(2) && (equip.isInSuddenDown||equip.isNoAirCheck))
{
//上料3如果报警,可以直接处理移栽
return true;
......
......@@ -150,7 +150,7 @@ namespace OnlineStore.DeviceLibrary
{
msg = " storeMoveStep=" + MoveInfo.MoveStep + axis.DisplayStr + "目标位置[" + targetPosition + "]当前位置[" + outCount
+ "],误差过大,需要报警";
LogUtil.error(msg,34);
LogUtil.error(msg,1034);
}
}
return false;
......
......@@ -39,7 +39,7 @@ namespace OnlineStore.DeviceLibrary
{
conTimer = new System.Timers.Timer();
conTimer.AutoReset = true;
conTimer.Interval = 60000;
conTimer.Interval = 10000;
conTimer.Elapsed += ConTimer_Elapsed;
}
conTimer.Enabled = false;
......
......@@ -37,11 +37,14 @@ namespace OnlineStore.DeviceLibrary
{
type = "入库";
}
else
else if(InOrOutStore.Equals(2))
{
type = "出库";
}
return "托盘【" + TrayCode + "】" + (IsFull ? "有料," : "空,") + type + "," + WareCode + "," + PosId + "," + PlateH + "," + PlateW + "," + InStoreNG + "," + NgMsg;
string err =InStoreNG? "入库失败:"+NgMsg:"";
string jinji = EmergencyOut ? "紧急出料" : "";
return "托盘[" + TrayCode + "][" + (IsFull ? "有料," : "空,") +"]["+ type +
"]二维码[" + WareCode + "]库位号[" + PosId + "]盘高[" + PlateH + "]盘宽[" + PlateW + "] [" + err + "] ["+ jinji + "]" ;
}
/// <summary>
/// 夹具编码值(1-32?)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!