LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

In a multi-conditional formula node it keeps returning same thing

I am trying to execute a multi-conditional if else loop. From this website it says version 6.0 (which I have) can use C language so it should be something like:
if (x=0) y= 1000;
else if (x=1) y= 60000;
else if (x=2) y= 90000;
else y=0;
etc
what I am trying to do is take a value from a ring (0,1,2,3) and multiply it by a certain constant depending on what the value is. However, no matter what I do the loop is returning only the first value of the if statement no matter what the input value is. How can I get this loop to return 60000 if x=1 etc?
0 Kudos
Message 1 of 2
(2,430 Views)
Jem,

I noticed that your code only uses one equal sign for the comparison, when you should be using two? Is this the issue? When I tried your code in LabVIEW 6.0.2 with "==" instead of "=" in the comparison of the if statements. It functioned properly.

Randy Hoskin
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 2 of 2
(2,430 Views)