02-28-2019 05:53 PM
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.
Solved! Go to Solution.
02-28-2019 06:16 PM
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
03-01-2019 08:51 AM
Mcduff,
When I try to open the file I don't have the vi you changed to. Is this a new vi for 2018?
03-01-2019 09:39 AM
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
03-01-2019 11:00 AM
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
03-01-2019 11:17 AM
I found the vi and it does the same thing. It prints the green pen starting from the top instead of the bottom.
03-01-2019 11:27 AM
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.
03-01-2019 11:30 AM
And attached is your VI with fixed data point value just so that you can run it yourself
03-01-2019 11:32 AM
@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
03-01-2019 11:35 AM
I appreciate the input. I will try to update this to get rid of the zero.
Thanks