| MATLAB Central > MATLAB Newsreader > Clock that goes from 0 to 720 and start again (SIM... |
|
|
|
Subject: Clock that goes from 0 to 720 and start again (SIMULINK) From: Matt Date: 25 Apr, 2012 19:12:07 Message: 1 of 20 |
|
Hello ! |
|
Subject: Clock that goes from 0 to 720 and start again (SIMULINK) From: Steven_Lord Date: 25 Apr, 2012 19:27:35 Message: 2 of 20 |
|
|
|
Subject: Clock that goes from 0 to 720 and start again (SIMULINK) From: Matt Date: 25 Apr, 2012 19:47:07 Message: 3 of 20 |
|
Thank you for your answer ! |
|
Subject: Clock that goes from 0 to 720 and start again (SIMULINK) From: Steven_Lord Date: 25 Apr, 2012 21:20:27 Message: 4 of 20 |
|
|
|
Subject: Clock that goes from 0 to 720 and start again (SIMULINK) From: Matt Date: 25 Apr, 2012 21:35:17 Message: 5 of 20 |
|
Yes it is exactly what I have to do, now I'm gonna figure out how to use this with SIMULINK blocks ! :-) |
|
Subject: Clock that goes from 0 to 720 and start again (SIMULINK) From: Phil Goddard Date: 25 Apr, 2012 23:02:39 Message: 6 of 20 |
|
This is what the Limited Counter block does: |
|
Subject: Clock that goes from 0 to 720 and start again (SIMULINK) From: Matt Date: 26 Apr, 2012 12:24:12 Message: 7 of 20 |
|
Hmmm I didn't find something useful in there I'm afraid. But I did experiments and using the following SIMULINK blocks : |
|
Subject: Clock that goes from 0 to 720 and start again (SIMULINK) From: Phil Goddard Date: 26 Apr, 2012 14:55:12 Message: 8 of 20 |
|
The limited counter gives discrete steps. |
|
Subject: Clock that goes from 0 to 720 and start again (SIMULINK) From: Matt Date: 26 Apr, 2012 15:34:13 Message: 9 of 20 |
|
Fantastic Phil this is exactly what I need ! Do you know how can I change the frequency of the signal (aka being able to chose when it goes to 0 rather than having it set to 720) ? :-) |
|
Subject: Clock that goes from 0 to 720 and start again (SIMULINK) From: Phil Goddard Date: 26 Apr, 2012 17:10:12 Message: 10 of 20 |
|
The ramp/integrator will reset anytime the reset signal rises. |
|
Subject: Clock that goes from 0 to 720 and start again (SIMULINK) From: Matt Date: 26 Apr, 2012 19:04:30 Message: 11 of 20 |
|
Thank you Phil I got it now ! Many thanks ! :-D |
|
Subject: Clock that goes from 0 to 720 and start again (SIMULINK) From: Matt Date: 27 Apr, 2012 08:46:07 Message: 12 of 20 |
|
Sorry for bringing this back up but following the problem of the timer which has now been solved, I'm facing another problem related to this issue. |
|
Subject: Clock that goes from 0 to 720 and start again (SIMULINK) From: Phil Goddard Date: 27 Apr, 2012 13:35:21 Message: 13 of 20 |
|
|
|
Subject: Clock that goes from 0 to 720 and start again (SIMULINK) From: Matt Date: 27 Apr, 2012 14:49:07 Message: 14 of 20 |
|
Indeed Phil you were right, I had set a timestep and it was too big compared to the simulation time ! Now everything is sloved, I thank you again once again for your interest in my case ! :-) |
|
Subject: Clock that goes from 0 to 720 and start again (SIMULINK) From: hoangpham8182 Date: 18 May, 2012 08:27:27 Message: 15 of 20 |
|
On Apr 27, 4:49 |
|
Subject: Clock that goes from 0 to 720 and start again (SIMULINK) From: Matt Date: 13 Jun, 2012 07:17:10 Message: 16 of 20 |
|
My problem isn't totally solved. I had a closer look at the block system I did, following Phil's advice, and I must say it isn't exactly doing what it should be. Here is the the block schema : |
|
Subject: Clock that goes from 0 to 720 and start again (SIMULINK) From: Matt Date: 13 Jun, 2012 20:29:07 Message: 17 of 20 |
|
"Matt" wrote in message <jr9epm$b4d$1@newscl01ah.mathworks.com>... |
|
Subject: Clock that goes from 0 to 720 and start again (SIMULINK) From: Phil Goddard Date: 14 Jun, 2012 03:26:07 Message: 18 of 20 |
|
Creating the given model from scratch gives without changing any default settings gives a hit at exactly 720. |
|
Subject: Clock that goes from 0 to 720 and start again (SIMULINK) From: Matt Date: 14 Jun, 2012 19:07:07 Message: 19 of 20 |
|
"Phil Goddard" <phil@goddardconsulting.ca> wrote in message <jrblkf$9ki$1@newscl01ah.mathworks.com>... |
|
Subject: Clock that goes from 0 to 720 and start again (SIMULINK) From: Phil Goddard Date: 17 Jun, 2012 04:06:07 Message: 20 of 20 |
|
This is a solver selection issue -- with a fixed step solver (ode3 for instance) you are never going to get a vertical line. |
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 |
| lookup | Matt | 27 Apr, 2012 04:49:17 |
| simulink | Phil Goddard | 25 Apr, 2012 19:04:10 |
| simulink clock | Matt | 25 Apr, 2012 15:14:09 |
