How can I hold a true signal for a defined time after conditions are met in Simulink 8.3 (R2014a)?

82 views (last 30 days)

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 10 Sep 2018
Enabling a signal for a specified amount of time when triggered can be accomplished in several different ways in Simulink. The basic procedure to implement this type of logic is outlined, as follows:
1) Use a Simulink Clock block to get the current simulation time
2) Capture the current time when the enable/trigger event occurs
3) Disable the signal/enabled subsystem after the desired amount of time passes
See the attached example for an implementation with a MATLAB Function block using persistent variables.
More information on persistent variables in MATLAB Function blocks can be found, as follows:https://www.mathworks.com/help/matlab/ref/persistent.html

More Answers (0)

Tags

No tags entered yet.

Products


Release

R2014a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!