| Writing S-Functions | ![]() |
Respond to a pause or resumption of the simulation of the model that contains this S-function.
Syntax
Arguments
S
SimStruct representing an S-Function block.
simStatus
Status of the simulation, either SIM_PAUSE or SIM_CONTINUE
Description
Simulink calls this routine when a simulation of the model containing s pauses or resumes.
Example
#if defined(MATLAB_MEX_FILE) #define MDL_SIM_STATUS_CHANGE static void mdlSimStatusChange(SimStruct *S, ssSimStatusChangeType simStatus) { if (simStatus == SIM_PAUSE) { slPrintf("Pause has been called! \n"); } else if (simStatus == SIM_CONTINUE) { slPrintf("Continue has been called! \n"); } } #endif
Languages
| mdlSetWorkWidths | mdlStart | ![]() |
© 1994-2005 The MathWorks, Inc.