Error running Simulink model from compiled App Designer GUI
Mostra commenti meno recenti
I have a very simple App Designer project that highlights a problem I'm having after compiling other more complicated App Designer projects into a standalone app.
The following runs without any issues when run from the App Designer enviornment. I'm simply passing a block parameter value into Simulink using 'set_param', running the model, obtaining and graphing the output data from the model.
The following is invoked by a button press callback in my App Designer Code
% Button pushed function: RunSimButton
function RunSimButtonPushed(app, event)
%Simulink Model Name & Sim Time
Model_Name='SimModelDebug_01';
Simulation_Time=app.SimTimeSpinner.Value;
%get amplitude value from user
AmplitudeValue= string(app.SineWaveAmplitudeSpinner.Value);
%update block value in model
set_param('SimModelDebug_01/SineWave','Amplitude', AmplitudeValue)
%run Simulink model
SimOut=sim(Model_Name,Simulation_Time);
%Get values back in from model
Wave=SimOut.Wave;
Time=Wave.Time;
WaveData=Wave.Data;
%plot sim data to GUI
plot(app.UIAxes,Time,WaveData);
end


However, when I compile the app and try to run it from the standalone program I get the following errors and the app will not run.
Error using SimDebug/RunSimButtonPushed (line 30)
SlProxy service unavailable.
Error in appdesigner.internal.service.AppManagementService/tryCallback (line 369)
Error in matlab.apps.AppBase>@(source,event)tryCallback(appdesigner.internal.service.AppManagementService.instance(),app,callback,requiresEventData,event) (line 37)
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 410)
Error while evaluating Button PrivateButtonPushedFcn.
Any help would be greatly appreciated!!!!
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Simulink Compiler in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!