Problem with resettable subsystem

4 vues (au cours des 30 derniers jours)
Natalija Zivanovic
Natalija Zivanovic le 6 Mai 2020
Hi!
I am making a simulation in Simulink in which I want to reset a "From Workspace" signal when a certain signal goes from 0 to 1. I have tried to use resettable subsystem, but this does not seem to trigger a reset of the signal. I don't know if I am doing anything wrong or if what I want is not possible?
This is how my signals and simulation looks like:
The resettable subsystem:
The "Reset" block settings:
The signal used to trigger the reset (At time zero it also is equal to 1, but since it overlaps with y axis you cannot see it in the figure):
The output of the resettable subsystem (not as desired, it should reset right after 2 s):

Réponses (1)

Ameer Hamza
Ameer Hamza le 6 Mai 2020
The reset block does not apply to the time-dependent signals. It only resets blocks whose state change based on input, e.g., integrator, summation, etc. The output of From workspace depends on the current time. To read the value from the workspace and reset it after receiving a signal, you will need to write a function using the MATLAB function block, which reset the index of current value on receiving the signal.

Community Treasure Hunt

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

Start Hunting!

Translated by