v1: hmfr, 2006. v2: mfnb, 2007 labview seminar university of puerto rico mayagüez campus

24
V1: HMFR, 2006. V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus

Upload: allison-wright

Post on 10-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: V1: HMFR, 2006. V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus

V1: HMFR, 2006. V2: MFNB, 2007

LabView SeminarUniversity of Puerto Rico

Mayagüez Campus

Page 2: V1: HMFR, 2006. V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus

V1: HMFR, 2006. V2: MFNB, 2007

Outline• What is LabView ?

• Generate a new graphical programming

• Applications design

• Type of data used in LabView

• Examples– My first program

Page 3: V1: HMFR, 2006. V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus

V1: HMFR, 2006. V2: MFNB, 2007

What is LabView?• Virtual Instrumentation

– It is a software module that simulates the front panel of an instrument.

– When using a VI, the user sees in the computer monitor a screen that looks like a physical instrument • Oscilloscope• Function generator• Multimeter

Page 4: V1: HMFR, 2006. V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus

V1: HMFR, 2006. V2: MFNB, 2007

Generate New application• Go to Start and search LabView Shortcut• This window should appear

Select New…

Page 5: V1: HMFR, 2006. V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus

V1: HMFR, 2006. V2: MFNB, 2007

Graphical Programming• Front Panel and Block Diagram

Front Panel Block Diagram

Page 6: V1: HMFR, 2006. V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus

V1: HMFR, 2006. V2: MFNB, 2007

Graphical DesignThere are libraries that consist of numerous types of tools, controllers, indicators and functions.• FRONT PANEL: Controls (Controls and Indicators)• BLOCK DIAGRAM: Functions

Page 7: V1: HMFR, 2006. V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus

V1: HMFR, 2006. V2: MFNB, 2007

Graphical Programming• Make the following VI• How I search HELP?

Vertical Fill Slide

Tank

Round LED

Page 8: V1: HMFR, 2006. V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus

V1: HMFR, 2006. V2: MFNB, 2007

Graphical Programming• To show the digital display:

– Right click over the objects (Slide1, Slide 2, Tank)• Visible item

– Digital Display

Page 9: V1: HMFR, 2006. V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus

V1: HMFR, 2006. V2: MFNB, 2007

Graphical ProgrammingFront Panel Block Diagram

Add and Greater instructions must be included

Page 10: V1: HMFR, 2006. V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus

V1: HMFR, 2006. V2: MFNB, 2007

Graphical Programming• Change the object values and caption.

– Click over the slide value and caption and then insert this new

values (0 – 10).– Do the same for the second slide (0 – 10) and the tank (0 – 20).

• Make all connections as depicted on the Block Diagram.

Page 11: V1: HMFR, 2006. V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus

V1: HMFR, 2006. V2: MFNB, 2007

Graphical Programming• Run the application using this button

– What was the behavior?

• Run with this other button– To stop use

• The differences between Run and Run Continuously are:– Run execute the program only one time. A while loop

control the code– Run continuously do not depend of any loop

• Problem: The program could enter in an infinite loop, and scratch windows.

• Debugging

Page 12: V1: HMFR, 2006. V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus

V1: HMFR, 2006. V2: MFNB, 2007

Using Loop• Select While Loop

– Right click over the circular red button of the while loop

• Select Create a Control

• Run

Page 13: V1: HMFR, 2006. V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus

V1: HMFR, 2006. V2: MFNB, 2007

Type of Data Used in LabView • Boolean (light green): This type of data can have

the values 1 (true) or 0 (false). • Numerical (orange or blue): There are different

data type, by example, double, integer, etc.• Strings (pink): stores characters as in a one-

dimensional array.• Clusters (brown or pink): A cluster can store

several types of data (strings, arrays, Boolean, etc.)

Page 14: V1: HMFR, 2006. V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus

V1: HMFR, 2006. V2: MFNB, 2007

HELP• In menu, select Help and Show Context Help

Page 15: V1: HMFR, 2006. V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus

V1: HMFR, 2006. V2: MFNB, 2007

Example 2: FORMULA NODE

Page 16: V1: HMFR, 2006. V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus

V1: HMFR, 2006. V2: MFNB, 2007

DAQ• Single-Point Acquisition

– A single point acquisition is an immediate, non-buffered operation.

– Only one data point is obtained.– This type of acquisition is useful when no timing

information is wanted.

Page 17: V1: HMFR, 2006. V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus

V1: HMFR, 2006. V2: MFNB, 2007

DAQ• Buffered Waveform Acquisition

– This method is utilized to perform accurate multi-point acquisitions.

– A specific number of data points are recorded at a predetermined scan rate (sampling frequency) and stored in a buffer.

– The data stored in the buffer is then retrieved by the VI and displayed on the screen.

– This type of acquisition is useful when recording high frequency signals and when accurate timing information is wanted.

Page 18: V1: HMFR, 2006. V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus

V1: HMFR, 2006. V2: MFNB, 2007

DAQ Config Input

Page 19: V1: HMFR, 2006. V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus

V1: HMFR, 2006. V2: MFNB, 2007

DAQ Config Input

Page 20: V1: HMFR, 2006. V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus

V1: HMFR, 2006. V2: MFNB, 2007

DAQ Config Output

Page 21: V1: HMFR, 2006. V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus

V1: HMFR, 2006. V2: MFNB, 2007

DAQ Config Output

Page 22: V1: HMFR, 2006. V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus

V1: HMFR, 2006. V2: MFNB, 2007

DAQ Single Point

Page 23: V1: HMFR, 2006. V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus

V1: HMFR, 2006. V2: MFNB, 2007

DAQ Buffered

Page 24: V1: HMFR, 2006. V2: MFNB, 2007 LabView Seminar University of Puerto Rico Mayagüez Campus

V1: HMFR, 2006. V2: MFNB, 2007

Questions