53
1

LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

Embed Size (px)

Citation preview

Page 1: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

1

Page 2: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

2

LabVIEW 2010Hands-on S ession

For BeginnersZileriu Vlad

S ales Manager RomaniaNational Instruments

Page 3: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

3

What You’ll Do Today

• Learn LabVIEW Fundamentals• Acquire S ignals with DAQ Device• Analyze Acquired Data• Write data to file

Page 4: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

4

• Leaders in Computer-Based Measurement and Automation

• Long-term Track Record of Growth and Profitability

• Fortune’s “100 Best Companies to Work For” 11 years in a row

• Significant investment in research and development > 18% of revenue in 2009

• More than 5000 employees; operations in more than 40 countries

• LabVIEW 1.0 released in 1986

National Instruments at a Glance

Page 5: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

5

Virtual Instrumentation with LabVIEW

Automated Test

Industrial

EmbeddedS oftware-defined

behavior

Modular I/O

Page 6: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

6

Virtual Instrumentation Case S tudy

Application

Boeing used LabVIEW and 70 PXI chassis to collect over 300 channels of acoustic data simultaneously in their research to decrease noise during takeoffNI Products

LabVIEW, PXI

"Using NI software and hardware, we were able to create a high-end, low-cost system that could distribute the acquisition system across multiple chassis, tightly synchronize all channels, provide high channel count with full bandwidth on all channels simultaneously, and allow virtually unlimited channel-count expansion. “

-- James Underbrink, Boeing Aero/Noise/Propulsion Laboratory

Page 7: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

7

What is LabVIEW?

Page 8: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

8

GProgramming

Language

Hardware S upport Analysis and Technical Code

Libraries

Reporting and Data Visualization

Tools

Technology Abstraction

Models of Computation

Page 9: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

9

LabVIEW is a Programming Language• Graphical Programming

• Data types• S tructures (i.e. loops, case, event

handling)• S tandard functions (i.e. File I/O)

• Reuse external code• Compiles to machine code• Automatic multithreading

Page 10: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

10

LabVIEW is a Development Environment• Debugging tools• Assistants• Configurable functions• I/O Finder• Easy UI Development• S oftware Engineering Tools• Performance Tools

Page 11: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

11

LabVIEW Has Built-in Engineering Libraries• In-line and off-line analysis and control

• S ignal processing• Analysis and filtering• Complex math• PID• Vision• Motion

Page 12: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

12

LabVIEW Eas ily Connects to Hardware I/O

• 8000+ instruments from over 250 vendors• PCI, PCIe, PXI, US B, E thernet, serial, GPIB,

and CAN devices• Modular data acquisition hardware from DC

to the GHz range• Motion control stages • Cameras• Hundreds of PLCs

Page 13: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

13

LabVIEW Fundamentals

Page 14: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

14

The LabVIEW Environment“VI” = program or

function

“Front Panel” = user interface “Block Diagram” = code

Page 15: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

15

Exercise: Open and Run Final Application

• Explore final application• Acquire, analyze and display the signal

Page 16: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

16

Controls & Indicators

• Knobs/Dials• Graphs/Charts• Buttons• Digital Displays• S liders• Thermometers• Customize and

create your own

Front

Panel

Page 17: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

17

Finding Front Panel Objects

or

• R ight-click on Front Panel• Browse by object hierarchy

• Press <ctrl + space> to bring up• S earch by object name

Controls Palette Controls Quick

Drop

Front

Panel

Page 18: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

18

Functions and Express VIsBlock

Diagram

Configuration BasedExpress VI

S tandard VIs

Page 19: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

19

Dataflow Programming

123

Comparison waits until all inputs are present, then executesOnce executed, output from comparison continues through code

Both S imulate S ignal Express VIs execute simultaneously

1 2 3

Block

Diagram

Page 20: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

20

• LabVIEW automatically divides each application into multiple execution threads (introduced in 1998 with LabVIEW 5.0)

• Parallel code paths will execute in unique threads

Automatic Multithreading in LabVIEW

thread

thread

thread

Block

Diagram

Page 21: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

21

Click to edit Master subtitle style

European Southern Observatory LabVIEW Multicore computing

For a size comparison, two humans and a car stand next to the E-ELT.NI Products

LabVIEWReal-Time module

Application

Control the segmented M1 and flexible M4 mirrors using 3000 (M1) and 8000 (M4) actuators and thousands of sensors. The application runs on 16 x Dell M1000 Eight coreSystems in parallel.

Page 22: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

22

Wires and Data Types• 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

22

S calar1D Array2D Array

DBL Numeric Integer Numeric S tring

Block

Diagram

Page 23: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

23

Execution Control S tructuresWhile Loop

For Loop

Run until stop condition met Run N times

• Allow same piece of code to run multiple times• Exit conditions different for each

Block

Diagram

Page 24: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

24

Finding B lock Diagram Functions

or

Functions Palette Functions Quick

Drop

• R ight-click on Block Diagram• Browse by object hierarchy

• Press “ctrl + space” to bring up• S earch by object name

Block

Diagram

Page 25: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

25

As Complex as You Need

Express VIs

Quick, easy

Limited

RegularVIs

Hides unnecessary details

Retains power and flexibility

Low-levelVIs

Powerful, flexible,

Difficult, time-consuming

Block

Diagram

Page 26: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

26

Instructor Demo: Creating a Bas ic VI

• Use basic LabVIEW objects• S imulate signal and display

Page 27: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

27

Exercise 2: S imulate S ignal to Graph

• S imulate various signals• Write to Graph

Page 28: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

28

Built-in Programming Ass is tance

Highlight Execution

Block Diagram C leanup

Context Help

Page 29: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

29

Instructor Demo: Us ing Help Tools

• Use Highlight Execution, Context Help and Block Diagram Cleanup

Page 30: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

30

Data Acquis ition with LabVIEW

Page 31: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

31

PC-Based Data Acquis ition (DAQ)

Page 32: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

32

NI DAQ Platforms

PCI / PCIe PXI / PXIe

US BWireless / E thernet

CompactDAQModular US B

One application, multiple targets

Page 33: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

33

Example DAQ S ystemHi-S peed US B 2.0

Or E thernet

Mix and Match over 50 modules

Hot-swappable modulesDirect

sensor connectivity

NI CompactDAQ

Built-in S ignal Conditioning

Page 34: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

34

CompactDAQ Door Rattle Noise Analyzer

NI Products

LabVIEW, CompactDAQ

Application

S M Instruments used LabVIEW and CompactDAQ to design a portable “S ound Camera” to analyze unwanted noise in automobile testing.

Page 35: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

35

Exercise 3: Taking a Bas ic Measurement

• Acquire the signal• Write to graph

Page 36: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

36

Analys is andS ignal Process ing

Page 37: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

37

• S ignal Process ing & Analys is

– Waveform Generation– Waveform Conditioning– Waveform Monitoring– Waveform Measurements– S ignal Generation– S ignal Operations– Windows– Digital Filters– S pectral Analysis– Transforms– Point-by-Point

• Mathematics– Numeric– E lementary and S pecial

Functions– BLAS /LAPAC-based Linear

Algebra– Curve Fitting– Interpolation / Extrapolation– Probability and S tatistics– Optimization– Ordinary Differential Equations– Geometry– Polynomial– Formula Parsing– 1D & 2D Evaluation– Calculus

LabVIEW S ignal Process ing, Analys is and Math

Page 38: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

38

Using Analys is Functions

Configuration Based

Express VIs

Programmatic, Low-Level VIs

Text-based MathS cript Node

Page 39: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

39

Advanced Analys is - Mind/Computer Interface

“LabVIEW simplifies development and encourages innovation by offering an intuitive graphical programming approach; you can focus on innovation rather than programming details.”

- Michael Callahan, CEO, Ambient

NI Products

S ignal Processing in LabVIEWUS B DAQ

www.theaudeo.comApplication

University of Illinois engineering students worked with LabVIEW to develop a device that translates thought into control commands.

Page 40: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

40

Exercise 4: Add Analys is and Output

• Acquire signals signal• Add Power S pectrum Analysis

Page 41: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

41

Reporting and Data Visualization

Page 42: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

42

Data Visualization and Communication• Visualization

• Built-in user interface objects• Charting and graphing

capabilities• Remote application control

• Reporting and Data S torage

• File I/O functionality• HTML reports for the Web• Microsoft Word and Excel

reports

Page 43: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

43

LabVIEW S upported S torage Types

• AS C II• Binary• HTML• XML• LVM

• TDM(S ) *• Excel• Word • Datalog• Databases

Page 44: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

44

Click to edit Master subtitle style

Fjord & Bælt – Acquire, Analyze and Log acoustic communication of killer whales

“Integration with LabVIEW gives us more functionality for logging, monitoring, and analysis, an d we can display and save results in the same application with the LabVIEW MathScript routine.” - Magnus Wahlburg - Fjord & Bælt

NI Products

LabVIEW, US B data acquisition

Application

Fjord & Bælt simultaneously records 10 signals sampling at 500 kHz each on one laptop for several hours every day, resulting in hundereds of gigabytes of unique data on toothed-whale echolocation. .

Page 45: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

45

Exercise 5: Write to File

• Acquire the signal•Perform Analysis•Write to File

Page 46: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

46

Software to Interactively Manage, Analyze and Report Measurement Data

DIAdem

NI DataFinderData Index

Search Interface

Measurement Data

Interactive Analysis and Reporting on the Desktop

Page 47: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

47

Exercise 6: Reading the Data in DIAdem

• View the Data in NI DIAdem

Page 48: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

48

Next S teps

Page 49: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

49

LabVIEW Training and Certification Path

ni.com/romania/training

Page 50: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

50

Training and Certification Membership Program

Flat rate training program with

ü unlimited access to all scheduled courses for one or two years,

ü personalized training programs,ü option to retake all courses,ü skill validation with professional

credentials,ü and money-back satisfaction

guarantee.

Page 51: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

51

Thank you for your attention!

Page 52: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

52

Control for S teel Rolling Mill

Images: Integrated Industrial S ystems (I2S )

With NI LabVIEW graphical programming tools, we quickly programmed the FPGA and real-time processor in CompactR IO. Because CompactR IO and our PLCs are Ethernet based, we successfully integrated the CompactR IO PAC with our control systems to optimize our rolling mills with minimal changes to our existing control architecture.

Clark Hummel, I2S

NI Products

LabVIEW, LabVIEW FPGA, cR IO

Application

I2S combined LabVIEW with NI CompactR IO to create a gamma-based, high-speed thickness measurement device to control sheet thickness in a steel rolling mill

Page 53: LabVIEW 2010 - upm.rotraian/web_curs/LabVIEW/docum/lv_intro_2010.… · LabVIEW 2010 Hands-on Session ... • Leaders in Computer-Based ... Automatic Multithreading in LabVIEW thread

53

CompactDAQ S afety helmet crash test

NI Products

LabVIEW, CompactDAQ

Application

S MF used LabVIEW and CompactDAQ to built a safety helmet drop test system for certification purposes.