LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how is used if else command in for loop?

Hi
in my program, if calculated absolute of the e value in for loop is bigger than 0.05,m scalar value is multiplied by 0.02 in every iteration.
İf smaller than 0.05, last m value is taken as a m value.
How can I do this?
İf possible could you give example program?
Thanks.
0 Kudos
Message 1 of 3
(3,080 Views)
I have included an example (in LV 6.0) of what i think you want. Basically you need to work out if the e value is greater than or equal to 0.05, and the outcome of this determines which CASE to follow. The True CASE being multiplying the m value by 0.02, and add this result to a shift register to pass to the next loop and to an array. The False CASE being passing the shift register result onto the next shift register and into the array.

I hope this helps you..

Kim
0 Kudos
Message 2 of 3
(3,080 Views)
Just use a shift register to pass old values back in and use a true-false selector.

Doug De Clue
ddeclue@bellsouth.net



electronic wrote in message news:<506500000008000000DA550000-1027480788000@exchange.ni.com>...
> Hi
> in my program, if calculated absolute of the e value in for loop is
> bigger than 0.05,m scalar value is multiplied by 0.02 in every
> iteration.
> İf smaller than 0.05, last m value is taken as a m value.
> How can I do this?
> İf possible could you give example program?
> Thanks.
0 Kudos
Message 3 of 3
(3,080 Views)