P. 1
Lab View

Lab View

|Views: 8|Likes:
Published by Bhavin Gajjar

More info:

Categories:Types, Reviews, Book
Published by: Bhavin Gajjar on Jul 05, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

03/02/2013

pdf

text

original

Instrument Interfacing with LabVIEW

Project Done By Shekhar C. Chaudhari Under the Guidance of Shri. Suresh Kumar A. Praveen Kumar.

Overview :• The language • Building an Application • Front Panel • Source Diagram • • • • • Programming For Instruments:Signal Generator (Marconi 2031) Network Analyzer (HP 8714C) Spectrum Analyzer (HP 8590L) Vector Voltmeter (HP 8508A)

Virtual Instrumentation

Stand Alone Instrument

PC Based Instrument

Vendor Defined

User Defined

Key Elements of Virtual Instruments

Acquisition
INSTRUMENT

Analysis
Calculate

Presentation
User Interface Hard Copy File I/O

Signal Routing and Conditioning

DAQ Boards IEEE488 (GPIB) VXI RS-232

Format Trigger Control

Interprocess Communication Networking

What is it?
•Laboratory Virtual Instrument Engineering Workbench. •Development environment for the G language. •Produced by National Instruments for all major operating systems. •Originally developed for communication with lab devices. •A really useful tool.

What is NI LabVIEW ?

• Fast development with interactive configuration and programming • Easy interface with real –world I/O, measurement analysis, and data presentation

Why use LabVIEW? • Easy to Learn - Intuitive. • Easy to Use. • No Syntax. • Source code reads like schematic. • Speed of development. • Ready made controls for many instruments. • As versatile as text-based languages.

Programming Evolution

The G Language :
• Completely graphical programming language. • Source code is a diagram of nodes and wires.

• Data travels along wires. • Flow of data controls execution. Not flow of code! • Position on diagram is irrelevant

Dataflow Programming
Dataflow NOT Codeflow • Block diagram executes dependent on the flow of data; block diagram does execute left to right • Node executes when data is available to ALL input terminals • Nodes supply data to all output terminals when done

Building an Application:
• Applications are called virtual instruments (VI’). • Two parts to make 1. Front Panel 2.Sorce Diagram • Always start with front panel. • Draw a pencil block diagram of the main functions of diagram. • Make this diagram in G code. • Done.

LabVIEW Programs Are Called Virtual Instruments (VI’s)
Front Panel
– Controls = Inputs – Indicators = Outputs

Block Diagram
– Accompanying “Program” for Front Panel – Components “wired” together

VI Front Panel
Front Panel Toolbar Boolean Control Icon

Graph Legend

Waveform Graph Plot Legend Scale Legend

VI Block Diagram

Block Diagram Toolbar SubVI

Divide Function

Graph Terminal Wire Data While Loop Structure Numeric Constant Timing Function Boolean Control Terminal

Controls and Functions Palettes Controls Palette
(Front Panel Window)

Functions Palette
(Block Diagram Window)

Function (and structures ) Palette
Functions Palette (Block Diagram Window)

Structure: While loop

Tools Palette
• Floating Palette • Used to operate and modify front panel and block diagram objects.
Automatic Selection Tool Operating Tool Positioning/Resizing Tool Labeling Tool Wiring Tool Shortcut Menu Tool Scrolling Tool Breakpoint Tool Probe Tool Color Copy Tool Coloring Tool

Creating a VI
Front Panel Window

Block Diagram Window

Control Terminals

Indicator Terminals

Instrument Control Overview
• Control any instrument if you know the following: • Type of connector on the instrument − Type of cables needed • Electrical properties involved − Communication protocols used • Software drivers available Instruments Computer

GPIB Communication
GPIB Interface

GPIB Instruments

GPIB Cable

Configuring GPIB Board and Instruments

Measurement & Automation Explorer (MAX)

Instrument Drivers
• More than 1200 LabVIEW Instrument drivers • Programming simplified to high-level API

Instrument Driver VIs

• Initialize • • • • Configure • • • • • • • • • Action/Status • • • • • • • • • • • • • Data • • • • • • • • • • • • • • • • • • • • • • • • • • • Utility • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • Close • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •

Instrument Driver Inputs and Outputs

HP34401A Initialize.vi

• Instrument Descriptor • VISA Sessions

• Error cluster

- A connection or link to a specific instrument - Created after instrument is initialized - Used throughout VI whenever you communicate with that specific instrument

Putting It All Together

• • • •

Initialize instrument Do operation(s) Close instrument Check error status

My Developed Programs for Instruments:
Instruments: • Vector VoltMeter (HP 8508A) • Signal Generator (Marconi 2031)
– Combine programs of Sig-Vvm
• Measurement at one frequency and data recording, • Frequency increment and data recording, • Frequency increment - decrement and data recording.

• Network Analyzer (HP 8714C)

• Spectrum Analyzer (HP 8590L)

• General purpose program for Network Analyzer • Phase delay measurement using Network Analyzer • Phase delay measurement with OFC switching for two wavelength Measurement • General purpose program for Spectrum Analyzer

•Measurement at one frequency and data recording for Sigen-Vvm Block Diagram
Control input for sigen

Control input for Vvm

Output Indicator Boolean control

File path

Block Diagram

Signal generator Block diagram

Sequence structure While loop

Vector Voltmeter Block diagram

•Frequency Increment & Data Recording
Front Panel

Input parameter For sigen Input parameter For Vvm Waveform Graph Indicator

File path For data storing

Block Diagram
Formula Node

While loop For loop

Vector Voltmeter Block diagram

Number of Iteration

Increment Frequency

•Frequency Increment –Decrement & Data Recording
Front Panel

Input parameter For sigen

Waveform Graph Indicator

Block Diagram

Sequence Structure for increment & decrement

•General Purpose Program For Network Analyzer (HP 8714C)

Front Panel

File path

Waveform Graph Indicator

Block Diagram

Event Structure

Enter Switch

Freq Configur ation

Set marker

All marker off

Configure scale

Format measure ment

For display

Store picture image

•Phase-Delay Measurement Using Network Analyzer Front Panel

Block Diagram

Read 8 Marker Store data to file

Delay to Phase changeover

•Phase-Delay Measurement Using Network Analyzer with OFC switch Front Panel

Two wavelength selection

Block Diagram

Switch for wavelength selection

•General Purpose Program For Spectrum Analyzer (HP 8590L )

Front Panel
GPIB Address

Amplitude Setting

Marker Setting Output indicator & Marker value indicator Frequency Setting

Bandwidth Setting

Block Diagram

Event Structure

Bandwidth setting

Frequency setting

Marker setting

Marker off

Configure trace

Configure sweep

Save image

Read & Display

•Spectrum Analyzer program With Power Failure Protection Front Panel

Marker value & power indicator

File Path

Block Diagram
Set Parameter

Check power status Set Marker

Check power status

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->