- “rtwbuild”: This is the standard function used for building Simulink models for code generation. It generates code based on the model configuration settings and the selected code generation options. However, it does not include the necessary dSPACE-specific configuration for RCP target platforms.
- “rti_build2”: This function is specifically designed for building Simulink models for dSPACE RCP target platforms. It provides additional configuration options and handles the necessary setup for communication with the target hardware.
Code Generation using Matlab script
4 views (last 30 days)
Show older comments
When building for a dSPACE target platform (say 1401) ; should I use the standard rtwbuild('ModelName') or use the rti_build2('ModelName')?
Note: rtwbuild command works with the matlab version used.
0 Comments
Answers (2)
Harimurali
on 4 Oct 2023
Hi Suryakiran,
I understand that you are facing a dilemma on whether to use the “rtwbuild” or the “rti_build2” function when building a Simulink model for a dSpace RCP (Rapid Control Prototyping) target platform such as the dSpace 1401.
You should use “rti_build2” instead of “rtwbuild”, and here is why:
Therefore, the "rti_build2" function makes sure that the resulting code is appropriate for the RCP target platform and contains any necessary dSPACE-specific configuration.
I hope this helps.
0 Comments
Manas
on 4 Oct 2023
Hey Suryakiran Menachery George,
I understand that you would like to know to which command among “rtwbuild()” and “rti_build2()” is more suitable for running a Simulink model for the dSPACE target platform like DS1401.
It is recommended to use the “rtwbuild()” command. It is the standard command for building models and generating code for various target platforms including dSPACE platforms. “rtwbuild()” automatically handles the code generation process based on the target settings specified in your Simulink model and the configuration parameters.
“rti_build2()” command is specific to Real-Time Interface blocks and is typically used for advanced scenarios where you need more over control over the code generation process, such as customizing the interface between Simulink and the target platform.
Hope this helps
0 Comments
See Also
Categories
Find more on Simulink Coder in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!