Display Simulation Time at 'First' Falling edge of a signal only in Simulink

1 view (last 30 days)
I want to display the time at which a signal drops from True to False for the very first time. I tried using triggered subsystem to write Clock to a Display but it keeps triggering it every time value the signal drops from True to False and only displaying the latest trigger.

Answers (1)

Fangjun Jiang
Fangjun Jiang on 2 Apr 2023
You can add an Enable block to make it Enabled Triggered subsystem.
Add a counter to enable it only before the first trigger.
I think a "self-locker" could also work. Inside this Enabled Triggered subsystem, connnect a constant TRUE to a second Outport. It's initial output is FALSE. Do a NOT operation to enable the subsystem.

Tags

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!