How to control time in a while loop subsystem
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I did this simulink model and it worked (simplified representation below).
Now, I want to put all these operations into a while loop subsystem (simplified representation in image 2) in order to change in each iteration some parameters in the subsystem "Operations_1".
But when I want to run it, I have this error :
'.../Derivative' has sample time 0. Only constant (inf) or inherited (-1) sample times are allowed in iterator subsystem '.../...'
I didn't find where to change this sample time, despite my researches on forums.
So I tried to remplace it with a Discrete Derivative (because of the fact the signals are triggered and not continuous in the while loop) but I got this error :
Iterator subsystem '...' cannot contain block '.../Discrete Derivative/TSamp' because this block requires a service that maintains the time that
has elapsed between two consecutive executions. Since the iterator subsystem can be executed multiple times at a given time step, the concept of
elapsed time is not well-defined between two such executions.
I don't know how to do time-related operations into a while loop subsystem. I got this error not only on this specific derivative block, I also have some transfer functions in the subsystems 1&2 and I got similar results.
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Schedule Model Components in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!