MATLAB SIMULINK 7 - DEVELOPING S-FUNCTIONS Guide de l'utilisateur Page 145

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 210
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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.
Vue de la page 144
1 2 ... 140 141 142 143 144 145 146 147 148 149 150 ... 209 210

Commentaires sur ces manuels

Pas de commentaire