How to access Fundamental Sample Time value within a simulink model
Mostra commenti meno recenti
I have a model will run fixed step discrete. Some of the subsystems I must use require the value of the fundamental step time as an input.
The quick version is, of course, to use a constant as an input and set it equal to the value of the fundamental sample time that's input in the configuration parameters.
And, of course, this method is an invitation to subtle bugs when the configuration parameter is changed but someone forgets to change one of the constant blocks to match.
So - is there a way to simply pull in the value that's been set within the configuration parameters?
Thanks.
Risposta accettata
Più risposte (1)
Babak
il 27 Nov 2012
1 voto
In Simulink Library Browser, go to the Simulink, Signal Attributes, section. There is a block called Weighted Sample Time.
That's what you can use to multiply any signal with it to get Ts.
2 Commenti
Douglas
il 28 Nov 2012
Babak
il 28 Nov 2012
Simulink is based on blocks and signals. I don't think there is any pre-defined, and system set up variable like Ts that you can just simply write it anywhere in any block and use it that way. I think the only solution is what you said, just connecting a unit step or 1 constant source to the Weighted sample block.
Categorie
Scopri di più su Schedule Model Components in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!