Borrar filtros
Borrar filtros

Code Generation using Matlab script

3 visualizaciones (últimos 30 días)
Suryakiran Menachery George
Suryakiran Menachery George el 18 de Mayo de 2022
Respondida: Manas el 4 de Oct. de 2023
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.

Respuestas (2)

Harimurali
Harimurali el 4 de Oct. de 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:
  • 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.
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.

Manas
Manas el 4 de Oct. de 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

Categorías

Más información sobre Deployment, Integration, and Supported Hardware en Help Center y File Exchange.

Productos


Versión

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by