The mcd_main function generated from S12ZVM_FOC.slx

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

The mcd_main function generated from S12ZVM_FOC.slx

ソリューションへジャンプ
1,350件の閲覧回数
jiangfeng
Contributor III

Hi, Dear Daniel

This is the main function generated from S12ZVM_FOC.slx, however ,I can't find the SYSTEM_TASK() in the while cycle. Should I put the SYSTEM_TASK in the red part or the while loop?

I  have tried to put the SYSTEM_TASK() in the red part or the while loop  ,and then my BLDC didn't work.

Thanks very much.

pastedImage_1.png

ラベル(1)
1 解決策
1,143件の閲覧回数
Daniel_Popa
NXP Employee
NXP Employee

Hi jiangfeng‌,

I'm not sure i've understood your question.

The MBDToolbox generates all the code and setup needed to run the application without the need for any additional hand written code.

That comment is put there in case you want to reuse the generated code for other purposes via an IDE.

By default the code generated by the Matlab is going to place the call to SYSTEM_TASK() within the callback of the TIM_Ch0_ISR interrupt.

Is this what you are looking for ?

pastedImage_1.png

Do not try to call is on the infinite loop. In case you need to use another interrupt source, just call it on that interrupt callback routine since you need a precise timing in order to control the motor.

Hope this helps!

Daniel

元の投稿で解決策を見る

2 返答(返信)
1,144件の閲覧回数
Daniel_Popa
NXP Employee
NXP Employee

Hi jiangfeng‌,

I'm not sure i've understood your question.

The MBDToolbox generates all the code and setup needed to run the application without the need for any additional hand written code.

That comment is put there in case you want to reuse the generated code for other purposes via an IDE.

By default the code generated by the Matlab is going to place the call to SYSTEM_TASK() within the callback of the TIM_Ch0_ISR interrupt.

Is this what you are looking for ?

pastedImage_1.png

Do not try to call is on the infinite loop. In case you need to use another interrupt source, just call it on that interrupt callback routine since you need a precise timing in order to control the motor.

Hope this helps!

Daniel

1,143件の閲覧回数
jiangfeng
Contributor III

Hi,,Daniel

I understand. Thanks  very much

0 件の賞賛
返信