| Real-Time Workshop® | ![]() |
Custom Code
The Model Source block adds user-specified custom code to the model.c or model.cpp file that the code generator creates for the model that contains the block.
Note If you include this block in a submodel (model referenced by a Model block), the Real-Time Workshop build process ignores the block for simulation target builds, but includes any specified custom code in the build process for other targets. |
Code to be added at the top of the model's generated source file.
Code to be added at the top of the model's generated source file.
See Example: Using a Custom Code Block.
Model Header, System
Derivatives, System Disable, System Enable, System
Initialize, System Outputs, System Start, System
Terminate, System Update
Inserting Custom Code Into Generated Code in the Real-Time Workshop documentation
![]() | Model Header | Protected RT | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |