How to use "coderTimeSleep" to pause the code of matlab function block in Simulink.
조회 수: 3 (최근 30일)
이전 댓글 표시
I want to pause the code of a matlab function block in Simulink when i'm going to generate generate C code to run on Arduino hardware.
I use the source code "coder_posix_time" and i load the files .c and the header .h successfully on the custom code.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1379089/image.png)
How i run the function "coderTimeSleep" to pause the code x secs? What syntax do i have to use?
i have used coder.ceval("coder_posix_time",u); but is not working.
댓글 수: 0
답변 (1개)
Mayank Sengar
2023년 5월 22일
You can use pause(n) function to pause execution of function for n seconds.
Kindly leverage following documentation for the same:
There are also other ways to do pause execution temporarily mentioned in the following MATLAB answer.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 MATLAB Support Package for Arduino Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!