LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

graph auto-scaling

In order to print a graph, I've created a sub-vi which prints on
completion. The sub-vi waits for a button to be pressed before closing
(the button is a boolean terminating a while-loop). For some reason
the graph does not auto-scale.
Autoscaling is turned on. When I turn off autoscaling with the pop-up
menu, and turn it on again, the graph scales (just like when a vi is
not running. This vi is, however).

Can someone help me?

Thanks

Erwin.
0 Kudos
Message 1 of 7
(3,490 Views)
Use an attribute node to autoscale the graph. When "Y Scale Info.Y Scale
Fit" is set to 1, the graph autoscale once. I don't know why the graph does
not update. Maybe if the graph is an input control, its value is assigned
before the front panel is opened so LabVIEW does not redraw new scale of a
closed FP. Maybe just putting the graph terminal in the while loop will
force an update.

Anyway the attribute node will fix this.

Jean-Pierre Drolet


"erwin" a écrit dans le message news:
399af953.362562@news.tudelft.nl...
> In order to print a graph, I've created a sub-vi which prints on
> completion. The sub-vi waits for a button to be pressed before closing
> (the button is a boolean terminating a while-loop). For some reason
> the
graph does not auto-scale.
> Autoscaling is turned on. When I turn off autoscaling with the pop-up
> menu, and turn it on again, the graph scales (just like when a vi is
> not running. This vi is, however).
>
> Can someone help me?
>
> Thanks
>
> Erwin.
0 Kudos
Message 2 of 7
(3,490 Views)
>Use an attribute node to autoscale the graph. When "Y Scale Info.Y Scale
>Fit" is set to 1, the graph autoscale once. I don't know why the graph does
>not update. Maybe if the graph is an input control, its value is assigned
>before the front panel is opened so LabVIEW does not redraw new scale of a
>closed FP. Maybe just putting the graph terminal in the while loop will
>force an update.
>
Using the attribute node did not scale the graph, nor did putting the
graph in the while loop. I've noticed that the problem only occurs on
my PC at home (Pentium 166 with windows 98), and not at another
(pentium 233 with windows 95).
Maybe it's just a problem with computer speed or OS.
I've now solved it by making the graph a hidden control, and
connecting a visible indicator to i
t.

Thanks,

Erwin.
0 Kudos
Message 3 of 7
(3,491 Views)
I know this is an old post but I was looking for an answer to the question of howe to programmatically turn off auto scale.
It looks like you need to create a REFERENCE to the graph control, then set 0,1, or 2 on scaleFit in order for it to update.

Mike
0 Kudos
Message 4 of 7
(3,453 Views)

I am having this same problem.  My autoscale works fine in Labview 7.1 development but doesn't work in executable.  I'm taking the front panel image of a VI that is hidden.

 

Any suggestions?

0 Kudos
Message 5 of 7
(3,068 Views)

Correct. You need to right click on the graph in question.

- Click 'create' --> 'property node' 

- for the property node, select  'X scale' --> 'scale fit'

- change this property to 'write' instead of 'read'

 

Then wire a constant to this property

0 = Do not autoscale

1 = Autoscale once (now)

2 =  Autoscale

Cory K
0 Kudos
Message 6 of 7
(3,066 Views)
I already have all that.  The problem is that the graph does not autoscale when the VI it is running in is not open or the graph is not visible.  Is there a way around this?  I don't understand what these people suggested above.
0 Kudos
Message 7 of 7
(3,048 Views)