From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to have a subvi graph update in the main VI in labview 7.1

Solved!
Go to solution

I tried to follow this guide, but got stuck: http://digital.ni.com/public.nsf/allkb/0F4EA104660C0AF38625726F0069B27E

 

It seems that I'm having some issues in labview 7.1, I'm not sure what this step means: 

 

On the front panel, place a Control Refnum (Controls Palette»Modern»Refnum»Control Refnum), and select the appropriate VI Server class based on the type of control.

 

I tried placing a Control Refnum, but I'm not sure the appropriate VI Server class. I attached a vi showing the type of graph I'm using, I'm not sure which to select.

 

Is this possible in 7.1?

 

Thank you 

0 Kudos
Message 1 of 8
(4,040 Views)

I'm not sure how it is in LV 7.1, but in 2010 your ctlfef is selected here. You pass the ctlref to a sub-vi or upper VI.

 

VI server class.JPG

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 2 of 8
(4,034 Views)

Alright, I ended up doing it like that, using the refnum for a couple arrays that have my X and Y values, and then merging them into a graph. I'm doing

exactly like the guide, but the graph/XY values are still not updating til the end of the SubVI's run

 

http://digital.ni.com/public.nsf/allkb/0F4EA104660C0AF38625726F0069B27E

 

Ideas?

0 Kudos
Message 3 of 8
(4,001 Views)

You keep posting a link to an NI example. Post your main and subVI so someone can see what you've done incorrectly.

 

Also, the easy way to create the reference on the front panel of the subVI - on the block diagram of the main, right click on the indicator/control and select Create Reference. Drag that reference to the front panel of the subVI. Done.

0 Kudos
Message 4 of 8
(3,995 Views)

@Dennis Knutson wrote:

You keep posting a link to an NI example. Post your main and subVI so someone can see what you've done incorrectly.

 

Also, the easy way to create the reference on the front panel of the subVI - on the block diagram of the main, right click on the indicator/control and select Create Reference. Drag that reference to the front panel of the subVI. Done.



I was trying to avoid posting my code, but okay. 

The main and subvi with issues are attached. 

 

I'm pretty sure the reference is correct, because it DOES update after the subvi has finished running. I just need it to update itself as the stuff in the subvi is updated.

Download All
0 Kudos
Message 5 of 8
(3,989 Views)

How many time per iteration of the main loop do you think the arrays are read and bundled?  (once maybe?)


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 8
(3,985 Views)

@Jeff Bohrer wrote:

How many time per iteration of the main loop do you think the arrays are read and bundled?  (once maybe?)


Hmm, I get what you're saying. How would I possibly change it to behave how I want?

0 Kudos
Message 7 of 8
(3,983 Views)
Solution
Accepted by topic author bobholmgren

Got it working, I made a reference to the graph and did it that way. I wasn't sure what category the graph fit under in the selection, but it turned out to be "WaveformGraph"

0 Kudos
Message 8 of 8
(3,976 Views)