LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

media

Hello
I have a signal variable in time, that is the real wind speed, ... so I want to obtain the average value of this signal every 10 min.
Can you help me? 
0 Kudos
Message 1 of 13
(3,777 Views)

Hi enzo78,

can you show your code? If you use a loop, then add a shift register to it and store your value in it. With the "Add Array Elements" function and a simple divide block, you can than calculate your average.

Mike

Message 2 of 13
(3,768 Views)
Here is my vi
 
thanks
0 Kudos
Message 3 of 13
(3,761 Views)
Hi enzo78,
see the attached example.
Mike
Message 4 of 13
(3,749 Views)

Thank you

It`s good.

Bye

 

0 Kudos
Message 5 of 13
(3,743 Views)

Hi

can you give me a manual to better understand the use of shift register and the loop

Thanks

Cheers

0 Kudos
Message 6 of 13
(3,735 Views)
Here is a version of MikeS81's VI with an alternate calculation which does not grow the array indefinitely. It does not store all the values, only the sum and the count.

It also shows how this can be done without local variables.

Lynn
Message 7 of 13
(3,732 Views)
Hi enzo,
there informations in your online help. Smiley Happy For more informations see this link http://www.ni.com/academic/lv_training/d/how_learn_lv.htm
Mike
Message 8 of 13
(3,700 Views)

Hello

I`ve another question for you about the same VI,

The average value obtained is variable in time untill I stop the while loop, so I`ve stopped it with an elapsed time, wich stop it every 600 second. 

Now I need to take only this value and to put it into a grafh: wind speed in y axis and present time (text) in x axis.

Somebody can help me?

thanks

0 Kudos
Message 9 of 13
(3,677 Views)
I send my new VI
0 Kudos
Message 10 of 13
(3,676 Views)