LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

for loop in formula node not working

Solved!
Go to solution

Hi,

I;m trying to use for loop in formula node but it is not working. I want the output (y1) produce value in certain range (a and d, of course a is smaller than d). I' not using primitive labview since a and d are keep changing (both are variables). I did try to put "return 0;" after equation y1 but the error popup.

The issue for loop not working since it gives last value ( i mean 'd') . It not start with a value (initial).

Please help me how to solve this..

 

Pls ignore other variables that not used in equation. Thank you!! very much

0 Kudos
Message 1 of 3
(5,726 Views)
Solution
Accepted by rina

Your code is working.

 

for2.png

 

 

But why you use loop?
You get last value, so you can get it in one step with correct x;

Also why you say that can't use primitives?
If you use wires instead of terminals or local variables states of values keep constant.

 

y1, y1_2, y1 3 is the same values calculated different ways.

 

 

for.png

0 Kudos
Message 2 of 3
(5,700 Views)

many thanks!! after lil bit changes, it works for my case..

0 Kudos
Message 3 of 3
(5,630 Views)