LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

simple formula node that has an if statement broken

I have been trying to write LV 6.1 formula nodes and they keep breaking with a nonsense message about needing a left brace. Even simple ones like the following do this:

if ( f > 250 )
CHRL=20;
else CHRL=2;
PLRL=20;


Error on line 1 is marked by a '#' character: "if ( f <# 250 ) CHRL=20; else CHRL=2; P"
0 Kudos
Message 1 of 2
(2,495 Views)
If you will look in the error window, you will see that the error is listed as undefined variable. You have to let the node know what "f" is. Right click on the left side of the node and select "Add Input". Call it "f".

___________________
Try to take over the world!
0 Kudos
Message 2 of 2
(2,492 Views)