Commit 859314a0 LN

HY12如果10秒未处理托盘,HY13工单料直接横移

1 个父辈 fb6c05d4
...@@ -1280,9 +1280,28 @@ namespace OnlineStore.AssemblyLine ...@@ -1280,9 +1280,28 @@ namespace OnlineStore.AssemblyLine
LineManager.Line.HYEquipMap[id].IsDebug = isD; LineManager.Line.HYEquipMap[id].IsDebug = isD;
} }
} }
private void Test()
{
RemoteDecodeHelper.RemoteDecodeParam remoteDecodeParam = new RemoteDecodeHelper.RemoteDecodeParam
{
codeTypeList = CodeManager.allCodeTypeList.ToArray(),
codeCount = 3,
timeout = 3000
};
Bitmap bitmap = new Bitmap("test.bmp");
List<CodeInfo> LastCodeList = RemoteDecodeHelper.DecodeRequest(bitmap, remoteDecodeParam);
List<string> test = new List<string>();
foreach(CodeInfo codeInfo in LastCodeList)
{
test.Add(codeInfo.CodeStr);
}
string codeMsg = CodeManager.ProcessCode(test);
bitmap.Dispose();
MessageBox.Show("test.bmp:\r\n" + codeMsg, "test.bmp扫码测试结果", MessageBoxButtons.OK);
}
private void chbDisMove_CheckedChanged(object sender, EventArgs e) private void chbDisMove_CheckedChanged(object sender, EventArgs e)
{ {
Test();
if (!LoadOk) if (!LoadOk)
{ {
return; return;
......
 
20230825
HY03顶升和前阻挡下降慢问题。
HY12如果10秒未处理托盘,HY13工单料直接横移。
20230811 20230811
1.HY15处,紧急料一盘去出料四,一盘去HY17 1.HY15处,紧急料一盘去出料四,一盘去HY17
......
...@@ -187,6 +187,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -187,6 +187,10 @@ namespace OnlineStore.DeviceLibrary
{ {
} }
internal virtual bool noTrayTime(int targetMs)
{
return false;
}
internal virtual bool CanStartMove() internal virtual bool CanStartMove()
{ {
if (MoveInfo.MoveType.Equals(LineMoveType.None) && runStatus.Equals(LineRunStatus.Runing)) if (MoveInfo.MoveType.Equals(LineMoveType.None) && runStatus.Equals(LineRunStatus.Runing))
......
...@@ -1464,6 +1464,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -1464,6 +1464,12 @@ namespace OnlineStore.DeviceLibrary
{ {
return false; return false;
} }
if (HY12NoTray())
{
LogInfo(" C1->出料线:工单料,HY12空闲10秒" + LastValue + "," + "" + param.ToStr());
MoveInfo.MoveParam = param;
return true;
}
if (LastValue.Equals(0)) if (LastValue.Equals(0))
{ {
LogInfo(" C1->出料线:工单料,随意放" + LastValue + "," + "" + param.ToStr()); LogInfo(" C1->出料线:工单料,随意放" + LastValue + "," + "" + param.ToStr());
...@@ -1498,6 +1504,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -1498,6 +1504,18 @@ namespace OnlineStore.DeviceLibrary
return false; return false;
} }
private bool HY12NoTray()
{
//Hy12已经10秒钟未处理托盘
HYEquipBase hy12 = LineManager.Line.HYEquipMap[212];
if (hy12.noTrayTime(10000))
{
return true;
}
return false;
}
private bool LeftLinePriority() private bool LeftLinePriority()
{ {
if (!LineManager.DisLeftOutLine) if (!LineManager.DisLeftOutLine)
......
...@@ -197,6 +197,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -197,6 +197,8 @@ namespace OnlineStore.DeviceLibrary
{ {
CheckAxisAlarm(UpdownAxis); CheckAxisAlarm(UpdownAxis);
} }
HasTrayProcess();
} }
} }
} }
...@@ -18,6 +18,43 @@ namespace OnlineStore.DeviceLibrary ...@@ -18,6 +18,43 @@ namespace OnlineStore.DeviceLibrary
private Stopwatch trayCheckWait = new Stopwatch(); private Stopwatch trayCheckWait = new Stopwatch();
private Stopwatch trayCheckLowWait = new Stopwatch(); private Stopwatch trayCheckLowWait = new Stopwatch();
private object lockObj = ""; private object lockObj = "";
//没有处理托盘计时器
private Stopwatch noTrayProcessWatch = new Stopwatch();
private void HasTrayProcess()
{
try
{
if(SecondMoveInfo.MoveType.Equals(LineMoveType.None)&&IOValue(IO_Type.HY_FrontStopCheck).Equals(IO_VALUE.LOW))
{
//无托盘开始计时
CheckStopWatch(noTrayProcessWatch, 3000000, false);
}
else
{
noTrayProcessWatch.Stop();
}
}
catch(Exception ex)
{
LogUtil.error("HasTrayProcess 出错:" + ex.ToString());
}
}
internal override bool noTrayTime(int targetMs)
{
if (noTrayProcessWatch.IsRunning)
{
if (noTrayProcessWatch.ElapsedMilliseconds >= targetMs)
{
return true;
}
}
return false;
}
private void CheckFixture() private void CheckFixture()
{ {
if (Monitor.TryEnter(lockObj, TrayManager.mTimeOut)) if (Monitor.TryEnter(lockObj, TrayManager.mTimeOut))
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!