LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

case structure

Hello!!

 

I have no longer started programming with labview and I'm having problems with a simple matter.

 

How can program the following?: "if two conditions are true simultaneously, a certain case of a case structure will be executed".

 

In my code, I would like a boolean to be true but also a numeric data to be 1, to execute that specific case.

 

How can I do so? What would I have at the input of the case structure?

 

Thank you very much in advance,

 

Miren

0 Kudos
Message 1 of 6
(2,722 Views)

Hi Miren,

do you know the AND or OR function from the boolean palette?

 

Mike

0 Kudos
Message 2 of 6
(2,711 Views)

Your question is an extremely basic one. You're asking about Boolean functions and Comparison functions. Have you done any of the tutorials?

 

To learn more about LabVIEW it is recommended that you go through the introduction material, tutorial(s), and other material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.

 

Note: if your "numeric" is floating point, DO NOT USE AN EQUAL FUNCTION, lest you wish to get bombarded on your next question asking why 1=1 can be false in LabVIEW. Do a search on comparing floats and you will understand.

Message 3 of 6
(2,707 Views)

You can also solve it by 2 nested cases, although an external AND and OR is slightly better.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 6
(2,680 Views)

Something like this

 

23882iD1BDE502721F4DFA

0 Kudos
Message 5 of 6
(2,668 Views)

Thank you very much for all your answers!

They helped me a lot!

0 Kudos
Message 6 of 6
(2,659 Views)