LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

two instances of the same subvi use the same internal data

I create a .vi that need to use many instances of the same subvi, the subvi work fine alone, when this subvi runs the first time, it puts an input data in the first position of an array contained in the subvi, the second time, it put an input data in the second position of its internal array…. Etc
but when i put 2 instances of the same subvi, i find that the two instances uses the same array but

i need that each instance use a different internal array,

the first time that the first instance of the subvi runs, puts the data in the first position of this internal array, the first time that the second instance runs, puts the data no in the first position of this internal array, it puts the data in the second position of the same array that the first instance.
i think that all the instances of the subvi uses the same space in memory.
What can i do?
0 Kudos
Message 1 of 2
(2,325 Views)
Make your sub-vi re-entrant. Select File -> Execution -> re-entrant. This will make a separate copy of the vi for each instance that you use it.
hope this helps
0 Kudos
Message 2 of 2
(2,319 Views)