From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean Algebra being used to calcualte result in labview

Solved!
Go to solution

Is there a way in Labview to take a Boolean algebraic expression and calculate the result without having to graphically draw the diagram using the Boolean palette symbols for logic with interconnecting lines?  I.E.>  Maybe a formula node or some equivalent that takes an expression like NOT (A AND B) OR C and computes the output?

0 Kudos
Message 1 of 4
(3,011 Views)
Solution
Accepted by topic author id

Hi id,

 

use the formula node

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,984 Views)

Two questions:

 

1.  Why are you using LabVIEW and don't want to do graphical programming?

2.   "i.e. Maybe a formula node".  Then why not use a formula node?

0 Kudos
Message 3 of 4
(2,983 Views)

@id wrote:

Is there a way in Labview to take a Boolean algebraic expression and calculate the result without having to graphically draw the diagram using the Boolean palette symbols for logic with interconnecting lines?


Fortunately, in LabVIEW there is even a way to graphically solve any Boolean expression without having to write any text. 😄 Try it instead!

 

And no, the formula node will not work with boolean datatypes (green wires). It will do bitwise operations on integers of the same datatype, same as graphical code. Make sure you deal with operation precedence correctly.

 

logic.png

 

You will only be able to do the blue code using a formula node.

0 Kudos
Message 4 of 4
(2,962 Views)