LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pop up plot windows like Matlab figures

I don't have Matlab but I would like to be able to give the user the ability to select various variables and plot them.  My variables come from recorded TDMS files.  What I would like to provide is the ability to select vars or pairs of vars for plotting and allow the user to open up as many plot windows as they desire.  Then to give them an export function to save all the plot windows to a word document.

 

In MatLab, this is straight forward.  You just call figure() and then itterate through figure handles.

 

Is there a similar approach native to LabView Full?

 

Thanks,

 

XL600

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

Hi xl600,

 

- you can put your graph in a reentrant VI. Then call this reentrant VI using VIServer as often as you like to "open plot windows"…

- By collecting references to those VIs you can create your own save routine…

- There is the RGT to create "word documents"…

 

Is all this "native" enough?

Best regards,
GerdW


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

Sounds pretty native Smiley Happy  Could a reference to the graph control inside the pop-up be sent back via notifier to give the calling VI the ability to interact with the graph directly?  Or would a VI reference be recommended.

 

I would guess that the re-entrant graph VI would have to have a non-terminating loop to keep the reference(s) valid with some way to stop provided.  I'll give that a try.

 

I do have the RGT which should help.

 

Thanks!

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

A lot of the implementation details really depend on what you want the image to look like. For example, since you already have the VI reference, one "easy" way to do what you're asking would be to get the image of the entire front panel (http://digital.ni.com/public.nsf/allkb/09FAC3BEE5B9C38B862570EC00698237) and save that.

 

You'll definitely need a way to stop the VIs after you launch them with VI Server - there are many approaches to command a stop (Notifier, Queue, User Event, etc). If you aren't constantly updating the data in the graphs (which I assume you're not since your data is coming from a file), you don't really need a loop, you just need a blocking function with an inifinite timeout (like the Wait on Notifier) that will keep the VI running until you tell it to stop.

0 Kudos
Message 4 of 4
(2,753 Views)