MATLAB Answers

Matlab not able to finalise running a script for a Simulink model

1 view (last 30 days)
An
An on 1 Sep 2020
Commented: Fangjun Jiang on 4 Sep 2020
I have currently occuring a problem with a Matlab/simulink model, which I will need to use for my project.
A Simulink model uses a Matlab script and functions for parameters calculation. In order to use Simulink model, I need to run the script.
Problem occurs when I try to run the code but never finalises that (I have waited at least half an hour). Also, I received ten (for 1-10 equal components) warnings stating:
Warning: Matching "From" for "Goto" 'WEC/no1/Goto23' not found
> In Lscript (line 128)
In the line 128, there is a command, which should start the Simulink model:
sim('WEC');
The model works fine for some other people, who have tried it in their PC and also the creator has said that everything should be correct in the sense of code and model.
Does anybody know to suggest why my Matlab might throw such messages and never finalise it?
Best wishes and thank you in advance!

  1 Comment

An
An on 2 Sep 2020
I guess running the script so slow is not related to that warning.

Sign in to comment.

Answers (1)

Fangjun Jiang
Fangjun Jiang on 2 Sep 2020
The warning messages are non-critical. It indicates some signals are "sent" but not used anywhere.
Might it be that computer capabilities are quite different? Open the model "WEC", reduce the simulation time and click the "Play" button manually to see if it finishes the simulation.

  5 Comments

Show 2 older comments
An
An on 4 Sep 2020
I have founf the problem, the simulation on SImulink has been set too long, I just shortened the simulation time duration. Unfortunately, commenting sim() line out is not an option because the script uses simout (to the workbase) data in calculations and otherwise is necessary to start calling this information manually.
Fangjun Jiang
Fangjun Jiang on 4 Sep 2020
I have been saying "reduce the simulation time" twice. sim() line does not have return variable. If run manually, simout would still be created in the base workspace.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!