11-28-2006 10:01 AM
11-28-2006 12:41 PM - edited 11-28-2006 12:41 PM
You would probably be best off using a "Functional Global" rather than a regular LabVIEW global.
A Functional Global is just a subVI with a while loop that has a shift register and a Case structure in the loop. Your data is stored in the shift register and the Case structure contains any number of states to manipulate the stored data.
I've attached a very simple example that can initialize your data, read, write and one case that can insert data anywhere in an array.
The advantage of using this over a regular global is better memory handling and it avoids the possibilities of race conditions that you must consider for regular globals. Also, since it's just a VI, you can add any number of cases to do whatever you need it to do.
As long as you do not make this VI re-entrant, anywhere you use it will be working on the same data set.
Ed
Message Edited by Ed Dickens on 11-28-2006 12:50 PM
11-28-2006 03:15 PM
Thank you very much ED,
I am going to try to use it.
Thanks again
Gonzalo