Path: news.mathworks.com!not-for-mail
From: "Hong " <honghaot@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Simulink results & GUI
Date: Fri, 28 Mar 2008 13:48:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 32
Message-ID: <fsisuh$6tt$1@fred.mathworks.com>
References: <fqe7gf$hnq$1@fred.mathworks.com>
Reply-To: "Hong " <honghaot@gmail.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1206712081 7101 172.30.248.38 (28 Mar 2008 13:48:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 28 Mar 2008 13:48:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1061427
Xref: news.mathworks.com comp.soft-sys.matlab:459661



 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