![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/388643/image.png)
Unable to reset sample and hold signal in resettable subsystem - Simulink
4 views (last 30 days)
Show older comments
I am trying to reset a sample and hold block in simulink using the resettable subsytem, but I cannot reset the output. The first image below shows the simulink flow diagram within my resettable subsystem. The input is the second (red) waveform shown below, the reset signal is the third (yellow), and the output is the first (green). I want the output (green) to return to a state of 0 once the rising edge is triggered by the reset signal, however this does not happen for some reason. I do not know if this is because the sample and hold block is not working properly with the reset block. If you have any other suggestions how to implement this without using a sample and hold block please let me know. All I am trying to do is hold a value of 1 once the input is triggered, and then keep that value of 1 until the reset signal is triggered.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/385988/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/385993/image.jpeg)
0 Comments
Answers (1)
Nagasai Bharat
on 22 Oct 2020
Edited: Nagasai Bharat
on 22 Oct 2020
Hi,
From my understanding the problem is that the output is not getting reset when triggered.The workaround I could devise is using a monostable block(set trigger to rising) with the pulse duration to be the maximum duration between the initial input trigger and the reset trigger possible. This would help you achive the result you are trying to achieve.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/388643/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/388643/image.png)
In this case I have used 10s as my pulse duration which is the stop time.
1 Comment
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!