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

  • 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 69
3 Writing S-Functions As C-MEX files
3-26
mdlProcessParameters
mdlProcessParameters is an optiona l routine that Simulink calls after
mdlCheckParameters changes and verifies parameters. The processing is done
at the top of the simulation loop when it i s safe to process t he change d
parameters. This routine can only be used in a C MEX S-function.
The p urpose of this routine is to process newly changed parameters. An
example is to cache parameter changes in work vectors. Simulink does not call
thisroutine when itis used withtheReal-TimeWorkshop. Therefore, ifyouuse
this routine in an S-function designed for use with the Real-Time Workshop,
youmustwrite yourS-functionsothat it doesn’trelyonthis routine.Todo this,
you must inline your S-function by using t he Target Language Compiler. S ee
The Target Language Compiler Reference Guide for information on inlining
S-functions.
The synopsis is:
#define MDL_PROCESS_PARAMETERS /* Change to #undef to remove function */
#if defined(MDL_PROCESS_PARAMETERS) && defined(MATLAB_MEX_FILE)
static void mdlProcessParameters(SimStruct *S)
{
}
#endif /* MDL_PROCESS_PARAMETERS */
Vue de la page 69
1 2 ... 65 66 67 68 69 70 71 72 73 74 75 ... 209 210

Commentaires sur ces manuels

Pas de commentaire