MATLAB SIMULINK 7 - DEVELOPING S-FUNCTIONS Guía de usuario Pagina 145

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 210
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 144
The C MEX S-Function SimStruct
3-101
Table 3-6: Error Handling and Status SimStruct Macros
Macros Description
ssSetErrorStatus
(S,"string")
For improved performance and error handling, your S-function
should report errors using:
ssSetErrorStatus(S, "error message");
return;
Be careful when using ssSetErrorStatus in your S-function. Error
string must be persistent memory; it cannot be a local variable.
ssGetSimMode(S)
This macro can be used to determine the context in which your
S-function is executing. Current simulat ion modes are:
SS_SIMMODE_NORMAL Running a “normal” Simuli nk simula tion
SS_SIMMODE_SIZES_CALL_ONLY Block edit (evaluation) to
obtain number of ports
SS_SIMMODE_RTWGEN Generating code
SS_SIMMODE_EXTERNAL External mode simulation
ssGetSolverName(S)
This returns a char * name of the solver.
ssIsVariableStepSolver
(S)
Returns 1 if the solver being used is a variable step solver. This is
useful when creating S-functions that have zero crossings and an
inherited sample time.
Vista de pagina 144
1 2 ... 140 141 142 143 144 145 146 147 148 149 150 ... 209 210

Comentarios a estos manuales

Sin comentarios