View Single Post
  #2   Spotlight this post!  
Unread 15-03-2009, 19:05
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Programming toggle switches to DS for different autonomous routines?

You could possibly get by with a cheap switch read when the cRIO first boots, but I think a better solution takes just a few edits of the Basic template.

On your Basic diagram, open the Basic Get Mode VI. On its panel is an output called Robot Mode which wasn't connected as an output. When the template was made, I never checked to see what the DS behavior was, and assumed that Other would work fine. Since it doesn't, here is how to fix it.

On the subVI, right click on the icon in the upper right of the Basic Get Mode panel and Show the Connector. Click on one of the connector outputs, then click on the Robot Mode. Save the VI, Close, and on the Basic Robot Main, you now have access to the Robot Mode output. Wire this to the edge of the case so that in Other you can switch on it and you can read the switches only in Auto Disabled and set a global with the state of the switches.

Greg McKaskle
Reply With Quote