pause a program while running and resume from the same spot
2 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
Matt J
2022-8-24
编辑:Matt J
2022-8-24
2 个评论
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 Center 和 File 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!