How to Restart "Repeating Sequence" block from t=0s
2 views (last 30 days)
Show older comments
Hello;
I making a EV car model in Simulink where I have a "Repeating Sequence" as source for my car speed profil, at certain point i stop the car to pass to charging then i resume the driving, which i want to resume the driving from t=0 in the speed profil which i cant now since i cant restart the block and the Repeating Sequence block has no time input to modify it.
Do you have an idea how can i restart "Repeating Sequence" block from t=0s ?
Thank you for your respond
Best regards
3 Comments
Rowan Koenderink
on 17 May 2022
I need the same kind of thing for a project of mine, did anyone find a solution yet?
Answers (2)
Yukthi S
on 3 Dec 2024
I got that you want to reset the speed profile for the car every time driving resumes after recharging.
Since "Repeating Sequence" cannot take external inputs for reset operation, using it within an "Enabled Subsystem" that resets upon enabling is a potential workaround to this issue. The “Custom Repeating Sequence” block given in the attachment might help you to get started.
This model uses an enabled subsystem with a custom sequence block made from a 1-D lookup table and a custom counter. The counter, which has an external reset signal, restarts the sequence every time the subsystem is enabled. This setup can be adjusted to fit specific needs.
In the installed MATLAB R2016b, type the following two commands in the command window to access the "Enabled Subsystem" documentation.
>> addressString = 'simulink/slref/enabledsubsystem.html';
>> web(fullfile(docroot, addressString));
The same workaround can be used for the latest versions of MATLAB also till date. Hope this workaround will get you started!
0 Comments
See Also
Categories
Find more on Sources in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!