Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.

18
Part I MVRT 2011 – 2012 Season Introduction to LabVIEW

Transcript of Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.

Page 1: Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.

Part I

MVRT2011 – 2012 Season

Introduction to LabVIEW

Page 2: Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.

Table Of Content• Programming• Labview• VI• Blank VI• Front Panel• Variables & Data Types• Controls Vs. Indicators

• Block Diagram• Wires• Data Flow• Clean Up Wires• Putting It Together• Debugging • Activity

Page 3: Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.

Programming writing a computer program using a computer language

Simileas verbal languages tell people what to do computer languages tell computers what to do

as verbal languages are spoken , computer languages are programmed .

Programming

Page 4: Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.

LabVIEW“laboratory virtual instrumentation engineering

workbench”graphical programming software

Similea software like Word

Labview

Page 5: Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.

Opening Labview

Opening labviewFind correct version of labviewUse search bar if neededOpen

Page 6: Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.

VIvirtual instrumentsthe document in which you programhas a front panel and a block diagram

Similea document in word

VI

Page 7: Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.

Blank VI

Blank VIOpen labviewClick “blank vi” in upper left under “new”

Page 8: Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.

Front panel user interface (where users interact with the program)

Similekeys on a keyboard

Front Panel

Page 9: Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.

Control Palettecontains inputs and outputsfind: right click front panel

Similecontains possible keys for a keyboard

Front panel

Page 10: Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.

Variables and Data Types

A variable has an unchanged name [fido] and it always holds a value of the same data type [dog].

However the value [breed] is changeable.The value [breed] of a dog may be accessed by calling the

variable’s name [fido].

Page 11: Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.

Data Types• Int

– Integer– Blue in LabVIEW

• Double/Float– Decimal number– Red in labVIEW

• Boolean– True/False– Dashed in Labview

• String– String of Characters:

letters/number/symbols

Page 12: Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.

Controls vs. Indicators

ControlsA control allows for data input

(changing the value of the variable)

Examples- Typing into an editable text box- Turning the knob- Flipping the switch

IndicatorsAn indicator displays the

output (accessing the value of the variable)

Examples- a read-only text box- a graph- an on/off light

Page 13: Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.

Block Diagramprogramming interface

Similecontains what happens when a key on a keyboard is pressed

Functions Palettecontains elements for programmingFind: right click

Similecontains pieces behind the keyboard

Block Diagram

Page 14: Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.

Broken wire

Wiresconnect an input and output

Simileconnect the dots

Broken wireinput and output are not of the same data type

Similecan’t add 1+a brokencan add 1+1 connected

Wires

Page 15: Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.

Data flow: Left right

Labview functions (ex. Addition) accept input from the left and output to the right

Right and write labview as you read and write english

Page 16: Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.

Cleaning up wiresProcess: 1. right click 2. “clean up wires”

Clean up wires

Page 17: Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.

Outputinteger

Wire

InputsvariableInteger

Putting it together

Page 18: Part I MVRT 2011 – 2012 Season Introduction to LabVIEW.

Debuggingfinding & fixing problems

how: highlight execution & run

tips: keep code neat & organized

Debugging