Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: Simulink Question: How to exit a simulation?

Subject: Simulink Question: How to exit a simulation?

From: Kedar Dimble

Date: 26 Jun, 2008 17:26:02

Message: 1 of 3

Hi,
  I was wondering if there is any way to exit or break a
Simulink simulation. To make myself clear, here is what I
want to do.
  I have a robot simulation running and running fine. To run
it from the command window, I have set the time argument to
be 20 seconds. Now I want to terminate the simulation when
the robot reaches a particular point. In my case, the robot
reaches the point and continues further as the simulation is
not over yet.
  Had it been an m-file, the loop could have been easily
terminated. But I have no idea how to terminate a Simulink
simulation when a particular condition is satisfied, before
the final time of simulation is reached.
  Any help will be highly appreciated. Thanks in advance.

KEdar

Subject: Simulink Question: How to exit a simulation?

From: David

Date: 26 Jun, 2008 18:32:01

Message: 2 of 3

"Kedar Dimble" <kedardimble@hotmail.com> wrote in message
<g40jfa$dun$1@fred.mathworks.com>...
> Hi,
> I was wondering if there is any way to exit or break a
> Simulink simulation. To make myself clear, here is what I
> want to do.
> I have a robot simulation running and running fine. To
run
> it from the command window, I have set the time argument
to
> be 20 seconds. Now I want to terminate the simulation
when
> the robot reaches a particular point. In my case, the
robot
> reaches the point and continues further as the
simulation is
> not over yet.
> Had it been an m-file, the loop could have been easily
> terminated. But I have no idea how to terminate a
Simulink
> simulation when a particular condition is satisfied,
before
> the final time of simulation is reached.
> Any help will be highly appreciated. Thanks in advance.
>
> KEdar

check out the 'stop simulation' block in the sinks.

Subject: Simulink Question: How to exit a simulation?

From: Kedar Dimble

Date: 7 Aug, 2008 16:39:03

Message: 3 of 3

"David " <dave@bigcompany.com> wrote in message
<g40nb1$1o9$1@fred.mathworks.com>...
>
> check out the 'stop simulation' block in the sinks.



Thanks David. Worked like charm.

Tags for this Thread

Everyone's Tags:

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.

Tag Activity for This Thread
Tag Applied By Date/Time
simulink Kedar Dimble 26 Jun, 2008 13:30:22
condition Kedar Dimble 26 Jun, 2008 13:30:22
terminate Kedar Dimble 26 Jun, 2008 13:30:22
simulation Kedar Dimble 26 Jun, 2008 13:30:22
rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics