10-01-2019 05:00 PM
Dear friends,
As a new LabView user, I am having trouble with a very basic array related problem.
I am working on signal data processing especially with temperature data. I sensor will create thousands of data, however I need to store data into a 1D array with 5 index and everytime new data will come in it will replace the first data.
Example:
1st temprature value, 10 degree comes in it will be stored in index 0,
2nd temprature value, 10.5 degree comes in it will be stored in index 0, & 10 degree will move to index 1.
I want this process for upto 5 indexes
And when 6th temperature value comes in it will be in index 0; ..., 2nd temperature data will be in index 5; however, 1st temperature will be out of the array.
Please help me and your help is much appreciated.
Thank you so much in advance
Solved! Go to Solution.
10-01-2019 05:22 PM
You want the 'Build Array' function.
10-01-2019 05:44 PM - edited 10-01-2019 05:45 PM
Well, you need to rotate the array too, else you run out of elements once it gets larger than the buffer.
You can also use the data queue ptbypt.
Here are thew two possibilities:
10-01-2019 06:00 PM
Hello MrJackHamilton,
I am so thankful to you for your quick response.
I need to limit the array size upto 4 indexes and put the new data into index 0, and move out the element of index 4 out of the array when a new data comes in, and this will continue for thousands of data.
I have attached a file. This might help
Thank you so much for your time, I really appreciate your help.
Forhad
University of Windsor
Ontario, Canada
10-01-2019 08:38 PM
10-02-2019 04:54 PM
Hello Altenbach,
I can't thank you enough for your help. I really appreciate your time.
I am working on a project at University of Windsor, part of the project relates to LabView. As a new LabView user, I am struggling with basics. Please keep in touch.
Thank you and have a wonderful day.