Error Handling in Simulink Accelerator

2 Ansichten (letzte 30 Tage)
Mike Sprengel
Mike Sprengel am 3 Mai 2019
I ran into an issue where one of my simulation models running in accelerator mode hits some type of error and then crashes (MATLAB/Simulink are completely exited, rather than simply stalling).
I reran the model in normal mode and found that an index block was receiving an out-of-range input which caused the initial error (this issue is easily fixed and not of concern).
In an attempt to better understand the issue I created a simplified model with the same out-of-range error occurring at a specified timed. When I ran the model in normal mode the simulation terminated and I received the expected out-of-range error in the diagnostics viewer. However when I ran the same simplified model in accelerator mode the simulation ran to the specified stop time even though an out-of-range error on the index block was present for half of the simulation (I imposed a maximum step size to ensure I was evaluating the system with the error present).
While I was not able to recreate the issue of the simplified model causing MATLAB/Simulink to exit in accelerator mode, I’m assuming another error occurs in my full model as a result of the out-of-range error but I’m unable to verify. I’m having this same issue in both 2017a and 2018b, and unfortunately I can’t upload the full model due to it containing a large amount of confidential information.
I’m using the full model as part of a large-scale evaluation and have try, sim, and catch to automatically run the batch of simulations and deal with various errors which may occur. While having the simulation exit on an error is not ideal, it does allow me to move on to the next simulation and it’s much better than having MATLAB completely shutdown without any indication why.
My question is two part:
  • Are there any setting available to ensure that a simulation running in accelerator mode will exhibit a similar error response to a simulation running in normal mode?
  • Has anyone seen a case where Simulink hits an error causing MATLAB/Simulink to fully exit?
Thanks for the insight,
Mike

Antworten (0)

Kategorien

Mehr zu Event Functions finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by