MATLAB SIMULINK 7 - DEVELOPING S-FUNCTIONS Betriebsanweisung Seite 154

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 210
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 153
3 Writing S-Functions As C-MEX files
3-110
ssGetSFcnParam(S,index)
Used in any routine to access a parameter entered by in the
S-function block dialog box where
index starts at 0 and is less
than
ssGetSFcnParamsCount(S).
ssSetSFcnParamNotTunable
(S,index)
Used i n mdlInitializeSizes to specify that a parameter doesn’t
change during the simulation, where
index starts at 0 and is less
than
ssGetSFcnParamsCount(S). T his wil l improve efficiencya nd
provide error handli ng in the event that a n attempt is made to
change the parameter.
Table 3-8: Parameter SimStruct Macros (Continued)
Macros Description
Table 3-9: Sample Time SimStruct Macros
Macro Description
ssSetNumSampleTimes
(S,nSampleTimes)
Usedin mdlInitializeSizes to setthe number of sampletimes
your S-function has. This must be a positive integ er greater
than 0.
ssGetNumSampleTimes(S)
Canbeusedinanyroutine(exceptmdlIntializeSizes)toget
the number of sample times your S-function has.
ssSetSampleTime
(S,st_index, value)
Used in mdlInitializeSizes to specify the “period of the
sample time where
st_index starts at 0.
ssSetOffsetTime
(S,st_index,value)
Used in mdlInitializeSizes to specify the “offset” of the
sample time where
st_index starts at 0.
Seitenansicht 153
1 2 ... 149 150 151 152 153 154 155 156 157 158 159 ... 209 210

Kommentare zu diesen Handbüchern

Keine Kommentare