you can also do a "rectified" triangle wave like this:
and then auto-index a For Loop...
Likewise, I will try to change it as it would go to 0 after reaching 4 and then start counting until 4 again.
From this remark I get the feeling OP wants to go 0,1,2,3,4,0,1,2,3,4 AND\OR 4,3,2,1,0,4,3,2,1,0, not 01,2,3,4,3,2,1.
The title implies there is a 4-0 count down, but that could be in parallel of the up counting.
Of course, if you can count up from n=0-4, counting down is simply 4-n...
OMG. You are so exactly on the point. Yes, I made mistake while writing the title.
What I am looking for was 0,1,2,3,4,0,1,2,3,4,0 and so on.
Here is another way to do it (delay set to 1 s so you can see it counting).
Yes, it can be quite simple.
But none of the simple solutions will fit into an existing application, working as a simulation for a real device.
And we can't really suggest a solution for that, as it will depend on the existing structure...
If you have some driver VI that gets called in a loop, you'd could do something like this:
This can be called as often as you like, but should be called significantly more often then 5 times per second for good results.