pause a program while running and resume from the same spot

조회 수: 2 (최근 30일)
lital levy
lital levy 2022년 8월 24일
댓글: Matt J 2022년 8월 24일
Hi, I wrote a programme that consists of reading from a sensor who get heated after being on for over 20 min.
I wonder if there is a possibility while the program is running to pause it after 20 min for a 20 min pause, and then it will continued right where it stopped.
thank you

답변 (1개)

Matt J
Matt J 2022년 8월 24일
편집: Matt J 2022년 8월 24일
Yes, there is a command for it: pause.
  댓글 수: 2
lital levy
lital levy 2022년 8월 24일
thank you ,but my program consists loops and Im not looking for a command that will pause after a specific line, i need it to pause in a specific time
Matt J
Matt J 2022년 8월 24일
I don't have a full picture of how the sensor is operated . One thing you might be able to do is use the backgroundPool to issue on/off commands to the sensor, using pause or tic...toc to measure intervals of time between commands. Your main program would, however, have the responsibility of checking whether the data it is reading from the sensor is valid.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Scope Variables and Generate Names에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by