This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS 中把int16变量 换成int32 变量数据异常



如图,把int16 err 换成int32 err,程序数据处理异常。请问这个是什么引起的?

struct _Pid_I_c{
Uint16 SetVrms;
Uint16 ActualVrms;//Actual value
int16 err;//Deviation
int16 err_last;
float Kp, Ki, Kd;
int16 RegulationFactor;
int16 SetFactor;
int16 integral;
Uint16 Vmax;
Uint16 Vmin;
};