LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you obtain graph information from a subvi?

Hello all,

I have a working VI that varies a voltage source with certain start end and intervals. and every step it increases the voltage, it takes a look at a spectrum which is graphed in a multiplot-XY graph. the vi on its own works perfectly fine. Now the problem is: when i tried to implement this vi as a subvi to a larger VI, the graph does not get updated during the steps, but only gets updated once when the subvi finishes and displays the final graph. I have connected the XY-Graph of my subvi to an output terminal and connected that to  a local variable of my bigger proram's Xy-graph.

I'd assume the problem is that the graph information only gets passed out of the subvi to the main vi once at the end of the subvi operation. (i have a for loop in my subvi to increase the voltage by steps, and then the same loop i take a spectrum and graph it, and i think that is the problem since i'd assume no information from this for loop will be passed out to the main  vi until the loop finishes, no?

attached is a look at my subvi.

thank you very much for all your help!!!!
0 Kudos
Message 1 of 4
(2,746 Views)
Hi northPIG,

wow, what a messy block diagram...Smiley Surprised
Left-to-right wiring? Straight wires? Using "value" property nodes when the terminal is unused (and wires are the way to go in LabVIEW)? Wild mix of datatypes?

Ok, now to your question:
To update the xy-graph from your subvi you need to wire a reference of the indicator to the subvi. In the subvi you can use a property node to set new values in the xy-graph (and here a property node is really needed)!
Best regards,
GerdW


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

=P sorry about the messiness~~

and to your answer:

i don't quite understand what exactly you meant by your answer. "wire a reference of the indicator to the subvi" the indicator as in the xy graph? and what exactly is a reference? those static vi reference thing? (sorry, i'm veeeeeeery new at this labview as you may tell from the messiness)
"use a proerty node to set new values in the xy-graph": isn't that what i used in my block diagram? I used a XY-graph value property node to update the xy-graph within my subvi.

so it won't work by simply making my XY-graph an output terminal and connect that terminal to the main VI's xy-graph?

if it's not too much trouble, please be bit more specific ><

 i uploaded the subvi even though it's missing few sub-subvis? (the main vi is 1mb big and requires like 270 different subvis so it's impossible to upload that one -_-)

thanks again for your help GerdW!
0 Kudos
Message 3 of 4
(2,734 Views)
Hi northPIG,

it seems you need to attend some basic LabView courses - the can be found on NI's website for free!

I changed the attachment to show what I tried to give by words in my previous message...
Best regards,
GerdW


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