فهرست منبع

修复上位机显示功率值在实时显示实际功率时出现异常数值

CN\houcf5 4 ماه پیش
والد
کامیت
7b75936297

+ 3 - 3
1.FrameLayer/Source/main.c

@@ -371,7 +371,7 @@ void mn_voParaSet(void)
                 cp_stMotorPara.swIdMaxA = Syspara2.stMotorPara.uwIdMaxA.uwReal ;//I2C_uwMotorParaRead[5];
                 cp_stMotorPara.swIdMinA =Syspara2.stMotorPara.uwIdMinA.uwReal ;// I2C_uwMotorParaRead[6];
                 cp_stMotorPara.swRSpeedRpm = Syspara2.stMotorPara.uwRSpdRpm.uwReal ;//I2C_uwMotorParaRead[7];
-                cp_stMotorPara.swRPwrWt = Syspara2.stMotorPara.uwRPwrWt.uwReal ;//I2C_uwMotorParaRead[8];
+                cp_stMotorPara.uwRPwrWt = Syspara2.stMotorPara.uwRPwrWt.uwReal ;//I2C_uwMotorParaRead[8];
                 cp_stMotorPara.swRIarmsA =Syspara2.stMotorPara.uwRCurA.uwReal ;// I2C_uwMotorParaRead[9];
                 cp_stMotorPara.swRUdcV = Syspara2.stMotorPara.uwRVolV.uwReal ;//I2C_uwMotorParaRead[10];
                 cp_stMotorPara.swJD = Syspara2.stMotorPara.uwJD.uwReal ;//I2C_uwMotorParaRead[11];
@@ -542,7 +542,7 @@ void mn_voParaUpdate(void)
             cp_stMotorPara.swIdMaxA = MC_UpcInfo.stMotorInfo.uwIdMaxA;
             cp_stMotorPara.swIdMinA = MC_UpcInfo.stMotorInfo.uwIdMinA;
             cp_stMotorPara.swRSpeedRpm = MC_UpcInfo.stMotorInfo.uwRSpdRpm;
-            cp_stMotorPara.swRPwrWt = MC_UpcInfo.stMotorInfo.uwRPwrWt;
+            cp_stMotorPara.uwRPwrWt = MC_UpcInfo.stMotorInfo.uwRPwrWt;
             cp_stMotorPara.swRIarmsA = MC_UpcInfo.stMotorInfo.uwRCurA;
             cp_stMotorPara.swRUdcV = MC_UpcInfo.stMotorInfo.uwRVolV;
             cp_stMotorPara.swJD = MC_UpcInfo.stMotorInfo.uwJD;
@@ -748,7 +748,7 @@ void mn_voEEUperParaUpdate(void)
         Syspara2.stMotorPara.uwIdMaxA.uwReal = cp_stMotorPara.swIdMaxA;
         Syspara2.stMotorPara.uwIdMinA.uwReal = cp_stMotorPara.swIdMinA;
         Syspara2.stMotorPara.uwRSpdRpm.uwReal = cp_stMotorPara.swRSpeedRpm;
-        Syspara2.stMotorPara.uwRPwrWt.uwReal = cp_stMotorPara.swRPwrWt;
+        Syspara2.stMotorPara.uwRPwrWt.uwReal = cp_stMotorPara.uwRPwrWt;
         Syspara2.stMotorPara.uwRCurA.uwReal = cp_stMotorPara.swRIarmsA;
         Syspara2.stMotorPara.uwRVolV.uwReal = cp_stMotorPara.swRUdcV;
         Syspara2.stMotorPara.uwJD.uwReal = cp_stMotorPara.swJD;

+ 3 - 3
3.BasicFunction/Source/canAppl.c

@@ -74,7 +74,7 @@ void Can_voUpdateMC_UpcInfo(void)
     MC_UpcInfo.stMotorInfo.uwIdMaxA = cp_stMotorPara.swIdMaxA;
     MC_UpcInfo.stMotorInfo.uwIdMinA = cp_stMotorPara.swIdMinA;
     MC_UpcInfo.stMotorInfo.uwRSpdRpm = cp_stMotorPara.swRSpeedRpm;
-    MC_UpcInfo.stMotorInfo.uwRPwrWt = cp_stMotorPara.swRPwrWt;
+    MC_UpcInfo.stMotorInfo.uwRPwrWt = cp_stMotorPara.uwRPwrWt;
     MC_UpcInfo.stMotorInfo.uwRCurA = cp_stMotorPara.swRIarmsA;
     MC_UpcInfo.stMotorInfo.uwRVolV = cp_stMotorPara.swRUdcV;
     MC_UpcInfo.stMotorInfo.uwJD = cp_stMotorPara.swJD;
@@ -1248,8 +1248,8 @@ void Power_Cal(void)
     UWORD Poit_temp;
     UWORD Power_temp;
     SLONG  Power_clac;
-    Poit_temp= (cp_stMotorPara.swRPwrWt)>>11;
-    Power_temp=cp_stMotorPara.swRPwrWt & 0x07ff;
+    Poit_temp= (cp_stMotorPara.uwRPwrWt)>>11;
+    Power_temp=cp_stMotorPara.uwRPwrWt & 0x07ff;
     if(cp_stControlPara.swPwrLimitValWt>700)
     {
     Powercal.swMaxpower=cp_stControlPara.swPwrLimitValWt-600;

+ 1 - 1
4.BasicHardwSoftwLayer/2.BasicSoftwLayer/Include/CodePara.h

@@ -119,7 +119,7 @@ typedef struct
     SWORD swIpeakMaxA;
 
     SWORD swRSpeedRpm;
-    SWORD swRPwrWt;
+    UWORD uwRPwrWt;
     SWORD swRIarmsA;
     SWORD swRUdcV;
     SWORD swTorMax;

+ 1 - 1
4.BasicHardwSoftwLayer/2.BasicSoftwLayer/Source/CodePara.c

@@ -85,7 +85,7 @@ void CodeParaInit(void)
     cp_stMotorPara.swIpeakMaxA = M_IS_PEAK_MAX_AP;
 
     cp_stMotorPara.swRSpeedRpm = M_R_SPD_RPM;
-    cp_stMotorPara.swRPwrWt = M_R_PWR_WT;
+    cp_stMotorPara.uwRPwrWt = M_R_PWR_WT;
     cp_stMotorPara.swRIarmsA = M_R_IRMS_A;
     cp_stMotorPara.swRUdcV = M_R_UDC_v;
     cp_stMotorPara.swTorMax = M_MAX_TOR_NM;