labview in 3 hours. what is test & measurement? keypad functionality keypad functionality lcd...

Post on 20-Jan-2016

221 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

LabVIEW in 3 Hours

What is Test & Measurement?

KeypadFunctionality

KeypadFunctionality

LCDTesting

LCDTesting

SoundQuality

SoundQuality

AcousticQuality

AcousticQuality

RF SignalAnalysis

RF SignalAnalysis

Battery Test Battery Test

Engineering – IndustriesTelecom

Chemical Processing

Electronics

Military

Aerospace

Biomedical

Transportation

Semiconductor

Automotive

Manufacturing

TestIndustries

Instrumentation

Instrumentation

Data Acquisition

Hardware and Driver Software

Virtual Instrumentation

Application Software

Network

Virtual Instrumentation Architecture

LabVIEW

Data Acquisition and Signal Conditioning VisionPXI/CompactPCI Distributed I/O PLCsGPIB/Serial

and VXIModular

Instrumentation

Instrument / Data Acquisition Drivers

Section I – The LabVIEW Environment

• LabVIEW terms• Components of a LabVIEW application• LabVIEW programming tools• Creating an application in LabVIEW

LabVIEW Programs Are Called Virtual Instruments (VIs)

LabVIEW Programs Are Called Virtual Instruments (VIs)2 Work areas:

1. Front PanelControls = Inputs to

the computer

2 Work areas:

LabVIEW Programs Are Called Virtual Instruments (VIs)

1. Front PanelControls = Inputs to

the computerIndicators = Outputs

from the computer

LabVIEW Programs Are Called Virtual Instruments (VIs)

2. Block DiagramInstruction set for

controls, indicators“Source Code”

2 Work areas:

1. Front PanelControls = Inputs to

the computerIndicators = Outputs

from the computer

BooleanControl

DoubleIndicator

Waveform Graph

Panel ToolbarVI Front Panel

Pull-downmenu

VI Block Diagram

Thermometer Terminal

DataAcquisitionFunction

While Loop

Stop ButtonTerminal

Stop LoopTerminal

TemperatureIndicator

Delay

Pull-downmenu

Controls and Functions Palettes

Graphical, floating palettes

Used to place controls & indicators on the front panel, or to build the block

diagram

Functions Palette(Block Diagram Window)

Controls Palette(Front Panel Window)

Operating Tool

Positioning/Resizing Tool

Labeling Tool

Coloring Tool

Tools Palette (Front Panel)

Operating Tool

Positioning/Resizing Tool

Labeling Tool

Coloring Tool

Wiring Tool

Breakpoint Tool

Probe Tool

Tools Palette (Block Diagram)

Automatic Selection

Run Button

Continuous Run Button

Abort Execution

Pause/Continue Button

Text Settings

Align Objects

Distribute Objects

Reorder

Execution Highlighting Button Step Into Button

Step Over Button

Step Out Button

Additional Buttons on the Diagram Toolbar

Status Toolbar

Run Button

Continuous Run Button

Abort Execution

Pause/Continue Button

Text Settings

Align Objects

Distribute Objects

Reorder

Execution Highlighting Button Step Into Button

Step Over Button

Step Out Button

Additional Buttons on the Diagram Toolbar

Status Toolbar

Basic Spectral Measurement.viOpen a Virtual Instrument

Template Browser

Create a New VI

Front Panel Window

Creating a VI – Front Panel

Front Panel Window

Creating a VI – Front Panel

Front Panel Window

Creating a VI – Block DiagramBlock Diagram

LabVIEW’s Context Help

Creating a VI – Adding Functions

Creating a VI – Adding Functions

wiring toolWire attachment points (nodes) flash when the wiring tool is passed over

Creating a VI – Wiring

Right Click Node Terminals (communication ports)

Creating a VI – Adding Functions

Creating a VI – Adding Functions

Express Functions

Same overall functionality

Section II

• What is a subVI?• Creating a subVI• Using a VI as a subVI

SubVIs

LabVIEW is modular• Any VI can be used as a subroutine (or subVI) to other programs

• Advantages– Modular– Easier to debug– Don’t have to recreate code

Creating a SubVI

1. Create code2. Select code for use in

subVI3. Click Edit-Create subVI

Editing a SubVI

Insert the SubVI into a Top Level VI

Accessing user-made subVIs Functions >> Select a VI

Or Drag icon onto target diagram

Create SubVI from your code

View your subVI

Section III – Data Acquisition

• Data acquisition (DAQ) basics• Connecting Signals• Simple DAQ application

DAQ – Data Acquisition

• Plug-in board for a computer with:– Analog input channels– Analog output channels– Counters– Digital I/O

• Controlled by a suite of LabVIEW VIsFunctions>>Data Acquisition

DAQ – DataAcquisition

Hardware Connections

BNC-2120

SCB-68

SC-2075

Channel Connections

+

-

Differential

Measurement

Single-Ended

MeasurementGround

SignalMotor

Battery Signal 1

Signal 2

Analog Signals

1.659487387 volts 1010100111110ADC

Data Acquisition System

Digital Signals

Measurement & Automation Explorer

Channel Connections

• Single-Ended Mode: ACHx and AIGND used to connect signal to channel x

• Differential Mode: ACHx, ACHx+8 used to connect signal to channel x

Channel Connections

Section IV – Loops and Charts

• For Loop• While Loop• Charts• Graphs

Loops• While Loops

– Terminated by condition– Always Runs Once– Delay between iterations

may be added

• For Loops– Terminate after N iterations– N specified on block diagram

Loops (cont.)

While Loop

1. Select the loop

2. Enclose Code to Repeat

Charts and Graphs•Waveform Charts display a history of values over time

- Strip Chart (continuous scrolling)

- Scope Chart (repeatedly redraws over the same region)

- Sweep Chart (redraws curve to the right of the old curve)

•Waveform Graphs and X-Y Graphs

- Wavefrom Graphs plot Y for regular increments of X

- X-Y Graphs plot Y vs. X for any X-Y sets (non-regular)

ChartsWaveform chart – special numeric indicator

that can display a history of valuesControls >> Graphs >> Waveform Chart

Wiring Data into Charts

Single Plot Charts Multiplot Charts

Combining data onto one graph

File I/O Using The LVM Express Function

File I/O Using Traditional Functions

•Read/write to spreadsheet file

•Read/write characters to file (ASCII)

•Read lines from file

•Read/write binary file

Easy File Easy File I/O VIsI/O VIs

Conclusion

• See www.ni.com for more help, examples

top related