LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Taking the Last 1024 Data Points of a Continuous Input

I have an input that is being output to a waveform chart. The viewable area is 1024 samples long. This input occurs during a case loop. When the case is true, data is displayed on the chart. When the case is false, the display stops updating, but keeps the current data in view.

I then have another case statement which determines whether the data should be saved or not. The problem I am having is that I am only getting one data point when I save the file.

Is there a way to put the data into a circular buffer that only keeps the 1024 points that are on the screen and deletes everything before them?

An example would be extremely helpful.

THANKS!
0 Kudos
Message 1 of 3
(2,568 Views)
When you update a chart, you are generally only adding one updeate at a time.

The rest of the data is stored in the charts hsitory.

You can right-click on the chart and crate a property node and configure it as read from "history".

This will return all of the data in the chart.

I hope this help,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 3
(2,568 Views)
Right click on the chart and select Create>Property Node. Right click on the property node and select Properties>History Data. This will output an array that is no larger than your chart history length. If your history length is larger than your number of samples displayed, all you need do is an Array Subset to get the most recent data.
Message 3 of 3
(2,568 Views)