You are on page 1of 1

BME-333: Clinical Laboratory Instrumentation

Lab 2
Logical Operations and Case Structures in LabVIEW
Lab goals:
• To perform logical operations
• Demonstrate the use of case structures

In this lab you are expected to apply your learnings from lab1 and incorporate those
learnings with the use of logical operations as well as case structures. A set of logical
operations readily available to you are listed on the next page.

A Case Structure is a branching control mechanism that allows different executions


depending on the value of the label. The Case Structure is analogous to the Case block
in Java or C++ in which, based on what case value the input variable matched, the
case structure will choose the correct cases for execution. To create a Case Structure,
open the Functions palette and open the Structures palette. Under Structures select the
Case Structure. You are encouraged to wire a Boolean and later a Numeric variable to
the case structure to understand its behavior.

Exercises:

1. Create a new vi project and save it in Lab2 folder within the folder of your name
2. Set up two switches and perform a logical OR operation with them, displaying the
result appropriately.
3. Set up a simple Boolean case structure such as the one shown above.
4. Create a system with case structures such that two switches perform logical OR
operation when the case structure is in TRUE state and a logical AND of the same
inputs when the case structure is in the FALSE state.
5. Repeat 4 but instead of True and False, use cases 0,1,2,3 to implement AND, OR,
NOT, NAND logical operations

You might also like