LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to mirror xy graphs between VIs?

Hi,

 

I've got an application where the main interface is a tab control.  Each of the 6 tab pages has a subpanel.  In each subpanel, there is a subVI that displays a number of controls and an XY graph.  The graphs vary a bit between the subVIs, with each graph having different cursors, maybe different axis labels, etc.  

 

I've recently received a request from a user that in addition to the tabs the system has now, they want an additional page on the tab that will show them the graphs from all 6 subVIs simultaneously.  

 

Is there some way I can "mirror" an xy graph control in a subVI and display the mirror in another?  I can get references to the original graph, and I only need to update the data once a second or so.  This is for viewing only - the user will not be able to interact with the mirrored graph (no cursor movement, no changing the axis, etc.).

 

Thanks,

JasonP

0 Kudos
Message 1 of 4
(3,374 Views)

Hi Jason,

 

You have some options.

 

You could use a reference and get the value of the graph.

This would require polling to get new values and property nodes can be slow.

 

Or you could use a Queue or a User Event to get the data to the main vi as shown in the attached examples.

 

steve

 

 

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
Download All
Message 2 of 4
(3,360 Views)

I know you mentioned you wouldn't want to edit the graphs, but perhaps you could use more subpanels of the same VIs as described here?
http://digital.ni.com/public.nsf/allkb/60A749CF788726088625766200537F65?OpenDocument
 

Message 3 of 4
(3,336 Views)

First - Thanks to you both for replying!

 

I can't use the subpanel approach - this would create separate instances of each subVI.  The new instances wouldn't share data with the old ones, and the whole point here is to build a type of summary page that shows what's going on in the individual subVIs.

 

I looked at the property node approach.  I think it could be made to work, but it feels a bit inelegant.  To get an actual mirrored graph, I'd need to grab a BUNCH of properties.  Still, if I can't find anything I like better, I may come back to it.

 

Putting the data in queues or events would be fine if all I needed to display were the plots.  But I also need to get the x and y scales, any cursors, etc.  Since the graphs (and graph properties) change from subVI to subVI, it would be difficult to come up with a generic format to send the additional (non data) elements.

 

So far, the most workable solution I've come up with is to grab the references to all the graphs in the subVIs, pass them to the summary VI in a functional global, use the refs + the "Get Image" method to grab a picture of each graph, and then display them in a picture control.  It works, and running 6 graphs (each updating once a second) doesn't really bog down my CPU.  The only problem is how to handle differently sized graphs in an aesthetically pleasing way.

 

JasonP

0 Kudos
Message 4 of 4
(3,331 Views)