12-29-2017 04:32 AM
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.
12-29-2017 04:38 AM
12-29-2017 05:25 AM
Gerd's recommendation is very good. In addition, reset your "Time has elapsed" VIs by using the "reset" input:
Regards, Jens
12-29-2017 10:27 AM - edited 12-29-2017 10:27 AM
Hi Jens,
that reset isn't needed as it is already set in the options of the ElapsedTime ExpressVIs… 😄
Hi hsa,
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!
12-29-2017 11:06 AM
12-29-2017 12:33 PM - edited 12-29-2017 12:34 PM
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.
12-29-2017 06:29 PM
And since everybody is recommending a state machine: Application Design Patterns: State Machines
12-31-2017 10:15 AM
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.
thanks jensG69
12-31-2017 10:22 AM
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.
thanks altenbach