I had written a program, my problem is for the first iteration program is Ok, for the next iteration it goes to the last flat sequence and run its elapsed time, I want for each iteration of program, run first, second, third and finally forth flat sequence and dont go to the last flat sequence.
Solved! Go to Solution.
don't use sequences, build a state machine instead!
Gerd's recommendation is very good. In addition, reset your "Time has elapsed" VIs by using the "reset" input:
that reset isn't needed as it is already set in the options of the ElapsedTime ExpressVIs… 😄
there is no wait function in your (while) loops: you don't need to spin them as fast as possible just to recalculate the very same expression again and again!
don't mind my last comment: it still makes sense to reset the ElapsedTime at while loop start…
I also recommend a state machine, but since this seems to be your very first program, here's some more advice.
I would recommend to try to convert the entire code to a simple state machine. The only structures you need is a single outer loop and a case structure. try it! :D.
Hi, that is a good idea, it resets elapsed time and my program works correctly, in the other hands there are other ways to do that.
yes your completely wright, I dont know about a state machine, i would be a good idea, a very small and useful program better than a big, complex program.