Thread Subject: Simulink results & GUI

Subject: Simulink results & GUI

From: Kevin Voet

Date: 2 Mar, 2008 12:45:03

Message: 1 of 2

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

Subject: Simulink results & GUI

From: Hong

Date: 28 Mar, 2008 13:48:01

Message: 2 of 2

 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.

rssFeed for this Thread

Contact us at files@mathworks.com