From generated code (Simulink Embedded coder) to Simulink model, for verification
Ältere Kommentare anzeigen
Good evening, I'm working with Simulink Embedded Coder and I generated a Simulink discrete time controller model into C++ code. Now I want to verify if the code works as well as the starting Simulink model: so I want to subtitute the controller using blocks and MATLAB functions with a block running the C++ generated code, and verify if the behavior of the control in the simulated plant is the same for both of them.
How I can build a Simulink block running the source and header files of the generated code?
Antworten (1)
Mark McBroom
am 22 Mär. 2020
0 Stimmen
Put the Simulink model in Software In the Loop Mode(SIL). When this is done, Simulink will automatically replace the Simulink model with the generated code when the "Run" button is pushed. https://www.mathworks.com/help/releases/R2020a/ecoder/ug/about-sil-and-pil-simulations.html
1 Kommentar
Luca Nanu
am 27 Mär. 2020
Kategorien
Mehr zu Simulink Coder finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!