| mshafer1 |
09-02-2015 08:04 |
Re: motor programming
Quote:
Originally Posted by itwasntme455
(Post 1440477)
What is the wait 20 for in the bottom left corner?
|
The wait 20 is in there because this loop is designed to be dropped in Periodic Tasks and run in parallel with Teleop (which should contain your drive code). The wait command actually releases the processor to do other things for a split second then come back and rerun this loop.
Please note two things. 1) the code posted by Mark is a snippet, you can download the picture and drag it into LabVIEW and it will turn back into code.
2) it is advisable to move the part that he has labeled labeled for teleop into the loop (one joystick gets values, one index array, three branches of the button value) - mostly because these actions are related (increase cohesion).
|