02-15-2017 10:56 AM
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
02-15-2017 11:11 AM
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?
02-15-2017 11:18 AM
Sounds pretty native 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!
02-15-2017 12:11 PM
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.