フィルターのクリア

Overrun and Task Execution Time Profiling on Arduino

3 ビュー (過去 30 日間)
MathWorks Support Team
MathWorks Support Team 2018 年 7 月 30 日
編集済み: MathWorks Support Team 2024 年 4 月 19 日
I am deploying my Simulink model to Arduino hardware (Uno) and running an External mode or PIL simulation. When I decrease the sample time of the model below a certain threshold, I no longer get sensible readings from my sensor connect to my Arduino. Why is this happening?

採用された回答

MathWorks Support Team
MathWorks Support Team 2024 年 4 月 18 日
編集済み: MathWorks Support Team 2024 年 4 月 19 日
A likely cause of this issue is from task overruns. A task overrun occurs if the target hardware is still performing one instance of a task when the next instance of that task is scheduled to begin. To determine if you are encountering overruns, please refer to the following documentation page:
This page outlines the process for detecting overruns and some methods you can employ to mitigate them. Please note that an option is to upgrade from the Uno to an Arduino with a more powerful processor, such as the Due.
To get a better understanding of the parts of your model that are causing overruns, you can profile execution time for your model running on the Arduino in PIL. Execution time profiling can be configured with the option Configuration Parameters > Code Generation > Verification > Measure task execution time. Please refer to the following documentation page for more information on profiling the execution of your generated code:
You can use this feature to determine how the various parts of your model that are affecting overruns and the minimal sample time needed to run the model without overruns.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeRun on Target Hardware についてさらに検索

タグ

タグが未入力です。

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by