|

Course Highlights
This one-day course presents multiple methods for integrating code into Simulink models. The focus will be on integrating C and MATLAB®. Topics discussed will include M-file and C-MEX S-functions, Embedded MATLAB, and the Legacy Code Tool for wrapping external C functions into Simulink. This course is intended for intermediate to advanced Simulink users.
Course Objectives
The aim of the course is to provide knowledge on writing M-file and C-Mex S-functions, wrapping external C functions code using Legacy Code Tool and using Embedded Matlab.
Who Must Attend
Engineers, scientist and researchers who wish to integrate applications written in C and Matlab into Simulink model.
Course Benefits
Upon the completion of this course, the participants will be able to design integrated Simulink model with C and Matlab code.
Pre-requisites
"Comprehensive SIMULINK", "Comprehensive MATLAB", and knowledge of C programming.
Course Outline
Introduction
Gain a basic understanding of the methods of integrating code into Simulink and the motivations for using each method
- Company introduction
- Model-Based Design
- Overview of code integration methods
- Choosing the correct code integration method
Transitioning from MATLAB® to Simulink®
Learn about the methods of integrating M-code into Simulink
- Writing Embedded MATLAB Functions
- Benefits and drawbacks of Embedded MATLAB Functions
- Converting a MATLAB function to an Embedded MATLAB Function
- Basic S-function concepts
- Writing M-file S-functions
- Benefits and drawbacks of M-file S-functions
- Level-1 versus Level-2 M-file S-functions
- Converting a MATLAB function to an M-file S-function
Calling External C Functions and Routines
Learn about the methods of integrating C code into Simulink
- Calling an external C routine using the Legacy Code Tool
- Benefits and drawbacks of using the Legacy Code Tool
- Writing an S-function using the S-Function Builder
- Benefits and drawbacks of using the S-Function Builder
- Calling an external C routine using the S-Function Builder
Code Generation Considerations
Learn the procedures and limitations for automatically generating code with Real-Time Workshop® when using the code integration methods described in the course
- Process for generating code from an Embedded MATLAB Function
- Limitations for generating code from an Embedded MATLAB Function
- Limitations for generating code from M-file S-functions
- Legacy Code Tool options that facilitate code generation
- S-Function Builder options that facilitate code generation
- Limitations for generating code from the S-Function Builder
|