LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why the waveform in Main program does not show up?

Hellow!
Attached is a simple example of the problem i met,when i run "main1.VI",why the waveform in subvi "1.VI" did not show up?what shall i do to make it show up? thanks!
0 Kudos
Message 1 of 9
(3,230 Views)
VI Properties
Category: Window Appearance

If you wish to have your subVI open on call, set it to Dialog or Custom.
Of the two, custom gives your more controls over how a VI is displayed.

Cheers!
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 2 of 9
(3,221 Views)
Your main program will receive data once the subVI stops. Your subVI never stops.

In order to stop the subVI via it's FP stop button, it's front panel must be open. Right-click on its icon in main.vi and select "subVI node setup". Select "show front panel when called and close afterwards". Once the subVI closes, the last point is shown in the chart of the main VI. This is probably not hat you really wanted.

It seems to me that you are a bit confused about the details of dataflow.

There are methods to update the main graph in realtime, but they are quite a bit more advanced. What exactly are you trying to do?
0 Kudos
Message 3 of 9
(3,218 Views)
what i mean is that i can not see the wavefrom in the waveform chart in main1.VI,what's that reason?

Message Edited by happybird on 06-17-2005 10:05 AM

0 Kudos
Message 4 of 9
(3,217 Views)
As mentioned before, you've made a mistake. When you call the subVI, execution passes from main to the subVI. You have a subVI with a while loop. The while loop can only be terminated with the front panel stop button. But, because you are not displaying the front panel of the subVI, there is no way to stop the subVI and your main VI appears hung up. Even if you display the front panel of the subVI, the indicator on the main will not update until the subVI finishes. That is the nature of dataflow in LabVIEW. In fact, in other programming languages, if you call a function with a while loop, the main part of the program will not see any updated values either. You can make a main VI show a subVIs values while it is executing with references or global variables but you still have to solve the problem of the subVI that you can't stop.
0 Kudos
Message 5 of 9
(3,203 Views)
Hi,

My apologies for mistaken your question 😛

Altenbach & Dennis had already answered to problem.
Nevertheless, please take a look at this simple test_mod.llb for your reference.

PS: A small loop-delay would be nice 🙂

Cheers!
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 6 of 9
(3,199 Views)
I thought I already explained that. You call a subVI that never stops which updates its own hidden waveform graph forever. This subVI cannot produce any output to the main VI until it finishes. It never finishes!

Dataflow dictates that:
  • A node cannot execute until all inputs have received data.
  • A node cannot produce output until it finishes.

    You have a few options, two are shown in the attached modification:
    (1) get rid of the while loop in the subVI and place it in the main VI. Now the subVI gets called successively, always immediately returning a value. (This is the correct and recommended way).

    (2) Feed a reference to the chart of the main VI to the subVI, then update the main graph via property writes. This is not very efficient but can be useful in a limited set of circumstances. The implementation is also currently incomplete, because the subVI cannot be stopped.

    In any case, please put some small wait in each of your loops. Else they spin as fast as possible, consuming all CPU and making your computer sluggish.
  • Message 7 of 9
    (3,197 Views)
    ian.f.k ,i am very interested in your program,but i have trouble to open it for my 7.0 version labview,could you please make a 7.0 version VI? thanks!
    0 Kudos
    Message 8 of 9
    (3,190 Views)
    Hello,

    Attached is the converted version.

    JLS
    Best,
    JLS
    Sixclear
    0 Kudos
    Message 9 of 9
    (3,165 Views)