TI中文支持网
TI专业的中文技术问题搜集分享网站

TI 程序模块的错误

proj_Lab20 调用的程序模块:

void CTRL_setup_user(CTRL_Handle handle,
const _iq angle_pu,
const _iq speed_ref_pu,
const _iq speed_fb_pu,
const _iq speed_outMax_pu,
const MATH_vec2 *pIdq_offset_pu,
const MATH_vec2 *pVdq_offset_pu,
const bool flag_enableSpeedCtrl,
const bool flag_enableCurrentCtrl)

对count_traj的更新不对。

Linda:

您好!

请问是程序编译有错误么?具体出错信息是什么?

proj_Lab20 调用的程序模块:

void CTRL_setup_user(CTRL_Handle handle,
const _iq angle_pu,
const _iq speed_ref_pu,
const _iq speed_fb_pu,
const _iq speed_outMax_pu,
const MATH_vec2 *pIdq_offset_pu,
const MATH_vec2 *pVdq_offset_pu,
const bool flag_enableSpeedCtrl,
const bool flag_enableCurrentCtrl)

对count_traj的更新不对。

min zhou2:

回复 Linda:

void CTRL_setup_user(CTRL_Handle handle, const _iq angle_pu, const _iq speed_ref_pu, const _iq speed_fb_pu, const _iq speed_outMax_pu, const MATH_vec2 *pIdq_offset_pu, const MATH_vec2 *pVdq_offset_pu, const bool flag_enableSpeedCtrl, const bool flag_enableCurrentCtrl){ CTRL_State_e ctrlState = CTRL_getState(handle); uint_least16_t count_traj = CTRL_getCount_traj(handle);   //上一次的 counter_traj uint_least16_t numCtrlTicksPerTrajTick = CTRL_getNumCtrlTicksPerTrajTick(handle);

// increment the state counter CTRL_incrCounter_state(handle);

// increment the trajectory count CTRL_incrCounter_traj(handle);  //更新 counter_traj

// run the appropriate controller if(ctrlState == CTRL_State_OnLine) { // increment the current count CTRL_incrCounter_current(handle);

// increment the speed count CTRL_incrCounter_speed(handle); }

// as needed, update the trajectory if(count_traj >= numCtrlTicksPerTrajTick)  //count_traj 在这儿是上一次的值,而不是现在的值,从其他例程也可以证明这儿用得不对。 { // reset the trajectory count CTRL_resetCounter_traj(handle);

// run the trajectories CTRL_runTraj(handle); } // end of if(gFlag_traj) block

CTRL_setAngle_pu(handle,angle_pu); CTRL_setSpeed_ref_pu(handle,speed_ref_pu); CTRL_setSpeed_fb_pu(handle,speed_fb_pu); CTRL_setSpeed_outMax_pu(handle,speed_outMax_pu);

CTRL_setIdq_offset_pu(handle,pIdq_offset_pu); CTRL_setVdq_offset_pu(handle,pVdq_offset_pu);

CTRL_setFlag_enableSpeedCtrl(handle,flag_enableSpeedCtrl); //设置控制器是否嵌入速度控制器 CTRL_setFlag_enableCurrentCtrl(handle,flag_enableCurrentCtrl);//是否嵌入电流控制器

return;} // end of CTRL_setup_user() function

proj_Lab20 调用的程序模块:

void CTRL_setup_user(CTRL_Handle handle,
const _iq angle_pu,
const _iq speed_ref_pu,
const _iq speed_fb_pu,
const _iq speed_outMax_pu,
const MATH_vec2 *pIdq_offset_pu,
const MATH_vec2 *pVdq_offset_pu,
const bool flag_enableSpeedCtrl,
const bool flag_enableCurrentCtrl)

对count_traj的更新不对。

Seven Han:

回复 min zhou2:

你好,有没有可能是用了旧的版本呢?

proj_Lab20 调用的程序模块:

void CTRL_setup_user(CTRL_Handle handle,
const _iq angle_pu,
const _iq speed_ref_pu,
const _iq speed_fb_pu,
const _iq speed_outMax_pu,
const MATH_vec2 *pIdq_offset_pu,
const MATH_vec2 *pVdq_offset_pu,
const bool flag_enableSpeedCtrl,
const bool flag_enableCurrentCtrl)

对count_traj的更新不对。

min zhou2:

回复 Seven Han:

最新的1.8

proj_Lab20 调用的程序模块:

void CTRL_setup_user(CTRL_Handle handle,
const _iq angle_pu,
const _iq speed_ref_pu,
const _iq speed_fb_pu,
const _iq speed_outMax_pu,
const MATH_vec2 *pIdq_offset_pu,
const MATH_vec2 *pVdq_offset_pu,
const bool flag_enableSpeedCtrl,
const bool flag_enableCurrentCtrl)

对count_traj的更新不对。

min zhou2:

回复 min zhou2:

顺便问一个问题:TI 有通过RS在线校正值计算电机绕组温度的公式或程序模块吗?

赞(0)
未经允许不得转载:TI中文支持网 » TI 程序模块的错误
分享到: 更多 (0)