LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to introduce values of one sensor into one array

Hi , I need to get the average of one set of values that I got from one sensor, so I have thought of taking them into one array in order to calculate the average later... but I have been able to do that. My first problem I am not sure of the length of the final array so I have been trying to find a way of increasing that length and I presume I could take the values inside by using a "building an array" block. does anyone know any way of doing this , thanks 

 

0 Kudos
Message 1 of 4
(2,463 Views)

Hi Lorquino,

 

I presume I could take the values inside by using a "building an array" block. does anyone know any way of doing this , thanks

You already know the way. Did you try it?

(Don't forget the shift register. And don't forget to set a reasonable max size of your array…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,452 Views)

test.png

 

 

Thanks for your prompt answer GerdW.I have done something like this , but it seems all the data are kept just in one position of the final array rather than different values in different positions...and if i connect the shift array of the left into the SUm block it says it has different dimesions from the array that is in the final position...Im not sure what structure I should connect to the shift registers 

 

0 Kudos
Message 3 of 4
(2,444 Views)

Hi lorqino,

 

because you use the shift register wrong!

 

Did you take the lessons mentioned in the "Training" section in the header of the LabVIEW board? You really should...

(You also should learn about autoindexing loop tunnels.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(2,426 Views)