I only have “Autonomous Enabled” under “Robot Mode” for the Begin.vi
Autonomous code goes in Autonomous Independent.vi, with nothing special required in Begin or Finish. Begin should open all the robot I/O resources and store them in the RefNum Registry as usual. (Finish can close them if you want to be picky about cleaning up, but under normal conditions it’ll never be executed – the robot just gets turned off.)
I think I found the answer I was looking for.
I have been working on a offboard vision processing system. It runs on Linux and I want to have it shutdown before powering off the robot. I was hoping to have the Finish.vi run the vi that triggers the shutdown process automatically. Although, if the robot gets shut off before the Finish.vi gets called, then that scheme will not work.
So, any suggestions where to place a vi to shutdown the vision processor board automatically?
You need to decide upon a trigger for the shutdown.
If you know that you’re in a match, you might shutdown at the end of Teleop when you reenter the Disabled state.
During practice the Disabled state won’t be so predictable, and if your robot Disables for any reason during a match you’ll be out of luck.
If you can train your users to hit the Finish button on the panel, then Finish is a fine place to place the shutdown. But as the season progresses, that seems to become less and less common. I’d suggest putting it into multiple locations. If the HW doesn’t have its own button that can be programmed for shutdown, you can certainly mount your own on near the robot breaker and have the cRIO monitor it. Ultimately, that seems the best bet for general use.
Greg McKaskle