GUI for Simulink as a standalone (load_system is excluded from packaging)

조회 수: 9 (최근 30일)
Hello,
I am having a GUI designed with App Designer running and displaying variables from a Simulink Model. I can also adjust variables in the GUI and update them into the simulation.
I use load_system('mysystem') and set_param('mysystem','Simulationcommand','Start') to start the system.
When I try to create a standalone now i get the Warnings
"load_system", "close_system, save_system" are excluded from packaging for the MATLAB Runtime environment according to the MATLAB Compiler license.
Is it not possible to run a simulation in a standalone application?

채택된 답변

Kojiro Saito
Kojiro Saito 2020년 6월 4일
편집: Kojiro Saito 2020년 6월 4일
load_system, close_system and save_system are not supported by MATLAB Compiler as described in this list.
But from R2020a, with Simulink Compiler, you can compile Simulink simulations as a standalone application.
Below is an example.
sim, Simulink.SimulationInput and Simulink.SimulationOutput are supported by Simulink Compiler, so you can create a standalone application with these commands instead of load_system.
  댓글 수: 1
Muhammad Awan
Muhammad Awan 2021년 2월 22일
Hi Korijo,
I saw this answer of yours and thought you may be answer to my query too. For a standalone app designer app, calling a simulink model, can we have a functionality like this one (List Available CAN Channels) shown in following example?
In this example, the chosen CAN channel is pushed in the simulink model using set_param command as shown below:
% Push the selected CAN channel into the simulation model CAN Configuration block.
set_param(canConfigPath{1}, 'Device', app.canChannelDeviceSelected);
set_param(canConfigPath{1}, 'DeviceMenu', app.canChannelDeviceSelected);
set_param(canConfigPath{1}, 'ObjConstructor', app.canChannelConstructorSelected);
Is it possible to do the same from a standalone app, which is required to Run on a computer without matlab & simulink installed?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Model, Block, and Port Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by