Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

window pop up 1

Status
Not open for further replies.

chopieske

New member
Joined
Jun 14, 2012
Messages
3
Location
FR
Hello all,
I was wondering if there existed a block in Simulink that when a condition is satisfied, a window pops up with a message I would define.
Thank you in advance.
 
Yes, there is. Or more accurately, when a condition is satisfied you can enable a block to display a box with a message in it.

Here's the pseudo code

If condition==satisfied
then
MSG$="OMG it works!!!!"
messagebox(MSG$)
else
endif

This may need some banal refinements, but frankly let's face it, you should have done Business Studies.








Cheers

Greg Locock


New here? Try reading these, they might help FAQ731-376
 
Actually I was asking for block in Simulink, not MatLab code.

I'll try to be more specific:
I need to stop a simulation either when it finishes (obviously) or when a signal exceeds a certain value (for which I use a RELATIONAL OPERATOR block and a STOP block). It would be helpful to show a message if the simulation has stopped because of that value exceeding the limit imposed. (This model is going to be used by people when I'm not working here anymore so I won't be able to explain them.)
My question is if there is such a block in Simulink that when that condition is satisfied, a window or some kind of message pops up saying why the simulation has stopped. I would put this block parallel to the STOP block.

Would you GregLocock (or anybody else) be able to help again? Thank you.
...and please, don't be misrespectful.

Cheers
 
Nevermind, I already found it after 2 days of intensive search.

In case it can be of any help to somebody, it is a block called ASSERTION. It stops the simulation, shows an error window and writes whatever message in the Command Window.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top