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 CenterFile Exchange에서 Deployment, 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