0
votes

I have a simpe simulink model

simulink model

It compiles fine unless I try to save output states:

save output states

Then I face with this error when I try to compile it:

Saving the complete set of the SimState is only supported for the model running in Normal or Accelerator mode, and for Model blocks running in Normal mode.

matlab model error

Why does it happen and how to get around that?

Update:

My model is set to fixed step and it is set to normal mode: simulink normal mode

1
How do you run your model? Is it in a model block inside another model? Are you sure you don't have any other blocks in the model? Do you generate code from the model?am304
@am304, It is a very simple model. It is not nested. It runs fine. but it does not build. I build code by pressing the extreme right hand side button on the last photo that I have uploaded.ar2015
Why do you build the model? What purpose does that serve? Logging final states won't work with building. Just press play to run the model.am304

1 Answers

0
votes

As mentioned in the comments, "building" the model is only for the purpose of generating code/executables, and saving final states is not supported for code generation. If you just want to run the model, just press the "Run" button, not the "Build" button and it should work. See the Simulink documentation for more details on how to run a model.