Brice Chatelan wrote in message <7qgiua$26k$1@minus.oleane.net>...
>I'm using a type 2 global variable because I need a big data array shared
by
>two parallel VI, so this data array is manipulated in a subVI non
reentrant.
>...
>For other method the big data array is read to extract part of needed data,
>so in the subVI diagramm, a readable local variable issued from the big
data
>array terminal is used . But how big data array is not needed for these
>methods, big data array terminal is not rewritten as output in these
>condition diagramms because the big data array is theoretically unchanged
>and I want to avoid to duplicate my big data array to save time and memory.
>The result is surprising because:
>After the load method, the big data array output is right.
>Then, the input of the second subVI call as a get method is correct.
>Readable local variable of the big data array sends right data as input of
>the condition associated with this method, in the subVI.
>Then, the input of the third subVI call as a get method is wrong. Readable
>local variable of the big data array sends wrong data as input of the
>condition associated with this method, in the subVI.
>
>So, I suppose I have to wire my big array as output of the condition for
>every method call, what lose
>a lot of time and memory.
>
>Have you a better idea, please?
>
Brice,
Are you using a while loop with uninitialized shift-registers in your LV2
style global. This technique is what defines a "LV2 style global" also
called functional globals because you can embed actual functionality into
the VI (for example in your case to extract certain data from an array and
operate on it) as opposed to the read/write only usage of the built in
globals.
From what I can gather, it doesn't sound like you are using the while
loop/shift-register method. You shouldn't need to use a local variable at
all. The data is passed around using the shift-register and it passes
through all of you conditions (load, get, etc.) and no you won't lose time
and memory (or money) doing it this way, certainly not any more than you
would using a local variable. Try it and see if it doesn't fix your
problems and work better than what you are doing now.
If you are using a while loop and shift-registers, then I'm not
understanding clearly what you are doing. Perhaps if you emailed me your VI
(privately of course) to take a look at.
Good Luck!
Scott Menjoulet