Basic Robot Main vi

If we are not using cameras, do we delete the second and third while loops showing in the Basic Robot Main vi?

Is there a need for them? Will they hurt anything if we leave them there, but are not uing them?

As far as i know…it should not cause any issues. Just make sure you delete the camera open.vi as well as the camera close.vi and I think it should all work fine.

We used the timing loop, but deleted the whole camera loop. Seems to work fine and is faster when doing the “trace execution” on the PC, since it has one less loop to go through.

What is the timing loop used for?

We put a 1 second delay inside the timing loop and increment a global counter in the timing loop. In the autonomous code we can read the global variable to see how many seconds have passed since autonomous started. We use this for timing movements during autonomous.

That certainly works, but if you would rather, you can put your time comparison directly in the auto. If you place a GetTime function at the beginning of your auto, and another inside your loop or other places in your code, you just subtract to get your elapsed time.

Greg McKaskle

You could use the structure posted
http://www.chiefdelphi.com/forums/showpost.php?p=829755&postcount=13. That make the loop run for 15 seconds and it will also monitor the amount of time elapsed in ms. This gives you a little more resolution and allows for a smaller step if you’re trying to ramp based on time

This thread also posts multiple versions of autonomous,