Why do I get the error: “Failed to evaluate mask initialization commands: Cannot change the model while simulation is running” while running my simulation in Fast Restart?

35 views (last 30 days)
I upgraded my Simulink to version R2022a and when I try to run my simulation in Fast Restart, I get the following error:
Failed to evaluate mask initialization commandsCaused by: Cannot change the model while simulation is running

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 21 Mar 2022
This error could potentially be caused due to the introduction of a new simulation status “Restarting” (22a Release Note) that improves Fast Restart workflows. Due to this change, the SimulationStatus configuration parameter value during the initialization of the Fast Restart simulation returns “restarting” in R2022a as opposed to “compiled” in previous versions. Models or scripts (for eg. Mask Initialization scripts) that conditionalize behavior based on the value of SimulationStatus might require to be updated to check against the new simulation status following this change.
 

More Answers (0)

Categories

Find more on Author Block Masks in Help Center and File Exchange

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!