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.

[参考译文] LAUNCHTXL-F2.8069万M:Strobe事件初始化过程中发生抖动

Guru**** 2333840 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/580740/launchxl-f28069m-jerk-during-strobe-event-initialization

部件号:LAUNCHTXL-F2.8069万M

您好,

我想使用外部频闪灯信号来初始化eQEP编码器。 项目基于lab13e。 我有一个问题,即在  频闪动事件中,电机有时会产生巨大的抖动,电机停止移动。

初始化eQEP的代码来自实验室

 

//将计数器置于RESET
QEP_RESET_counter(obj->qepHandle[QEP]);

//设置QPOSINIT寄存器
QEP_set_posn_init_count(obj->qepHandle[QEP],0);

//禁用所有中断QEP_disable_all_Handle(Qeple_Handle_rema_eple_rebers_qep_rebers_qep_qep_qep_rebers_qep_qep_reposle[QEP]
中断Qeple_rebers_qep_qep_reposle_qep_reposle[qep_reposle_reposle_qep_reposle_qep_reposle_reposle_qep_reposle_reposle_reposle_reposle_rebers_qep_qep_qep_qep_qep_reposle_rebers_qep_qep_rebers














qep_disable_gate_index(obj->qepHandle[QEP]);
qep_set_ext_clock_rate (obj->qepHandle[QEP],QEP_Xcr_2x_RES);
qep_set_a_polarity (obj->qepHandle[QEP],QEP_QAP_No_Effect);
QEP_Set_B_POLICITY (obj->qepHandle[QEP],QEP_QBP_No_Effect);
QEP_Set_index_POLICITY (obj->qepHandle[QEP],QEP_QIP_No_Effect);
QEP_Set_strobe_obj (EP->qepHandle[QEP], QEP_QSP_No_effect);

//设置QEPCTL寄存器
QEP_set_emu_control(obj->qepHandle[QEP],QEPCTL_Freesoft_ineve_halt);
QEP_set_posn_count_reset_mode(obj->qepHandle[QEP],QEPTL_Reset_EP_Elet,QEP_RES_RES_RES_RES_RESET_ENT_RES_ENTR_RESET_EN_EN_ENTR_RES_RESET_DEP-
QEPCTL_Sei_Rising Falling_Edge_Init);
QEP_Set_index_event_init (obj->qepHandle[QEP],QEPCTL_IEI_Nothing);
// QEP_Set_index_event_latch (obj->qepHandle[QEP],QEPCTL_IEL_Rising _Edge);
qep_set_strobe_event_latch(obj->qepHandle[QEP],QEPCTL_Sel_Rising _Falling_Edge);
qep_set_soft_init(obj->qepHandle[QEP],QEPCTL_Swi_Noth);qep_disable_unit_Fall_timer(obj->qeptimer[QEP]

qep_disable_watchdog (obj->qepHandle[QEP]);

//设置QPOSCTL寄存器
qep_disable_posn_compare(obj->qepHandle[QEP]);

//设置QCAPCTL寄存器
qep_disable_capture (ep->qepHandle[QEP]);

//

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    Jakub,

    在感应式InstaSPIN运动实验中,编码器角度与Rs重新校准步骤中的电机角度对齐。 如果您重新初始化eQEP编码器,则会中断对齐,这也是电机停止的原因。

    我的建议是将应用位置控制和电机位置控制分开,使应用概念"0"与电机概念"0"不同。

    InstaSPIN运动中的定位系统是一种相对定位系统,使其非常通用。 您的应用程序代码需要从轴和目标的绝对位置转换为到达目标所需的相对位置步长。