MATLAB SIMULINK 7 - DEVELOPING S-FUNCTIONS Guida Utente Pagina 73

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 210
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 72
Overview of the C MEX S-Function Routines
3-29
simulation(or theReal-TimeWorkshopexternalmode)ifan attempt ismade
to change the parameter.
If your S- function outputs are discrete (e.g., can only take on the values, 1
and 2), then specify
SS_OPTION_DISCRETE_VALUED_OUTPUT.
The
ssGetPath (the Simulink full model path to the block) and
ssGetModelName (here model refers to the S-function name) are available for
use. If they are the same (that is, if
strcmp(ssGetPath(S),ssGetModelName(S))==0), then the S-function is
being executed from the MATLAB command line and is not part o f a
simulation.
In mdlInitializeS izes, you also must specify the number of sample times for
your block. There are two ways of specifying sample times:
Port-based sample times
Block-based sample times
See “SettingSample Times forC MEXS-Functions”onpage 3-36for acomplete
discussion of sample time issues.
Vedere la pagina 72
1 2 ... 68 69 70 71 72 73 74 75 76 77 78 ... 209 210

Commenti su questo manuale

Nessun commento