LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Compressing the X-axis of a real-time chart

I am using a Waveform Chart to display a number of signals with the x-axis setup to show real-time.  I did this using the charts Real Time.VI example and it works great.

 

Now for my problem.  I want to compress the x-axis to show 1 hrs time instead of the current 4 min worth it shows.  I have played with all the variables in the xscale.Range cluster and can't get anything to work.

 

Any suggestions?

 

Thanks in advance.

0 Kudos
Message 1 of 13
(4,829 Views)

What is your data acquisition rate?

 

The default history length for a waveform chart is only 1024 data points.  If you change that to a larger value (right click/properties) it will maintain a longer history.

0 Kudos
Message 2 of 13
(4,817 Views)

The rate is usually 1 sample per 15 seconds or 0.25Hz.  Are you suggesting I change the history length from 1024 to 256000?

 

Thanks,

J

0 Kudos
Message 3 of 13
(4,796 Views)

Okay, I tried that option but now I just get a longer history that I can scroll back and see.  What I want to do is for the current viewable area of the plot to hold 1 hr's worth of data.

 

J

0 Kudos
Message 4 of 13
(4,794 Views)
You can use the properties on chart to rescale the chart or you can use the graph pallet to change the scale on your display.
0 Kudos
Message 5 of 13
(4,785 Views)

OK, but which properties?  I have tried changing several and haven't found the right one yet.  Please let me know exactly which properties to change.

 

Thanks

0 Kudos
Message 6 of 13
(4,775 Views)
Try changing the Maximum and Minimum on the scale area.
0 Kudos
Message 7 of 13
(4,768 Views)

I am playing with Real-Time Chart.vi (from the examples) for simplicity sake so I can apply the changes to my major VI once it works.

 

Adjusting the Max and Min in xscale.Range property does not seem to do much.  The default max is 10, if you change that to 300 or even 3600 the length of the plot does not change.

 

If you monitor these values they are actually overwritten automatically as the time stamps are taken.

 

J

0 Kudos
Message 8 of 13
(4,761 Views)
Post your vi so we can look at the chart settings.  Are you sure you don't have autoscaling turned on?
0 Kudos
Message 9 of 13
(4,753 Views)

This is the copy of the Real-Time Charts.vi example I have been playing with.  Since it behaves the same as my real VI I am posting it instead.

 

J

0 Kudos
Message 10 of 13
(4,736 Views)