Block Creation Basics
Principles of extending block functionality of Simulink® through new block development
Simulink allows you to extend the built-in modeling functionality by integrating existing code and creating your own blocks.
Existing code can be any code that provides the kind of functionality not available through Simulink library blocks. You can integrate MATLAB®, C/C++, and Fortran code. You can also integrate System object™.
Create a new Simulink block for your needs if the built-in library does not provide a suitable block. You can create new functionality using a MATLAB function rather than a Simulink block diagram.
Blocks
Function Caller | Call Simulink or exported Stateflow function |
Level-2 MATLAB S-Function | Use Level-2 MATLAB S-function in model |
MATLAB Function | Include MATLAB code in models that generate embeddable C code |
MATLAB System | Include System object in model |
S-Function | Include S-function in model |
S-Function Builder | Integrate C or C++ code to create S-functions |
Simulink Function | Graphically define a function with Simulink blocks |
Fcn | Apply specified expression to input |
Topics
- Types of Custom Blocks
Learn about the capabilities of custom blocks.
- Design and Create a Custom Block
Build a custom block using a Level-2 MATLAB S-function.
- Comparison of Custom Block Functionality
Compare and contrast the features of different custom blocks types.