Commit f075fe55 张东亮

工单料与单独出库料混出造成料串下降问题

1 个父辈 55e3f0d4
......@@ -53,35 +53,42 @@ namespace DeviceLibrary
static int webclienttimeout = 30000;
public static void CheckAndRunServer()
{
lock (EyemFeatureSet)
try
{
Process[] processesByName = Process.GetProcessesByName("EyemFeatureSet");
if (processesByName.Length != 0)
lock (EyemFeatureSet)
{
return;
}
Process[] processesByName = Process.GetProcessesByName("EyemFeatureSet");
if (processesByName.Length != 0)
{
return;
}
string text = "Modules\\EyemFeatureSet\\EyemFeatureSet.exe";
if (!File.Exists(text))
{
throw new Exception("找不到算法服务器文件");
}
string text = "Modules\\EyemFeatureSet\\EyemFeatureSet.exe";
if (!File.Exists(text))
{
throw new Exception("找不到算法服务器文件");
}
EyemFeatureSet = ProcessUtil.StartProcess("EyemFeatureSet", Application.StartupPath + "\\Modules\\EyemFeatureSet\\");
int num = 5;
while (num > 0)
{
num--;
Thread.Sleep(1000);
MyWebClient myWebClient = new MyWebClient(webclienttimeout);
string text2 = myWebClient.DownloadString(visionUrl + "/alive");
if (text2.Trim() == "\"1\"")
EyemFeatureSet = ProcessUtil.StartProcess("EyemFeatureSet", Application.StartupPath + "\\Modules\\EyemFeatureSet\\");
int num = 5;
while (num > 0)
{
return;
num--;
Thread.Sleep(1000);
MyWebClient myWebClient = new MyWebClient(webclienttimeout);
string text2 = myWebClient.DownloadString(visionUrl + "/alive");
if (text2.Trim() == "\"1\"")
{
return;
}
}
throw new Exception("算法服务器文件打开失败");
}
throw new Exception("算法服务器文件打开失败");
}catch(Exception ex)
{
LogUtil.error("CheckAndRunServer EyemFeatureSet.exe", ex);
}
}
public class Result
{
......
......@@ -326,6 +326,10 @@ namespace DeviceLibrary
MoveInfo.log($"等待料串准备好放料");
return false;
}
else if(MoveInfo.IsTimeOut(10))
{
mainMachine.TurnToOut();
}
}
else if (To.posid == BoxStorePosition.ngdoor)
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!