Hello,
It's not fully clear to me what you are trying to do based on your attached model, but if I am correct you want to repeat a portion of a signal (is it a stimulus?) until a certain time, at which you would skip to the present time of that signal. I have attached a simple example showing this concept using a 1D Lookup Table and the simulation time using the Clock block, as well as the mod function to compare to the simulation time and model your 5 second loop frequency. Let us know if this helps.
Kris