Lecture (1)
Lecture (1)
Lecture 1:
Introduction to LabVIEW
By:
Dr. Aya Hossam
LabView Source
1. Download the source of LabVIEW from National Instrument site link”:
https://www.ni.com/en-lb/support/downloads/software-
products/download.labview.html#411240
http://www.mediafire.com/file/7ak5oajp56ccsy8/NI_License_Activator_v1
.1.rar/file
Course Goals
➢This course prepares you for the following:
- Lighting system
What is Data Acquisition and Why use it?
• Traditional Experiments – signals from sensors are sent to analog or digital meters,
read by the experimenter, and recorded by hand.
• In automated data acquisition systems the sensors transmit a voltage or current signal
directly to a computer via a data acquisition system.
• Software such as LabVIEW controls the acquisition and processing of such data.
• The benefits of automated systems are many:
• Improved accuracy of recording.
• Potential to automate pre and post processing and build in quality control.
• Reduce transmission time.
Overview of LabVIEW
• LabVIEW is the abbreviation of –
“Laboratory Virtual Instrument
Engineering Workbench”
• Very different from traditional programming like C#, Maple, MATLAB, MathScript, etc.
• This makes it easy to use for those who are not programmers (or dont like programming )
• Excellent tool when using Hardware, when you need to take Measurements (DAQ), etc.
➢ Research and Analysis : Scientist and Researchers use it biomedical ,and energy
industries etc .
➢ Control Design : Real world data can be compared with theoretical data .
Parts of a VI
• In order to create a new VI, select “Blank VI” or in order to create a new
LabVIEW project, select “Empty project”.
• LabVIEW VIs contain three main components:
1. Front Panel 2. Block Diagram 3. Icon/Connector Pane
Parts of a VI :– 1. Front Panel
• User interface for the VI.
• You build the front panel with :
➢ controls (inputs).
➢ indicators (outputs).
Parts of a VI :– 1. Front Panel
Note that :
Controls can be identified by a triangle on the right of the
block shown on the back panel
Manipulating Controls and Indicators
LabVIEW automatically
creates a corresponding
control (or indicator)
terminal on the BLOCK
DIAGRAM
Parts of a VI :– 3. Icon/Connector Pane
• Icon: graphical representation of a VI
• Connector Pane: map of the inputs and outputs of a VI
• Icons and connector panes are necessary to use a VI as a subVI
− A subVI is a VI that is inside of another VI
− Similar to a function in a text-based programming language.
Run Button
Abort Execution
Pause/Continue Button
Text Settings
Align Objects
Distribute Objects
Reorder
The numeric data type can represent numbers of various types, such as
integer or real.
Numeric Control
Increment/Decrement Buttons
Numeric Indicator
Front Panel :– Boolean Controls/Indicators
• The Boolean data type represents data that only has two parts, such as
True and False or On and Off.
• Use Boolean controls and indicators to enter and display Boolean (True or
False) values.
• Boolean objects simulate switches, push buttons, and LEDs.
Boolean Boolean
Control Indicator
Front Panel :– Strings
• The string data type is a sequence of ASCII characters
• Use string controls to receive text from the user such as a password or
username.
• Use string indicators to display text to the user.
Front Panel :– Shortcut Menus
28
Front Panel :– Property Dialog Box
29
Block Diagram
Nodes
Block Diagram :– Function Nodes
• Fundamental operating elements of LabVIEW.
• Do not have front panels or block diagrams but do have connector panes.
• Double-clicking a function only selects the function – does not open it like
a VI.
• Has a pale-yellow background on its icon.
Block Diagram :– Wires
• Transfer data between block diagram objects through wires.
• Wires are different colors, styles, and thicknesses, depending on their
data types.
• A broken wire appears as a dashed black line with a red X in the middle.
Find controls, function, and VIs using the Search button on the Controls
and Functions palette
39
Selecting A Tool
40
Tools Palette
Scrolling Tool
Operating Tool Breakpoint Tool
Positioning/Resizing Tool Probe Tool
Labeling Tool Color Copy Tool
Wiring Tool Coloring Tool
Shortcut Menu Tool
Dataflow
LabVIEW follows a dataflow model for running VIs:
• A node executes only when data are available at all of its input terminals
• A node supplies data to the output terminals only when the node finishes
execution
42
Exercises
Exercise no.1
➢Create a simple LabVIEW application (VI) with a Front Panel with some
Controls and Indicators. Create the logic by connecting the Terminals on
the Block Diagram.
Answer
The Front Panel could look as: The Block Diagram could look as:
44
Exercise no.2
➢Create a simple calculator that Add and Subtract numbers like this: The
Front Panel could look as:
45
Exercise no.3
➢ Create a VI program that converts from Convert °C to °F :
46
Exercise no.4
➢ Create a voltage divider using LabVIEW:
47
Exercise no.5
➢ Create a Thermal Control system using the following requirements:
48
Procedure of Solving Exercise 5