From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graph attributes not updating on print VI

Hi All,

At my current client's lab they are having problems with printing test result graphs to HTML. They typically have two almost identical VIs with graphs. The first one is the operator's GUI, colored, lots of buttons, etc. This displays properly.  When it comes time to print the test reports they send both data and graph attributes, such as scales, etc, to a simplified version of the graph VI. This second VI has a white background, all the operator's buttons have been removed, a few new summary tables usually get added, then they tell this VI to print it's front panel to HTML.  Been there, done that.

The finished HTML reports often show that the second, white, VIs sometimes do not have the correct graph scaling. The data looks correct, but the scales are way off.  I have not yet been asked to look at the code, but that is probably coming soon. I have been asked to ask my LabVIEW contacts for general ideas related to this technique.

Unfortunately the code is on a secure system in a secure lab, so I cannot post an actual VI from the project. I seem to recall seeing similar problems on a project long ago and the solution(s) involved keeping the printing VIs open and the order that data and attributes were applied, etc.

The code is very very legacy and cannot be replaced at this time & budget, I may be asked for help in finding a quick modification solution. Any thoughts, sequence of steps, things to remember to check, etc are appreciated.
0 Kudos
Message 1 of 4
(2,455 Views)
Hello,

You're on the right path with making sure the order of operations applied to the simpler VI's graph properties is the same as that of the operator's GUI.  In the absence of other information, this is the best way to ensure identical appearance.  It would help to know which version of LabVIEW that you're seeing this behavior on - many small user interface quirks have been fixed in the later versions.  Also, do you know under what conditions the incorrect scaling appears?  Is the incorrect scale just the default for the graph, or is it some arbitrary scale that is neither the default or the intended?  We'll be happy to help you out as much as you can!
Cheers,

Matt Pollock
National Instruments
0 Kudos
Message 2 of 4
(2,439 Views)
We are using LabVIEW 8.0.1 for this project.
The incorrect scale is not the default, it is arbitrary and changes depending on which test and test data set is sent to the graph for printing.
0 Kudos
Message 3 of 4
(2,427 Views)
It's likely a problem with the report VI grabbing the front panel image before it has been updated properly by the property nodes.  After speaking with some of my colleagues here, we have seen situations where if you configure the subvi to open when called, programmatically minimize it, and close it when it's finished; the subvi will work.  You could also consider enforcing dataflow dependencies between the scale updates and the report VI functions, possibly introducing a wait function in between to ensure that the panel can be updated completely before the image is taken.  Of course, without access to code, I can only offer suggestions and general information about what has worked in the past.  If you get more information, let me know!
Cheers,

Matt Pollock
National Instruments
0 Kudos
Message 4 of 4
(2,408 Views)