Course Details
This one-day course presents multiple methods for integrating C code into Simulink® models. Topics discussed include the C Caller and C Function blocks, Legacy Code Tool for wrapping external C functions into Simulink, and manually written C MEX S-functions. This course is intended for intermediate to advanced Simulink users.
Day 1 of 1
Integrating External C Code Using Simulink Blocks
Objective: Integrate C code into Simulink models using the C Caller and C Function blocks.
- Integrating algorithmic C code
- Integrating C code with custom data types
- Integrating code with states
- Sharing custom C code blocks
Creating S-Functions from Legacy Code
Objective: Integrate C code into a Simulink model using automated tools.
- Calling external C functions with Legacy Code Tool
- Handling states
- Sharing compiled S-functions
Writing Wrapper S-Functions
Objective: Integrate C code into a Simulink model by manually writing C MEX S-functions.
- Writing C MEX S-functions
- Calling external code from C MEX S-functions
- Work vectors
- Debugging C MEX S-functions
- Multirate C MEX S-functions
Deploying Integrated C Code
Objective: Explore the procedures and limitations for automatically generating code with Simulink Coder™.
- Generating code from C Caller and C Function blocks
- Generating code from C MEX S-functions
- Function inlining
- Integrating target-specific code
C Code Integration Methods Review
Objective: Review code integration methods and discuss the pros and cons of each.
- Review of all methods of code integration
- How to choose a code integration method
Level: Intermediate
Prerequisites:
- Simulink Fundamentals
- MATLAB Fundamentals
- Knowledge of C programming
Duration: 1 day
Languages: Deutsch, English, 日本語, 한국어