Hi,
I understand that you're trying to implement a periodic timer in Simulink, which resets after reaching a specified time and starts over until the simulation stop time is reached.
A combination of the following Simulink blocks can be used to achieve this:
- "Clock" block to monitor the current simulation time,
- "Constant" block to set the desired timer duration, and
- "Mod" block to implement the periodic reset.
Here is an example:
The output from the "Mod" block yields the current simulation time modulo the specified timer duration, which is essentially performing the reset operation.
Here’s the output of the “Scope” block:
The model has been attached for reference. Hope this helps.
Best,
Umang