LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why is the chart history data property a 2D array of waveform?

Well, its a simple question I guess and its pretty much in the subject. Why is the chart history data property a 2D array of waveform? I had assumed it would be a 1D array of waveform. I've been looking in the documentation but find no explanation. I must be missing something and hoping someone can clarify this for me. Thanks!

By the way, what I am trying to do is read waveforms stored to file into a waveform chart so I can then used the buffered data (history data) of the chart to do some analysis and display results. But I was expecting my 1D array of waveforms out of the chart's history data but I found a 2D array and not quite sure what to do with that.
0 Kudos
Message 1 of 3
(2,499 Views)
Usually the waveform history is a 1d array but this is dynamic and adjusts to the type of waveform array. If you have two arrays clustered (to show two waveform graphs together, the history data requires an array of clustered data. I am not sure when you would have a 2d array of data since it is usually flattened to 1d array and displayed as concatinated data? Also if you are using the waveform as just a buffer it is probably not the best method to do this, I would read the data and build a 1d array inside of a loop (concatinate data arrays using a shift register or write data to a preallocated array and keep track of the index), you can then process this array. If you are reading the data into the buffer space of a waveform graph then processing the data, you can get into trouble when the buffer is overwritten (this buffer is fixed and not dynamic) or a graph is cleared durring runtime. I would be curious to see the screenshot of the 2d array history.

-Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 3
(2,494 Views)
The history is a 2-d array of waveform data type because one dimension (rows) represents an update of multiple channels to the chart and the other dim. is each of the updates that was applied to the chart.

I always get the row-collumns confussed so forgive if I did so again.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 3
(2,481 Views)