LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW - XY-Graph in SubVI

Hello,

I wrote a VI to read data from a temperature controller, including to plot the data in a X-Y-Graph. I can see the data immediately in  the graph. When I try to insert it as a SubVi into an other program, the graph does not show immediately the data. When the whole data recording is finished, the graph appears.

The program, which I want to include as a SubVI is in the appendix.

 

Can someone help me and explain me the problem?

Thanks!!

0 Kudos
Message 1 of 4
(2,065 Views)

Hi Stefanie,

 

I can see the data immediately in  the graph.

That's how you wrote this VI.

 

When I try to insert it as a SubVi into an other program, the graph does not show immediately the data.

The graph in this very (sub)VI will still show the data immediatly!

 

When the whole data recording is finished, the graph appears.

I guess you talk about a graph in your calling MainVI: yes, it will show the data once the measurement is finished.

 

Can someone help me and explain me the problem?

That's no problem.

It's the way LabVIEW works: THINK DATAFLOW!

The main VI will receive the data only when your subVI finishes it's execution!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,060 Views)

Thanks for your answer! Did I understand it right, that the best would it just be: Not including this Vi as a SubVi? 

Or is there an other possibility?

0 Kudos
Message 3 of 4
(2,057 Views)

You can leave this code as a subVI. You have to be aware of when you are executing the code. You need to make sure that where you place your code in the program will cause the subVI to execute. You also need to make sure that all of the required set-points are connected to the subVI to ensure that it functions properly.

 

If you show us the rest of your code we can help you implement this code so it will execute as you are hoping.

Tim
GHSP
0 Kudos
Message 4 of 4
(2,052 Views)