From 0c6dc6148aa0fe400d2279a856efce9abc8ca39f Mon Sep 17 00:00:00 2001 From: "zhengxuan.zhang" Date: Thu, 27 Jun 2024 15:52:57 +0800 Subject: [PATCH] =?UTF-8?q?#0005=EF=BC=9A=E6=89=AB=E6=8F=8F=E9=80=9F?= =?UTF-8?q?=E5=BA=A6=E7=9A=84=E4=B8=8B=E5=8F=91=EF=BC=9B=20Jog=E8=BF=90?= =?UTF-8?q?=E5=8A=A8=EF=BC=8C=E8=BF=90=E5=8A=A8=E5=88=B0=E6=8C=87=E5=AE=9A?= =?UTF-8?q?=E7=82=B9=EF=BC=8C=E6=89=AB=E6=8F=8F=E8=BF=90=E5=8A=A8=E4=B8=89?= =?UTF-8?q?=E7=A7=8D=E9=80=9F=E5=BA=A6=E5=85=B3=E7=B3=BB=EF=BC=9B=E5=AE=9A?= =?UTF-8?q?=E4=BD=8D=E5=90=88=E6=88=90=E9=80=9F=E5=BA=A6=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E5=BE=85Metus=E5=8F=8D=E9=A6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HSI_HexagonMI_EF3/HSI_Motion.cpp | 39 ++++++++++++++++---------------- HSI_HexagonMI_EF3/version.h | 4 ++-- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/HSI_HexagonMI_EF3/HSI_Motion.cpp b/HSI_HexagonMI_EF3/HSI_Motion.cpp index 825bdc6..9aa6c3f 100644 --- a/HSI_HexagonMI_EF3/HSI_Motion.cpp +++ b/HSI_HexagonMI_EF3/HSI_Motion.cpp @@ -301,7 +301,7 @@ HSI_Motion::HSI_Motion() { m_SetPotion_DriveSpeed[j] = 20; //设置定位驱动速度 //写日志 - g_pLogger->SendAndFlushWithTime(L"m_SetPotion_DriveSpeed[%d] = %d\n", j, m_SetPotion_DriveSpeed[j]); + //g_pLogger->SendAndFlushWithTime(L"m_SetPotion_DriveSpeed[%d] = %d\n", j, m_SetPotion_DriveSpeed[j]); } m_Set_XYZA_Reserve = 0; //XYZA轴方向 @@ -3707,8 +3707,8 @@ HSI_STATUS HSI_Motion::GetSingleAxisParam(int AXIS, double motionParam[5]) ErrorsHandler(); } //打印数组 motionParam[5] - g_pLogger->SendAndFlushWithTime(L"[GetSingleAxisParam] Vel = %.4f, ACC = %.4f, DCC = %.4f, KillDec = %.4f, Jerk = %.4f\n", - motionParam[0], motionParam[1], motionParam[2], motionParam[3], motionParam[4]); + /* g_pLogger->SendAndFlushWithTime(L"[GetSingleAxisParam] AXIS = %d, Vel = %.4f, ACC = %.4f, DCC = %.4f, KillDec = %.4f, Jerk = %.4f\n", + AXIS,motionParam[0], motionParam[1], motionParam[2], motionParam[3], motionParam[4]);*/ //g_pLogger->SendAndFlushWithTime(L"[GetSingleAxisParam] Out\n"); } @@ -3760,8 +3760,8 @@ HSI_STATUS HSI_Motion::SetSingleAxisParam(int AXIS, double motionParam[5]) //设 //} //打印 motionParam[5] - g_pLogger->SendAndFlushWithTime(L"[SetSingleAxisParam] Vel = %.4f, ACC = %.4f, DCC = %.4f, KillDec = %.4f, Jerk = %.4f\n", - motionParam[0], motionParam[1], motionParam[2], motionParam[3], motionParam[4]); + g_pLogger->SendAndFlushWithTime(L"[SetSingleAxisParam] AXIS = %d, Vel = %.4f, ACC = %.4f, DCC = %.4f, KillDec = %.4f, Jerk = %.4f\n", + AXIS,motionParam[0], motionParam[1], motionParam[2], motionParam[3], motionParam[4]); //g_pLogger->SendAndFlushWithTime(L"[SetSingleAxisParam] Out\n"); } @@ -7791,14 +7791,14 @@ HSI_STATUS HSI_Motion::GetSpeedXyzOld(int AxisNum, double& Speed) HSI_STATUS HSI_Motion::GetSpeedXyz(int AxisNum, double& Speed) { - g_pLogger->SendAndFlushWithTime(L"[GetSpeedXyz] In\n"); + //g_pLogger->SendAndFlushWithTime(L"[GetSpeedXyz] In\n"); auto rStatus = HSI_STATUS_NORMAL; short AxisNumber = AxisConvertIndex(AxisNum); //将轴号转换为 平台轴号 Speed = m_SetPotion_DriveSpeed[AxisNumber]; //从m_SetPotion_DriveSpeed[AxisNumber]中获取速度 g_pLogger->SendAndFlushWithTime(L"[GetSpeedXyz] AxisNum = %d, Speed=%d\n", AxisNumber, m_SetPotion_DriveSpeed[AxisNumber]); - g_pLogger->SendAndFlushWithTime(L"[GetSpeedXyz] Out\n"); + //g_pLogger->SendAndFlushWithTime(L"[GetSpeedXyz] Out\n"); return rStatus; } @@ -8002,24 +8002,25 @@ short HSI_Motion::AxisConvertIndex(UINT AxisTypes) //=========================================================================== void HSI_Motion::SetSingleAxisMotionParams(UINT AxisTypes, double SetMotionParam[5]) //设置单轴运动参数 { - g_pLogger->SendAndFlushWithTime(L"[SetSingleAxisMotionParams] In >>>>>>>>>>>>>>>>>>>>>>\n"); + g_pLogger->SendAndFlushWithTime(L"[SetSingleAxisMotionParams] In >>>>>>>>>>>>>>>>>>>>>> \n"); double getMotionParam[5] = { 0 }; - short AxisNumber = AxisConvertIndex(AxisTypes); - //打印轴当前运动参数 - GetSingleAxisParam(AxisNumber, getMotionParam); //获取单轴运动参数 + //打印 AxisTypes + g_pLogger->SendAndFlushWithTime(L"[SetSingleAxisMotionParams] AxisTypes = %d\n", AxisTypes); + + GetSingleAxisParam(AxisTypes, getMotionParam); //获取单轴运动参数 g_pLogger->SendAndFlushWithTime( - L"[before] Axis= %.2f, Velocity = %.2f, Acceleration= %.2f, Deceleration= %.2f, KillDeceleration= %.2f, Jerk= %.2f\n", - AxisNumber, getMotionParam[0], getMotionParam[1], getMotionParam[2], getMotionParam[3], getMotionParam[4]); + L"[before] Axis= %d, Velocity = %.2f, Acceleration= %.2f, Deceleration= %.2f, KillDeceleration= %.2f, Jerk= %.2f\n", + AxisTypes, getMotionParam[0], getMotionParam[1], getMotionParam[2], getMotionParam[3], getMotionParam[4]); //设置单轴参数 - SetSingleAxisParam(AxisNumber, SetMotionParam); + SetSingleAxisParam(AxisTypes, SetMotionParam); //打印轴当前运动参数 - GetSingleAxisParam(AxisNumber, getMotionParam); //获取单轴运动参数 + GetSingleAxisParam(AxisTypes, getMotionParam); //获取单轴运动参数 g_pLogger->SendAndFlushWithTime( - L"[after] Axis= %.2f, Velocity = %.2f, Acceleration= %.2f, Deceleration= %.2f, KillDeceleration= %.2f, Jerk= %.2f\n", - AxisNumber, getMotionParam[0], getMotionParam[1], getMotionParam[2], getMotionParam[3], getMotionParam[4]); + L"[after] Axis= %d, Velocity = %.2f, Acceleration= %.2f, Deceleration= %.2f, KillDeceleration= %.2f, Jerk= %.2f\n", + AxisTypes, getMotionParam[0], getMotionParam[1], getMotionParam[2], getMotionParam[3], getMotionParam[4]); g_pLogger->SendAndFlushWithTime(L"[SetSingleAxisMotionParams] Out >>>>>>>>>>>>>>>>>>>>>>\n"); @@ -8279,7 +8280,7 @@ HSI_STATUS HSI_Motion::SetSpeedExOld(UINT AxisTypes, double Speed) HSI_STATUS HSI_Motion::SetSpeedEx(UINT AxisTypes, double Speed) { auto rStatus = HSI_STATUS_NORMAL; - g_pLogger->SendAndFlushWithTime(L"[SetSpeedEx] In\n"); + //g_pLogger->SendAndFlushWithTime(L"[SetSpeedEx] In\n"); short AxisNumber = AxisConvertIndex(AxisTypes); if (Speed <= 0) { @@ -8297,7 +8298,7 @@ HSI_STATUS HSI_Motion::SetSpeedEx(UINT AxisTypes, double Speed) //打印日志 轴号不在1-4之间 g_pLogger->SendAndFlushWithTime(L"[SetSpeedEx] 轴号不在0-8之间\n"); } - g_pLogger->SendAndFlushWithTime(L"[SetSpeedEx] Out\n"); + //g_pLogger->SendAndFlushWithTime(L"[SetSpeedEx] Out\n"); return rStatus; } diff --git a/HSI_HexagonMI_EF3/version.h b/HSI_HexagonMI_EF3/version.h index af4aeb3..5eba0b4 100644 --- a/HSI_HexagonMI_EF3/version.h +++ b/HSI_HexagonMI_EF3/version.h @@ -12,5 +12,5 @@ #define HSI_VERSION_REVNUM #define HSI_VERSION_BUILD_DATE _T(__DATE__ ) #define HSI_VERSION_BUILD_TIME _T(__TIME__ ) -#define HSI_FILE_DESCRIPTION "周三 2.24.06 / 18:03 " -#define HSI_FILE_CSDESCRIPTION _T("周三 2.24.06 / 18:03 ") +#define HSI_FILE_DESCRIPTION "周四 2.24.06 / 14:56 " +#define HSI_FILE_CSDESCRIPTION _T("周四 2.24.06 / 14:56 ")