|
Need help with Elapsed Time VI
Hi everybody, I'm a programmer for team #2250 (I apologize for my bad English). I got a problem with the Elapsed time VI (i think). I'm trying to set a loop that run in a certain amount of time (4 sec). I put 2 elapsed time VIs in 2 while loop cases. I set the time target is 4, the auto reset setting is true, the start time is 0 for each of them. The 2 loops is inside a sequence flat case (separately). When I try to run it, the robot does exactly what I want (a motor run forward 4 sec, then run backward for another 4 sec). However, when I try to do it the second time (with the same program), the timing goes crazy. The motor run forward for about 2, or 3 sec and then stop when it supposes to run backward. I reset the robot, deploy the same code again, and the first time I press the button, it goes very well (forward and backward), the second time, it is bad. I believe there are some mistakes in settings of the elapsed time VI. I think if I add some codes to reset it completely before run the loop (whenever I press the button) maybe helpful but I don't know how to fix it. Any ideas will be appreciated.
|