Stop Simulink Model Update via Callback
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
Fangjun Jiang
il 15 Apr 2024
Instead of sldiagviewer.reportError(errMsg), if you do error(errMsg), it should stop.
3 Commenti
Fangjun Jiang
il 15 Apr 2024
Modificato: Fangjun Jiang
il 15 Apr 2024
okay, try modelName([],[],[],'term'). I think model update is equivalant as modelName([],[],[],'compile')
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Simulink Functions in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!