Single use Simulink Switch

13 views (last 30 days)
Matthew Enright
Matthew Enright on 11 Jul 2016
Answered: Xiaojie Tao on 13 May 2024
Hey guys,
I'm new to these forums and having a bit of trouble with Simulink which I hope someone can help me with. I'm trying to create a single use switch that reacts to an input by switching something on when the input reaches a certain point but then stays on regardless of what the input then does.
For example: The input is an objects speed and when said objects speed goes above 100 it switches a light on. this light then stays on regardless of the changes in speed of the object i.e. if it goes below 100 it stays on and then if it again goes above 100 it still stays on, the light stays on until the simulation is terminated or reset.
My attempts previously have involved memory blocks and timers but I can't seem to make the switch stay permanently on once it's triggered, essentially I want the functionality of the manual switch but trigger-able by the simulation itself. Unfortunately I am also limited to using R2009a due to the hardware the simulation runs on.
Thanks in advance!

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 11 Jul 2016
  2 Comments
Matthew Enright
Matthew Enright on 12 Jul 2016
thank you! This makes everything I made far too overcomplicated.
Quazi Hussain
Quazi Hussain on 27 Mar 2019
Excellent! Helped me a lot at my work. Thanks Azzi.

Sign in to comment.

More Answers (2)

Mohit Kumar
Mohit Kumar on 13 May 2019
That Realy helped me a lot in my simulation...Thank you so much Azzi..

Xiaojie Tao
Xiaojie Tao on 13 May 2024
Azzi made my life easier

Categories

Find more on Simulink in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!