LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to programmatically clear the chart

Good morning

 

I have doubt in clearing a chart programmatically

 

I need to display the the values in chart and clear the chart,again i need to display in the next cycle

 

I am able to display values and clear programmatically(passing some empty array values), but not able to diplay values in next cycle

 

Pls give me some suggestions

0 Kudos
Message 1 of 8
(2,870 Views)

Your way of working sounds good to me Smiley Happy

Send data to chart to display it

Send empty array to chart to clear it

Send new data to chart to display it

 

Maybe you didn't program it well Smiley Sad

Can you post your VI so that we can have a look at it?

0 Kudos
Message 2 of 8
(2,868 Views)

Thanks Alain

 

 

I have atached my eg program

 

0 Kudos
Message 3 of 8
(2,861 Views)

Since you send only one point to the chart, you can't display a line, so change the plot style of the plot to points or keep the line style plot but generate multiple points using a for loop with for example 15 iterations.

 

Both ways will do, with the first one you will see a unique point every 2 seconds, with the second one you will see a new line every two seconds.

 

You don't need to wire the dimesion size connector of the Initialize array vi.

0 Kudos
Message 4 of 8
(2,856 Views)
Thanks Alain
0 Kudos
Message 5 of 8
(2,845 Views)

One more question

 

If i want clear the chart only after the time scale reached 100, how can i do this

 

 

Thanks

0 Kudos
Message 6 of 8
(2,835 Views)

If i want clear the chart only after the time scale reached 100, how can i do this

 

Consider changing the ADVANCED - UPDATE MODE to SCOPE chart.

That will clear automatically when your data gets to the right side, and start over.

 

 Otherwise, clear it anytime you like by sending an empty array of points to your chart's HISTORY DATA property.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 7 of 8
(2,831 Views)
Thanks Steve
0 Kudos
Message 8 of 8
(2,823 Views)