LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in X axis in a Chart

Hello to all.

 

I am using a Chart in Real Time.

I mean, Chart has a measure in Y axis and Chart has the real Time (hour and minutes) in X axis.

For example if the measure is 10 at 10:00 then Y axis is 10 and X axis is 10:00.

 

My problem is that the range of X axis is 15 minutes, so in the example if it is 10:16 then 10:00 is removed for putting measure at 10:16.

 

How can I determinate the range of my X axis?

 

Thanks a lot. 

0 Kudos
Message 1 of 8
(3,846 Views)

Hi A.,

 

How can I determinate the range of my X axis?

You can set the X axis range using property nodes! (Or you switch on autoscaling…)

That being said: a chart has a history buffer that is defined at edit time. When the buffer is full the oldest data are removed when you add new data!

 

To use "real" timestamps with charts you should use waveforms instead of plain scalars of 1D/2D arrays. Then all you need to do is to disable "ignore timestamps" in the chart properties!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(3,831 Views)

Take a look at the chart properties.

Is the chart history length long enough?  is auto-scaling on for the x axis?


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 8
(3,830 Views)

Hi A.Salcedo,

As it was recommended in the previous posts, please check if AutoScale X of the Waveform Chart is on (right click -> X scale -> AutoScale X).

 

If you want to set the range of the X Scale as Gerard already said, just create a property node as following:

Create -> property node -> X Scale -> Range ->  Maximum. (make sure it is set to Write)

It will look like in the below attachment.

 

 

0 Kudos
Message 4 of 8
(3,783 Views)

I have checked the buffer size and if I increment the size then it works!! it goes more than 15 minutes!!

But I don't know if that is the optimal way to do this becouse programm will save memory for this right?.

 

I will do what you say about using waforms.

 

Thanks!

0 Kudos
Message 5 of 8
(3,775 Views)

Thanks for replying.

The X Scale is on AutoScale but the problem is the buffer size !

But incrementing buffer size I don't know if it is the optimal way to do this.

 

Thanks!

0 Kudos
Message 6 of 8
(3,773 Views)

Hi A.,

 

the chart can provide its own buffer for your data - so as long as you don't get any "out of memory" problems (or lagging UI) everything is fine…

 

BUT:

Most often it doesn't make sense to show thousands of points in a chart/graph that is just ~400 pixels wide! For this it would make more sense to create our own buffer with just limited number of points/data resulting from decimating the measurement data…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 8
(3,769 Views)

But incrementing buffer size I don't know if it is the optimal way to do this.

 

You are not incrementing the memory reserved at run time for the Waveform Chart buffer (total points which go to the Waveform Char buffer), only how many points of that buffer to see.

To increment/decrement the memory itslf of the Chart History buffer size, one must Right Click the Chart -> Char History Length (by default it is 1024 points).

 

In conclusion, as Gerard pointed out, it is just fine to adjust the maximum value which can be seen on the Chart as you want.

0 Kudos
Message 8 of 8
(3,742 Views)