Hello,
Seeing your diagram (why make it so complicated when a simple solution exists), you are still using unappropriate methods (I gave you some advice some time ago, see https://scilab.discourse.group/t/piecewise-velocity-over-time-scilab-xcos). If you want some help, you should first describe things precisely (you have some typos, e.g. does “5/s” mean “5m/s” ?).
The velocity starts at 5/s and then after 25m, the velocity changes to 0, then when it becomes 0, it stays there for 3 sec, after the 3 sec delay it moves back with a speed of-5m/s until it goes back to the original position then once it reaches the original position, the velocity becomes 0 then i want it to loop
Are you considering a point which is moving along a linear axis, initially at x=0, whose speed profile is defined on [0,t_3] by
with t_2=t_1+3 and such that x'(t) is periodic and has period t_3 ? if the answer is yes, you have t_1=5s, t_2=8s and t_3=13s and it is easy to generate x(t) in Xcos (and even make it periodic) by using the signal builder block:
speedprofile.zcos (3.6 KB)