The error maybe due to a model instability.
One way to remove the error is to open the dialog box of the 'Integrator' block, select 'Limit output' and specify an initial condition and saturation limits which are meaningful for your model.
You can also open the 'Configuration Parameter' and set the diagnostic 'Inf or NaN block output' to 'error'. From the error generated for the specific block the actual issue can be decoded (Example: divide by zero) which can be avoided in logic.
Below is information on tools that may assist you in further improving the model stability:
- Solver Profiler: The Solver Profiler can help you visualize your model dynamics and see where they may be unstable. Using the Solver Profile is described at this link
- Use Stepping Options to pause the simulation and view signal values before the error occurs.
Additionally, hierarchy is recommended when building complex models to improve readability. In case you are interested in that, information on converting your model to use subsystems may be found here