Opening Simulink models in stand-alone executable app?

4 visualizaciones (últimos 30 días)
Prabhakar Vallury
Prabhakar Vallury el 14 de Ag. de 2024
Respondida: Aditya Saikumar el 23 de Ag. de 2024
Hello,
I have an interactive app (.mlapp created in AppDesigner) that makes changes to a Simulink model (.slx) selected by the user. For example, the user may select signal lines and rename them according to a standard naming convention. After completion, the user saves and closes the Simulink model and moves on to the next one, etc. The .m scripts in the app utilize functions from several toolboxes such as Statistics, Simulink Test, Stateflow, Simscape, etc.
I'm interested in converting this app into a stand-alone executable (and perhaps even a web-app). The intent is to provide this executable to suppliers who may not have access to the Mathworks suite. What limitations/restrictions would come into play for such a conversion?
  • Can the user be provided a file-browser to select the Simulink model to open? Does the Simulink model itself need to be compiled?
  • Can the executable open the selected model and allow the user to interact (select, move, rename, etc)?
  • Are the necessary toolbox functions automatically included in the executable? Or does the end-user need a local installation of these toolboxes?
In general, I have the impression that stand-alone executables are suitable for apps that are self-contained (e.g., data-processing, plotting, etc) rather than opening and working with other files such as Simulink models.
Just beginning to look into this, so any learned guidance is much appreciated. Thanks!
P

Respuestas (1)

Aditya Saikumar
Aditya Saikumar el 23 de Ag. de 2024
Hi Prabhakar,
“App Designer uses MATLAB Compiler to create standalone applications. The following MATLAB documentation links list which Products/Toolboxes MATLAB Compiler supports, and which functions it does not support:
End-users do not need to install any toolboxes to run an application created by MATLAB Compiler. Take a look at the following MATLAB Answers link which provides more details about how MATLAB Compiler works in case additional Toolboxes are used: https://www.mathworks.com/matlabcentral/answers/1653310-which-toolboxes-are-included-in-the-matlab-runtime-mcr-for-2021a#answer_899665
"uigetfile" can be used to launch a file browser to select files. Following is the MATLAB documentation link for "uigetfile": https://www.mathworks.com/help/releases/R2024a/matlab/ref/uigetfile.html
As far as I know, the only way to edit Simulink models through App Designer is to use “open_system” function which opens the given Simulink model in Simulink. However, this function is not supported by MATLAB Compiler as listed in the documentation link above.
Thank you,
Aditya

Categorías

Más información sobre Modeling en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by