 geno13
		
			geno13
		
		
		
		
		
		
		
		
	
			08-04-2008 02:26 PM
 MikeS81
		
			MikeS81
		
		
		
		
		
		
		
		
	
			08-04-2008 02:39 PM
 
					
				
		
 Ray.R
		
			Ray.R
		
		
		 
		
		
		
		
		
	
			08-04-2008 02:40 PM
Yes, Functional Global(s) may be able to help you, but you may fall also into the same (or similar) trap.
However, what you could do is to use Functional Globals that contain clusters which group data together.
But before you code too far, why are you using so many Global Variables (globals) in the first place? Maybe there are better alternatives.. I often see people over using Globals and Locals when there is no need to do so.
Is it possible to show your code?
R
 Ben
		
			Ben
		
		
		 
		
		
		
		
		
	
			08-04-2008 03:25 PM
yes sharing your code will let us supply better suggestions.
I seldom use AN Action Engines (Functional globals) with a large amount of variables unless they are related in some way. This decision only comes after a lot of thought about who needs to access them and how the various fields interact. Once I have completed all of that work and decide I have to group a set of variables together and have ruled out using queues, only then will I create a cluster for that data structure and develop the AE. Whenever possible put un-related values in distinct AEs.
Ben
 
					
				
		
 Ray.R
		
			Ray.R
		
		
		 
		
		
		
		
		
	
			08-04-2008 04:56 PM
I agree with Ben.
Using queues is better than a number of Globals or Action Engines (Functional Globals). If you need to pass data to a sub-vi, you can simply wire the queue out to a queue control of a sub-vi, or a reference. See attached example of passing data to a sub-vi using a queue. The example is an extremely simple, undocumented tid-bit of code that sends the loop count to the consumer VI.
Run the main program called QueueProducer.vi.
R
08-05-2008 09:15 AM
 
					
				
		
 Ray.R
		
			Ray.R
		
		
		 
		
		
		
		
		
	
			08-05-2008 09:38 AM
08-06-2008 04:25 PM
 Ben
		
			Ben
		
		
		 
		
		
		
		
		
	
			08-06-2008 05:03 PM
08-08-2008 08:38 AM