Commit 7793f08d 张东亮

翻板运动过程中停止继续运行翻转过头问题

1 个父辈 3f460bbe
......@@ -11,7 +11,7 @@ namespace DeviceLibrary
{
public class LiftMonitor : ISafetyDevice
{
string doorClose = IO_Type.StringDoor_Close;
string doorClose = IO_Type.NGDoor_Close;
/// <summary>
/// 关闭端延时
/// </summary>
......@@ -71,6 +71,12 @@ namespace DeviceLibrary
moveInfo.log($"急停未解除");
return;
}
double speed = (double)upspeed;
if(paused)
{
speed = speed / 3.0;
moveInfo.log($"上一次有暂停,速度降为{speed}");
}
paused = false;
if (IOManager.IOValue(up.ToString()).Equals(IO_VALUE.HIGH))
{
......@@ -84,7 +90,7 @@ namespace DeviceLibrary
IOManager.IOMove(axisbreak, IO_VALUE.HIGH);
Thread.Sleep(200);
}
axisBean.RelMove(StrokeLength, (double)upspeed);
axisBean.RelMove(StrokeLength, speed);
DateTime d = DateTime.Now;
moveInfo.log($"{axisBean.AxisName},LiftUp");
var wr = WaitResultInfo.WaitAction(new Func<WaitResultInfo, bool>(WaitUp), $"等待顶升[{axisBean.Config.Explain}]机构上升");
......@@ -162,6 +168,12 @@ namespace DeviceLibrary
moveInfo.log($"急停未解除");
return;
}
double speed = (double)downspeed;
if (paused)
{
speed = speed / 3.0;
moveInfo.log($"上一次有暂停,速度降为{speed}");
}
paused = false;
if (IOManager.IOValue(down.ToString()).Equals(IO_VALUE.HIGH))
{
......@@ -175,7 +187,7 @@ namespace DeviceLibrary
IOManager.IOMove(axisbreak, IO_VALUE.HIGH);
Thread.Sleep(200);
}
axisBean.RelMove(-StrokeLength, (double)downspeed);
axisBean.RelMove(-StrokeLength, speed);
DateTime d = DateTime.Now;
moveInfo.log($"{axisBean.AxisName},LiftDown");
var wr = WaitResultInfo.WaitAction(new Func<WaitResultInfo, bool>(WaitDown), $"等待顶升[{axisBean.Config.Explain}]机构下降");
......
......@@ -25,6 +25,13 @@ namespace DeviceLibrary
CheckAndRunServer();
string json = HttpHelper.Get(url);
Result result = JsonHelper.DeserializeJsonToObject<Result>(json);
if (result == null)
{
LogUtil.info($"reelStatusCheck 无反馈,重试");
Thread.Sleep(1000);
json = HttpHelper.Get(url);
result = JsonHelper.DeserializeJsonToObject<Result>(json);
}
if (result != null && result.code == 0)
{
LogUtil.info($"{configName} 料盘放置正常");
......@@ -60,14 +67,14 @@ namespace DeviceLibrary
throw new Exception("找不到算法服务器文件");
}
EyemFeatureSet= ProcessUtil.StartProcess("EyemFeatureSet", Application.StartupPath+"\\Modules\\EyemFeatureSet\\");
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");
string text2 = myWebClient.DownloadString(visionUrl + "/alive");
if (text2.Trim() == "\"1\"")
{
return;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!