LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

A subVI's output value doesn't update

Here's a description of what happens. My main VI contains a subVI (in a while loop) which is doing some calculations. The problem is as follows: the output values of the subVI are to be displayed on the front panel of my main VI, but the indicators display 0 for two of these values. In fact, if I put a probe in the main VI to see the data outputing from the subVI, it is grayed (no data?) for the values I mentionned. Then, if I open the subVI to see the value on its own front-panel, I see the correct values that I should get in my main VI. From that point, the main VI starts displaying the correct values too.

To make it short, some values of the subVI aren't passed (or so it seems) into the main VI until I open the VI manua
lly by double-clicking on it while everything is running. Why?

The problem doesn't happen again until I close the main VI (not just stopping it) and/or Labview.

If it can help, I am using Labview 6.1 under Windows XP.

Any help would be greatly appreciated. Thanks!
0 Kudos
Message 1 of 6
(3,258 Views)
Could you post the subVI? Is it littered with e.g. value property writes on other indirect ways interacting with the FP objects?

For example, have a look at this recent thread
Message 2 of 6
(3,258 Views)
Without seeing the sample code the only useful information I would impart is that the mantra of LabVIEW, it's "data flow" programing so check your data flow is always the first step.
0 Kudos
Message 3 of 6
(3,258 Views)
Without more information and some code to look at, I would surmise that the subvi is set reentrant, and its indicators (that update the main vi ) are updated in the subvi thru property node "value"
Message 4 of 6
(3,258 Views)
Well, seems like you don't need anymore information: that's exactly what I had. By the way you're saying it, I guess that I shouldn't have value property nodes in a reentrant VI.

I replaced those by local variables and everything is working fine now.

I just wanted to know... was it mentionned somewhere in the Labview help? If it was, anyone could tell me where? If not, I think that it really should be.

Thanks everyone for your help!
0 Kudos
Message 5 of 6
(3,258 Views)
Property nodes are used in par with user interface. When it is used, it does update the value taken from the corresponding (variable on the) front panel.
Think of it for a given control/indicator, there are two separate variables (memory locations) one in the front panel and the other in the block diagram. In a reentrant vi, the front panel is dissociated from the rest of the code and is not updated, and hence the corresponding property node (value) is not really updated, which accounts for the terminal value not being updated either.
This is mentioned in all Labview help and in these dicussion forums (you keep reading about it all the time)
0 Kudos
Message 6 of 6
(3,258 Views)