LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

End character to if-statement on formula node

Hi, this must be dumpiest question over the history, but I can't find solution, so have to ask here 🙂

 

I have lots of chemical forms in one formula node and I want to use if-statement to select them. Is there any character to end if-statement? (end if)

 

other language:

 

{if A=B}

X=1

{/if}

 

{if A=C}

X=2

{/if}

_____________________

 

Now if I try to do this same in labview

 

if (A=B);

X=1;

 

if (A=C);

X=2;

 

It will return value 2 every time.

 

Thx

-Recon

 

0 Kudos
Message 1 of 3
(3,143 Views)

What is A, B, C?

Look at the case structure, A is your selector, B and C are the defined cases and a catch all default can return if A is undefined.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 3
(3,133 Views)

Are you using an inline C node?  If so, I'd imaging you end your if statement however you would do that in normal C code.  Otherwise, I would do the following in the code...

 

New Picture.png

0 Kudos
Message 3 of 3
(3,132 Views)