MATLAB SIMULINK 7 - DEVELOPING S-FUNCTIONS Uživatelská příručka Strana 73

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 210
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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.
Zobrazit stránku 72
1 2 ... 68 69 70 71 72 73 74 75 76 77 78 ... 209 210

Komentáře k této Příručce

Žádné komentáře