|
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
|