Upload
kenneth-hensley
View
218
Download
1
Tags:
Embed Size (px)
Citation preview
336540 Design of Bio-Medical Virtual
InstrumentationTutorial 1
Course information
Dr. Eugene Konyukhov: [email protected] , BM room 342 , Tel: 054-7891895Tal Gilboa: [email protected] , Emerson building 6th floor, Tel: 5103Shir Paluch: [email protected] , BM room 330, Tel: 4127
Reception hours: By appointment
Grading: • 20% Homework (~5 HW assignments) • 80% Project
Outline
Navigating LabVIEW– Front panel window– Controls, Indicators and constants– Block diagram window– Data flow
LabVIEWLaboratory Virtual Instrumentation Engineering Workbench
• LabVIEW programs are called VIs (virtual instruments)• LabVIEW VIs contain two main components:
1. The front panel window2. The block diagram window
LabVIEW – graphical programming environment which can be used to create applications with professional user interfaces
Front Panel• The front panel window is the user interface for the VI
Run the VI
If the arrow is broken it mean that we have an error in our program
Run continuously
Stop
Pause
Design buttons
Controls Indicators and ConstantsControls:• Controls are the interactive input terminals of the VI. They stimulate
input devices and supply data to the block diagram.• Controls are: knobs, push buttons etc.
Indicators:• Indicators are the interactive output terminals of the VI. They display
data the block diagram acquires or generates.• Indicators are graphs, LEDs etc.
Constants - values that the user doesn’t need to change or access.
Controls palette
View » Controls Palette or right-click the front panel workspace to display the Controls palette
Use the Controls palette to place controls and indicators on the front panel
Controls and IndicatorsEvery control or indicator has a data type associated with is:
• Numeric Controls and Indicators – represent numbers of various types
• Boolean Controls and Indicators- represent data that has only two possible states
• String Controls and Indicators – sequence of ASCII characters
Block Diagram• The Block Diagram window contains the graphical source code
Terminal
Constant
Functions palette
View » Functions Palette or right-click the block diagram workspace to display the Functions palette
Use the Functions palette to build the block diagram
To display the Context Help window select Help » Show Context Help or press the <Ctrl-H> keys
Exercise 1
• Create a VI which gets the height and base of a triangle from the user, computes the area of the triangle and presents it
Exercise 2
Create a VI which:• Gets two numbers from the user• Sums, divides and multiplies them• subtracts 1 from one of the numbers• Presents all the results
Data flow
• LabVIEW follows a dataflow model for running VIs• A block diagram node executes when it receives all required inputs
• Which function executes first: Add or subtract?• Which function executes first: Random number, subtract or add?• Which function executes first: Random number, divide or add?• Which function executes last: Random number, subtract or add?