Simulink model "running" from stand-alone "app designer" app

26 ビュー (過去 30 日間)
Aitor  Milo
Aitor Milo 2020 年 3 月 31 日
コメント済み: Hokky 2024 年 4 月 10 日 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 件のコメント
Birdman
Birdman 2020 年 3 月 31 日
What do you do in your Simulink model? Don't you have a chance to recreate it in a script?
Aitor  Milo
Aitor Milo 2020 年 3 月 31 日
編集済み: Aitor Milo 2020 年 4 月 1 日
It is a digital twin of a dynamic industrial process (with some inertias and variabilities). The tool takes a simplified version of the process and recreates it for an end user perspective (and expertise). It is a complex code which we have developed in simulink environment and now we want to transfer it to the customer.
Maybe it is possible to recreate it in a matlab script, however, as we are in the final step of the app designer (the stand alone test) we were wondering if is possible to run/call simulink models (.slx) with the stand alone version.
We thought so, because in the app designer environment works. But now we are not sure. It is not possible to run the simulink with the standalone version of app designer?
Thank you for your comment!

サインインしてコメントする。

採用された回答

Kojiro Saito
Kojiro Saito 2020 年 4 月 1 日
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 件のコメント
Ajay B
Ajay B 2024 年 3 月 28 日 14:48
same issue with me also, your issue got solved??
Hokky
Hokky 2024 年 4 月 10 日 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

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Design Optimization についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by