I am currently trying to implement a timer into a Simulink model I am working on. The idea is to take the current simulation time, limit it to 5400 seconds and when it reaches that value it has to reset to 0, reach 5400 s again and so on.
I was experimenting with different blocks but it either gets too complicated or I do not get the desirable results. I am attaching a screenshot of what I am trying to achieve just to give you an idea. I am trying to make something like this, but way more simpler. As you can tell from this model, it is not very practical. In addition Simuilink gets slower and slower, and also I am limited to the times I do add this loop. I used series of switches, each +5400 and in the end I subtract 86400s (equivelant to 24 hours) from the whole thing to make it start again and so on. I am pretty sure there is a much easier and simpler way I can do this.
Solutions solely involving Simulink would be much appreciated as I do not have experience with MatLab commands and scripts.
Thank you in advance.