![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1146195/image.jpeg)
[Simulink] I want to just switch two values with positive trigger
4 views (last 30 days)
Show older comments
Hi,
I want to make a simple Simulink model, switching two values with positive trigger, as shown below.
How can I make it? I tried many things, but I could not.
# I want to use only HDL-compatible block.
Best,
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1145805/image.png)
0 Comments
Answers (1)
Fangjun Jiang
on 5 Oct 2022
Use the trig signal to trig a "triggered subsystem", the trigger type is "rising". Inside the subsystem is a "Not" logical block. Outside, feed the subsystem output to a "Unit Delay" block and then feed it to the input of the subsystem. Set the inital of "Unit Dela" to be 0.
All blocks are from HDL library.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1146195/image.jpeg)
0 Comments
See Also
Categories
Find more on Schedule Model Components 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!