|
Re: New Programmer looking for some help!
Another thing that hasn't been mentioned is that you are putting a long loop into the autonomous iterative callback. There are two supported ways of doing the autonomous -- iterative and independent.
The independent is somewhat easier to use for things like this. You enter your loop and use the Delay & Feed VI to time the movements in the loop. If you open the autonomous independent, there is code very similar to this already present, but turned off with a case structure and a constant. The independent runs until the DS or FMS ends the auto and disables the robot.
The iterative is supposed to return within 20ms so that the next packet can cause your callback to be called again. Technically, you can do this with the iterative, you you'll need to make some state data such as a global to keep track of the existing state and to trigger new state changes on some of the calls.
Greg McKaskle
|