Simulink model "running" from stand-alone "app designer" app
23 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Aitor Milo
le 31 Mar 2020
Commenté : Hokky
le 10 Avr 2024 à 18:43
I am developing an app with app designer. The app employs Simulink models. I want to use the app through the standalone Desktop App.
The app runs/works correctly in the Matlab environment. However, I use the MATLAB compiler to create the app, then I execute the app and the app fails when the simulink code is executed.
simOut=sim('MODEL.slx','StopTime','TimeEnd','FixedStep','1','StartTime','0');
How can I run a Simulink model with a standalone desktop app?
Thank you in advance
2 commentaires
Birdman
le 31 Mar 2020
What do you do in your Simulink model? Don't you have a chance to recreate it in a script?
Réponse acceptée
Kojiro Saito
le 1 Avr 2020
Yes, sim command does not work in MATLAB Runtime as of R2019b, so applications which use Simulink models cannot directly compile with MATLAB Compiler.
From R2020a, Simulink Compiler has released. With this toolbox as well as MATLAB Compiler, sim command can be compiled as a standalone application.
For limitation of Simulink Compiler, here is a list of toolboxes, functions and Simulink blocks which MATLAB Compiler / Simulink Compiler support.
6 commentaires
Hokky
le 10 Avr 2024 à 18:43
Hello,
First the version I am working with is 2019b and can not be changed by the requirement.
This is so far I have done:
- created model, build and generate code resulted in model.exe
- create mlapp
- call the model.exe with params "system[model.exe, p]"
- build the mlapp include the model.exe
can any one tell me better way to do this, thanks
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Simulink Design Optimization dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!