| Contents | Index |
No
#define MDL_SIM_STATUS_CHANGE
void mdlSimStatusChange(SimStruct *S, ssSimStatusChangeType simStatus)
SimStruct representing an S-Function block.
Status of the simulation, either SIM_PAUSE or SIM_CONTINUE.
SimStatusChange(s, status)
Instance of Simulink.MSFcnRunTimeBlock class representing the Level-2 MATLAB S-Function block.
Status of the simulation, either 0 when paused or 1 when continued.
The Simulink engine calls this routine when a simulation of the model containing S pauses or resumes. This method is only valid for simulation. C MEX S-functions must enclose the method in a #if defined(MATLAB_MEX_FILE) statement.
#if defined(MATLAB_MEX_FILE)
#define MDL_SIM_STATUS_CHANGE
static void mdlSimStatusChange(SimStruct *S,
ssSimStatusChangeType simStatus) {
if (simStatus == SIM_PAUSE) {
ssPrintf("Pause has been called! \n");
} else if (simStatus == SIM_CONTINUE) {
ssPrintf("Continue has been called! \n");
}
}
#endif
C, C++

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |