LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Recalculate mean for every loop?

Hi there - I'm just starting out with LabView and have a question.  My users are complaining that the signal I'm averaging isn't responding fast enough to the signal itself - it takes a while for it to come down (or up) to the correct level.  My guess is that the value through the mean operator isn't being reset after the completion of the loop.  Is there a way to reset the mean control after the loop iteration is finished?
 
My setup:
 
I've got a DAQ Assistant that gets 10 channels of data off of my hardware box. 
The output goes into a split signal, one for each.
I then grab one of the values, put it into a Mean operator, and then display the value in a numeric control.
(something similar is done for the other channels)
 
All of this is in a loop.
 
Any ideas?
 
Thanks in advance,
Mike
0 Kudos
Message 1 of 8
(3,179 Views)
Hi Mike,

could you attach your vi?

How do you take your mean? "grab one of the values, put it into a Mean operator" is not quite clear... Taking the mean from one value?

Best regards,
GerdW


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

Hi there, Thanks for the quick reply.

Yes, Out of the signal splitter, I connect one of the outputs to the mean operator.  Then the output of the mean operator I connect to the input of the numeric control.

I'll work on getting permission to post the vi.

Thanks again!

Mike

0 Kudos
Message 3 of 8
(3,166 Views)
Hi Mike,

you do something like this:

The mean is calculated from the actual values, no delay...

You want to "reset" the indicator (it's no control as it's a data sink!)? You can write new values to it, maybe by the help of a local.
In the example you can't reset the mean functions, it's as is...


Message Edited by GerdW on 03-11-2008 05:44 PM
Best regards,
GerdW


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

Yes, that's exactly what I'm talking about.  Except, in between the Mean control and the numeric control, there's no conversion going on.  Here's the vi file I'm using...

Thanks!

Mike

0 Kudos
Message 5 of 8
(3,136 Views)
accidently hit submit...


Message Edited by GerdW on 03-11-2008 08:30 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 8
(3,116 Views)
Hi Mike,

I changed your example a little bit Smiley Wink

First: you should really give a label to each control/indicator - even when you don't show it in the frontpanel!

2nd:
You used the Point-By-Point routines to calc the mean. When you open them and look at their block diagram you see a big loop and some shift registers... They are used when you want to calc with measurement coming in point after point, but in your DAQ assistent you read 10o values in one go. I replaced on of them with a standard mean function (math palette -> probability&statistics), that should do the trick.Smiley Happy
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 8
(3,116 Views)

Thanks, that worked like a charm! 

 

Thanks for your help!

Mike

0 Kudos
Message 8 of 8
(3,093 Views)