ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

waveform chart propert node

Is is possible to get the current x position of the waveform chart...maybe using the property node?

Thanks in advance,

AH
0 Kudos
Message 1 of 3
(3,352 Views)
Hi AH,

If the x-axis scrollbar is not being used, the current x position of the waveform chart is simply the maximum value on the x-scale. First, make sure to turn on Autoscaling on the X-axis via the Waveform Chart property XScale.ScaleFit with a ‘2’ constant wired as input. Then, to read the current x position, use the Waveform Chart property XScale.Maximum.

Another option is to use the initial x-axis value (XScale.Offset) and add the length of the chart history data to that value. However, note that this only works is the chart history buffer is not full. Or, just have another variable that tracks the number of data points that have been outputted to the chart and add that value to the XScale.Offset.

Hope this helps. Good luck!

Kileen
0 Kudos
Message 2 of 3
(3,341 Views)
Thank you Kileen,

exactly what I needed....

Adam
0 Kudos
Message 3 of 3
(3,330 Views)