2014-03-31 12:32 PM
I am receiving this compiler error in SystemNDrivePrarms.h on lines 8182, 8216, and 8250 when compiling MCTasks.c. (MC version: 3.4.1, IDE: IAR EW for ARM 7.10)
ID_DEMAG, /*!< Demagnetization current in s16A:
Current(Amp) = [Current(s16A) * Vdd micro]/ [65536 * Rshunt * Aop] */ The demagnetisation value I input to MCWB is 5.1Ampere. Did I do something wrong? To work-around, will the algorithm tolerate a maximum representable value that has not truncated? #hj #integer-truncation2014-03-31 12:47 PM
Here is the #define from lines 51-54 of
PMSM motor parameters.h
:#define NOMINAL_CURRENT 15745
#define MOTOR_MAX_SPEED_RPM 23000 /*!< Maximum rated speed */ #define MOTOR_VOLTAGE_CONSTANT 0.6 /*!< Volts RMS ph-ph /kRPM */ #define ID_DEMAG -47236 /*!< Demagnetization current */2014-04-01 12:46 AM
Ciao Luke
This warning isn't to understimate this because it means that with these setting some overflow has occurred by the preprocessor. In this case I suspect that the Demagnetizing Current in motor - electrical parameter is greather than the measurable one due the current feedback network. If you attach the WB file I can take a look. Ciao Gigi2014-04-01 12:21 PM
2014-04-02 12:24 AM
Ciao Luke,
you catch the point. It has to stay in the dynamic range of the current detection processin circuits oterwise you get an overflow in the computation. Ciao Gigi2021-06-27 11:08 PM
Adding of "STM32 Motor Control" topic.
Best regards.