I'm in the process of connecting a GUI to a Simulink
simulation and I've run into a few difficulties.
1) The simulation should be running according to the state
of a togle button.
For this I'm using "while cmdStart_State == get(hObject,
'Max')" but the problem is the handles don't get updated
(and the results of the simulation don't get entered into
the workspace) until after the function ends.
My idea was to keep starting and pausing the simulation with
the set_param() function but that doesn't work either
because of the handles that don't update during the function
execution.
So is there a way to continously feed the results of the
simulation into the workspace? The idea is to make a live
plot and keep simulating until the button is toggled again.
To plot the figure while running simulation lively, m file
Fcn block following your simulink signals should be helpful.
"Kevin Voet" <kevin.voet@gmail.com> wrote in message
<fqe7gf$hnq$1@fred.mathworks.com>...
> I'm in the process of connecting a GUI to a Simulink
> simulation and I've run into a few difficulties.
>
> 1) The simulation should be running according to the state
> of a togle button.
>
> For this I'm using "while cmdStart_State == get(hObject,
> 'Max')" but the problem is the handles don't get updated
> (and the results of the simulation don't get entered into
> the workspace) until after the function ends.
>
> My idea was to keep starting and pausing the simulation
with
> the set_param() function but that doesn't work either
> because of the handles that don't update during the
function
> execution.
>
> So is there a way to continously feed the results of the
> simulation into the workspace? The idea is to make a live
> plot and keep simulating until the button is toggled
again.
>
> I appreciate any help and thanks in advance
Tags for this Thread
Add a New Tag:
Separated by commas
Ex.: root locus, bode
What are tags?
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.