MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Guida Utente Pagina 285

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 386
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 284
Custom Code Library
11-7
The code below is the MdlStart function for this example (mymodel).
void MdlStart(void)
{
/* user code (Start function Header) */
/* System: <Root> */
unsigned int *ptr = 0xFFEE;
/* user code (Start function Body) */
/* System: <Root> */
/* Initialize hardware */
*ptr = 0;
/* state initialization */
/* DiscreteFilter Block: <Root>/Discrete Filter */
rtX.d.Discrete_Filter = 0.0;
}
Custom Subsystem Code
The Custom Subsystem Code sublibrary contains eight blocks to insert critical
code sections into system functions:
Each of these blocks has a dialog box containing two text fields that allow you
to place data at the top and the bottom of system functions. The eight blocks
are:
Subsystem Start
Subsystem Initialize
Subsystem Terminate
The custom code
enteredinthe
MdlStart Function
Custom Code dialog
box is embedded
directly in the
generated code.
Vedere la pagina 284
1 2 ... 280 281 282 283 284 285 286 287 288 289 290 ... 385 386

Commenti su questo manuale

Nessun commento