Simulink Real Time Workshop - how to measure code execution time?
이전 댓글 표시
I have a Simulink model from which I generate code using Real Time Workshop for a Quanser Q8 data acquisition board. How do I measure the actual execution time of my model?
댓글 수: 1
Paulo Silva
2011년 3월 13일
That's a good question, I'm going to work with Quanser hardware and maybe something like that will be needed, +1 vote, good luck.
채택된 답변
추가 답변 (2개)
Kaustubha Govind
2011년 3월 14일
0 개 추천
I don't know if this answers your question completely, but if you're using ert.tlc or one of its descendants, rt_OneStep is the function that is to be called at every time step - so adding instrumentation around a call to rt_OneStep should give you a measure of execution time per step.
Mark
2011년 3월 14일
0 개 추천
There is an additional feature called "RTW profiling hooks" that might help with this. It is somewhat advanced and requires you to write some TLC code, but it essentially lets you add user-defined code at the beginning and end of generated functions, which is an ideal location for adding "tic"/"toc" commands.
카테고리
도움말 센터 및 File Exchange에서 Simulink Coder에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!