LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

update X-axis (time-axis) after selecting "clear chart"

I created one program (see attached file).
There is one chart in the front pannel. The Y-axis represents the data received by the chart. The X-axis displays the time at which the data are passed to the chart. I did so by creating the property node (x-scale offset and x-scale format).
 
In the run mode, if user right click on the chart and select "clear chart", it is found that all old data in the chart will be erased. However, the X-axis does not update itself. This means, after "clearring chart", the time shown at the X-axis is not the true sampling time of Y-axis data.
 
Could any one help me to modify this program so that the X-axis can update "itself" and always show the true time at which Y-axis data are sampled?
 
Thanks a lot.
 
Sincerely,
Xiaogang
 
 
0 Kudos
Message 1 of 7
(3,294 Views)

Hi,

Just did a small modification in your attached VI.(Took the x axis scale offset inside while loop)

Is this what you are looking for?

Regards

Dev

 

Message 2 of 7
(3,289 Views)
Hello,

An easy way of doing that is using the waveform data ype, since it uses time and data together.
Check annex,

Hope this helps,
Paulo
Message 3 of 7
(3,282 Views)

Hi, Dev,

thanks a lot for your reply, but your program is different from what I am looking for.

I want to show a group of points (X- time, Y-data) in the chart. The correponding X value must be the sampling time of that data displayed on y axis.

However, in your new program, the X-value of the very first point in the chart keep changing, while that data is acutally sampled at a previous time...

0 Kudos
Message 4 of 7
(3,279 Views)
Hi, Paulo,
Very good suggestion.
 
With your and Dev's help, i ve solved my problem.
Thank you two very much.
Best regards.
0 Kudos
Message 5 of 7
(3,259 Views)

oh, sorry.

realized that i did not attach my program.

thanks for you two's help.

here we go...

0 Kudos
Message 6 of 7
(3,157 Views)

Hi

glad to have been of help

All the best

Regards

Dev

0 Kudos
Message 7 of 7
(3,140 Views)