LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Formula node conditional

Solved!
Go to solution

Hi Guys

 

I wrote a simple conditional code in formula node and there is no error but it doesn't calculate. It works wrong and when I check the code I can't find any mistake.Please read my code and Let me know what is wrong with my code.

 

Thanks so much

0 Kudos
Message 1 of 5
(3,669 Views)
Solution
Accepted by topic author GAHSIM

theres no error, but you used for example "if (A=0)". = is NOT a comparison operator, I think you mean "if (A==0)" which compares A to zero...

 

Try it like this...

 

Hope this helps

 

christian


THINK G!! 😉
------------------------------------------------------------------------------------------------
Using LabView 2010 and 2011 on Mac and Win
Programming in Microsoft Visual C++ (Win), XCode (Mac)
Message 2 of 5
(3,666 Views)

Thank you christian

 

It doneSmiley Happy

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

It's fairly clear you are a text-based programmer. You should learn to do things the LabVIEW way. Here is your formula node code written in LabVIEW:

 

 

Note that you should NOT perform a direct comparison to zero with floating point numbers. This issue has been discussed MANY times in this forum (example search) and has nothing to do with LabVIEW, as it is an issue with the way numbers are stored with computers.

Message 4 of 5
(3,614 Views)

Oh thank you for labviewing

 

I like Labview way. infact I perfer combination some times it is more quick to write code. and less wires too.

 

Thank you for the point about comparision to ziro with floating point numbers.I didn't know it.

 

Smiley Happy

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