LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

After using "Print Panel.vi" I am not able to change the ranges of the graph axes

I want to print the front panel and I am using the PrintPanel.vi. The range of the Y-axes has to be fixed to a user-defined value for a number of data sets. But in some cases, the user has to change the range of the Y-axis.
I attached a demo program to make it clear. Make sure LV is closed (for one or another reason can this make a difference). Start the attached VI. The first curve is displayed. Change the maximum value of the y-axis from 2.0 to e.g. 2.2. Then press the 'print'-button. The frontpanel is printed and the next curve is displayed. The max value of the Y-axes is changed to 2.0 (OK). But now it is impossible to change the max or min value of the Y-axes anymore.
In som
e cases does everything work fine if you restart the VI a second time without first stopping LV in between.
Does anyone have an explanation and solution how to solve the problem?
I am running LV 6.0.2 on NT or Win2000.
0 Kudos
Message 1 of 8
(3,203 Views)
If you're trying to change the Y scale from the front panel control, then you're going to have to put it inside the for loop. LabVIEW is a dataflow language. The value of the control is read when the VI starts but once the for loop starts to run, the value is not read again. Putting the control inside the for loop means that the control will be read on each iteration of the for loop.
0 Kudos
Message 2 of 8
(3,203 Views)
Even if I place the control in the loop, I am not able to change the Y-scale after having printed the front panel.
And before printing the front panel, I am able to change the Y scale.
0 Kudos
Message 3 of 8
(3,203 Views)
Right now, the way your program is organized, the Property node which changes the Y-scale is executed once, and then you wait in a while loop until the user presses Print or No Print. If you want the user to be able to change the Y-scale while you are waiting for one of the Print buttons to be pressed, then you need to place the property node which changes the Y-scale values inside that same while loop. If you want to see what is happening inside your code, click on the "Light Bulb" from the block diagram to enable "Highlight Execution" and run your VI to watch how the functions in your VI are executed.
Message 4 of 8
(3,203 Views)
I had for loop on the brain. As logman pointed out, move the code for changing the scale inside the WHILE loop.
0 Kudos
Message 5 of 8
(3,203 Views)
I changed the code a bit. I removed the graph and replaced it by a value, the same error occured.
How to reproduce:
1) Exit LabVIEW completely (VERY IMPORTANT)
2) Open and run the attached VI
3) change the value of the 'value'-control to eg. 2.2 by typing in the value.
4) press on the print button
5) try to change the value of the 'value'-control to eg. 5.0 by typing in the value. This is NOT possible.
Changing the value with the arrows is possible.
6) stop the VI.
7) restart and no problem will occure.
😎 Completely exit LV, restart the VI (and LV), the same error appears again after having printing the front panel.

I notice this only with LV 6.0.2. With LV 6.1 it seems to work fine.
0 Kudos
Message 6 of 8
(3,203 Views)
Please see my reply on the previous answer.

Thank you,

Marc
0 Kudos
Message 7 of 8
(3,203 Views)
I am unable to reproduce the problem you describe in either 6.0.2 or 6.1.
0 Kudos
Message 8 of 8
(3,203 Views)