Clear Filters
Clear Filters

triggered events or triggered switch

9 views (last 30 days)
Andreas on 14 Jan 2020
Commented: Andreas on 14 Jan 2020
Hello everyone,
I built a model showing a tank filling routine. A pulse generator gives a start signal for filling the tank and will open a valve.
A counter (integrator) measures the tank volume and when a certain level is reached, the valve will be shut until start of the next cycle.
When a cycle is not complete, the system keeps filling and misses one trigger event (on purpose).
Is there any better way to model without memory block? Maybe some kind of triggered switch, which keeps its signal path until the next trigger signal?
Any help is appreciated.
  1 Comment
Andreas on 14 Jan 2020
This one inspired me a bit:
So I changed the model to be built with logical blocks, but still have to use memory blocks.
With step size and solver set to auto, both versions (in one model, chose via manual variant sink) create different output. When the maximum step size is reduced, output becomes similar.

Sign in to comment.

Answers (0)




Community Treasure Hunt

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

Start Hunting!