LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

can I create a picture file from a graph or chart image?

Hi!

I have an assignment at school to make an oscilloscope in Lab View 8.2 and I thought it would be cool if the user could create picture files at certain moments of time with the plot shown, smth like archives.
Is there a way the image can be exported and how can I control the type and name of those files?

Thanks!
0 Kudos
Message 1 of 3
(2,522 Views)
The graphs/charts have a "Get Image" method that returns the image data. You can feed this to one of the VI that save the data to a BMP or PNG file.

To get that method, right-click on the graph and select "Create -> Invoke Node -> Get Image"
0 Kudos
Message 2 of 3
(2,520 Views)
You may want to make these pictures printer friendly (white background, dark reticle).  It is fairly straightforward to do this.  In the event which handles creating the picture (you are using the event structure, aren't you?), do the following:
  1. Using a property node of the graph, get the current colors for the plot area and X and Y scale grid colors (yes, we buried them pretty deep Smiley Sad - look on the properties page to get names for things you want to change).  Also fetch the plot colors (colors of the traces).
  2. Using another property node, change the plot area and grid colors to something more printer friendly (white and a light gray are good).  You may also want to change the plot colors to something darker so they print well.
  3. Grab the image.
  4. Change the colors back to the original values (wire directly from the first property node).

If you want to see this sort of thing in action, download the NI-SCOPE driver.  It includes the NI-SCOPE soft front panel (a version of exactly what you are doing).  You can run it in simulation mode if you don't have an NI-SCOPE device.  Select File->Print.  You will see the graph area momentarily switch to white as the application does a screen capture for print.

Let us know if you need more information.

0 Kudos
Message 3 of 3
(2,492 Views)