User`s guide

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.