LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to print a waveform graph programmatically from within Labview 7.1.1 Base Edition?

I would like to be able to print the results of a test from a Waveform Graph programmatically in a Labview 7.1.1 vi.
0 Kudos
Message 1 of 7
(2,766 Views)
Yes.  Fairly easily, too.  Take a look a the Print Report.vi, there are several related examples in the help file.
0 Kudos
Message 2 of 7
(2,759 Views)
Is the Print to Report.vi available in the Base Edition? I did try looking for this and could not find it. I am investigating if using "Vi Methods" will work, but this looks complicated.
0 Kudos
Message 3 of 7
(2,757 Views)
Hi,
  the first thing would be to get an image of the graph.
You can do this from a GetImage method node of the graph.
The next step would be to take that image and store it into a file somewhere. 
Unfortunately the file storage isn't available in the base package (the write to jpeg or write to bmp file) so you'd need to convert the flattened pixmap by hand and work out either the xmp file format (fairly easy but no examples of this for labview) or converting it into a bitmap or jpeg etc.
Knowing where you stored it you could then print it say by useing something that
had an activeX interface so you could load the file, and send it to print - you'll have to browse around and find one probably, or use microsoft word.
 
The easiest option by far is to upgrade to a full or professional version where you'll be able to do the reports etc. quite easily through the nireports vis.
 
Sorry.
 
Thanks

Sacha Emery
National Instruments (UK)
// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 4 of 7
(2,735 Views)
Sacha,
Thanks for the reply. I had already implemented a "print to .png file" option and figured that National Instruments would suggest upgrading despite your sales staff saying that the product we bought would do everything we needed to do for our projects.
0 Kudos
Message 5 of 7
(2,730 Views)
Hi
 
There is a way of doing it.
 
1. Create a sub-vi that will act as your report page.
2. You can then populate the Front Panel of this sub-vi with all the controls and decorations that you want to print. Make it look like a report page. The controls will need to attached to the connector pane so that you can pass the data into the sub-vi from you main vi for printing.
3. In the sub-vi, Go to File->Properties->Print Options and make sure that you check Automatically Print Front Panel every time VI completes execution.
 
 
4. Modify your Main VI so that it calls the  "Print Report" sub vi that you have just created on demand e.g. in response to clicking a button.
5. Remember to include the Front Panel if you build this into an application using app builder. The builder will normally strip front panels from sub vi's.
 
Hope that helps
 
David
 
 

Message Edited by David Crawford on 11-25-2005 02:44 AM

0 Kudos
Message 6 of 7
(2,717 Views)

Many thanks David.

This gives me a better solution than just outputting to a file. Plus I have the added advantage of removing the cursor controls from the graph to "clean up" the output.

0 Kudos
Message 7 of 7
(2,710 Views)