Capturing Simulink Errors
이전 댓글 표시
I would like to start a simulation programatically, but I would also like the ability to start, stop, or pause a simulation. In order to do this, I have determined that one must use the command
set_param('ModelName', 'SimulationCommand', 'start');
Unfortunately, I am now not able to record any errors reported by the simulation. By using the sim command, I get an MSLException, but I can't control the simulation state. Are there other options I am missing, or is this the trade off I must deal with?
As a side note, I have used a setup where I insert a subsystem that allows me to control simulation state, but this is a less preferred method, as it edits the model. If it is the only way to do it though, I can continue back on that path.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Event Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!