Search Comments and Ratings

go

   
Date File Comment by Comment Rating
20 Feb 2011 Simulink Signal Viewing using Event Listeners and a MATLAB UI. This demo shows how to use block listeners to view model signals in a MATLAB user interface. Author: Phil Goddard Goddard, Phil

A couple of comments ask about using the "old method" of an s-function instead of an event listener.
I often use the S-function approach, and to some extent prefer that way.
However it means that the model itself must be modified -- by the addition of the s-function block.

Sometimes, for whatever reason, you don't want to add that additional block.
Rather you want the UI to attach itself to an existing model, do its stuff, then unattach itself at the end.
That is what the event_listener approach allows.
e.g. you want to write a UI that allows the user to select one of many different models to run and upload data from.

08 Nov 2009 Simulink Signal Viewing using Event Listeners and a MATLAB UI. This demo shows how to use block listeners to view model signals in a MATLAB user interface. Author: Phil Goddard Goddard, Phil

I've updated the example to show how to add listeners to multiple blocks.

29 May 2009 Simulink Signal Viewing using Event Listeners and a MATLAB UI. This demo shows how to use block listeners to view model signals in a MATLAB user interface. Author: Phil Goddard Goddard, Phil

The reported bug about not being able to have the model open _before_ opening the UI has been fixed.

Note however that there are many model-UI interactions that the demo does not handle. For instance if the simulation is started from the UI, but is stopped by pressing the stop button on the model, then UI stop/start buttons are not updated. There are many such interactions that would need to be handled in a production version of this app, but are not handled here since they are not core functionality for the topic at hand.

Contact us