how to generate an infinitely running code in simulink embedded coder?

3 ビュー (過去 30 日間)
Nallapuri Nirali
Nallapuri Nirali 2025 年 4 月 7 日
コメント済み: Nallapuri Nirali 2025 年 4 月 17 日
how to generate an infinitely running code in simulink embedded coder like how we use in legacy code
example:
void main(){
for(;;){
}
}
I have used idle task block but it has some limitations like some blocks like can transmit in c2000 micro controller blockset takes a auto sample time of 0.2 sec but simulink shows an error if time based blocks are included in idle task block function

回答 (1 件)

Michael
Michael 2025 年 4 月 7 日
Normally you only have to set the "Stop time" in the Configuration Parameters --> Solver option or directly in the model to "inf". Then starting code generation.
  3 件のコメント
Michael
Michael 2025 年 4 月 8 日
And after what time does the code execution stop?
Nallapuri Nirali
Nallapuri Nirali 2025 年 4 月 17 日
I'm speaking about execution in code
I want all my code to be in while 1 after generation

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDeployment, Integration, and Supported Hardware についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by