From what I know, you're right about the main vi not getting updated.
The subVI can only return values when it is done running. (It would be
nice if you could use pointers here...)
However, there are two ways to make this work:
First, you might want to bring the FOR or WHILE loop to the main VI
calling the subVI. Thus, the subVI only runs once and will return its
proper value to the main VI.
Second option is to have two consecutively running WHILE loops. One
calls the subVI as you are doing now. The second takes values from the
GLOBAL variables and displaying it on the screen. This method is not
elegant but it works. (also consider adding some delay or wait time so
you don't end up using all processor time updating the screen.)
Hope that helps.
Shan Pin Koh
In your case you need
1) an indicator on the main VI panel to display the boolean array
2) to pass a reference to that indicator to the subvi when you call it
3) to use this reference in the subVI, connect a property node to it and
write the values to be displayed to the 'value' property of this node
If you don't have version 6, you can write the values to be displayed to
a global and display this global in the main VI from within a while loop
which must run in the main VI in parallel to the running subVI.
It's more complicated, since you need a mechanism to gracefully shut
down the while loop after subVI finishes. You could do this with
another global control boolean which is not displayed but just connected
to the repeat terminal of the while loop. Don't forget to put a 'Wait' of,
say, 50...100 msec in that while loop.
-Franz
zkajan schrieb:
--
Franz Josef Ahlers
Section Semiconductor Devices
Physikalisch-Technische Bundesanstalt
Bundesallee 100
D-38116 Braunschweig
phone: (+49) 531 592 2410
fax: (+49) 531 592 2405