Writing S-Functions    

ssSetErrorStatus Termination Criteria

When you call ssSetErrorStatus and return from your S-function, Simulink stops the simulation and posts the error. To determine how the simulation shuts down, refer to the flow chart figure on How Simulink Interacts with C S-Functions. If ssSetErrorStatus is called prior to mdlStart, no other S-function routine is called. If ssSetErrorStatus is called in mdlStart or later, mdlTerminate is called.


  Exception Free Code Checking Array Bounds