Experiment 7 _Structures in LabVIEW (1)
Experiment 7 _Structures in LabVIEW (1)
OBJECTIVES
The objective of this lab session is to learn how to implement various structures in LabVIEW.
OUTCOMES
As a result of this lab session, you will be able to
1. Implement a while loop, a case structure, and a for loop in VI.
2. Use these structures in aVI.
LAB SETUP
Equipment:
NA
Components:
NA
Software:
NI LabVIEW
RESOURCES
Lab Instructors;
Previous Lab sessions
LabVIEW core 1 course manual
ACTIVITIES
What is a structure?
Structures are elements that control program execution flow. Structures in LabVIEW include While
loops, For loops, Formula Nodes, Case structures and Flat sequences.
Structures are found on the Structures palette of the Functions>>All Fucntions menu
The functions palette becomes visible by right-clicking a mouse in an open area of the block diagram
or by selecting Show Functions Palette from the windows pull down menu.
Activities:
Interactive Example 1: Using the while loop
Create a VI that continuously generates random numbers between 0 and 1000 until it generates a
number that matches a number selected by the user. Determine how many numbers the VI generated
before generating the matching number.
Homework:
Create a VI that takes the seconds until a plane arrives at an airport and converts the time into a
combination of hours/minutes/seconds. A warning message with an LED is displayed if time exceeds
one hour.
ASSESSMENT
You will be graded based on the rubrics uploaded on Moodle