LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

quality of graphics

Which method will give me a better quality of a graphic? We need to save the graphic to a file, and we need to print it too. We use LabVIEW 6.0.2.
- Use the getimage method of a control and then save it to jpeg/png/bmp?
- Print the panel directly to a printer?
- Export data to Excel and then create an excel graphic using activeX?
- Any other?
0 Kudos
Message 1 of 5
(1,193 Views)
Hi,
I assume you're refering to a graph control graphic (this is usually the thing people want to print).
If so :
the getimage method will give you a graphic of exactly how it looks on screen, the same as printing the panel directly. If you need a quick method of getting the data onto paper, these are fine. If you need something you can extract points from on paper, you'll need to either a) make the graph as big on the screen as possible before employing either of the above methods, or b) save the data into a format a graphing program (i.e. Excel or some other data manipulation package) can handle. Then again, you'll be limited by how accurate those packages can print out.
Personally, I don't bother with high accuracy printouts, but I do save the raw data so I
can do post analysis inside the PC.
The best answer is to try them all and take your pick - some will take longer than others to execute, but all should take a only few minutes to create. (suggest since this is a trial, save the raw data, and re-graph it in the Excel trial afterwards by hand, just for speed.)

S.
// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 2 of 5
(1,193 Views)
Hi,

I have just spent two days experimenting on this. This is what I have found:

Using NT4 and LV 6.02:

I have a VI with a tab control with 7 pages each with at least 1 graph and 1 table. The best printed output to a networked HP1220C has been using the print panel to printer method. The difference between that and many other things I have tried is very significant. However, I am having problems when I programmatically try to use the method more than once in a loop (see my recent post @ http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=313&HOID=5065000000080000005F5A0000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0).

I have tried to get the panel image and send it to a picture control in a subvi and programatically print that subvi using the same method but the graphics in the results appear somewhat bitmapped and jagged even though the contents of the picture control look exactly the same as the vi i am attempting to print.

I have tried to use the MS Word side of the Report Generation Toolkit by appending the panel image to a report and those graphics were identical (also somewhat bitmapped and jagged.)

I have also tried to append the image to a standard report in the RGT. The .png image file type parameter (which is actually '.bmp' in the case statement with a note that .png files are no longer taken by Standard Reports) produced identical results. The .jpg filetype was the worst with a pale hue around the traces on the graph.

I have used the Print Panel to Selectable Printer vi available in the LV DevEX code library (@ http://zone.ni.com/devzone/explprog.nsf/6c163603265406328625682a006ed37d/b6f4ab560d84a4e08625667a004ed574?OpenDocument ) which uses a Labview VIPrintPanelToPrinter function call to print. It has the same excellent graphics as the Print Panel to Printer method but with the same problems described in my earlier post.

I have tried fiddling with the tools>options>printing settings... I have tried changing the image depth to 24bit in VI's that utilize getting the panel image...I have tried both development and .exe code...I have tried LV 6.1 and Win2K...

Bottom line:
The best output I have observed is using the print panel to printer method and the VIPrintPanelToPrinter function call. The plots on my graphs are very fine lines and appear vector type in quality as opposed to raster type. The printed output appears finer than the screen graphics @1024 x 768 on 25" monitor. But there seems to be some problem invoking the method more than once and I have not been able to find another way to produce printed output with this same quality.

I am preparing a support request. I will post my results. My simplest reincarnation of the Print to Panel method problem is attached. Take a look at the printed output (I'd appreciate knowing if you have behavior problems similar to those in my earlier post).

Thanx.
0 Kudos
Message 3 of 5
(1,193 Views)
Ok, here is NI's support response:

"I see what you mean by the strange windows. I had a horrible time trying to get back to the front panel after stopping the VI. This is a bug in LabVIEW and not the video driver. R&D is aware of the issue an is working to fix this behavior for the next release of LabVIEW. I think that I was able to find a workaround though. It is messy but will do the job. I made extensive modifications to your code and attached it below. The idea is to save the image of the front panel to disk and then print the images with Internet Explorer using ActiveX. I have recommended this method to many people with printing problems in the past. The drawbacks are that you will have to have internet explorer on your computer and
you will need to use a PC.



!!! That's a pretty big bug not to be in the KnowledgeBase !!!

Important Note:
The workaround supplied with some minor revisions is posted below. IT ALSO PRODUCES THE LOWER QUALITY GRAPHICS. It seems that any time you start dealing with the image (picture box, appending to report/word report/html doc) the resulting printed output is of a lesser quality. I have attached it anyway as it is a brief example of how to produce printed output via ActiveX and Internet Explorer (which I didn't want to try to tackle when I was testing different methods.)

New Bottom Line:
Print Panel to Printer is superior printed output but it has an acknowledged bug in LV 6.02-6.1 that may affect your app, especially if you invoke it successively with front panels populated with many controls or complex controls.
0 Kudos
Message 4 of 5
(1,193 Views)
Highlighted
I've found as the best - the way of exporting my data to be print to MATLAB
workspace and then using MATLAB as printing artwork engine. It is a little
bit long way but it works fine.
Another way is to use NI Diadem software, if you have it.

"AOrtin" wrote in message
news:506500000008000000FF5A0000-1027480788000@exchange.ni.com...
> Which method will give me a better quality of a graphic? We need to
> save the graphic to a file, and we need to print it too. We use
> LabVIEW 6.0.2.
> - Use the getimage method of a control and then save it to
> jpeg/png/bmp?
> - Print the panel directly to a printer?
> - Export data to Excel and then create an excel graphic using activeX?
> - Any other?
0 Kudos
Message 5 of 5
(1,193 Views)