LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Autoscaling Y-axis taking too much of screen space for only small change in Y

Hi Wonder if there is a way around for above, I could not have found a suitable property to achieve this.

My signal varies 0-1000N. Autoscaling works perfectly fine. But for any steady value, say 20N, maximum and minimum adjusts to roughly 21N and 19N responding to Noise taking the whole space of the graph. Is there a way to set these to say 10 and 30N and still have y scale auto-scaling?

Thanks

K Waris

ATE and Labview Consultant
https://www.easybodge.com
0 Kudos
Message 1 of 11
(3,372 Views)

I didnt know the answer so I had a 2 minutes look and perhaps the Loose Fit property is intended for this issue?

 

Cheers, 

Jimmy

 

2015-07-30 10_46_06-Untitled 1 Front Panel _.png

0 Kudos
Message 2 of 11
(3,363 Views)

You could get the Min/Max values of your array (or a subset of your array, depending on how many samples you are displaying on your graph), subtract a few units from your min and add a few to your max, then use those values to dynamically set the min & max values of your graph Y scale. The resulting graph will always have a bit of unused area above and below the graphed data, but should eliminate the problem of noise filling your graph on steady readings.

 

Good luck.


0 Kudos
Message 3 of 11
(3,352 Views)
What it sounds like you want is an autoscaling function that doesn't really autoscale, but you might be able to get what you want with a little judicious programming.

Say for the sake of argument that you don't want difference between the scale min and max to be less than 10. First measure the dynamic range of the data you are going to be plotting. If the range of the signal is less than 10, turn of autoscaling and set the min and max values based on the average of the data. If the signal dynamic range is greater than 10, turn on autoscaling.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 11
(3,286 Views)

"First measure the dynamic range of the data", Do you mean comparing with previous value to see if new value is more than 10??.

 

I am plotting 10000/s and my loops do not have room for more ticks unfortunately. And waiting for properties to update the graph scale may take more time!Just thinking out loud! I thought there might be an easier way. I do have the ability on my front panel to switch off autoscale and set manual scale by moving vertical numeric controls. May be it is a good alternative! Thanks anyways

 

K Waris

CLD 

ATE and Labview Consultant
https://www.easybodge.com
0 Kudos
Message 5 of 11
(3,273 Views)
Dynamic range is max value in data minus min value.

You may think you are plotting that fast, but you are not. That is much much faster than you can update the screen and much much much much faster than the human eye can perceive.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 11
(3,250 Views)

With all due respect, its a graph not a gauge. If x scale range is set to say 10s ( x scale max - x scale min) and I load graph with 10000 points every seconds, it would simply draw the trends and human eye would see and analyze the trend as it plots over 10 seconds. And a keen user may zoom in using the graph pallette buttons.Smiley Happy

Will see how it goes. I am only being optimistic that Labview would do it all for me. I may end up learning the hard way!

 

K Waris

CLD

ATE and Labview Consultant
https://www.easybodge.com
0 Kudos
Message 7 of 11
(3,226 Views)
I was clear you were talking about a graph. Your post said 10000 of something happened per second. It wasn't clear that it was data points. If you are only updating the graph once per second you have a ton of time to do what I suggested.

By the way how wide is the plot area in pixels?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 8 of 11
(3,201 Views)

It is 800/600 px. Obviously I may get thicker lines for more samples

 

I just wanted to make sure that I understand your suggestion. So for the chunk of data points - say 10000- you suggest find maximum and minimum which probably could be done using array max/min function and if it is less than 10 then turn off auto scale and set the scale based on average of the values of data points in the array??

 

K Waris

CLD 

ATE and Labview Consultant
https://www.easybodge.com
0 Kudos
Message 9 of 11
(3,184 Views)
Yes, that's about it. Also given that you are plotting 10000 points in an area 800 pixels wide, you might also want to consider decimating the data before plotting it

LabVIEW is going to be decimating the data anyway, if you do it yourself you have more control over the process.

As luck would have it, that is the very topic of my current blog post which went live less than an hour ago...

http://www.notatamelion.com/2015/07/31/plotting-large-datasets-without-waiting-forever/

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 10 of 11
(3,152 Views)