How to measure control law execution time in Launchxl-F28379D?

조회 수: 2 (최근 30일)
Dear Sir or Madam,
I have implemented a digital control law in a Launchxl-F28379D using the Embeded Code Support for TI C2000 ProcessorsSimuli.
The control law is implemented inside an IRQ trigger function block between the AD and and the DA block.
How can I measure the execution time of this control law? I have used codertarget.profile.getData( ), but this gave me the exectution time for AD an DA but not in between.
In code composer source code we usually add a GPIO bit activation after getting AD value and GPIO bit deactivation after control law computation. This allows oscilloscope measurement. But I don't know how to do something simular in Simulink.
Can you help me?
Thanks in advance
With best regards.
Enric
codertarget.profile.getData('f28379D_AD_int')

채택된 답변

Venkatesh Chilapur
Venkatesh Chilapur 2019년 3월 20일
Hi Enric,
Attached is the model which helps you to achieve the same in simulink w.r.t GPIO bit activation and deactivation. Few points to note: The subsystem which contains the algorithm for which we need to measure the execution time, needs to be defined as atomic. The GPIO pin Set and Clear operation are part of the 'System Outputs' block which will place the GPIO pin Set and Clear lines of code around the algorithm code that helps one to measure the execution time by measuring the GPIO ON time using a digital scope.
Hope this helps,
Regards,
Venkatesh C
  댓글 수: 1
Enric Vidal Idiarte
Enric Vidal Idiarte 2019년 3월 21일
Hi Venkatesh,
Thanks for your answer.
It works very well.
Unitl now I did it modifying the source code in Code Composer, but with MATLAB it's
more usefel.
Lots of thanks
Regards,
Enric

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품


릴리스

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by