Commit 7e012f4f LN

出料优化

1 个父辈 573cc62a
......@@ -1051,9 +1051,17 @@ namespace OnlineStore.DeviceLibrary
return msg;
}
private bool conIsPro = false;
private DateTime conLastTime = DateTime.Now;
private void ServerConTimer_Elapsed(object sender, ElapsedEventArgs e)
{
TimeSpan span = DateTime.Now - conLastTime;
if (conIsPro && span.TotalSeconds < 30)
{
return;
}
//14.异常看板
// > 地址:
......@@ -1073,6 +1081,8 @@ namespace OnlineStore.DeviceLibrary
// >> - data:
try
{
conIsPro = true;
conLastTime = DateTime.Now;
List<AlarmMsg> alarmList = new List<AlarmMsg>();
foreach (EquipBase equip in AllEquipMap.Values)
{
......@@ -1095,6 +1105,10 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil.error("ServerConTimer_Elapsed 出错:" + ex.ToString());
}
finally
{
conIsPro = false;
}
}
}
}
\ No newline at end of file
......@@ -548,13 +548,13 @@ namespace OnlineStore.DeviceLibrary
}
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_01_CylinderDown))
{
MoveInfo.NextMoveStep(LineMoveStep.PO_02_DownWait);
OutLog("出料 " + MoveInfo.SLog + " : 等待200后夹紧");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
}
//只有当BOX可以进行出出料时,移栽物品,防止卡住
else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_02_DownWait))
{
// MoveInfo.NextMoveStep(LineMoveStep.PO_02_DownWait);
// OutLog("出料 " + MoveInfo.SLog + " : 等待200后夹紧");
// MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
//}
////只有当BOX可以进行出出料时,移栽物品,防止卡住
//else if (MoveInfo.MoveStep.Equals(LineMoveStep.PO_02_DownWait))
//{
int lineId = DeviceID % 100;
MoveInfo.NextMoveStep(LineMoveStep.PO_03_CylinderOpen);
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Tighten, IO_Type.ClampCylinder_Slack);
......
......@@ -630,7 +630,7 @@ namespace OnlineStore.DeviceLibrary
paramMap.Add("deviceAlarmList", msgListStr);
string server = GetAddr(Addr_updateDeviceAlarmMsg, paramMap);
DateTime startTime = DateTime.Now;
string resultStr = HttpHelper.Post(server, "",2000);
string resultStr = HttpHelper.Post(server, "",5000);
LogUtil.debug("updateDeviceAlarmMsg " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
RfidData data = JsonHelper.DeserializeJsonToObject<RfidData>(resultStr);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!