Professional Documents
Culture Documents
Programming Using Case Structures, Arrays and Clusters
Programming Using Case Structures, Arrays and Clusters
To perform addition or subtraction of any two numbers using case structure in LabVIEW.
Software Required:
NI LabVIEW
Procedure:
• Right-click in the front panel. Select Numeric>>Numeric Control and drop two
controls in the front panel.
• Right-click in the front panel. Select Numeric>>Numeric Indicator and drop it in the
front panel.
• Right-click in the front panel. Select Boolean>>Push Button and drop it in the front
panel.
• Add Case Structure in the block diagram.
• Now write the logic for cases “SUB” and “ADD” as shown in the figure.
• Run VI.
• Note: False: ADD; True: SUBTRACT
Block Diagram: “SUB” Case
VIT, Chennai
BEEE305P – Measurements and Instrumentation Laboratory
Front Panel:
Result:
Thus, the VI to perform addition or subtraction of any two numbers using a case structure is
created.
VIT, Chennai
BEEE305P – Measurements and Instrumentation Laboratory
Software Required:
NI LabVIEW
Procedure: • Create
blank VI.
• Right click on the front panel →modern →array→ array matrix→ numeric control.
• Create four numeric indicators in the front panel for maximum variable, index,
minimum variable and index.
• Right click on block diagramArrayArray Max & Min.
• Using wiring operations, the required connections are given in the block diagram.
• Inputs are given in the front panel and the program is executed
Block Diagram:
VIT, Chennai
BEEE305P – Measurements and Instrumentation Laboratory
Front Panel:
Result:
Thus, the VI to find the maximum and minimum element from an array is created.
Software Required:
NI LabVIEW
Procedure:
VIT, Chennai
BEEE305P – Measurements and Instrumentation Laboratory
Bundle Cluster
Block Diagram:
Front Panel:
Unbundle Cluster:
Block Diagram:
VIT, Chennai
BEEE305P – Measurements and Instrumentation Laboratory
Front Panel:
Result:
VIT, Chennai