View Single Post
  #3   Spotlight this post!  
Unread 24-03-2011, 07:58
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,751
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: More local variables.

How do the subVIs run? If one calls another calls another, like much of WPILib, then the typical approach is to pass the data in and out using a parameter. This is what happens if you select some code and use Edit>>Create SubVI from Selection.

If the VIs are going to loop forever, or for a long time, similar to how Periodic tasks or Vision does, then you need another communication mechanism. Globals are the one I'd start with. Be careful to write to a given global in only one loop and read it in the others, or you will start to see race conditions.

Greg McKaskle
Reply With Quote