LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graph in a subvi: how to update 2 or more graphs with same value on main vi?

 

 

So I have a DAQ graph inside a SubVI which is in a loop.

 

So unless the loop is executed, the Main VI does not get the value of the graph. Hence an approach I used is to use a reference which is working.
InSubVI.JPG

 

In Main VI and associated graphs:

In Main VI.JPG

 

Updates this.JPG

But the question is, how do I update 2 graphs which should have the same value on the Main VI?  I tried several ways but the second graph is not updating.

Any ideas? Thank you!!

 

 

0 Kudos
Message 1 of 6
(2,630 Views)

Hi rajiv,

 

Hence an approach I used is to use a reference which is working.

Use one more reference for that other graph!

 

I would not use that approach by reference, your UI might become slow due to shuffling larger (?) datasets into graphs by reference. There surely is a better way, like subpanels…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 6
(2,624 Views)

Gerd, I could not quite see how to implement the idea of subpanels, although I get the idea.  Am trying to implement the most effective methods.

 

I just tried to use an FGV in the SubVI which is buffering the data ( remember you told me about it: using a shift register), well I implemented that.

 

Now the idea would be simply to read the buffer on the main panel. Would that be the best way? Or the subpanel is still the best way? Thank you a lot for a response!!!

0 Kudos
Message 3 of 6
(2,553 Views)

Hi rajiv,

 

Now the idea would be simply to read the buffer on the main panel. Would that be the best way? Or the subpanel is still the best way?

What's your definition of "best"?

 

Start with a FGV…

Best regards,
GerdW


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

Best for me is what an expert in LabVIEW would consider as the best approach for that purpose.

 

So am doing data acquisition. However it is done within a SubVI as the whole structure is too large for the main VI. However the data needs to be seen on  several graphs on the main VI.

So far the FGV is working. So I buffer the data in the SubVI in the FGV and read it on the main panel and use it over for each graph I want to visualise the same result or permutations.

0 Kudos
Message 5 of 6
(2,541 Views)

Hello Gerd,

 

I confirm that using a reference from a SubVI to display a graph via reference to the Main VI slows down the Data acquisition of the subvi considerably.

 

Thanks for pointing that out!

0 Kudos
Message 6 of 6
(2,522 Views)