Thanks.
Hai,
You can write the Simulink Block output values into a .mat
file using 'To File' block and read the same file from the
matlab GUI.
or else similarly you can also make use of 'To Workspace'
block and then read the workspace parameters from the matlab
GUI.
Regards,
Ashwini
"Ashwini Deshpande" <vd.as...@mathworks.com> wrote in
message <fvbi3v$624$1...@fred.mathworks.com>...
...
> You can write the Simulink Block output values into a .mat
> file using 'To File' block and read the same file from the
> matlab GUI.
...
> Yes I know, but in this way, if I run the simulation from
> the GUI with the command "sim(...)", I've got to wait the
> end of the simulation before execute the instruction which
> reads the file. I need a real time response...
Use set_param(bdroot, 'SimulationCommand', 'Start') to run
the simulation asynchronously.
--
Ralph Schleicher, Freelance Engineer http://ralph-schleicher.de
Development * Consulting * Training
Mathematical Modeling and Simulation
Software Tools
-Beth W.
Ralph Schleicher <r...@ralph-schleicher.de> wrote in message
<878wyuv...@echo.mueller-schleicher.i>...
> Is there a way to plot in a GUI window, realtime, the
> values that are being generated by a simulink model? Like
> having a scope but within a GUI screen?
Yes of course. Add a call-back function to your GUI returning
the handles of the UI objects. Write an M-file S-function with
the Simulink signals as input. Query and cache the UI object
handles in the StartFcn, then update the UI objects in the
mdlUpdate procedure. Done that, works like a charm.
Hello Elizabeth
Could you be kind to post an example for plotting realtime
graphs in GUI
IrFaN
Dear Ralph, Dear Elizabeth,
could you exemplify that problem ...
"Add a call-back function to your GUI returning
the handles of the UI objects. Write an M-file S-function with
the Simulink signals as input. Query and cache the UI object
handles in the StartFcn, then update the UI objects in the
mdlUpdate procedure. "
or provide mor detail
Thanks in advance
Martin
hey..Regarding the that u wanted take real time data from simulink to GUI..I am currently doing something related to this..but i dun have any idea..
can u give some example of code?
> hey..Regarding the that u wanted take real time data from simulink to
> GUI..I am currently doing something related to this..but i dun have
> any idea.. can u give some example of code?
See <http://ralph-schleicher.de/pub/slui/slui-2008-08-30.zip>, for
a complete example.
--
Ralph Schleicher <http://ralph-schleicher.de>
The link doesn't seem to work for me. Could you please re-upload it again?
Regards,
Saidul
Ralph Schleicher <r...@mueller-schleicher.de> wrote in message <871vtpo...@echo.mueller-schleicher.i>...
I have uploaded an example UI/model using this approach to the file exchange:
http://www.mathworks.com/matlabcentral/fileexchange/24294
Phil.
could u post an example of this metod? (use s function insted event listener)
Hello,
I followed your example and it works very nice, thank you for that. However now I need to access both signals from XYGraph block? Could you tell me how to do that? I changed
sTime = block.CurrentTime;
into:
sTime=block.InputPort(2).Data;
In localEventListener function, but now both variables: sTime and data have the same values. What am I doing wrong?