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

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 210
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 60
Overview of the C MEX S-Function Routines
3-17
The following sections discuss each of these routines and give an overview of
themorecommonmacrosusedtoaccessthe
SimStruct data structure. A full
list of the macros is given in “The C MEX S -Function SimStruct” on page 3–9 7.
Alternate Calling Structure for the Real Time Workshop
If you use the Real-Time Workshop to generate code for a model that contains
S-functions, Simulink does not go through the entire calling sequence outlined
above. Initialization proceeds as outlined above until Simulink reaches the
mdlInitializeConditions routine. After calling mdlInitializeConditions,
Simulink calls
mdlRTW, an S-function routine unique to the Real-Time
Workshop,
mdlTerminate, and exits. This picture shows the calling sequence:
Figure 3-2: S-Function Calling Sequence when Simulink is Used with the
Real-Time Workshop
For more information aboutthe Re al-Time Workshop and how it interacts with
S-functions, see The Real-Time Workshop User’s Guide and The Target
Language Compiler Reference Guide.
mdlRTW
For code generation only
p. 3-54
mdlTerminate
p. 3-53
mdlSetInputPortWidth/mdlSetOutputPortWidth
mdlInitializeSizes
mdlInitializeSampleTimes
mdlSetWorkWidths
mdlStart
p. 3-28
p. 3-35
p. 3-46
p. 3-48
p. 3-36
mdlSetInputPortSampleTime/mdlSetOutputPortSampleTime
p. 3-33
mdlInitializeConditions
p. 3-48
Vedere la pagina 60
1 2 ... 56 57 58 59 60 61 62 63 64 65 66 ... 209 210

Commenti su questo manuale

Nessun commento