LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Compressing the X-axis of a real-time chart

When I write 3600 for the constant going into Xscale.Max, the chart shows a 1 hour spread of data just fine.

 

Now remember that the range of the chart assumes 1 second interval per data point.  Changing the x scale multiplier in the middle of the operation causes the x scale maximum to vary to either a longer or shorter range.

 

You don't need to use the Xscale Flipped node to create a wire to feed to the while loop to force the order of operations.  The error wire coming from the property nodes will work just fine.

Message Edited by Ravens Fan on 01-14-2009 06:16 PM
Message 11 of 13
(842 Views)

Hey Joshjack-

 

What is happening here is there in not enough memory allocated for the chart and this is why you are unable to see the whole length of the graph regardless of where you set the XScale.Maximum. You have a few options here, you could increase the delay of your while loop, and decrease the number of data points being plotted on your chart. You could also right click on the chart on the front panel and select "Chart History Length..." and increase this number.

 

Also, to get an hour of data from the example vi you were working with, you can discard the XScale.Minimum property and set the XScale.Maximum to be the summation of 3600 and the value used for the offset.

 

You can not pragmatically change the number of points to plot on the chart because LV must allocate the correct memory space prior to running the vi. See Knowledgebase for more information.

 

Let us know if you are still having trouble.

 

Ben

Applications Engineering

National Instruments

Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 12 of 13
(840 Views)

Ok Folks, I increased the chart history to 256000 pts so that enough memory would be allocated.  Then I got rid of Xscale.min and change Xscale.max to 3600.  Works great!

 

 

Thanks everyone!

 

J

0 Kudos
Message 13 of 13
(817 Views)