From 146c998d47401434a5df39b664067f30f4d5a63f Mon Sep 17 00:00:00 2001 From: lhiven <236881222@qq.com> Date: Tue, 6 Jun 2023 19:21:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=AD=A3=E8=B4=9F=E9=99=90?= =?UTF-8?q?=E4=BD=8D=E7=9A=84=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.MotionPlat/Controls/AxisMove.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Rs.MotionPlat/Controls/AxisMove.cs b/Rs.MotionPlat/Controls/AxisMove.cs index afd6e75..7aef0f7 100644 --- a/Rs.MotionPlat/Controls/AxisMove.cs +++ b/Rs.MotionPlat/Controls/AxisMove.cs @@ -151,6 +151,24 @@ namespace Rs.MotionPlat if (lblOrg.BackColor != Color.Silver) lblOrg.BackColor = Color.Silver; } + + m_axis.GetPelStatus(out bool bPel); + if (bPel && lblPlimit.BackColor != Color.Lime) + lblPlimit.BackColor = Color.Lime; + else if (bPel == false) + { + if (lblPlimit.BackColor != Color.Silver) + lblPlimit.BackColor = Color.Silver; + } + + m_axis.GetNelStatus(out bool bNel); + if (bNel && lblNlimit.BackColor != Color.Lime) + lblNlimit.BackColor = Color.Lime; + else if (bNel == false) + { + if (lblNlimit.BackColor != Color.Silver) + lblNlimit.BackColor = Color.Silver; + } } } @@ -216,6 +234,7 @@ namespace Rs.MotionPlat if(m_axis!=null) { ErrorCode errCode = m_axis.Stop(); + m_axis.Abort_Go_Home(); AddMessage(errCode.ToString()); } }