Other Parts Discussed in Thread: MOTORWARE
Tool/software: Code Composer Studio
Hi!
I started to become familiar with an existing Firmware for a custom designed Motor driver (F28069M+DRV8305). Basicly the system works but I think there are a lot improvements possible.
First I started to check all user parameters. Thereby I found some wrong values. (But this is not part of my question ;) )
During debugging I saw that Ls an Rs have strange values:
The values are much higher than in the user.h file. Looks like an overflow?!
Furthermore I have following warning:
Can this be the problem? This is my struct:
typedef struct _MOTOR_Vars_t_
{
bool Flag_enableSys;
bool Flag_Run_Identify;
bool Flag_MotorIdentified;
bool Flag_MotorAligned;
bool Flag_enableForceAngle;
bool Flag_enableFieldWeakening;
bool Flag_enableRsRecalc;
bool Flag_enableUserParams;
bool Flag_enableOffsetcalc;
bool Flag_enablePowerWarp;
unsigned int MotorAlign_Rampup_Ticks;
unsigned long MotorAlign_Ticks;
CTRL_State_e CtrlState;
EST_State_e EstState;
USER_ErrorCode_e UserErrorCode;
CTRL_Version CtrlVersion;
_iq IdRef_A;
_iq IqRef_A;
_iq StopSpeedRef_krpm;
_iq SpeedRef_krpm;
_iq SpeedTraj_krpm;
_iq MaxAccel_krpmps;
_iq MaxAccel_index_krpmps;
_iq20 MaxJrk_krpmps2;
_iq Speed_krpm;
_iq SpeedQEP_krpm;
_iq OverModulation;
_iq RsOnLineCurrent_A;
_iq SvgenMaxModulation_ticks;
_iq Flux_Wb;
_iq Torque_Nm;
_iq I_Max_A;
float_t MagnCurr_A;
float_t Rr_Ohm;
float_t Rs_Ohm;
float_t RsOnLine_Ohm;
float_t Lsd_H;
float_t Lsq_H;
float_t Flux_VpHz;
_iq Kp_spd;
_iq Ki_spd;
_iq Kp_Idq;
_iq Ki_Idq;
_iq Vd;
_iq Vq;
_iq Vs;
_iq VsRef;
_iq VdcBus_kV;
_iq Id_A;
_iq Iq_A;
_iq Is_A;
MATH_vec3 I_bias;
MATH_vec3 V_bias;
ST_Vars_t SpinTAC;
//float Axis_Offset_Ang;
}MOTOR_Vars_t;
With my eval-Kit and lab03a everthing looks fine. On our custom board we use the FPU. Maybe is there the source of the problem?
Thanks!