Stop Simulink Model Update via Callback
5 ビュー (過去 30 日間)
古いコメントを表示
I have a callback on a custom block that checks a bus selector for missing signals, at the start of the model update routine. Based on the results of that update, I send an sldiagviewer.reportError(errMsg) command to Matlab. What I want it to do is stop the update cycle at that point because I know it will throw an error downstream in ~5 minutes where the user will have to fix the problem. Instead, Simulink just continues runnign the update cycle until Simulink decides it cannot continue anymore.
So my question is basically how to stop the update cycle?
0 件のコメント
採用された回答
Fangjun Jiang
2024 年 4 月 15 日
Instead of sldiagviewer.reportError(errMsg), if you do error(errMsg), it should stop.
3 件のコメント
Fangjun Jiang
2024 年 4 月 15 日
編集済み: Fangjun Jiang
2024 年 4 月 15 日
okay, try modelName([],[],[],'term'). I think model update is equivalant as modelName([],[],[],'compile')
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Simulink Functions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!