04-11-2023 05:14 PM
Hi,
I'm trying to save readings that are being received from Firebase to LabVIEW every 3 seconds with 150 Readings,
my problem is that while I'm trying to store the data for 1 min to be saved into an array I created a while loop with time elapsed 1 min but the values are not being stored! can anyone help?
The array must delete the previous min values and store the next min continuously.
Solved! Go to Solution.
04-11-2023 06:53 PM
You need to use a shift register to store the data.
04-11-2023 08:46 PM
Thank you for the response, I tried it but I have some questions.
1- The input data is array size 150 and every 3 seconds 150 readings are sent example for when the time elapsed is 9 seconds 450 readings must be stored, so which type of array is suitable to store the readings?
2- The readings in array2 (the pic attached) values are deleting directly how can I make it hold it until the next loop?
3- The array size should increase with 150 readings each time but in the code, it starts from 150 which is correct, but it increases by 1 reading after that why is that?
04-12-2023 03:55 AM - edited 04-12-2023 03:56 AM
Based on the attached VI Once the IR Measurements are done it enters to Loop where it will close only when time gets elapsed, It that case it wont Measure new IR values.
I recommend you use state machine and using shit register you can store the Array using Build array and and Initialize to empty when time elapses (Build Array Not recommended for large array size)
Also use state Machine architecture to achieve your requirement easily.
04-12-2023 04:25 AM
Check out the attached VI, where i made a skeleton using state machine.
You can work on top of this.
04-12-2023 08:08 AM
Thank you for your help tried with the first solution sent and it is working.
04-12-2023 08:11 AM
Thank you, this was helpful I just adjust the "False" condition and also I used a collecter to store the data.