Thread Subject: Making a step x seconds after a subsystem is enabled

Subject: Making a step x seconds after a subsystem is enabled

From: Kevin

Date: 29 May, 2008 11:25:04

Message: 1 of 4

Greetings

I want to use a step source in an enabled subsystem. The
problem is that I want the step to happen a certain time
after the subsystem is enabled.
Should I use a timer? Or is there a more simple way?

Subject: Making a step x seconds after a subsystem is enabled

From: aasim Azooz

Date: 29 May, 2008 14:45:04

Message: 2 of 4

"Kevin " <kedecuyp@mathworks.com> wrote in message
<g1m3qf$qu3$1@fred.mathworks.com>...
> Greetings
>
> I want to use a step source in an enabled subsystem. The
> problem is that I want the step to happen a certain time
> after the subsystem is enabled.
> Should I use a timer? Or is there a more simple way?

use wait(time)
Aasim Azooz

Subject: Making a step x seconds after a subsystem is enabled

From: Kevin

Date: 29 May, 2008 15:34:01

Message: 3 of 4

"aasim Azooz" <aasimazooz@yahoo.com> wrote in message
<g1mfhg$408$1@fred.mathworks.com>...
> "Kevin " <kedecuyp@mathworks.com> wrote in message
> <g1m3qf$qu3$1@fred.mathworks.com>...
> > Greetings
> >
> > I want to use a step source in an enabled subsystem. The
> > problem is that I want the step to happen a certain time
> > after the subsystem is enabled.
> > Should I use a timer? Or is there a more simple way?
>
> use wait(time)
> Aasim Azooz

I forgot to say that I'm using Simulink, so it doesn't work.
But thanks anyway

Subject: Making a step x seconds after a subsystem is enabled

From: Devdatt Lad

Date: 29 May, 2008 17:54:27

Message: 4 of 4


> I want to use a step source in an enabled subsystem. The
> problem is that I want the step to happen a certain time
> after the subsystem is enabled.
> Should I use a timer? Or is there a more simple way?

Kevin,

You cannot use the Step source block in this case. Try using the "Signal
From Workspace" block in Signal Processing Blockset / Sources library and
specify the data as

[0, 0, 0, 0, 0, 1]

Select to "hold final value" from the popup box and set sample time to 1.
The step will now occur 5 seconds after the subsystem is enabled.

Hope this helps,
Devdatt

-----
Devdatt Lad
The MathWorks, Inc.


Tags for this Thread

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.

rssFeed for this Thread
 

MATLAB Central Terms of Use

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 Terms prior to use.

Contact us at files@mathworks.com