09-14-2010 04:05 PM
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
09-14-2010 04:18 PM
Hi Miren,
do you know the AND or OR function from the boolean palette?
Mike
09-14-2010 04:20 PM
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.
09-15-2010 01:39 AM
You can also solve it by 2 nested cases, although an external AND and OR is slightly better.
09-15-2010 03:19 AM
Something like this
09-15-2010 04:04 AM
Thank you very much for all your answers!
They helped me a lot!