03-19-2012 09:33 AM
Is there a way to create a FIFO array similar to the one implemented in charts. I noticed the charts "use an internal FIFO buffer to retain a specified amount of existing data points". We eventually will plot the data but we have 64 data points being stored and we do not wish to use up the memory on the CPU storing 64 charts separately, especially if the chart is not being displayed. We do not mind storing the data within a 2D array and using this array as a FIFO then plotting the entire contents of one column.
For example let’s say the 2D array has 3600 rows and has 64 columns. Each new data set is to be added to the last rows deleting the first row thus creating the FIFO and there is always 3600 rows of data. Then one may wish to plot one column of data, all 3600 points for one particular sensor.
We started to use queue but once the queue is deselected the queued data is gone. But what about previewing the queue, the problem there you can’t transpose the data. The queue will output the row not the column. Hence why we would like to use a 2D array. We then thought to add the row then delete the last row thus constantly re-shaping and resizing the array, but wouldn't this use up a lot of memory.
Could the possibly be done with variants?
Suggestions…
Solved! Go to Solution.
03-19-2012 09:35 AM
im having deja vu, wasnt there a post recently about this?
03-19-2012 09:56 AM
found it,
can we avoid duplicate posts please, all you will do is annoy people. The other thread is:
http://forums.ni.com/t5/LabVIEW/How-to-create-a-FIFO-array/td-p/1000552
03-19-2012 10:04 AM
@Fro2 wrote:
Could the possibly be done with variants?
That sounds as reasonable as:
... could it be done with chicken soup?
... could it be done with eyes of newt?
...
As I said in the other thread, what makes you suggest variants out of the blue? They are not magical. Can you explain what you have in mind?
Initialize your full size 2D array in memory and keep it in a shift register. The rest should fall in place.