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

  • 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 81
3 Writing S-Functions As C-MEX files
3-38
Alternatively, you can specify that the sample time is in herited from the
driving block in which case the S-function can have only one sample time pair:
[INHERITED_SAMPLE_TIME, 0.0 ]
or
[INHERITED_SAMPLE_TIME, FIXED_IN_MINOR_STEP_OFFSET]
The following guidelines may help aid in specifying sample times:
A continuous function that changes during m inor integration steps should
register the
[CONTINUOUS_SAMPLE_TIME, 0.0] sample time.
A continuous function that does not change during minor integration steps
should register the
[CONTINUOUS_SAMPLE_TIME, FIXED_IN_MINOR_STEP_OFFSET] sample time.
A discrete function that changes at a specified rate should register the
discrete sample time pair
[discrete_sample_period, offset]
where
discrete_sample_period > 0.0
and
0.0 <= offset < discrete_sample_period
A discrete function that changes at a variable rate should register the
variable step discrete
[VARIABLE_SAMPLE_TIME, 0.0] sample time. The
mdlGetTimeOfNextVarHit function is called to g et the time of the next
sample hi t for the variable step discrete task. The
VARIABLE_SAMPLE_TIME
can be used with variable step solvers only.
If your function has no intrinsic sample time, then you must indicate that it is
inherited according to the following guidelines:
A function that changes as its input changes, even during minor integration
steps, should register the
[INHERITED_SAMPLE_TIME, 0.0] sample time.
A function that changes as its input changes, but doesn't change during
minorintegrationsteps(thatis,heldduring minor steps),shouldregisterthe
[INHERITED_SAMPLE_TIME, FIXED_IN_MINOR_STEP_OFFSET] sample time.
Vue de la page 81
1 2 ... 77 78 79 80 81 82 83 84 85 86 87 ... 209 210

Commentaires sur ces manuels

Pas de commentaire