User`s guide
Custom Code Library
11-5
• model.h — Header File block
•
model.prm — Parameter File block
•
model.c — Source File block
•
model.reg — Registration File block
The six function blocks in the second and third rows contain text fields to insert
critical code sections at the top and bottom of these designated model functions:
•
Registration function — Registration Function block
•
MdlStart — MdlStart Function block
•
MdlTerminate — MdlTerminate Function block
•
MdlOutputs — MdlOutputs Function block
•
MdlUpdate — MdlUpdate Function block
•
MdlDerivatives — MdlDerivatives Function block
Each block provides a dialog box that contains three fields.
Example of How to Use a Custom Code Block
The following example uses an MdlStart Function block to introduce code into
the
MdlStart function. The diagram below shows a simple model with the
Custom Code block inserted.