LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Very Newbie Question - Passing values back into a while loop.

I wrote a while loop that reads voltage and populates an array on the outside of the loop. From the array I produce a standard deviation...but I want to use that value as "value <= constantSTDEV" to stop the while loop. I'm not sure what I'm doing wrong. Can anyone help.

CCU Student
(VERY new to labview)
0 Kudos
Message 1 of 5
(2,559 Views)
You need to make your array inside of the loop instead of outside. You can do this using shift registers and the build array function. See the attached vi for an example. Hope it helps!

Brian
0 Kudos
Message 2 of 5
(2,559 Views)
Brian,
I can't open your VI. I get a message saying that resources are missing. I'm using 5.1...could that be that problem?
0 Kudos
Message 3 of 5
(2,559 Views)
Sorry, didn't realize that you were using 5.1. Try this copy that I saved for version 5 instead.
0 Kudos
Message 4 of 5
(2,559 Views)
try populating the array on the inside of the loop by using shift register
to add a new element to the array each time the loop executes. of course
then you will have to calculate the st. dev. inside the loop as well for
each execution of the loop, then simply use the value as your boolean stop
loop condition.


labview-student wrote in message
news:506500000008000000CC2E0000-1003545641000@exchange.ni.com...
> I wrote a while loop that reads voltage and populates an array on the
> outside of the loop. From the array I produce a standard
> deviation...but I want to use that value as "value <= constantSTDEV"
> to stop the while loop. I'm not sure what I'm doing wrong. Can
> anyone help.
>
> CCU Student
> (VERY new to labview)
0 Kudos
Message 5 of 5
(2,559 Views)