ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Easy Print Front Panel VI changes Graph on PDF file

Solved!
Go to solution

I am having a very strange behavior. I have a VI that contains a graph with 11 pens. One pen is on a second scale. When I print this front panel the line on the graph for the 11th pen is inverted. the scales have not changed. I have tried to create a new vi and it worked once until I saved the vi. I have tried 3 different drivers and they all do the same thing. I used the same code before without any problem on another project. I also tried using the report building method which worked but the graph turned out small and distorted on the file. I am running version 17 on windows 10 pro. I am running out of ideas.

0 Kudos
Message 1 of 11
(5,246 Views)

It worked for me when I replaced the print VI with the one recommended in the Help file, on LabVIEW 2018 though. You can try the attachment, I back saved for 2017.

 

mcduff

0 Kudos
Message 2 of 11
(5,238 Views)

Mcduff,

When I try to open the file I don't have the vi you changed to. Is this a new vi for 2018?

0 Kudos
Message 3 of 11
(5,200 Views)

I do not know, I have never used these VIs before. On your original post, the VI you used had a big red X on it. In the context help, it said it was deprecated and suggested another VI. I do not have LabVIEW here to check. Will update you a bit later.

 

mcduff

0 Kudos
Message 4 of 11
(5,197 Views)

The VI is located in the following directory:

Program Files\National Instruments\LabVIEW 20XX\vi.lib\printing\EasyPrinting.llb\Print VI Panel or Documentation

 

Can you check if it is in your 2017 folder?

 

mcduff

0 Kudos
Message 5 of 11
(5,188 Views)

I found the vi and it does the same thing. It prints the green pen starting from the top instead of the bottom.

0 Kudos
Message 6 of 11
(5,184 Views)
Solution
Accepted by markofdiego

Your right Y axis is Log-scale.

Your first data point is exactly zero. Apparently, Labview have issues with displaying zero on log-scale.

If you change your first data point of first (not 11th) plot to something like 1e-20, for example, then it prints correctly.

 

As for obsolescence - LV2018 obsoleted "standard report" report type which is used for simple printing VI.

 

I have always found Reports to be a bad fit for printing front panels. It messes up scales sometimes.

If you want to just send front panel to a default printer you can use attached snippet.

 

If you want to use custom printer, you are probably better of using .net printing function. It is a bit more work but you can have a very precise control of scales and page parameters.

Message 7 of 11
(5,181 Views)

And attached is your VI with fixed data point value just so that you can run it yourself

0 Kudos
Message 8 of 11
(5,178 Views)

@mikhail.musienko wrote:

Your right Y axis is Log-scale.

Your first data point is exactly zero. Apparently, Labview have issues with displaying zero on log-scale.

If you change your first data point of first (not 11th) plot to something like 1e-20, for example, then it prints correctly.

 

As for obsolescence - LV2018 obsoleted "standard report" report type which is used for simple printing VI.

 

I have always found Reports to be a bad fit for printing front panels. It messes up scales sometimes.

If you want to just send front panel to a default printer you can use attached snippet.

 

If you want to use custom printer, you are probably better of using .net printing function. It is a bit more work but you can have a very precise control of scales and page parameters.


I was about to suggest something similar to mikhail, that is, using the FP.Get Image method. You won't get a pdf, but does a png work for you? Also, good catch by mikhail on the log axis, note on 2018 printed okay.

 

mcduff

0 Kudos
Message 9 of 11
(5,176 Views)

I appreciate the input. I will try to update this to get rid of the zero.

Thanks

0 Kudos
Message 10 of 11
(5,173 Views)