From a0b14cef04ac7f73d374f159235af12d108360ec Mon Sep 17 00:00:00 2001 From: lhiven <236881222@qq.com> Date: Sun, 1 Oct 2023 11:10:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=BD=93=E4=BF=9D=E5=8E=8B?= =?UTF-8?q?=E8=BD=B4=E5=B7=B2=E7=BB=8F=E6=8A=AC=E8=B5=B7=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=B0=B1=E4=B8=8D=E7=94=A8=E5=86=8D=E5=88=B0=E4=BA=8C=E6=AE=B5?= =?UTF-8?q?=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.SkyLine/Flow/TurnoverFlow.cs | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/Rs.SkyLine/Flow/TurnoverFlow.cs b/Rs.SkyLine/Flow/TurnoverFlow.cs index 128ab0d..b32a95f 100644 --- a/Rs.SkyLine/Flow/TurnoverFlow.cs +++ b/Rs.SkyLine/Flow/TurnoverFlow.cs @@ -528,14 +528,21 @@ namespace Rs.MotionPlat.Flow //-----------------------------------------------测试位下料 case ETurnoverFlowStep.测试完成抬起到高速位: targetPos = SysConfigParam.GetValue("PressZ")+GlobalVar.PressLowSpeedOffset; - - errCode = AxisControl.PressZ.MovePos(targetPos, GlobalVar.PressLowSpeed); - if (errCode == Motion.ErrorCode.Ok) + double curPos = Ops.GetCurPosition(AxisAlias.PressZ); + if(curPos>targetPos) { - logInfo = "测试完成准备抬起"; - MessageQueue.Instance.Insert(logInfo); - LogHelper.Debug(logInfo); - Step = ETurnoverFlowStep.等待测试完成抬起到高速位; + Step = ETurnoverFlowStep.测试完成抬起安全位; + } + else + { + errCode = AxisControl.PressZ.MovePos(targetPos, GlobalVar.PressLowSpeed); + if (errCode == Motion.ErrorCode.Ok) + { + logInfo = "测试完成准备抬起"; + MessageQueue.Instance.Insert(logInfo); + LogHelper.Debug(logInfo); + Step = ETurnoverFlowStep.等待测试完成抬起到高速位; + } } break; case ETurnoverFlowStep.等待测试完成抬起到高速位: