336540 design of bio-medical virtual instrumentation tutorial 1

14
336540 Design of Bio-Medical Virtual Instrumentation Tutorial 1

Upload: kenneth-hensley

Post on 11-Jan-2016

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 336540 Design of Bio-Medical Virtual Instrumentation Tutorial 1

336540 Design of Bio-Medical Virtual

InstrumentationTutorial 1

Page 2: 336540 Design of Bio-Medical Virtual Instrumentation Tutorial 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

Page 3: 336540 Design of Bio-Medical Virtual Instrumentation Tutorial 1

Outline

Navigating LabVIEW– Front panel window– Controls, Indicators and constants– Block diagram window– Data flow

Page 4: 336540 Design of Bio-Medical Virtual Instrumentation Tutorial 1

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

Page 5: 336540 Design of Bio-Medical Virtual Instrumentation Tutorial 1

Front Panel• The front panel window is the user interface for the VI

Page 6: 336540 Design of Bio-Medical Virtual Instrumentation Tutorial 1

Run the VI

If the arrow is broken it mean that we have an error in our program

Run continuously

Stop

Pause

Design buttons

Page 7: 336540 Design of Bio-Medical Virtual Instrumentation Tutorial 1

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.

Page 8: 336540 Design of Bio-Medical Virtual Instrumentation Tutorial 1

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

Page 9: 336540 Design of Bio-Medical Virtual Instrumentation Tutorial 1

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

Page 10: 336540 Design of Bio-Medical Virtual Instrumentation Tutorial 1

Block Diagram• The Block Diagram window contains the graphical source code

Terminal

Constant

Page 11: 336540 Design of Bio-Medical Virtual Instrumentation Tutorial 1

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

Page 12: 336540 Design of Bio-Medical Virtual Instrumentation Tutorial 1

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

Page 13: 336540 Design of Bio-Medical Virtual Instrumentation Tutorial 1

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

Page 14: 336540 Design of Bio-Medical Virtual Instrumentation Tutorial 1

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?