49
LabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June 2010 373427G-01 Support Worldwide Technical Support and Product Information ni.com National Instruments Corporate Headquarters 11500 North Mopac Expressway Austin, Texas 78759-3504 USA Tel: 512 683 0100 Worldwide Offices Australia 1800 300 800, Austria 43 662 457990-0, Belgium 32 (0) 2 757 0020, Brazil 55 11 3262 3599, Canada 800 433 3488, China 86 21 5050 9800, Czech Republic 420 224 235 774, Denmark 45 45 76 26 00, Finland 358 (0) 9 725 72511, France 01 57 66 24 24, Germany 49 89 7413130, India 91 80 41190000, Israel 972 3 6393737, Italy 39 02 41309277, Japan 0120-527196, Korea 82 02 3451 3400, Lebanon 961 (0) 1 33 28 28, Malaysia 1800 887710, Mexico 01 800 010 0793, Netherlands 31 (0) 348 433 466, New Zealand 0800 553 322, Norway 47 (0) 66 90 76 60, Poland 48 22 328 90 10, Portugal 351 210 311 210, Russia 7 495 783 6851, Singapore 1800 226 5886, Slovenia 386 3 425 42 00, South Africa 27 0 11 805 8197, Spain 34 91 640 0085, Sweden 46 (0) 8 587 895 00, Switzerland 41 56 2005151, Taiwan 886 02 2377 2222, Thailand 662 278 6777, Turkey 90 212 279 3031, United Kingdom 44 (0) 1635 523545 For further support information, refer to the Technical Support and Professional Services appendix. To comment on National Instruments documentation, refer to the National Instruments Web site at ni.com/info and enter the Info Code feedback. © 2003–2010 National Instruments Corporation. All rights reserved.

Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

  • Upload
    others

  • View
    20

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

LabV

IEW

TM

Getti

ng S

tarte

d w

ith L

abVI

EW

Getti

ng S

tarte

d w

ith L

abVI

EW

June

201

037

3427

G-01

Supp

ort

Wor

ldw

ide

Tech

nica

l Sup

port

and

Prod

uct I

nfor

mat

ion

ni.com

Natio

nal I

nstru

men

ts C

orpo

rate

Hea

dqua

rters

1150

0 N

orth

Mop

ac E

xpre

ssw

ayA

ustin

, Tex

as 7

8759

-350

4U

SAT

el: 5

12 6

83 0

100

Wor

ldw

ide

Offic

es

Aus

tral

ia18

0030

080

0, A

ustr

ia43

662

4579

90-0

, Bel

gium

32(0

)2

757

0020

, Bra

zil5

511

3262

3599

, C

anad

a80

043

334

88, C

hina

8621

5050

9800

, Cze

chR

epub

lic42

022

423

577

4, D

enm

ark

4545

7626

00,

Finl

and

358

(0)

972

572

511,

Fra

nce

0157

6624

24, G

erm

any

4989

7413

130,

Ind

ia91

8041

1900

00,

Isra

el97

23

6393

737,

Ita

ly39

0241

3092

77, J

apan

0120

-527

196,

Kor

ea82

0234

5134

00,

Leb

anon

961

(0)

133

2828

, Mal

aysi

a18

0088

7710

, Mex

ico

0180

001

007

93, N

ethe

rlan

ds31

(0)

348

433

466,

N

ewZ

eala

nd08

0055

332

2, N

orw

ay47

(0)

6690

7660

, Pol

and

4822

328

9010

, Por

tuga

l351

210

311

210,

R

ussi

a7

495

783

6851

, Sin

gapo

re18

0022

658

86, S

love

nia

386

342

542

00, S

outh

Afr

ica

270

1180

581

97,

Spai

n34

9164

000

85, S

wed

en46

(0)

858

789

500

, Sw

itzer

land

4156

2005

151,

Tai

wan

886

0223

7722

22,

Tha

iland

662

278

6777

, Tur

key

9021

227

930

31, U

nite

dK

ingd

om44

(0)

1635

5235

45

For

furt

her

supp

ort i

nfor

mat

ion,

ref

er to

the

Tec

hnic

al S

uppo

rt a

nd P

rofe

ssio

nal S

ervi

ces

appe

ndix

. To

com

men

t on

Nat

iona

l Ins

trum

ents

doc

umen

tatio

n, r

efer

to th

e N

atio

nal I

nstr

umen

ts W

eb s

ite a

t ni.c

om/in

fo a

nd e

nter

the

Info

Cod

e feedback

.

© 2

003–

2010

Nat

iona

l Ins

trum

ents

Cor

pora

tion.

All

righ

ts r

eser

ved.

Page 2: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Impo

rtant

Info

rmat

ion

War

rant

yT

he m

edia

on

whi

ch y

ou r

ecei

ve N

atio

nal I

nstr

umen

ts s

oftw

are

are

war

rant

ed n

ot to

fai

l to

exec

ute

prog

ram

min

g in

stru

ctio

ns, d

ue to

def

ects

in

mat

eria

ls a

nd w

orkm

ansh

ip, f

or a

per

iod

of 9

0 da

ys f

rom

dat

e of

shi

pmen

t, as

evi

denc

ed b

y re

ceip

ts o

r ot

her

docu

men

tati

on. N

atio

nal

Inst

rum

ents

wil

l, at

its

opti

on, r

epai

r or

rep

lace

sof

twar

e m

edia

that

do

not e

xecu

te p

rogr

amm

ing

inst

ruct

ions

if N

atio

nal I

nstr

umen

ts r

ecei

ves

noti

ce o

f su

ch d

efec

ts d

urin

g th

e w

arra

nty

peri

od. N

atio

nal I

nstr

umen

ts d

oes

not w

arra

nt th

at th

e op

erat

ion

of th

e so

ftw

are

shal

l be

unin

terr

upte

d or

err

or f

ree.

A R

etur

n M

ater

ial A

utho

riza

tion

(R

MA

) nu

mbe

r m

ust b

e ob

tain

ed f

rom

the

fact

ory

and

clea

rly

mar

ked

on th

e ou

tsid

e of

the

pack

age

befo

re

any

equi

pmen

t wil

l be

acce

pted

for

war

rant

y w

ork.

Nat

iona

l Ins

trum

ents

wil

l pay

the

ship

ping

cos

ts o

f re

turn

ing

to th

e ow

ner

part

s w

hich

are

co

vere

d by

war

rant

y.

Nat

iona

l Ins

trum

ents

bel

ieve

s th

at th

e in

form

atio

n in

this

doc

umen

t is

accu

rate

. The

doc

umen

t has

bee

n ca

refu

lly

revi

ewed

for

tech

nica

l ac

cura

cy. I

n th

e ev

ent t

hat t

echn

ical

or

typo

grap

hica

l err

ors

exis

t, N

atio

nal I

nstr

umen

ts r

eser

ves

the

righ

t to

mak

e ch

ange

s to

sub

sequ

ent

edit

ions

of

this

doc

umen

t wit

hout

pri

or n

otic

e to

hol

ders

of

this

edi

tion

. The

read

er s

houl

d co

nsul

t Nat

iona

l Ins

trum

ents

if e

rror

s ar

e su

spec

ted.

In

no

even

t sha

ll N

atio

nal I

nstr

umen

ts b

e li

able

for

any

dam

ages

ari

sing

out

of

or r

elat

ed to

this

doc

umen

t or

the

info

rmat

ion

cont

aine

d in

it.

EX

CE

PT A

S S

PE

CIF

IED

HE

RE

IN, N

AT

ION

AL I

NS

TR

UM

EN

TS M

AK

ES N

O W

AR

RA

NT

IES, E

XP

RE

SS O

R IM

PL

IED

, AN

D S

PE

CIF

ICA

LL

Y D

ISC

LA

IMS A

NY

WA

RR

AN

TY

OF

ME

RC

HA

NT

AB

ILIT

Y O

R F

ITN

ES

S F

OR A

PA

RT

ICU

LA

R P

UR

PO

SE. C

US

TO

ME

R’S

RIG

HT T

O R

EC

OV

ER D

AM

AG

ES C

AU

SE

D B

Y F

AU

LT O

R N

EG

LIG

EN

CE O

N T

HE P

AR

T O

F

NA

TIO

NA

L I

NS

TR

UM

EN

TS S

HA

LL B

E L

IMIT

ED

TO

TH

E A

MO

UN

T T

HE

RE

TO

FO

RE P

AID

BY

TH

E C

US

TO

ME

R. N

AT

ION

AL I

NS

TR

UM

EN

TS W

ILL N

OT B

E L

IAB

LE F

OR

DA

MA

GE

S R

ES

UL

TIN

G F

RO

M L

OS

S O

F D

AT

A, P

RO

FIT

S, U

SE O

F P

RO

DU

CT

S, O

R IN

CID

EN

TA

L O

R C

ON

SE

QU

EN

TIA

L D

AM

AG

ES, E

VE

N IF

AD

VIS

ED

OF T

HE P

OS

SIB

ILIT

Y

TH

ER

EO

F. T

his

lim

itat

ion

of th

e li

abil

ity

of N

atio

nal I

nstr

umen

ts w

ill a

pply

rega

rdle

ss o

f the

form

of a

ctio

n, w

heth

er in

con

trac

t or t

ort,

incl

udin

g ne

glig

ence

. Any

act

ion

agai

nst N

atio

nal I

nstr

umen

ts m

ust b

e br

ough

t w

ithi

n on

e ye

ar a

fter

the

caus

e of

act

ion

accr

ues.

Nat

iona

l In

stru

men

ts

shal

l not

be

liab

le f

or a

ny d

elay

in p

erfo

rman

ce d

ue to

cau

ses

beyo

nd it

s re

ason

able

con

trol

. The

war

rant

y pr

ovid

ed h

erei

n do

es n

ot c

over

da

mag

es, d

efec

ts, m

alfu

ncti

ons,

or

serv

ice

fail

ures

cau

sed

by o

wne

r’s

fail

ure

to f

ollo

w th

e N

atio

nal I

nstr

umen

ts in

stal

lati

on, o

pera

tion

, or

mai

nten

ance

inst

ruct

ions

; ow

ner’

s m

odif

icat

ion

of th

e pr

oduc

t; o

wne

r’s

abus

e, m

isus

e, o

r ne

glig

ent a

cts;

and

pow

er f

ailu

re o

r su

rges

, fir

e,

floo

d, a

ccid

ent,

acti

ons

of th

ird

part

ies,

or

othe

r ev

ents

out

side

rea

sona

ble

cont

rol.

Copy

right

Und

er th

e co

pyri

ght l

aws,

this

pub

lica

tion

may

not

be

repr

oduc

ed o

r tra

nsm

itte

d in

any

form

, ele

ctro

nic

or m

echa

nica

l, in

clud

ing

phot

ocop

ying

, re

cord

ing,

sto

ring

in a

n in

form

atio

n re

trie

val s

yste

m, o

r tr

ansl

atin

g, in

who

le o

r in

par

t, w

itho

ut th

e pr

ior

wri

tten

con

sent

of

Nat

iona

l In

stru

men

ts C

orpo

rati

on.

Nat

iona

l Ins

trum

ents

res

pect

s th

e in

tell

ectu

al p

rope

rty

of o

ther

s, a

nd w

e as

k ou

r us

ers

to d

o th

e sa

me.

NI

soft

war

e is

pro

tect

ed b

y co

pyri

ght

and

othe

r in

tell

ectu

al p

rope

rty

law

s. W

here

NI

soft

war

e m

ay b

e us

ed to

rep

rodu

ce s

oftw

are

or o

ther

mat

eria

ls b

elon

ging

to o

ther

s, y

ou m

ay

use

NI

soft

war

e on

ly to

rep

rodu

ce m

ater

ials

that

you

may

rep

rodu

ce in

acc

orda

nce

wit

h th

e te

rms

of a

ny a

ppli

cabl

e li

cens

e or

oth

er le

gal

rest

rict

ion.

For

cop

yrig

ht n

otic

es, c

ondi

tion

s, a

nd d

iscl

aim

ers,

incl

udin

g in

form

atio

n re

gard

ing

cert

ain

thir

d-pa

rty

com

pone

nts

used

in L

abV

IEW

, ref

er to

th

e C

opyr

ight

topi

c of

the

Lab

VIE

W H

elp.

Trad

emar

ksC

VI,

Lab

VIE

W, N

atio

nal I

nstr

umen

ts, N

I, n

i.com

, the

Nat

iona

l Ins

trum

ents

cor

pora

te lo

go, a

nd th

e E

agle

logo

are

trad

emar

ks o

f N

atio

nal

Inst

rum

ents

Cor

pora

tion

. Ref

er to

the

Tra

dem

ark

Info

rmat

ion

at ni.com/trademarks

for

oth

er N

atio

nal I

nstr

umen

ts tr

adem

arks

.

The

mar

k L

abW

indo

ws

is u

sed

unde

r a

lice

nse

from

Mic

roso

ft C

orpo

rati

on. W

indo

ws

is a

reg

iste

red

trad

emar

k of

Mic

roso

ft C

orpo

rati

on in

th

e U

nite

d S

tate

s an

d ot

her

coun

trie

s. O

ther

pro

duct

and

com

pany

nam

es m

enti

oned

her

ein

are

trad

emar

ks o

r tr

ade

nam

es o

f th

eir

resp

ecti

ve

com

pani

es.

Mem

bers

of

the

Nat

iona

l Ins

trum

ents

All

ianc

e P

artn

er P

rogr

am a

re b

usin

ess

enti

ties

inde

pend

ent f

rom

Nat

iona

l Ins

trum

ents

and

hav

e no

ag

ency

, par

tner

ship

, or

join

t-ve

ntur

e re

lati

onsh

ip w

ith

Nat

iona

l Ins

trum

ents

.

Pate

nts

For

pat

ents

cov

erin

g N

atio

nal I

nstr

umen

ts p

rodu

cts/

tech

nolo

gy, r

efer

to th

e ap

prop

riat

e lo

cati

on:

Hel

p»P

aten

ts in

you

r so

ftw

are,

th

epatents.txt

fil

e on

you

r m

edia

, or

the

Nat

iona

l In

stru

men

ts P

aten

t Not

ice

at ni.com/patents

.

WAR

NING

REG

ARDI

NG U

SE O

F NA

TION

AL IN

STRU

MEN

TS P

RODU

CTS

(1)

NA

TIO

NA

L I

NS

TR

UM

EN

TS

PR

OD

UC

TS

AR

E N

OT

DE

SIG

NE

D W

ITH

CO

MP

ON

EN

TS

AN

D T

ES

TIN

G F

OR

A L

EV

EL

OF

R

EL

IAB

ILIT

Y S

UIT

AB

LE

FO

R U

SE

IN

OR

IN

CO

NN

EC

TIO

N W

ITH

SU

RG

ICA

L I

MP

LA

NT

S O

R A

S C

RIT

ICA

L C

OM

PO

NE

NT

S I

N

AN

Y L

IFE

SU

PP

OR

T S

YS

TE

MS

WH

OS

E F

AIL

UR

E T

O P

ER

FO

RM

CA

N R

EA

SO

NA

BL

Y B

E E

XP

EC

TE

D T

O C

AU

SE

SIG

NIF

ICA

NT

IN

JUR

Y T

O A

HU

MA

N.

(2)

IN A

NY

AP

PL

ICA

TIO

N, I

NC

LU

DIN

G T

HE

AB

OV

E, R

EL

IAB

ILIT

Y O

F O

PE

RA

TIO

N O

F T

HE

SO

FT

WA

RE

PR

OD

UC

TS

CA

N B

E

IMP

AIR

ED

BY

AD

VE

RS

E F

AC

TO

RS

, IN

CL

UD

ING

BU

T N

OT

LIM

ITE

D T

O F

LU

CT

UA

TIO

NS

IN

EL

EC

TR

ICA

L P

OW

ER

SU

PP

LY

, C

OM

PU

TE

R H

AR

DW

AR

E M

AL

FU

NC

TIO

NS

, CO

MP

UT

ER

OP

ER

AT

ING

SY

ST

EM

SO

FT

WA

RE

FIT

NE

SS

, FIT

NE

SS

OF

CO

MP

ILE

RS

A

ND

DE

VE

LO

PM

EN

T S

OF

TW

AR

E U

SE

D T

O D

EV

EL

OP

AN

AP

PL

ICA

TIO

N, I

NS

TA

LL

AT

ION

ER

RO

RS

, SO

FT

WA

RE

AN

D

HA

RD

WA

RE

CO

MP

AT

IBIL

ITY

PR

OB

LE

MS

, MA

LF

UN

CT

ION

S O

R F

AIL

UR

ES

OF

EL

EC

TR

ON

IC M

ON

ITO

RIN

G O

R C

ON

TR

OL

D

EV

ICE

S, T

RA

NS

IEN

T F

AIL

UR

ES

OF

EL

EC

TR

ON

IC S

YS

TE

MS

(HA

RD

WA

RE

AN

D/O

R S

OF

TW

AR

E),

UN

AN

TIC

IPA

TE

D U

SE

S O

R

MIS

US

ES

, OR

ER

RO

RS

ON

TH

E P

AR

T O

F T

HE

US

ER

OR

AP

PL

ICA

TIO

NS

DE

SIG

NE

R (A

DV

ER

SE

FA

CT

OR

S S

UC

H A

S T

HE

SE

AR

E

HE

RE

AF

TE

R C

OL

LE

CT

IVE

LY

TE

RM

ED

“S

YS

TE

M F

AIL

UR

ES

”). A

NY

AP

PL

ICA

TIO

N W

HE

RE

A S

YS

TE

M F

AIL

UR

E W

OU

LD

C

RE

AT

E A

RIS

K O

F H

AR

M T

O P

RO

PE

RT

Y O

R P

ER

SO

NS

(IN

CL

UD

ING

TH

E R

ISK

OF

BO

DIL

Y I

NJU

RY

AN

D D

EA

TH

) S

HO

UL

D

NO

T B

E R

EL

IAN

T S

OL

EL

Y U

PO

N O

NE

FO

RM

OF

EL

EC

TR

ON

IC S

YS

TE

M D

UE

TO

TH

E R

ISK

OF

SY

ST

EM

FA

ILU

RE

. TO

AV

OID

D

AM

AG

E, I

NJU

RY

, OR

DE

AT

H, T

HE

US

ER

OR

AP

PL

ICA

TIO

N D

ES

IGN

ER

MU

ST

TA

KE

RE

AS

ON

AB

LY

PR

UD

EN

T S

TE

PS

TO

P

RO

TE

CT

AG

AIN

ST

SY

ST

EM

FA

ILU

RE

S, I

NC

LU

DIN

G B

UT

NO

T L

IMIT

ED

TO

BA

CK

-UP

OR

SH

UT

DO

WN

ME

CH

AN

ISM

S.

BE

CA

US

E E

AC

H E

ND

-US

ER

SY

ST

EM

IS

CU

ST

OM

IZE

D A

ND

DIF

FE

RS

FR

OM

NA

TIO

NA

L I

NS

TR

UM

EN

TS

' TE

ST

ING

P

LA

TF

OR

MS

AN

D B

EC

AU

SE

A U

SE

R O

R A

PP

LIC

AT

ION

DE

SIG

NE

R M

AY

US

E N

AT

ION

AL

IN

ST

RU

ME

NT

S P

RO

DU

CT

S I

N

CO

MB

INA

TIO

N W

ITH

OT

HE

R P

RO

DU

CT

S I

N A

MA

NN

ER

NO

T E

VA

LU

AT

ED

OR

CO

NT

EM

PL

AT

ED

BY

NA

TIO

NA

L

INS

TR

UM

EN

TS

, TH

E U

SE

R O

R A

PP

LIC

AT

ION

DE

SIG

NE

R I

S U

LT

IMA

TE

LY

RE

SP

ON

SIB

LE

FO

R V

ER

IFY

ING

AN

D V

AL

IDA

TIN

G

TH

E S

UIT

AB

ILIT

Y O

F N

AT

ION

AL

IN

ST

RU

ME

NT

S P

RO

DU

CT

S W

HE

NE

VE

R N

AT

ION

AL

IN

ST

RU

ME

NT

S P

RO

DU

CT

S A

RE

IN

CO

RP

OR

AT

ED

IN

A S

YS

TE

M O

R A

PP

LIC

AT

ION

, IN

CL

UD

ING

, WIT

HO

UT

LIM

ITA

TIO

N, T

HE

AP

PR

OP

RIA

TE

DE

SIG

N,

PR

OC

ES

S A

ND

SA

FE

TY

LE

VE

L O

F S

UC

H S

YS

TE

M O

R A

PP

LIC

AT

ION

.

Page 3: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

© N

atio

nal I

nstru

men

ts C

orpo

ratio

nv

Getti

ng S

tarte

d w

ith L

abVI

EW

Cont

ents

Abou

t Thi

s M

anua

lC

onve

ntio

ns...

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

....i

xR

elat

ed D

ocum

enta

tion

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

..x

Chap

ter 1

Getti

ng S

tarte

d w

ith L

abVI

EW V

irtua

l Ins

trum

ents

Bui

ldin

g a

Vir

tual

Ins

trum

ent.

......

......

......

......

......

......

......

......

......

......

......

......

......

......

...1-

2L

aunc

hing

Lab

VIE

W...

......

......

......

......

......

......

......

......

......

......

......

......

......

.....

1-3

Ope

ning

a N

ew V

I fr

om a

Tem

plat

e...

......

......

......

......

......

......

......

......

......

......

1-4

Add

ing

a C

ontr

ol to

the

Fron

t Pan

el...

......

......

......

......

......

......

......

......

......

......

.1-6

Cha

ngin

g a

Sig

nal T

ype

......

......

......

......

......

......

......

......

......

......

......

......

......

....1

-8W

irin

g O

bjec

ts o

n th

e B

lock

Dia

gram

......

......

......

......

......

......

......

......

......

......

1-10

Run

ning

a V

I....

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

.....

1-11

Mod

ifyi

ng a

Sig

nal.

......

......

......

......

......

......

......

......

......

......

......

......

......

......

.....

1-11

Dis

play

ing

Tw

o Si

gnal

s on

a G

raph

......

......

......

......

......

......

......

......

......

......

....1

-15

Cus

tom

izin

g a

Kno

b C

ontr

ol...

......

......

......

......

......

......

......

......

......

......

......

......

1-16

Cus

tom

izin

g a

Wav

efor

m G

raph

......

......

......

......

......

......

......

......

......

......

......

...1-

17S

umm

ary

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

1-18

New

Dia

log

Box

and

Tem

plat

e V

Is...

......

......

......

......

......

......

......

......

......

......

.1-1

8F

ront

Pan

el...

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

....1

-19

Blo

ck D

iagr

am...

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

....1

-19

Fro

nt P

anel

and

Blo

ck D

iagr

am T

ools

......

......

......

......

......

......

......

......

......

......

1-19

Run

ning

and

Sto

ppin

g a

VI.

......

......

......

......

......

......

......

......

......

......

......

......

....1

-20

Exp

ress

VIs

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

1-20

Lab

VIE

W D

ocum

enta

tion

Res

ourc

es...

......

......

......

......

......

......

......

......

......

....1

-20

Pro

pert

y D

ialo

g B

oxes

......

......

......

......

......

......

......

......

......

......

......

......

......

......

1-21

Sho

rtcu

ts...

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

.1-2

1

Chap

ter 2

Cust

omiz

ing

a VI

Bui

ldin

g a

VI

from

a B

lank

VI.

......

......

......

......

......

......

......

......

......

......

......

......

......

......

.2-1

Ope

ning

a B

lank

VI.

......

......

......

......

......

......

......

......

......

......

......

......

......

......

....2

-2A

ddin

g an

Exp

ress

VI

Tha

t Sim

ulat

es a

Sig

nal.

......

......

......

......

......

......

......

...2-

2S

earc

hing

the

Hel

p an

d M

odif

ying

a S

igna

l.....

......

......

......

......

......

......

......

.....

2-3

Cus

tom

izin

g a

Use

r In

terf

ace

from

the

Blo

ck D

iagr

am...

......

......

......

......

......

.2-5

Con

figu

ring

a V

I to

Run

Con

tinu

ousl

y un

til t

he U

ser

Stop

s It

......

......

......

.....

2-6

Usi

ng th

e E

rror

Lis

t Win

dow

......

......

......

......

......

......

......

......

......

......

......

......

..2-

8C

ontr

olli

ng th

e Sp

eed

of E

xecu

tion

......

......

......

......

......

......

......

......

......

......

....2

-9

Cont

ents

Getti

ng S

tarte

d w

ith L

abVI

EWvi

ni.c

om

Usi

ng a

Tab

le to

Dis

play

Dat

a...

......

......

......

......

......

......

......

......

......

......

......

...2-

9S

earc

hing

for

Exa

mpl

es...

......

......

......

......

......

......

......

......

......

......

......

......

......

.2-1

1S

umm

ary.

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

.....

2-12

Usi

ng th

e L

abV

IEW

Hel

p R

esou

rces

......

......

......

......

......

......

......

......

......

......

.2-1

2C

usto

miz

ing

the

Blo

ck D

iagr

am C

ode

......

......

......

......

......

......

......

......

......

.....

2-13

Cre

atin

g C

ontr

ols

and

Indi

cato

rs...

......

......

......

......

......

......

......

......

...2-

13C

ontr

olli

ng W

hen

a V

I St

ops

Run

ning

......

......

......

......

......

......

......

...2-

14E

rror

s an

d B

roke

n W

ires

......

......

......

......

......

......

......

......

......

......

......

2-14

Dis

play

ing

Dat

a in

a T

able

......

......

......

......

......

......

......

......

......

......

...2-

14U

sing

the

NI

Exa

mpl

e F

inde

r....

......

......

......

......

......

......

......

......

......

......

......

...2-

14S

hort

cuts

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

....2

-15

Chap

ter 3

Anal

yzin

g an

d Sa

ving

a S

igna

lB

uild

ing

an A

naly

sis

VI.

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

.....

3-2

Mod

ifyi

ng a

VI

Cre

ated

fro

m a

Tem

plat

e...

......

......

......

......

......

......

......

......

...3-

2A

ddin

g a

Sig

nal.

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

....3

-4A

ddin

g T

wo

Sig

nals

......

......

......

......

......

......

......

......

......

......

......

......

......

......

....3

-5F

ilte

ring

a S

igna

l....

......

......

......

......

......

......

......

......

......

......

......

......

......

......

.....

3-7

Mod

ifyi

ng th

e A

ppea

ranc

e of

Gra

phs.

......

......

......

......

......

......

......

......

......

......

3-8

Ana

lyzi

ng th

e A

mpl

itud

e of

a S

igna

l....

......

......

......

......

......

......

......

......

......

....3

-9C

ontr

olli

ng th

e Sp

eed

of E

xecu

tion

......

......

......

......

......

......

......

......

......

......

....3

-9A

ddin

g a

War

ning

Lig

ht...

......

......

......

......

......

......

......

......

......

......

......

......

......

3-10

Set

ting

a W

arni

ng L

evel

Lim

it...

......

......

......

......

......

......

......

......

......

......

......

...3-

11W

arni

ng th

e U

ser.

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

.3-1

2C

onfi

guri

ng a

VI

to S

ave

Dat

a to

a F

ile.

......

......

......

......

......

......

......

......

......

...3-

13S

avin

g D

ata

to a

Fil

e....

......

......

......

......

......

......

......

......

......

......

......

......

......

.....

3-14

Add

ing

a B

utto

n T

hat S

tore

s D

ata

Whe

n C

lick

ed...

......

......

......

......

......

......

...3-

14S

avin

g D

ata

Whe

n P

rom

pted

by

a U

ser.

......

......

......

......

......

......

......

......

......

...3-

15V

iew

ing

Sav

ed D

ata.

......

......

......

......

......

......

......

......

......

......

......

......

......

......

...3-

16S

umm

ary.

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

.....

3-17

Con

trol

s an

d In

dica

tors

......

......

......

......

......

......

......

......

......

......

......

......

......

.....

3-17

Fil

teri

ng D

ata

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

..3-

17S

avin

g D

ata

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

.....

3-17

Chap

ter 4

Hard

war

e: A

cqui

ring

Data

and

Com

mun

icat

ing

with

Inst

rum

ents

(W

indo

ws)

Har

dwar

e an

d S

oftw

are

Req

uire

men

ts...

......

......

......

......

......

......

......

......

......

......

......

.....

4-1

Acq

uiri

ng a

Sig

nal i

n N

I-D

AQ

mx

......

......

......

......

......

......

......

......

......

......

......

......

......

..4-

2C

reat

ing

an N

I-D

AQ

mx

Tas

k...

......

......

......

......

......

......

......

......

......

......

......

....4

-2G

raph

ing

Dat

a fr

om a

DA

Q D

evic

e...

......

......

......

......

......

......

......

......

......

......

4-5

Page 4: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Cont

ents

© N

atio

nal I

nstru

men

ts C

orpo

ratio

nvi

iGe

tting

Sta

rted

with

Lab

VIEW

Edi

ting

an

NI-

DA

Qm

x T

ask

......

......

......

......

......

......

......

......

......

......

......

......

...4-

6V

isua

lly C

ompa

ring

Tw

o V

olta

ge R

eadi

ngs.

......

......

......

......

......

......

......

......

..4-

7C

omm

unic

atin

g w

ith

an I

nstr

umen

t: U

sing

Ins

trum

ent D

rive

rs a

nd th

e In

stru

men

t I/O

Ass

ista

nt...

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

4-7

Get

ting

Star

ted

with

the

Inst

rum

ent D

rive

r Fi

nder

......

......

......

......

......

......

......

4-8

Find

ing

and

Inst

allin

g In

stru

men

t Dri

vers

......

......

......

......

......

......

......

......

......

4-8

Usi

ng I

nstr

umen

t Dri

vers

......

......

......

......

......

......

......

......

......

......

......

......

......

..4-

9Se

lect

ing

an I

nstr

umen

t Usi

ng th

e In

stru

men

t I/O

Ass

ista

nt...

......

......

......

.....

4-10

Acq

uiri

ng a

nd P

arsi

ng I

nfor

mat

ion

for

an I

nstr

umen

t....

......

......

......

......

......

..4-

11W

irin

g a

Com

man

d to

an

Inst

rum

ent.

......

......

......

......

......

......

......

......

......

......

.4-1

2S

umm

ary

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

4-12

DA

Q A

ssis

tant

Exp

ress

VI.

......

......

......

......

......

......

......

......

......

......

......

......

.....

4-12

Tas

ks in

NI-

DA

Qm

x...

......

......

......

......

......

......

......

......

......

......

......

......

......

......

4-13

Inst

rum

ent D

rive

rs...

......

......

......

......

......

......

......

......

......

......

......

......

......

......

....4

-13

Inst

rum

ent I

/O A

ssis

tant

Exp

ress

VI.

......

......

......

......

......

......

......

......

......

......

..4-

14

Chap

ter 5

Usin

g Ot

her L

abVI

EW F

eatu

res

All

Con

trol

s an

d In

dica

tors

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

..5-

1A

ll V

Is a

nd F

unct

ions

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

....5

-2V

Is...

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

....5

-2F

unct

ions

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

...5-

3D

ata

Typ

es...

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

......

5-3

Whe

n to

Use

Oth

er L

abV

IEW

Fea

ture

s...

......

......

......

......

......

......

......

......

......

......

......

...5-

4

Appe

ndix

ATe

chni

cal S

uppo

rt an

d Pr

ofes

sion

al S

ervi

ces

Glos

sary

Inde

x

© N

atio

nal I

nstru

men

ts C

orpo

ratio

nix

Getti

ng S

tarte

d w

ith L

abVI

EW

Abou

t Thi

s M

anua

l

Use

this

man

ual a

s a

tuto

rial

to f

amil

iari

ze y

ours

elf

wit

h th

e L

abV

IEW

gr

aphi

cal p

rogr

amm

ing

envi

ronm

ent a

nd th

e ba

sic

Lab

VIE

W fe

atur

es y

ou

use

to b

uild

dat

a ac

quis

ition

and

inst

rum

ent c

ontr

ol a

pplic

atio

ns.

Thi

s m

anua

l con

tain

s ex

erci

ses

that

you

can

use

to le

arn

how

to d

evel

op

basi

c ap

plic

atio

ns in

Lab

VIE

W. T

hese

exe

rcis

es ta

ke a

sho

rt a

mou

nt o

f tim

e to

com

plet

e an

d he

lp y

ou g

et s

tart

ed w

ith L

abV

IEW

.

The

end

of e

ach

chap

ter i

nclu

des

a su

mm

ary

of th

e m

ain

conc

epts

taug

ht in

th

at c

hapt

er. U

se th

ese

sum

mar

ies

to r

evie

w w

hat y

ou le

arne

d.

Conv

entio

nsT

he f

ollo

win

g co

nven

tions

app

ear

in th

is m

anua

l:

»T

he »

sym

bol l

eads

you

thro

ugh

nest

ed m

enu

item

s an

d di

alog

box

opt

ions

to

a f

inal

act

ion.

The

seq

uenc

e F

ile»P

age

Setu

p»O

ptio

ns d

irec

ts y

ou to

pu

ll do

wn

the

File

men

u, s

elec

t the

Pag

eSe

tup

item

, and

sel

ect O

ptio

ns

from

the

last

dia

log

box.

Thi

s ic

on d

enot

es a

tip,

whi

ch a

lert

s yo

u to

adv

isor

y in

form

atio

n.

Thi

s ic

on d

enot

es a

not

e, w

hich

ale

rts

you

to im

port

ant i

nfor

mat

ion.

bold

Bol

d te

xt d

enot

es it

ems

that

you

mus

t sel

ect o

r cl

ick

in th

e so

ftw

are,

suc

h as

men

u it

ems

and

dial

og b

ox o

ptio

ns. B

old

text

als

o de

note

s pa

ram

eter

na

mes

, con

trol

s an

d in

dica

tors

on

the

fron

t pan

el, d

ialo

g bo

xes,

sec

tions

of

dial

og b

oxes

, men

u na

mes

, and

pal

ette

nam

es.

ital

icIt

alic

text

den

otes

var

iabl

es, e

mph

asis

, a c

ross

-ref

eren

ce, o

r an

intr

oduc

tion

to

a k

ey c

once

pt. I

tali

c te

xt a

lso

deno

tes

text

that

is a

pla

ceho

lder

for a

wor

d or

val

ue th

at y

ou m

ust s

uppl

y.

monospace

Text

in th

is f

ont d

enot

es te

xt o

r ch

arac

ters

that

you

sho

uld

ente

r fr

om th

e ke

yboa

rd, s

ecti

ons

of c

ode,

pro

gram

min

g ex

ampl

es, a

nd s

ynta

x ex

ampl

es.

Thi

s fo

nt is

als

o us

ed fo

r the

pro

per n

ames

of d

isk

driv

es, p

aths

, dir

ecto

ries

, pr

ogra

ms,

sub

prog

ram

s, s

ubro

utin

es, d

evic

e na

mes

, ope

ratio

ns, v

aria

bles

, fi

lena

mes

, and

ext

ensi

ons.

Page 5: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Abou

t Thi

s M

anua

l

Getti

ng S

tarte

d w

ith L

abVI

EWx

ni.c

om

monospace bold

Bol

d te

xt in

this

font

den

otes

the

mes

sage

s an

d re

spon

ses

that

the

com

pute

r au

tom

atic

ally

pri

nts

to th

e sc

reen

. Thi

s fo

nt a

lso

emph

asiz

es li

nes

of c

ode

that

are

dif

fere

nt f

rom

the

othe

r ex

ampl

es.

Plat

form

Text

in th

is f

ont d

enot

es a

spe

cifi

c pl

atfo

rm a

nd in

dica

tes

that

the

text

fo

llow

ing

it ap

plie

s on

ly to

that

pla

tfor

m.

righ

t-cl

ick

(Mac

OS

X) P

ress

<C

omm

and>

-cli

ck to

per

form

the

sam

e ac

tion

as

a ri

ght-

clic

k.

Rela

ted

Docu

men

tatio

nT

he fo

llow

ing

docu

men

ts c

onta

in in

form

atio

n th

at y

ou m

ay fi

nd h

elpf

ul a

s yo

u re

ad th

is m

anua

l:

•L

abV

IEW

Rel

ease

Not

es—

Use

thes

e re

leas

e no

tes

to in

stal

l and

un

inst

all L

abV

IEW

. The

rel

ease

not

es a

lso

desc

ribe

the

syst

em

requ

irem

ents

for

the

Lab

VIE

W s

oftw

are,

incl

udin

g th

e L

abV

IEW

A

ppli

cati

on B

uild

er.

•L

abV

IEW

Hel

p—U

se th

e L

abV

IEW

Hel

p to

acc

ess

info

rmat

ion

abou

t L

abV

IEW

pro

gram

min

g co

ncep

ts, s

tep-

by-s

tep

inst

ruct

ions

for

usi

ng

Lab

VIE

W, a

nd re

fere

nce

info

rmat

ion

abou

t Lab

VIE

W V

Is, f

unct

ions

, pa

lett

es, m

enus

, too

ls, p

rope

rtie

s, m

etho

ds, e

vent

s, d

ialo

g bo

xes,

and

so

on.

The

Lab

VIE

W H

elp

also

list

s th

e L

abV

IEW

doc

umen

tati

on

reso

urce

s av

aila

ble

from

Nat

iona

l Ins

trum

ents

. Acc

ess

the

Lab

VIE

W

Hel

p by

sel

ecti

ng H

elp»

Lab

VIE

W H

elp.

•L

abV

IEW

Qui

ck R

efer

ence

Car

d—U

se th

is c

ard

as a

ref

eren

ce f

or

info

rmat

ion

abou

t hel

p re

sour

ces,

key

boar

d sh

ortc

uts,

dat

a ty

pe

term

inal

s, a

nd to

ols

for

editi

ng, e

xecu

tion,

and

deb

uggi

ng.

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n1-

1Ge

tting

Sta

rted

with

Lab

VIEW1

Getti

ng S

tarte

d w

ith L

abVI

EW

Virtu

al In

stru

men

ts

Lab

VIE

W p

rogr

ams

are

call

ed v

irtu

al in

stru

men

ts, o

r V

Is, b

ecau

se

thei

rap

pear

ance

and

ope

rati

on im

itat

e ph

ysic

al in

stru

men

ts, s

uch

as

osci

llos

cope

s an

d m

ulti

met

ers.

Lab

VIE

W c

onta

ins

a co

mpr

ehen

sive

set

of

tool

s fo

r acq

uiri

ng, a

naly

zing

, dis

play

ing,

and

sto

ring

dat

a, a

s w

ell a

s to

ols

to h

elp

you

trou

bles

hoot

cod

e yo

u w

rite

.

In L

abV

IEW

, you

bui

ld a

use

r in

terf

ace,

or

fron

t pan

el, w

ith c

ontr

ols

and

indi

cato

rs. C

ontr

ols

are

knob

s, p

ush

butto

ns, d

ials

, and

oth

er in

put

mec

hani

sms.

Indi

cato

rs a

re g

raph

s, L

ED

s, a

nd o

ther

out

put d

ispl

ays.

Aft

er

you

buil

d th

e fr

ont p

anel

, you

add

cod

e us

ing

VIs

and

str

uctu

res

to c

ontr

ol

the

fron

t pan

el o

bjec

ts. T

he b

lock

dia

gram

con

tain

s th

is c

ode.

You

can

use

Lab

VIE

W to

com

mun

icat

e w

ith h

ardw

are

such

as

data

ac

quis

ition

, vis

ion,

and

mot

ion

cont

rol d

evic

es, a

s w

ell a

s G

PIB

, PX

I, V

XI,

R

S232

, and

RS4

85 in

stru

men

ts.

Page 6: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 1

Getti

ng S

tarte

d w

ith L

abVI

EW V

irtua

l Ins

trum

ents

Getti

ng S

tarte

d w

ith L

abVI

EW1-

2ni

.com

Build

ing

a Vi

rtual

Inst

rum

ent

In th

e fo

llow

ing

exer

cise

s, y

ou w

ill b

uild

a V

I th

at g

ener

ates

a s

igna

l and

di

spla

ys th

at s

igna

l in

a gr

aph.

Aft

er y

ou c

ompl

ete

the

exer

cise

s, th

e fr

ont

pane

l of

the

VI

will

look

sim

ilar

to th

e fr

ont p

anel

in F

igur

e1-

1.

You

can

com

plet

e th

e ex

erci

ses

in th

is c

hapt

er in

app

roxi

mat

ely

40 m

inut

es.

Figu

re 1

-1.

Fron

t Pan

el o

f the

Acq

uirin

g a

Sign

al V

I

Chap

ter 1

Getti

ng S

tarte

d w

ith L

abVI

EW V

irtua

l Ins

trum

ents

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n1-

3Ge

tting

Sta

rted

with

Lab

VIEW

Laun

chin

g La

bVIE

WT

he G

etti

ng S

tart

ed w

indo

w, s

how

n in

Fig

ure

1-2,

app

ears

whe

n yo

u la

unch

Lab

VIE

W. U

se th

is w

indo

w to

cre

ate

new

VIs

, sel

ect a

mon

g th

e m

ost r

ecen

tly

open

ed L

abV

IEW

fil

es, f

ind

exam

ples

, and

laun

ch th

e L

abV

IEW

Hel

p. Y

ou a

lso

can

acce

ss in

form

atio

n an

d re

sour

ces

to h

elp

you

lear

n ab

out L

abV

IEW

, suc

h as

spe

cifi

c m

anua

ls, h

elp

topi

cs, a

nd

reso

urce

s on

the

Nat

iona

l Ins

trum

ents

Web

sit

e, ni.com

.

Figu

re 1

-2.

Getti

ng S

tarte

d W

indo

w

The

Get

ting

Sta

rted

win

dow

dis

appe

ars

whe

n yo

u op

en a

n ex

istin

g fi

le o

r cr

eate

a n

ew f

ile.

The

Get

ting

Sta

rted

win

dow

rea

ppea

rs w

hen

you

clos

e al

l ope

n fr

ont p

anel

s an

d bl

ock

diag

ram

s. Y

ou a

lso

can

disp

lay

the

win

dow

fr

om th

e fr

ont p

anel

or

bloc

k di

agra

m b

y se

lect

ing

Vie

w»G

etti

ng S

tart

ed

Win

dow

.

Page 7: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 1

Getti

ng S

tarte

d w

ith L

abVI

EW V

irtua

l Ins

trum

ents

Getti

ng S

tarte

d w

ith L

abVI

EW1-

4ni

.com

Open

ing

a Ne

w V

I fro

m a

Tem

plat

eL

abV

IEW

pro

vide

s bu

ilt-

in te

mpl

ate

VIs

that

incl

ude

the

subV

Is,

func

tion

s, s

truc

ture

s, a

nd f

ront

pan

el o

bjec

ts y

ou n

eed

to g

et s

tart

ed

buil

ding

com

mon

mea

sure

men

t app

lica

tion

s.

Com

plet

e th

e fo

llow

ing

step

s to

cre

ate

a V

I th

at g

ener

ates

a s

igna

l and

di

spla

ys it

in th

e fr

ont p

anel

win

dow

.

1.L

aunc

h L

abV

IEW

.

2.In

the

Get

ting

Sta

rted

win

dow

, cli

ck th

e N

ew o

r V

I fr

om T

empl

ate

link

to d

ispl

ay th

e N

ew d

ialo

g bo

x.

3.Fr

om th

e C

reat

e N

ew li

st, s

elec

t VI»

Fro

m T

empl

ate»

Tut

oria

l (G

etti

ng S

tart

ed)»

Gen

erat

e an

d D

ispl

ay. T

his

tem

plat

e V

I ge

nera

tes

and

disp

lays

a s

igna

l.

A p

revi

ew a

nd a

bri

ef d

escr

ipti

on o

f th

e te

mpl

ate

VI

appe

ar in

the

Des

crip

tion

sec

tion.

Fig

ure

1-3

show

s th

e N

ew d

ialo

g bo

x an

d th

e pr

evie

w o

f th

e G

ener

ate

and

Dis

play

tem

plat

e V

I.

Chap

ter 1

Getti

ng S

tarte

d w

ith L

abVI

EW V

irtua

l Ins

trum

ents

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n1-

5Ge

tting

Sta

rted

with

Lab

VIEW

Figu

re 1

-3.

New

Dia

log

Box

4.C

lick

the

OK

but

ton

to c

reat

e a

VI

from

the

tem

plat

e. Y

ou a

lso

can

doub

le-c

lick

the

nam

e of

the

tem

plat

e V

I in

the

Cre

ate

New

list

to

crea

te a

VI

from

a te

mpl

ate.

Lab

VIE

W d

ispl

ays

two

win

dow

s: th

e fr

ont p

anel

win

dow

and

the

bloc

k di

agra

m w

indo

w.

5.E

xam

ine

the

fron

t pan

el w

indo

w.

The

use

r int

erfa

ce, o

r fro

nt p

anel

, app

ears

wit

h a

gray

bac

kgro

und

and

incl

udes

con

trol

s an

d in

dica

tors

. The

titl

e ba

r of

the

fron

t pan

el

indi

cate

s th

at th

is w

indo

w is

the

fron

t pan

el f

or th

e G

ener

ate

and

Dis

play

VI.

Page 8: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 1

Getti

ng S

tarte

d w

ith L

abVI

EW V

irtua

l Ins

trum

ents

Getti

ng S

tarte

d w

ith L

abVI

EW1-

6ni

.com

Note

If th

e fr

ont p

anel

is n

ot v

isib

le, y

ou c

an d

ispl

ay th

e fr

ont p

anel

by

sele

ctin

g W

indo

w»S

how

Fro

nt P

anel

. You

als

o ca

n sw

itch

bet

wee

n th

e fr

ont p

anel

win

dow

and

bl

ock

diag

ram

win

dow

at a

ny ti

me

by p

ress

ing

the

<C

trl-

E>

key

s. T

he <

Ctr

l> k

ey in

ke

yboa

rd s

hort

cuts

cor

resp

onds

to th

e (M

ac O

S X)

<O

ptio

n> o

r <

Com

man

d> k

ey o

r (L

inux

)<A

lt>

key

.

6.Se

lect

Win

dow

»Sho

w B

lock

Dia

gram

and

exa

min

e th

e bl

ock

diag

ram

of

the

VI.

The

blo

ck d

iagr

am a

ppea

rs w

ith

a w

hite

bac

kgro

und

and

incl

udes

VIs

an

d st

ruct

ures

that

con

trol

the

fron

t pan

el o

bjec

ts. T

he ti

tle b

ar o

f th

e bl

ock

diag

ram

indi

cate

s th

at th

is w

indo

w is

the

bloc

k di

agra

m f

or th

e G

ener

ate

and

Dis

play

VI.

7.O

n th

e fr

ont p

anel

tool

bar,

clic

k th

e R

un b

utto

n, s

how

n at

left

. You

al

so c

an p

ress

the

<C

trl-

R>

key

s to

run

a V

I.

A s

ine

wav

e ap

pear

s on

the

grap

h in

the

fron

t pan

el w

indo

w.

8.St

op th

e V

I by

clic

king

the

fron

t pan

el S

TO

P b

utto

n, s

how

n at

left

.

Addi

ng a

Con

trol t

o th

e Fr

ont P

anel

Fron

t pan

el c

ontr

ols

sim

ulat

e th

e in

put m

echa

nism

s on

a p

hysi

cal

inst

rum

ent a

nd s

uppl

y da

ta to

the

bloc

k di

agra

m o

f th

e V

I. M

any

phys

ical

in

stru

men

ts h

ave

knob

s yo

u ca

n tu

rn to

cha

nge

an in

put v

alue

.

Com

plet

e th

e fo

llow

ing

step

s to

add

a k

nob

cont

rol t

o th

e fr

ont p

anel

.

Tip

Thr

ough

out t

hese

exe

rcis

es, y

ou c

an u

ndo

rece

nt e

dits

by

sele

ctin

g E

dit»

Und

o or

pr

essi

ng th

e <

Ctr

l-Z

> k

eys.

1.If

the

Con

trol

s pa

lette

, sho

wn

in F

igur

e1-

4, is

not

vis

ible

in th

e fr

ont

pane

l win

dow

, sel

ect V

iew

»Con

trol

s P

alet

te.

Tip

You

can

righ

t-cl

ick

any

blan

k sp

ace

in th

e fr

ont p

anel

or t

he b

lock

dia

gram

to d

ispl

ay

a te

mpo

rary

ver

sion

of

the

Con

trol

s or

Fun

ctio

ns p

alet

te. T

he C

ontr

ols

or F

unct

ions

pa

lette

app

ears

with

a th

umbt

ack

icon

in th

e up

per

left

cor

ner.

Clic

k th

e th

umbt

ack

to p

in

the

pale

tte s

o it

is n

o lo

nger

tem

pora

ry.

Chap

ter 1

Getti

ng S

tarte

d w

ith L

abVI

EW V

irtua

l Ins

trum

ents

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n1-

7Ge

tting

Sta

rted

with

Lab

VIEW

2.If

you

are

a n

ew L

abV

IEW

use

r, th

e C

ontr

ols

pale

tte

open

s w

ith

the

Exp

ress

pal

ette

, sho

wn

in F

igur

e1-

4, v

isib

le b

y de

faul

t. If

you

do

not

see

the

Exp

ress

pal

ette

, cli

ck E

xpre

ss o

n th

e C

ontr

ols

pale

tte

to

disp

lay

the

Exp

ress

pal

ette

.

Figu

re 1

-4.

Cont

rols

Pal

ette

3.M

ove

the

curs

or o

ver

the

icon

s on

the

Exp

ress

pal

ette

to lo

cate

the

Num

eric

Con

trol

s pa

lett

e.

Whe

n yo

u m

ove

the

curs

or o

ver

icon

s on

the

Con

trol

s pa

lett

e, th

e na

me

of th

e su

bpal

ette

, con

trol

, or i

ndic

ator

app

ears

in a

tip

stri

p be

low

th

e ic

on.

Note

Som

e pa

lette

obj

ects

dis

play

a s

hort

nam

e on

the

pale

tte th

at is

dif

fere

nt f

rom

the

nam

e th

at a

ppea

rs in

the

tip

stri

p. T

he s

hort

nam

e ab

brev

iate

s th

e na

me

of th

e pa

lette

obj

ect

so th

at it

fit

s in

the

spac

e av

aila

ble

on th

e pa

lette

. If

you

have

dif

ficu

lty f

indi

ng a

pal

ette

ob

ject

by

its

shor

t nam

e, u

se th

e Se

arch

but

ton

on th

e C

ontr

ols

or F

unct

ions

pal

ette

to

find

the

pale

tte

obje

ct b

y na

me.

4.C

lick

the

Num

eric

Con

trol

s ic

on to

dis

play

the

Num

eric

Con

trol

s pa

lett

e.

5.C

lick

the

Kno

b co

ntro

l on

the

Num

eric

Con

trol

s pa

lette

to a

ttach

the

cont

rol t

o th

e cu

rsor

, and

then

add

the

knob

to th

e fr

ont p

anel

to th

e le

ft

of th

e w

avef

orm

gra

ph.

You

wil

l use

this

kno

b in

a la

ter

exer

cise

to c

ontr

ol th

e am

plit

ude

of a

si

gnal

.

6.Se

lect

File

»Sav

e A

s an

d sa

ve th

e V

I as Acquiring a Signal.vi

in

an e

asil

y ac

cess

ible

loca

tion

.

Page 9: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 1

Getti

ng S

tarte

d w

ith L

abVI

EW V

irtua

l Ins

trum

ents

Getti

ng S

tarte

d w

ith L

abVI

EW1-

8ni

.com

Chan

ging

a S

igna

l Typ

eT

he b

lock

dia

gram

has

a b

lue

icon

labe

led

Sim

ulat

e Si

gnal

. Thi

s ic

on

repr

esen

ts th

e Si

mul

ate

Sign

al E

xpre

ss V

I. A

n E

xpre

ss V

I is

a c

ompo

nent

of

the

bloc

k di

agra

m th

at y

ou c

an c

onfi

gure

to p

erfo

rm c

omm

on

mea

sure

men

t tas

ks. T

he S

imul

ate

Sign

al E

xpre

ss V

I sim

ulat

es a

sin

e w

ave

by d

efau

lt.

Com

plet

e th

e fo

llow

ing

step

s to

cha

nge

this

sig

nal t

o a

saw

toot

h w

ave.

1.D

ispl

ay th

e bl

ock

diag

ram

by

pres

sing

the

<C

trl-

E>

key

s or

by

clic

king

the

bloc

k di

agra

m.

Loc

ate

the

Sim

ulat

e Si

gnal

Exp

ress

VI,

sho

wn

at le

ft. T

he S

imul

ate

Sign

al E

xpre

ss V

I si

mul

ates

a s

igna

l bas

ed o

n th

e co

nfig

urat

ion

that

yo

u sp

ecif

y.

2.R

ight

-cli

ck th

e Si

mul

ate

Sign

al E

xpre

ss V

I and

sel

ect P

rope

rtie

s fro

m

the

shor

tcut

men

u to

dis

play

the

Con

figu

re S

imul

ate

Sign

al

dial

ogbo

x. (M

ac O

S X)

Pre

ss <

Com

man

d>-c

lick

to p

erfo

rm th

e sa

me

acti

on a

s ri

ght-

clic

k.

Tip

You

als

o ca

n do

uble

-cli

ck th

e E

xpre

ss V

I to

dis

play

the

Con

figu

re S

imul

ate

Sign

al

dial

ogbo

x.

3.Se

lect

Saw

toot

h fr

om th

e Si

gnal

typ

e pu

ll-d

own

men

u.

The

wav

efor

m o

n th

e gr

aph

in th

e R

esul

t Pre

view

sec

tion

cha

nges

to

a sa

wto

oth

wav

e. T

he C

onfi

gure

Sim

ulat

e Si

gnal

dia

log

box

shou

ld

appe

ar s

imil

ar to

Fig

ure

1-5.

Chap

ter 1

Getti

ng S

tarte

d w

ith L

abVI

EW V

irtua

l Ins

trum

ents

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n1-

9Ge

tting

Sta

rted

with

Lab

VIEW

Figu

re 1

-5.

Conf

igur

e Si

mul

ate

Sign

al D

ialo

g Bo

x

4.C

lick

the

OK

but

ton

to s

ave

the

curr

ent c

onfi

gura

tion

and

clo

se th

e C

onfi

gure

Sim

ulat

e Si

gnal

dia

log

box.

5.M

ove

the

curs

or o

ver

the

dow

n ar

row

s at

the

bott

om o

f th

e Si

mul

ate

Sign

al E

xpre

ss V

I. T

he d

own

arro

ws

indi

cate

you

can

rev

eal h

idde

n in

puts

and

out

puts

by

exte

ndin

g th

e bo

rder

of

the

Exp

ress

VI.

6.W

hen

a do

uble

-hea

ded

arro

w a

ppea

rs, s

how

n at

left

, cli

ck a

nd d

rag

the

bord

er o

f the

Exp

ress

VI t

o ad

d tw

o ro

ws.

Whe

n yo

u re

leas

e th

e bo

rder

, th

e A

mpl

itud

e in

put a

ppea

rs.

In F

igur

e1-

5, n

otic

e th

at A

mpl

itud

e is

an

opti

on in

the

Con

figu

re

Sim

ulat

e Si

gnal

dia

log

box.

Whe

n in

puts

, suc

h as

Am

plit

ude,

app

ear

on th

e bl

ock

diag

ram

and

in th

e co

nfig

urat

ion

dial

og b

ox, y

ou c

an

conf

igur

e th

e in

puts

in e

ither

loca

tion.

Page 10: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 1

Getti

ng S

tarte

d w

ith L

abVI

EW V

irtua

l Ins

trum

ents

Getti

ng S

tarte

d w

ith L

abVI

EW1-

10ni

.com

Wiri

ng O

bjec

ts o

n th

e Bl

ock

Diag

ram

To

use

the

knob

to c

hang

e th

e am

plit

ude

of th

e si

gnal

, you

mus

t con

nect

tw

o ob

ject

s on

the

bloc

k di

agra

m.

Com

plet

e th

e fo

llow

ing

step

s to

wir

e th

e kn

ob to

the

Am

plit

ude

inpu

t of

the

Sim

ulat

e Si

gnal

Exp

ress

VI.

1.O

n th

e bl

ock

diag

ram

, mov

e th

e cu

rsor

ove

r the

Kno

b te

rmin

al, s

how

n at

left

.

The

cur

sor

beco

mes

an

arro

w, o

r th

e Po

siti

onin

g to

ol, s

how

n at

left

. U

se th

e Po

sitio

ning

tool

to s

elec

t, po

sitio

n, a

nd r

esiz

e ob

ject

s.

Note

You

can

resi

ze o

nly

loop

s an

d st

ruct

ures

on

the

bloc

k di

agra

m. G

o to

the

fron

t pan

el

to r

esiz

e ob

ject

s yo

u ha

ve a

dded

to th

e fr

ont p

anel

.

2.U

se th

e Po

sitio

ning

tool

to s

elec

t the

Kno

b te

rmin

al a

nd m

ake

sure

it

is to

the

left

of t

he S

imul

ate

Sign

al E

xpre

ss V

I and

insi

de th

e gr

ay lo

op,

show

n at

left

.

The

term

inal

s in

side

the

loop

are

rep

rese

ntat

ions

of

fron

t pan

el

cont

rols

and

indi

cato

rs. T

erm

inal

s ar

e en

try

and

exit

por

ts th

at

exch

ange

info

rmat

ion

betw

een

the

fron

t pan

el a

nd b

lock

dia

gram

.

3.D

esel

ect t

he K

nob

term

inal

by

clic

king

a b

lank

spa

ce o

n th

e bl

ock

diag

ram

. If

you

wan

t to

use

a di

ffer

ent t

ool w

ith a

n ob

ject

, you

mus

t de

sele

ct th

e ob

ject

to s

wit

ch th

e to

ol.

4.M

ove

the

curs

or o

ver

the

arro

w o

n th

e K

nob

term

inal

, sho

wn

at le

ft.

The

cur

sor b

ecom

es a

wir

e sp

ool,

or th

e W

irin

g to

ol, s

how

n at

left

. Use

th

e W

irin

g to

ol to

wir

e ob

ject

s to

geth

er o

n th

e bl

ock

diag

ram

.

5.W

hen

the

Wir

ing

tool

app

ears

, cli

ck th

e ar

row

on

the

Kno

b te

rmin

al

and

then

clic

k th

e ar

row

on

the

Am

plit

ude

inpu

t of t

he S

imul

ate

Sign

al

Exp

ress

VI,

sho

wn

at le

ft, t

o w

ire

the

two

obje

cts

toge

ther

.

A w

ire

appe

ars

and

conn

ects

the

two

obje

cts.

Dat

a fl

ows

alon

g th

is

wir

e fr

om th

e K

nob

term

inal

to th

e E

xpre

ss V

I.

6.Se

lect

File

»Sav

e to

sav

e th

e V

I.

Chap

ter 1

Getti

ng S

tarte

d w

ith L

abVI

EW V

irtua

l Ins

trum

ents

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n1-

11Ge

tting

Sta

rted

with

Lab

VIEW

Runn

ing

a VI

Run

ning

a V

I ex

ecut

es th

e so

luti

on.

Com

plet

e th

e fo

llow

ing

step

s to

run

the

Acq

uiri

ng a

Sig

nal V

I.

1.D

ispl

ay th

e fr

ont p

anel

by

pres

sing

the

<C

trl-

E>

key

s or

by

clic

king

th

e fr

ont p

anel

.

2.C

lick

the

Run

but

ton

or p

ress

the

<C

trl-

R>

key

s to

run

the

VI.

3.M

ove

the

curs

or o

ver

the

knob

.

The

cur

sor

beco

mes

a h

and,

or

the

Ope

rati

ng to

ol, s

how

n at

left

. Use

th

e O

pera

ting

tool

to c

hang

e th

e va

lue

of a

con

trol

.

4.U

sing

the

Ope

ratin

g to

ol, t

urn

the

knob

to a

djus

t the

am

plitu

de o

f th

e sa

wto

oth

wav

e.

The

am

plit

ude

of th

e sa

wto

oth

wav

e ch

ange

s as

you

turn

the

knob

. As

you

chan

ge th

e am

plitu

de, t

he O

pera

ting

tool

dis

play

s a

tip s

trip

that

in

dica

tes

the

num

eric

val

ue o

f the

kno

b. T

he y

-axi

s on

the

grap

h sc

ales

au

tom

atic

ally

to a

ccou

nt f

or th

e ch

ange

in a

mpl

itud

e.

To in

dica

te th

at th

e V

I is

run

ning

, the

Run

but

ton

chan

ges

to a

da

rken

ed a

rrow

, sho

wn

at le

ft. Y

ou c

an c

hang

e th

e va

lue

of m

ost

cont

rols

whi

le a

VI r

uns,

but

you

can

not e

dit t

he V

I in

othe

r way

s w

hile

th

e V

I ru

ns.

5.C

lick

the

STO

P b

utto

n, s

how

n at

left

, to

stop

the

VI.

The

ST

OP

but

ton

stop

s th

e V

I af

ter

the

loop

com

plet

es it

s cu

rren

t it

erat

ion.

The

Abo

rt E

xecu

tion

but

ton,

sho

wn

at le

ft, s

tops

the

VI

imm

edia

tely

, bef

ore

the

VI f

inis

hes

the

curr

ent i

tera

tion

. Abo

rtin

g a

VI

that

use

s ex

tern

al re

sour

ces,

suc

h as

ext

erna

l har

dwar

e, m

ight

leav

e th

e re

sour

ces

in a

n un

know

n st

ate

by n

ot r

eset

ting

or

rele

asin

g th

em

prop

erly

. Des

ign

the

VIs

you

cre

ate

with

a s

top

butto

n to

avo

id th

is

prob

lem

.

Mod

ifyin

g a

Sign

alC

ompl

ete

the

foll

owin

g st

eps

to s

cale

the

sign

al b

y 10

and

dis

play

the

resu

lts in

the

fron

t pan

el g

raph

.

1.In

the

bloc

k di

agra

m, u

se th

e Po

siti

onin

g to

ol to

clic

k th

e w

ire

that

co

nnec

ts th

e Si

mul

ate

Sign

al E

xpre

ss V

I to

the

Wav

efor

m G

raph

te

rmin

al, s

how

n at

left

.

2.Pr

ess

the

<D

elet

e> k

ey to

del

ete

this

wir

e.

Page 11: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 1

Getti

ng S

tarte

d w

ith L

abVI

EW V

irtua

l Ins

trum

ents

Getti

ng S

tarte

d w

ith L

abVI

EW1-

12ni

.com

3.If

the

Fun

ctio

ns p

alet

te, s

how

n in

Fig

ure

1-6,

is n

ot v

isib

le, s

elec

t V

iew

»Fun

ctio

ns P

alet

te to

dis

play

it. T

he F

unct

ions

pal

ette

ope

ns

wit

h th

e E

xpre

ss p

alet

te v

isib

le b

y de

faul

t. If

you

hav

e se

lect

ed

anot

her

pale

tte, y

ou c

an r

etur

n to

the

Exp

ress

pal

ette

by

clic

king

E

xpre

ss o

n th

e F

unct

ions

pal

ette

.

Figu

re 1

-6.

Func

tions

Pal

ette

4.O

n th

e A

rith

met

ic &

Com

pari

son

pale

tte,

sel

ect t

he F

orm

ula

Exp

ress

V

I, s

how

n at

left

, and

pla

ce it

on

the

bloc

k di

agra

m b

etw

een

the

Sim

ulat

e Si

gnal

Exp

ress

VI

and

the

Wav

efor

m G

raph

term

inal

. You

ca

n m

ove

the

Wav

efor

m G

raph

term

inal

to th

e ri

ght t

o m

ake

mor

e ro

om b

etw

een

the

Exp

ress

VI

and

the

term

inal

.

The

Con

figu

re F

orm

ula

dial

og b

ox a

ppea

rs w

hen

you

plac

e th

e E

xpre

ss V

I on

the

bloc

k di

agra

m. W

hen

you

plac

e an

Exp

ress

VI

on

the

bloc

k di

agra

m, t

he c

onfi

gura

tion

dial

og b

ox f

or th

at V

I al

way

s ap

pear

s au

tom

atic

ally

.

Note

If y

ou p

lace

an

obje

ct to

o cl

ose

to a

noth

er o

bjec

t on

the

bloc

k di

agra

m, a

uto

wir

ing

mig

ht w

ire

the

two

obje

cts

toge

ther

. Del

ete

the

wir

es if

the

auto

mat

ic w

irin

g is

wro

ng. T

o co

nfig

ure

auto

wir

ing

sele

ct T

ools

»Opt

ions

then

sel

ect B

lock

Dia

gram

fro

m th

e C

ateg

ory

list

. Rem

ove

the

chec

kmar

k fr

om th

e E

nabl

e au

to w

irin

g ch

eckb

ox to

turn

off

au

to w

irin

g.

5.C

lick

the

Hel

p bu

tton,

sho

wn

at le

ft, i

n th

e bo

ttom

rig

ht c

orne

r of

the

Con

figu

re F

orm

ula

dial

og b

ox to

dis

play

the

Lab

VIE

W H

elp

topi

c fo

r th

is E

xpre

ss V

I.

The

For

mul

a he

lp to

pic

desc

ribe

s th

e E

xpre

ss V

I, th

e co

nfig

urat

ion

dial

og b

ox o

ptio

ns, a

nd th

e in

puts

and

out

puts

of t

he E

xpre

ss V

I. E

ach

Exp

ress

VI

has

a co

rres

pond

ing

help

topi

c yo

u ca

n ac

cess

by

clic

king

th

e H

elp

butto

n in

the

conf

igur

atio

n di

alog

box

or b

y ri

ght-

clic

king

the

Exp

ress

VI

and

sele

ctin

g H

elp

from

the

shor

tcut

men

u.

Chap

ter 1

Getti

ng S

tarte

d w

ith L

abVI

EW V

irtua

l Ins

trum

ents

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n1-

13Ge

tting

Sta

rted

with

Lab

VIEW

6.In

the

For

mul

a to

pic,

fin

d th

e di

alog

box

opt

ion

who

se d

escr

iptio

n in

dica

tes

that

it e

nter

s a

vari

able

into

the

form

ula.

7.M

inim

ize

the

Lab

VIE

W H

elp

to r

etur

n to

the

Con

figu

re F

orm

ula

dial

og b

ox.

8.C

hang

e th

e te

xt in

the

Lab

el c

olum

n of

the

dial

og b

ox o

ptio

n yo

u re

ad

abou

t, sh

own

at le

ft, f

rom

X1

to Sawtooth

to in

dica

te th

e in

put v

alue

to

the

Form

ula

Exp

ress

VI.

Whe

n yo

u cl

ick

in th

e F

orm

ula

text

box

at

the

top

of th

e C

onfi

gure

For

mul

a di

alog

box

, the

text

cha

nges

to

mat

ch th

e la

bel y

ou e

nter

ed.

9.D

efin

e th

e va

lue

of th

e sc

alin

g fa

ctor

by

ente

ring

*10

aft

er S

awto

oth

in th

e F

orm

ula

text

box

.

You

can

use

the

Inpu

t bu

ttons

in th

e co

nfig

urat

ion

dial

og b

ox o

r yo

u ca

n us

e th

e *

, 1, a

nd 0

key

boar

d bu

ttons

to e

nter

the

scal

ing

fact

or. I

f yo

u us

e th

e In

put

butto

ns in

the

conf

igur

atio

n di

alog

box

, Lab

VIE

W

plac

es th

e fo

rmul

a in

put a

fter

the

Saw

toot

h in

put i

n th

e F

orm

ula

text

bo

x. I

f yo

u us

e th

e ke

yboa

rd, c

lick

in th

e F

orm

ula

text

box

aft

er

Saw

toot

h an

d en

ter

the

form

ula

you

wan

t to

appe

ar in

the

text

box

. T

he C

onfi

gure

For

mul

a di

alog

box

sho

uld

appe

ar s

imil

ar to

Fi

gure

1-7.

Figu

re 1

-7.

Conf

igur

e Fo

rmul

a Di

alog

Box

Page 12: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 1

Getti

ng S

tarte

d w

ith L

abVI

EW V

irtua

l Ins

trum

ents

Getti

ng S

tarte

d w

ith L

abVI

EW1-

14ni

.com

Note

If y

ou e

nter

an

inva

lid f

orm

ula

in th

e F

orm

ula

text

box

, the

Err

ors

LE

D in

the

uppe

r ri

ght c

orne

r tu

rns

from

gre

en to

gra

y an

d di

spla

ys th

e te

xt Invalid Formula

.

10.

Cli

ck th

e O

K b

utto

n to

sav

e th

e cu

rren

t con

figu

rati

on a

nd c

lose

the

Con

figu

re F

orm

ula

dial

og b

ox.

11.

Mov

e th

e cu

rsor

ove

r th

e ar

row

on

the

Saw

toot

h ou

tput

of

the

Sim

ulat

e Si

gnal

Exp

ress

VI.

12.

Whe

n th

e W

irin

g to

ol a

ppea

rs, c

lick

the

arro

w o

n th

e Sa

wto

oth

outp

ut

and

then

cli

ck th

e ar

row

on

the

Saw

toot

h in

put o

f the

For

mul

a E

xpre

ss

VI,

sho

wn

at le

ft, t

o w

ire

the

two

obje

cts

toge

ther

.

13.

Use

the

Wir

ing

tool

to w

ire

the

Res

ult o

utpu

t of

the

Form

ula

Exp

ress

V

I to

the

Wav

efor

m G

raph

term

inal

.

Exa

min

e th

e w

ires

con

nect

ing

the

Exp

ress

VIs

and

term

inal

s. T

he

arro

ws

on th

e E

xpre

ss V

Is a

nd te

rmin

als

indi

cate

the

dire

ctio

n th

at th

e da

ta fl

ows

alon

g th

ese

wir

es. T

he b

lock

dia

gram

sho

uld

appe

ar s

imil

ar

to F

igur

e1-

8. U

se th

e bl

ock

diag

ram

fig

ures

as

a re

fere

nce.

The

ar

rang

emen

t of o

bjec

ts o

n yo

ur b

lock

dia

gram

doe

s no

t nee

d to

mat

ch

the

figu

re e

xact

ly.

Figu

re 1

-8.

Bloc

k Di

agra

m o

f the

Acq

uirin

g a

Sign

al V

I

Tip

You

can

rig

ht-c

lick

any

wir

e an

d se

lect

Cle

an U

p W

ire

from

the

shor

tcut

men

u to

ha

ve L

abV

IEW

aut

omat

ical

ly fi

nd a

rout

e fo

r the

wir

e ar

ound

exi

stin

g ob

ject

s on

the

bloc

k di

agra

m. L

abV

IEW

als

o ro

utes

a w

ire

to d

ecre

ase

the

num

ber

of b

ends

in th

e w

ire.

You

al

so c

an c

lick

the

Cle

an U

p D

iagr

am b

utto

n on

the

bloc

k di

agra

m to

olba

r to

hav

e L

abV

IEW

aut

omat

ical

ly r

erou

te a

ll e

xist

ing

wir

es a

nd r

earr

ange

obj

ects

on

the

bloc

k di

agra

m to

gen

erat

e a

clea

ner

look

.

14.

Pre

ss th

e <

Ctr

l-S

> k

eys

or s

elec

t File

»Sav

e to

sav

e th

e V

I.

Chap

ter 1

Getti

ng S

tarte

d w

ith L

abVI

EW V

irtua

l Ins

trum

ents

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n1-

15Ge

tting

Sta

rted

with

Lab

VIEW

Disp

layi

ng T

wo

Sign

als

on a

Gra

phT

o co

mpa

re th

e si

gnal

gen

erat

ed b

y th

e Si

mul

ate

Sign

al E

xpre

ss V

I and

the

sign

al m

odif

ied

by th

e Fo

rmul

a E

xpre

ss V

I on

the

sam

e gr

aph,

use

the

Mer

ge S

igna

ls f

unct

ion.

Com

plet

e th

e fo

llow

ing

step

s to

dis

play

two

sign

als

on th

e sa

me

grap

h.

1.In

the

bloc

k di

agra

m, m

ove

the

curs

or o

ver t

he a

rrow

on

the

Saw

toot

h ou

tput

of

the

Sim

ulat

e Si

gnal

Exp

ress

VI.

2.U

se th

e W

irin

g to

ol to

wir

e th

e Sa

wto

oth

outp

ut to

the

Wav

efor

m

Gra

ph te

rmin

al.

The

Mer

ge S

igna

ls f

unct

ion,

sho

wn

at le

ft, a

ppea

rs w

here

the

two

wir

es c

onne

ct. A

fun

ctio

n is

a b

uilt

-in

exec

utio

n el

emen

t, co

mpa

rabl

e to

an

oper

ator

, fun

ctio

n, o

r st

atem

ent i

n a

text

-bas

ed

prog

ram

min

g la

ngua

ge. T

he M

erge

Sig

nals

fun

ctio

n ta

kes

the

two

sepa

rate

sig

nals

and

com

bine

s th

em s

o th

at b

oth

can

disp

lay

on th

e sa

me

grap

h.

The

bloc

k di

agra

m s

houl

d ap

pear

sim

ilar

to F

igur

e1-

9.

Figu

re 1

-9.

Bloc

k Di

agra

m S

how

ing

the

Mer

ge S

igna

ls F

unct

ion

3.P

ress

the

<C

trl-

S>

key

s or

sel

ect F

ile»S

ave

to s

ave

the

VI.

4.R

etur

n to

the

fron

t pan

el, r

un th

e V

I, a

nd tu

rn th

e kn

ob c

ontr

ol.

The

gra

ph p

lots

the

orig

inal

saw

toot

h w

ave

and

the

scal

ed s

awto

oth

wav

e w

ith

10 ti

mes

the

ampl

itud

e, a

s yo

u sp

ecif

ied

in th

e Fo

rmul

a E

xpre

ss V

I. T

he m

axim

um v

alue

on

the

y-ax

is a

utom

atic

ally

sca

les

as

you

turn

the

knob

.

5.C

lick

the

STO

P b

utto

n to

sto

p th

e V

I.

Page 13: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 1

Getti

ng S

tarte

d w

ith L

abVI

EW V

irtua

l Ins

trum

ents

Getti

ng S

tarte

d w

ith L

abVI

EW1-

16ni

.com

Cust

omiz

ing

a Kn

ob C

ontro

lT

he k

nob

cont

rol c

hang

es th

e am

plit

ude

of th

e sa

wto

oth

wav

e, s

o la

beli

ng

it A

mpl

itud

e ac

cura

tely

des

crib

es th

e be

havi

or o

f th

e kn

ob.

Com

plet

e th

e fo

llow

ing

step

s to

cus

tom

ize

the

appe

aran

ce o

f th

e kn

ob.

1.R

ight

-cli

ck th

e fr

ont p

anel

kno

b an

d se

lect

Pro

pert

ies

from

the

shor

tcut

men

u to

dis

play

the

Kno

b P

rope

rtie

s di

alog

box

. Clic

k th

e A

ppea

ranc

e ta

b to

dis

play

the

App

eara

nce

page

.

2.In

the

Lab

el s

ectio

n on

the

App

eara

nce

page

, del

ete

the

labe

l Knob

, an

d en

ter Amplitude

in th

e te

xt b

ox.

The

Kno

b P

rope

rtie

s di

alog

box

sho

uld

appe

ar s

imila

r to

Figu

re1-

10.

Figu

re 1

-10.

Kno

b Pr

oper

ties

Dial

og B

ox

3.C

lick

the

Scal

e ta

b. I

n th

e Sc

ale

Styl

e se

ctio

n, p

lace

a c

heck

mar

k in

th

e Sh

ow c

olor

ram

p ch

eckb

ox.

The

kno

b in

the

fron

t pan

el w

indo

w u

pdat

es to

ref

lect

thes

e ch

ange

s.

4.C

lick

the

OK

but

ton

to s

ave

the

curr

ent c

onfi

gura

tion

and

clo

se th

e K

nob

Pro

pert

ies

dial

og b

ox.

5.Sa

ve th

e V

I.

Chap

ter 1

Getti

ng S

tarte

d w

ith L

abVI

EW V

irtua

l Ins

trum

ents

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n1-

17Ge

tting

Sta

rted

with

Lab

VIEW

6.R

eope

n th

e K

nob

Pro

pert

ies

dial

og b

ox a

nd e

xper

imen

t with

oth

er

prop

erti

es o

f th

e kn

ob. F

or e

xam

ple,

on

the

Scal

e pa

ge, t

ry c

hang

ing

the

colo

rs f

or th

e M

arke

r te

xt c

olor

by

clic

king

the

colo

r bo

x.

7.C

lick

the

Can

cel b

utto

n to

avo

id a

pply

ing

any

chan

ges

you

mad

e w

hile

exp

erim

enti

ng. I

f you

wan

t to

keep

the

chan

ges

you

mad

e, c

lick

the

OK

but

ton.

Cust

omiz

ing

a W

avef

orm

Gra

phT

he w

avef

orm

gra

ph in

dica

tor

disp

lays

the

two

sign

als.

To

indi

cate

whi

ch

plot

is th

e sc

aled

sig

nal a

nd w

hich

is th

e si

mul

ated

sig

nal,

you

can

cust

omiz

e th

e pl

ots.

Com

plet

e th

e fo

llow

ing

step

s to

cus

tom

ize

the

appe

aran

ce o

f the

wav

efor

m

grap

h in

dica

tor.

1.In

the

fron

t pan

el w

indo

w, m

ove

the

curs

or o

ver

the

top

of th

e pl

ot

lege

nd o

n th

e w

avef

orm

gra

ph.

Tho

ugh

the

grap

h ha

s tw

o pl

ots,

the

plot

lege

nd d

ispl

ays

only

one

plo

t.

2.W

hen

a do

uble

-hea

ded

arro

w a

ppea

rs, s

how

n in

Fig

ure

1-11

, clic

k an

d dr

ag th

e bo

rder

of t

he p

lot l

egen

d to

add

one

item

to th

e le

gend

. Whe

n yo

u re

leas

e th

e m

ouse

but

ton,

the

seco

nd p

lot n

ame

appe

ars.

Figu

re 1

-11.

Exp

andi

ng a

Plo

t Leg

end

3.R

ight

-cli

ck th

e w

avef

orm

gra

ph a

nd s

elec

t Pro

pert

ies

from

the

shor

tcut

men

u to

dis

play

the

Gra

ph P

rope

rtie

s di

alog

box

.

Page 14: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 1

Getti

ng S

tarte

d w

ith L

abVI

EW V

irtua

l Ins

trum

ents

Getti

ng S

tarte

d w

ith L

abVI

EW1-

18ni

.com

4.O

n th

e P

lots

pag

e, s

elec

t Saw

toot

h fr

om th

e to

p pu

ll-do

wn

men

u. I

n th

e C

olor

s se

ctio

n, c

lick

the

Lin

e co

lor b

ox to

dis

play

the

colo

r pic

ker.

Sel

ect a

new

line

col

or.

5.Se

lect

Saw

toot

h (F

orm

ula

Res

ult)

fro

m th

e to

p pu

ll-do

wn

men

u.

6.Pl

ace

a ch

eckm

ark

in th

e D

o no

t use

wav

efor

m n

ames

for

plot

nam

es

chec

kbox

. Thi

s ac

tion

lets

you

edi

t the

labe

ls o

n th

e gr

aph.

7.In

the

Nam

e te

xt b

ox, d

elet

e th

e cu

rren

t lab

el a

nd c

hang

e th

e na

me

of

this

plo

t to Scaled Sawtooth

.

8.C

lick

the

OK

but

ton

to s

ave

the

curr

ent c

onfi

gura

tion

and

clo

se th

e G

raph

Pro

pert

ies

dial

og b

ox.

The

plo

t col

or a

nd p

lot l

egen

d ch

ange

.

9.R

eope

n th

e G

raph

Pro

pert

ies

dial

og b

ox a

nd e

xper

imen

t with

oth

er

prop

erti

es o

f the

gra

ph. F

or e

xam

ple,

on

the

Scal

es p

age,

try

disa

blin

g au

tom

atic

sca

ling

and

cha

ngin

g th

e m

inim

um a

nd m

axim

um v

alue

of

the

y-ax

is.

10.

Cli

ck th

e C

ance

l but

ton

to a

void

app

lyin

g an

y ch

ange

s yo

u m

ade

whi

le e

xper

imen

ting

. If y

ou w

ant t

o ke

ep th

e ch

ange

s yo

u m

ade,

cli

ck

the

OK

but

ton.

11.

Save

and

clo

se th

e V

I.

Sum

mar

yT

he f

ollo

win

g to

pics

are

a s

umm

ary

of th

e m

ain

conc

epts

you

lear

ned

in

this

cha

pter

.

New

Dia

log

Box

and

Tem

plat

e VI

sT

he N

ew d

ialo

g bo

x co

ntai

ns m

any

tem

plat

e V

Is, i

nclu

ding

the

ones

use

d in

this

man

ual.

The

tem

plat

e V

Is h

elp

you

star

t bui

ldin

g V

Is f

or c

omm

on

mea

sure

men

ts a

nd o

ther

task

s. T

he te

mpl

ate

VIs

incl

ude

the

Exp

ress

VIs

, fu

nctio

ns, a

nd fr

ont p

anel

obj

ects

you

nee

d to

get

sta

rted

bui

ldin

g co

mm

on

mea

sure

men

t app

lica

tion

s.

Use

one

of

the

foll

owin

g m

etho

ds to

acc

ess

the

New

dia

log

box:

•C

lick

the

New

, VI

from

Tem

plat

e, o

r M

ore

link

s in

the

Get

ting

St

arte

d w

indo

w a

fter

you

laun

ch L

abV

IEW

.

•Se

lect

File

»New

fro

m th

e m

enu

bar

of th

e G

etti

ng S

tart

ed w

indo

w,

the

fron

t pan

el, o

r th

e bl

ock

diag

ram

.

Chap

ter 1

Getti

ng S

tarte

d w

ith L

abVI

EW V

irtua

l Ins

trum

ents

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n1-

19Ge

tting

Sta

rted

with

Lab

VIEW

Fron

t Pan

elT

he f

ront

pan

el is

the

user

inte

rfac

e of

a V

I. Y

ou b

uild

the

fron

t pan

el b

y us

ing

cont

rols

and

indi

cato

rs, w

hich

are

the

inte

ract

ive

inpu

t and

out

put

term

inal

s of

the

VI,

resp

ecti

vely

. Con

trol

s an

d in

dica

tors

are

loca

ted

on th

e C

ontr

ols

pale

tte.

Con

trol

s ar

e kn

obs,

pus

h bu

tton

s, d

ials

, and

oth

er in

put m

echa

nism

s.

Con

trol

s si

mul

ate

inst

rum

ent i

nput

mec

hani

sms

and

supp

ly d

ata

to th

e bl

ock

diag

ram

of

the

VI.

Indi

cato

rs a

re g

raph

s, L

ED

s, a

nd o

ther

dis

play

s. I

ndic

ator

s si

mul

ate

inst

rum

ent o

utpu

t mec

hani

sms

and

disp

lay

data

the

bloc

k di

agra

m a

cqui

res

or g

ener

ates

.

Bloc

k Di

agra

mT

he b

lock

dia

gram

con

tain

s th

e gr

aphi

cal s

ourc

e co

de, a

lso

know

n as

G

code

or

bloc

k di

agra

m c

ode,

for

how

the

VI

runs

. The

blo

ck d

iagr

am

code

use

s gr

aphi

cal r

epre

sent

atio

ns o

f fu

ncti

ons

to c

ontr

ol th

e fr

ont p

anel

ob

ject

s. F

ront

pan

el o

bjec

ts a

ppea

r as

icon

term

inal

s on

the

bloc

k di

agra

m.

Wir

es c

onne

ct c

ontr

ol a

nd in

dica

tor

term

inal

s to

Exp

ress

VIs

, VIs

, and

fu

nctio

ns. D

ata

flow

s th

roug

h th

e w

ires

in th

e fo

llow

ing

way

s: f

rom

co

ntro

ls to

VIs

and

fun

ctio

ns, f

rom

VIs

and

fun

ctio

ns to

indi

cato

rs, a

nd

from

VIs

and

fun

ctio

ns to

oth

er V

Is a

nd f

unct

ions

. The

mov

emen

t of

data

th

roug

h th

e no

des

on th

e bl

ock

diag

ram

det

erm

ines

the

exec

utio

n or

der

of

the

VIs

and

fun

ctio

ns. T

his

mov

emen

t of

data

is k

now

n as

dat

aflo

w

prog

ram

min

g.

Fron

t Pan

el a

nd B

lock

Dia

gram

Too

lsT

he P

osit

ioni

ng to

ol a

ppea

rs w

hen

you

mov

e th

e cu

rsor

ove

r an

obj

ect i

n th

e fr

ont p

anel

win

dow

or

on th

e bl

ock

diag

ram

. The

cur

sor

beco

mes

an

arro

w th

at y

ou c

an u

se to

sel

ect,

posi

tion

, and

res

ize

obje

cts.

The

Wir

ing

tool

app

ears

whe

n yo

u m

ove

the

curs

or o

ver

a te

rmin

al o

f a

bloc

k di

agra

m

obje

ct. T

he c

urso

r be

com

es a

spo

ol th

at y

ou c

an u

se to

con

nect

obj

ects

on

the

bloc

k di

agra

m th

roug

h w

hich

you

wan

t dat

a to

flo

w.

Page 15: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 1

Getti

ng S

tarte

d w

ith L

abVI

EW V

irtua

l Ins

trum

ents

Getti

ng S

tarte

d w

ith L

abVI

EW1-

20ni

.com

Runn

ing

and

Stop

ping

a V

IR

unni

ng a

VI e

xecu

tes

the

solu

tion

of t

he V

I. C

lick

the

Run

but

ton

or p

ress

th

e <

Ctr

l-R

> k

eys

to ru

n a

VI.

The

Run

but

ton

chan

ges

to a

dar

kene

d ar

row

to

indi

cate

the

VI

is r

unni

ng. Y

ou c

an s

top

a V

I im

med

iate

ly b

y cl

icki

ng

the

Abo

rt E

xecu

tion

but

ton.

How

ever

, abo

rtin

g a

VI

that

use

s ex

tern

al

reso

urce

s m

ight

leav

e th

e re

sour

ces

in a

n un

know

n st

ate.

Des

ign

the

VIs

yo

u cr

eate

with

a s

top

butto

n to

avo

id th

is p

robl

em. A

sto

p bu

tton

stop

s a

VI

afte

r th

e V

I co

mpl

etes

its

curr

ent i

tera

tion

.

Expr

ess

VIs

Use

Exp

ress

VIs

loca

ted

on th

e F

unct

ions

pal

ette

for

com

mon

m

easu

rem

ent t

asks

. Whe

n yo

u pl

ace

an E

xpre

ss V

I on

the

bloc

k di

agra

m,

the

dial

og b

ox y

ou u

se to

con

figu

re th

at E

xpre

ss V

I app

ears

by

defa

ult.

Set

the

opti

ons

in th

is c

onfi

gura

tion

dia

log

box

to s

peci

fy h

ow th

e E

xpre

ss V

I be

have

s. Y

ou a

lso

can

doub

le-c

lick

an

Exp

ress

VI

or r

ight

-cli

ck a

n E

xpre

ssV

I an

d se

lect

Pro

pert

ies

from

the

shor

tcut

men

u to

dis

play

the

conf

igur

atio

n di

alog

box

. If

you

wir

e da

ta to

an

Exp

ress

VI

and

run

it, th

e E

xpre

ss V

I di

spla

ys r

eal d

ata

in th

e co

nfig

urat

ion

dial

og b

ox. I

f yo

u cl

ose

and

reop

en th

e E

xpre

ss V

I, th

e V

I dis

play

s sa

mpl

e da

ta in

the

conf

igur

atio

n di

alog

box

unt

il yo

u ru

n th

e V

I ag

ain.

Exp

ress

VIs

app

ear

on th

e bl

ock

diag

ram

as

expa

ndab

le n

odes

with

icon

s su

rrou

nded

by

a bl

ue f

ield

. You

can

res

ize

an E

xpre

ss V

I to

dis

play

its

inpu

ts a

nd o

utpu

ts. T

he in

puts

and

out

puts

you

can

dis

play

for t

he E

xpre

ss

VI

depe

nd o

n ho

w y

ou c

onfi

gure

the

VI.

LabV

IEW

Doc

umen

tatio

n Re

sour

ces

The

Lab

VIE

W H

elp

cont

ains

info

rmat

ion

abou

t Lab

VIE

W p

rogr

amm

ing

conc

epts

, ste

p-by

-ste

p in

stru

ctio

ns f

or u

sing

Lab

VIE

W, a

nd r

efer

ence

in

form

atio

n ab

out L

abV

IEW

VIs

, fun

ctio

ns, p

alet

tes,

men

us, t

ools

, pr

oper

ties

, met

hods

, eve

nts,

dia

log

boxe

s, a

nd s

o on

. The

Lab

VIE

W H

elp

also

list

s th

e L

abV

IEW

doc

umen

tati

on r

esou

rces

ava

ilab

le f

rom

Nat

iona

l In

stru

men

ts. T

o ac

cess

hel

p in

form

atio

n fo

r E

xpre

ss V

Is, c

lick

the

Hel

p bu

tton

in th

e co

nfig

urat

ion

dial

og b

ox w

hile

you

con

figu

re a

n E

xpre

ss V

I.

You

als

o ca

n ac

cess

the

Lab

VIE

W H

elp

by r

ight

-clic

king

a V

I or

fun

ctio

n on

the

bloc

k di

agra

m o

r on

a p

inne

d pa

lett

e an

d se

lect

ing

Hel

p fr

om th

e sh

ortc

ut m

enu

or b

y se

lect

ing

Hel

p»L

abV

IEW

Hel

p.

Chap

ter 1

Getti

ng S

tarte

d w

ith L

abVI

EW V

irtua

l Ins

trum

ents

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n1-

21Ge

tting

Sta

rted

with

Lab

VIEW

Aft

er y

ou in

stal

l a L

abV

IEW

add

-on

such

as

a to

olki

t, m

odul

e, o

r dr

iver

, th

e do

cum

enta

tion

for t

hat a

dd-o

n ap

pear

s in

the

Lab

VIE

W H

elp

or a

ppea

rs

in a

sep

arat

e he

lp s

yste

m y

ou a

cces

s by

sel

ectin

g H

elp»

Add

-On

Hel

p,

whe

re A

dd-O

n H

elp

is th

e na

me

of th

e se

para

te h

elp

syst

em f

or th

e ad

d-on

.

Prop

erty

Dia

log

Boxe

sU

se p

rope

rty

dial

og b

oxes

or s

hort

cut m

enus

to c

onfi

gure

how

con

trol

s an

d in

dica

tors

app

ear o

r beh

ave

in th

e fr

ont p

anel

win

dow

. Rig

ht-c

lick

a c

ontr

ol

or in

dica

tor

on th

e fr

ont p

anel

and

sel

ect P

rope

rtie

s fr

om th

e sh

ortc

ut

men

u to

acc

ess

the

prop

erty

dia

log

box

for

that

obj

ect.

You

can

not a

cces

s pr

oper

ty d

ialo

g bo

xes

for

a co

ntro

l or

indi

cato

r w

hen

a V

I is

run

ning

.

Shor

tcut

sT

his

chap

ter

intr

oduc

ed th

e fo

llow

ing

keyb

oard

sho

rtcu

ts.

Note

The

<C

trl>

key

in s

hort

cuts

cor

resp

onds

to th

e (M

ac O

S X)

<O

ptio

n> o

r <C

omm

and>

ke

y or

(Lin

ux) <

Alt>

key

.

Shor

tcut

Fun

ctio

n

<C

trl-

R>

Run

s a

VI.

<C

trl-

Z>

Und

oes

the

last

act

ion.

<C

trl-

E>

Swit

ches

bet

wee

n th

e bl

ock

diag

ram

and

the

fron

t pa

nel w

indo

w.

<C

trl-

S>S

aves

a V

I.

Page 16: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n2-

1Ge

tting

Sta

rted

with

Lab

VIEW2

Cust

omiz

ing

a VI

You

can

cho

ose

one

of m

any

Lab

VIE

W te

mpl

ate

VIs

to u

se a

s a

star

ting

po

int w

hen

buil

ding

VIs

. How

ever

, som

etim

es y

ou n

eed

to b

uild

a V

I fo

r w

hich

a te

mpl

ate

is n

ot a

vaila

ble.

Thi

s ch

apte

r te

ache

s yo

u ho

w to

bui

ld

and

cust

omiz

e a

VI

with

out u

sing

a te

mpl

ate.

Build

ing

a VI

from

a B

lank

VI

In th

e fo

llow

ing

exer

cise

s, y

ou w

ill o

pen

a bl

ank

VI a

nd a

dd s

truc

ture

s an

d E

xpre

ss V

Is to

the

bloc

k di

agra

m to

bui

ld a

new

VI.

You

will

bui

ld a

VI

that

gen

erat

es a

sig

nal,

redu

ces

the

num

ber

of s

ampl

es in

the

sign

al, a

nd

disp

lays

the

resu

ltin

g da

ta in

a f

ront

pan

el ta

ble.

Aft

er y

ou c

ompl

ete

the

exer

cise

s, th

e fr

ont p

anel

of

the

VI

will

look

sim

ilar

to th

e fr

ont p

anel

in

Figu

re2-

1.

You

can

com

plet

e th

e ex

erci

ses

in th

is c

hapt

er in

app

roxi

mat

ely

45 m

inut

es.

Figu

re 2

-1.

Fron

t Pan

el o

f the

Red

uce

Sam

ples

VI

Chap

ter 2

Cust

omizi

ng a

VI

Getti

ng S

tarte

d w

ith L

abVI

EW2-

2ni

.com

Open

ing

a Bl

ank

VIIf

no

tem

plat

e is

ava

ilabl

e fo

r th

e V

I yo

u w

ant t

o bu

ild, y

ou c

an s

tart

with

a

blan

k V

I an

d ad

d E

xpre

ss V

Is to

acc

ompl

ish

a sp

ecif

ic ta

sk.

Com

plet

e th

e fo

llow

ing

step

s to

ope

n a

blan

k V

I.

1.In

the

Get

ting

Sta

rted

win

dow

, cli

ck th

e B

lank

VI

link

in th

e N

ew

sect

ion

or p

ress

the

<C

trl-

N>

key

s to

ope

n a

blan

k V

I.

A b

lank

fro

nt p

anel

win

dow

and

blo

ck d

iagr

am w

indo

w a

ppea

r.

Note

You

als

o ca

n op

en a

bla

nk V

I by

sel

ecti

ng F

ile»N

ew V

I or

by

sele

ctin

g F

ile»N

ew

and

sele

ctin

g B

lank

VI

from

the

Cre

ate

New

list

.

2.D

ispl

ay th

e bl

ock

diag

ram

.

3.If

the

Fun

ctio

ns p

alet

te is

not

vis

ible

, rig

ht-c

lick

any

blan

k sp

ace

on

the

bloc

k di

agra

m to

dis

play

a te

mpo

rary

ver

sion

of

the

Fun

ctio

ns

pale

tte.

Cli

ck th

e th

umbt

ack,

sho

wn

at le

ft, i

n th

e up

per

left

cor

ner

of

the

Fun

ctio

ns p

alet

te to

pin

the

pale

tte s

o it

is n

o lo

nger

tem

pora

ry.

Addi

ng a

n Ex

pres

s VI

Tha

t Sim

ulat

es a

Sig

nal

Com

plet

e th

e fo

llow

ing

step

s to

fin

d th

e E

xpre

ss V

I yo

u w

ant t

o us

e an

d ad

d it

to th

e bl

ock

diag

ram

.

1.Se

lect

Hel

p»Sh

ow C

onte

xt H

elp

from

the

fron

t pan

el o

r th

e bl

ock

diag

ram

to d

ispl

ay th

e C

onte

xt H

elp

win

dow

, sho

wn

in F

igur

e2-

2.

You

als

o ca

n cl

ick

the

Show

Con

text

Hel

p W

indo

w b

utto

n, s

how

n at

le

ft, o

n th

e fr

ont p

anel

or b

lock

dia

gram

tool

bar t

o di

spla

y th

e C

onte

xt

Hel

p w

indo

w.

Figu

re 2

-2.

Cont

ext H

elp

Win

dow

Tip

You

als

o ca

n pr

ess

the

<C

trl-

H>

key

s to

dis

play

the

Con

text

Hel

p w

indo

w.

(Mac

OS)P

ress

the

<C

omm

and-

Shif

t-H

> k

eys.

Page 17: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 2

Cust

omizi

ng a

VI

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n2-

3Ge

tting

Sta

rted

with

Lab

VIEW

2.O

n th

e F

unct

ions

pal

ette

, sel

ect t

he E

xpre

ss»I

nput

pal

ette

and

mov

e th

e cu

rsor

ove

r on

e of

the

Exp

ress

VIs

on

the

Inpu

t pa

lett

e.

Whe

n yo

u m

ove

the

curs

or o

ver

a V

I, th

e C

onte

xt H

elp

win

dow

di

spla

ys in

form

atio

n ab

out t

hat V

I.

3.U

se th

e in

form

atio

n th

at a

ppea

rs in

the

Con

text

Hel

p w

indo

w to

find

th

e E

xpre

ss V

I th

at c

an s

imul

ate

a si

ne w

ave

sign

al.

Kee

p th

e C

onte

xt H

elp

win

dow

ope

n. T

he c

onte

xt h

elp

prov

ides

us

eful

info

rmat

ion

as y

ou c

ompl

ete

the

rest

of

this

exe

rcis

e.

4.Se

lect

the

Exp

ress

VI t

hat c

an s

imul

ate

a si

ne w

ave

sign

al a

nd p

lace

it

on th

e bl

ock

diag

ram

. The

Con

figu

re S

imul

ate

Sign

al d

ialo

g bo

x ap

pear

s.

5.M

ove

the

curs

or o

ver

the

vari

ous

optio

ns in

the

Con

figu

re S

imul

ate

Sign

al d

ialo

g bo

x, s

uch

as F

requ

ency

(Hz)

and

Am

plit

ude.

Rea

d th

e in

form

atio

n th

at a

ppea

rs in

the

Con

text

Hel

p w

indo

w.

6.C

onfi

gure

the

Sim

ulat

e S

igna

l Exp

ress

VI t

o ge

nera

te a

sin

e w

ave

wit

h a

freq

uenc

y of

10.

7 an

d am

plitu

de o

f 2.

The

sig

nal i

n th

e R

esul

t P

revi

ew w

indo

w c

hang

es to

ref

lect

the

conf

igur

ed s

ine

wav

e.

7.C

lick

the

OK

but

ton

to s

ave

the

curr

ent c

onfi

gura

tion

and

clo

se th

e C

onfi

gure

Sim

ulat

e Si

gnal

dia

log

box.

8.M

ove

the

curs

or o

ver

the

Sim

ulat

e Si

gnal

Exp

ress

VI

and

read

the

info

rmat

ion

that

app

ears

in th

e C

onte

xt H

elp

win

dow

.

The

Con

text

Hel

p w

indo

w d

ispl

ays

info

rmat

ion

abou

t how

you

co

nfig

ured

the

Sim

ulat

e Si

gnal

Exp

ress

VI

in a

dditi

on to

the

stan

dard

co

ntex

t hel

p de

scri

ptio

n.

9.Sa

ve th

e V

I as

Reduce Samples.vi

in a

n ea

sily

acc

essi

ble

loca

tion

.

Sear

chin

g th

e He

lp a

nd M

odify

ing

a Si

gnal

Com

plet

e th

e fo

llow

ing

step

s to

use

the

Lab

VIE

W H

elp

to s

earc

h fo

r th

e E

xpre

ss V

I th

at r

educ

es th

e nu

mbe

r of

sam

ples

in a

sig

nal.

1.O

n th

e bl

ock

diag

ram

, mov

e th

e cu

rsor

ove

r th

e Si

mul

ate

Sign

al

Exp

ress

VI

to d

ispl

ay th

e C

onte

xt H

elp

win

dow

and

cli

ck th

e D

etai

led

help

link

to d

ispl

ay th

e Si

mul

ate

Sign

al to

pic

in th

e L

abV

IEW

H

elp.

You

mig

ht h

ave

to e

nlar

ge o

r sc

roll

dow

n in

the

Con

text

Hel

p w

indo

w to

see

the

Det

aile

d he

lp li

nk.

You

als

o ca

n ac

cess

the

Lab

VIE

W H

elp

by r

ight

-cli

ckin

g a

VI

or

func

tion

on

the

bloc

k di

agra

m o

r on

a p

inne

d pa

lette

and

sel

ectin

g H

elp

from

the

shor

tcut

men

u or

by

sele

ctin

g H

elp»

Lab

VIE

W H

elp.

Chap

ter 2

Cust

omizi

ng a

VI

Getti

ng S

tarte

d w

ith L

abVI

EW2-

4ni

.com

2.C

lick

the

Sear

ch ta

b, e

nter

sample compression

in th

e T

ype

in th

e w

ord(

s) t

o se

arch

for

text

box

, and

pre

ss th

e <

Ent

er>

key

. You

can

pl

ace

quot

atio

n m

arks

aro

und

the

phra

se to

sea

rch

for t

he e

xact

phr

ase.

Fo

r ex

ampl

e, y

ou c

an e

nter

"sample compression"

to n

arro

w th

e se

arch

res

ults

.

Thi

s w

ord

choi

ce r

efle

cts

wha

t you

wan

t thi

s E

xpre

ss V

I to

do

—co

mpr

ess,

or

redu

ce, t

he n

umbe

r of

sam

ples

in a

sig

nal.

You

als

o ca

n cl

ick

the

Inde

x ta

b to

sea

rch

keyw

ords

and

con

cept

s.

3.D

oubl

e-cl

ick

the

Sam

ple

Com

pres

sion

topi

c in

the

sear

ch r

esul

ts to

di

spla

y th

e to

pic

that

des

crib

es th

e Sa

mpl

e C

ompr

essi

on E

xpre

ss V

I.

4.A

fter

you

rea

d th

e de

scri

ptio

n of

the

Exp

ress

VI,

clic

k th

e A

dd to

the

bloc

k di

agra

m b

utto

n to

pla

ce th

e E

xpre

ss V

I on

the

curs

or.

5.M

ove

the

curs

or to

the

bloc

k di

agra

m.

6.A

dd th

e S

ampl

e C

ompr

essi

on E

xpre

ss V

I to

the

bloc

k di

agra

m to

the

righ

t of

the

Sim

ulat

e Si

gnal

Exp

ress

VI.

Whe

n yo

u kn

ow w

hich

item

you

wan

t to

add

to th

e bl

ock

diag

ram

or

fron

t pan

el, y

ou c

an u

se th

e Q

uick

Dro

p di

alog

box

to q

uick

ly fi

nd th

e it

em a

nd a

dd it

to th

e bl

ock

diag

ram

or f

ront

pan

el. S

elec

t Qui

ck D

rop

from

the

Vie

w m

enu

to d

ispl

ay th

is d

ialo

g bo

x. Y

ou a

lso

can

pres

s th

e <

Ctr

l-Sp

ace>

key

s. (M

ac O

S X)

Pre

ss th

e <

Com

man

d-Sh

ift-

Spac

e>

keys

.

Tip

You

can

spe

ed u

p th

e in

itia

l lau

nch

of th

e Q

uick

Dro

p di

alog

box

by

enab

ling

the

Loa

d pa

lett

es d

urin

g la

unch

radi

o bu

tton

on th

e C

ontr

ols/

Fun

ctio

ns P

alet

te p

age

of th

e O

ptio

ns d

ialo

g bo

x. S

elec

ting

to lo

ad p

alet

tes

whi

le L

abV

IEW

laun

ches

mig

ht s

low

dow

n th

e la

unch

ing

of L

abV

IEW

slig

htly

.

7.C

onfi

gure

the

Sam

ple

Com

pres

sion

Exp

ress

VI t

o re

duce

the

sign

al b

y a

fact

or o

f 25

usi

ng th

e m

ean

of th

ese

valu

es.

8.C

lick

the

OK

but

ton

to s

ave

the

curr

ent c

onfi

gura

tion

and

clo

se th

e C

onfi

gure

Sam

ple

Com

pres

sion

dia

log

box.

9.U

se th

e W

irin

g to

ol to

wir

e th

e Si

ne o

utpu

t of

the

Sim

ulat

e Si

gnal

E

xpre

ss V

I to

the

Sign

als

inpu

t of

the

Sam

ple

Com

pres

sion

E

xpre

ssV

I.

Page 18: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 2

Cust

omizi

ng a

VI

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n2-

5Ge

tting

Sta

rted

with

Lab

VIEW

Cust

omiz

ing

a Us

er In

terfa

ce fr

om th

e Bl

ock

Diag

ram

In th

e pr

evio

us e

xerc

ises

, you

add

ed c

ontr

ols

and

indi

cato

rs to

the

fron

t pa

nel u

sing

the

Con

trol

s pa

lett

e. Y

ou a

lso

can

crea

te c

ontr

ols

and

indi

cato

rs f

rom

the

bloc

k di

agra

m.

Com

plet

e th

e fo

llow

ing

step

s to

cre

ate

cont

rols

and

indi

cato

rs f

rom

the

bloc

k di

agra

m.

1.O

n th

e bl

ock

diag

ram

, rig

ht-c

lick

the

Mea

n ou

tput

of

the

Sam

ple

Com

pres

sion

Exp

ress

VI a

nd s

elec

t Cre

ate»

Num

eric

Ind

icat

or fr

om

the

shor

tcut

men

u to

cre

ate

a nu

mer

ic in

dica

tor.

A M

ean

indi

cato

r,

show

n at

left

, app

ears

on

the

bloc

k di

agra

m.

2.R

ight

-clic

k th

e M

ean

outp

ut o

f th

e Sa

mpl

e C

ompr

essi

on E

xpre

ss V

I an

d se

lect

Ins

ert

Inpu

t/O

utpu

t fr

om th

e sh

ortc

ut m

enu

to in

sert

the

Ena

ble

inpu

t.

In p

revi

ous

exer

cise

s, y

ou le

arne

d to

add

inpu

ts a

nd o

utpu

ts b

y ex

pand

ing

the

Exp

ress

VI

usin

g th

e do

wn

arro

ws.

Usi

ng th

e sh

ortc

ut

men

u is

a d

iffe

rent

way

to d

ispl

ay a

nd s

elec

t the

inpu

ts a

nd o

utpu

ts o

f an

Exp

ress

VI.

3.R

ight

-clic

k th

e E

nabl

e in

put a

nd s

elec

t Cre

ate»

Con

trol

fro

m th

e sh

ortc

ut m

enu

to c

reat

e a

swit

ch. A

Boo

lean

con

trol

, sho

wn

at le

ft,

appe

ars

on th

e bl

ock

diag

ram

.

Con

trol

term

inal

s ha

ve a

thic

ker b

orde

r tha

n in

dica

tor t

erm

inal

s. A

lso,

an

arr

ow a

ppea

rs o

n th

e ri

ght o

f the

term

inal

if th

e te

rmin

al is

a c

ontr

ol,

and

an a

rrow

app

ears

on

the

left

of

the

term

inal

if th

e te

rmin

al is

an

indi

cato

r.

4.R

ight

-clic

k th

e w

ire

that

con

nect

s th

e Si

ne o

utpu

t of

the

Sim

ulat

e Si

gnal

Exp

ress

VI

to th

e Si

gnal

s in

put o

f th

e Sa

mpl

e C

ompr

essi

on

Exp

ress

VI

and

sele

ct C

reat

e»G

raph

Ind

icat

or f

rom

the

shor

tcut

m

enu.

5.U

se th

e W

irin

g to

ol to

wir

e th

e M

ean

outp

ut o

f th

e Sa

mpl

e C

ompr

essi

on E

xpre

ss V

I to

the

Sine

gra

ph in

dica

tor.

The

Mer

ge S

igna

ls f

unct

ion

appe

ars.

Chap

ter 2

Cust

omizi

ng a

VI

Getti

ng S

tarte

d w

ith L

abVI

EW2-

6ni

.com

6.A

rran

ge th

e ob

ject

s on

the

bloc

k di

agra

m s

o th

ey a

ppea

r si

mil

ar to

Fi

gure

2-3.

Figu

re 2

-3.

Bloc

k Di

agra

m o

f the

Red

uce

Sam

ples

VI

7.D

ispl

ay th

e fr

ont p

anel

.

The

con

trol

s an

d in

dica

tors

you

add

ed a

ppea

r in

the

fron

t pan

el w

ith

labe

ls th

at c

orre

spon

d to

the

inpu

ts a

nd o

utpu

ts f

rom

whi

ch y

ou

crea

ted

the

cont

rols

and

indi

cato

rs.

Note

You

mig

ht n

eed

to s

crol

l or

resi

ze th

e fr

ont p

anel

to s

ee a

ll co

ntro

ls a

nd in

dica

tors

.

8.Sa

ve th

e V

I.

Conf

igur

ing

a VI

to R

un C

ontin

uous

ly u

ntil

the

User

Sto

ps It

In th

e cu

rren

t sta

te, t

he V

I ru

ns o

nce,

gen

erat

es o

ne s

igna

l, an

d th

en s

tops

ru

nnin

g. T

o ru

n th

e V

I un

til a

con

diti

on o

ccur

s, y

ou c

an u

se a

Whi

le L

oop.

Com

plet

e th

e fo

llow

ing

step

s to

add

a W

hile

Loo

p to

the

bloc

k di

agra

m.

1.D

ispl

ay th

e fr

ont p

anel

and

run

the

VI.

The

VI

runs

onc

e an

d th

en s

tops

. The

fro

nt p

anel

doe

s no

t hav

e a

stop

bu

tton.

2.D

ispl

ay th

e bl

ock

diag

ram

.

3.C

lick

the

Sear

ch b

utto

n, s

how

n at

left

, on

the

Fun

ctio

ns p

alet

te, a

nd

ente

r While

in th

e te

xt b

ox. L

abV

IEW

sea

rche

s as

you

type

the

firs

t fe

w le

tters

and

dis

play

s an

y m

atch

es in

the

sear

ch r

esul

ts te

xt b

ox.

If th

ere

are

obje

cts

wit

h th

e sa

me

nam

e, u

se th

e in

form

atio

n in

the

brac

kets

to th

e ri

ght o

f ea

ch o

bjec

t nam

e to

dec

ide

whi

ch o

bjec

t to

sele

ct. S

ome

obje

cts

are

loca

ted

on m

ulti

ple

pale

ttes

bec

ause

you

can

us

e th

em f

or m

ulti

ple

appl

icat

ions

.

Page 19: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 2

Cust

omizi

ng a

VI

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n2-

7Ge

tting

Sta

rted

with

Lab

VIEW

4.D

oubl

e-cl

ick

Whi

le L

oop

<<E

xecu

tion

Con

trol

>> to

dis

play

the

Exe

cuti

on C

ontr

ol s

ubpa

lett

e an

d te

mpo

rari

ly h

ighl

ight

the

Whi

le

Loo

p on

the

subp

alet

te.

5.Se

lect

the

Whi

le L

oop

on th

e E

xecu

tion

Con

trol

pal

ette

.

6.M

ove

the

curs

or to

the

uppe

r le

ft c

orne

r of

the

bloc

k di

agra

m. C

lick

and

drag

the

curs

or d

iago

nall

y to

enc

lose

all

the

Exp

ress

VIs

and

w

ires

, as

show

n in

Fig

ure

2-4.

Figu

re 2

-4.

Plac

ing

the

Whi

le L

oop

arou

nd th

e Ex

pres

s VI

s

7.R

elea

se th

e m

ouse

to p

lace

the

Whi

le L

oop

arou

nd th

e E

xpre

ss V

Is a

nd

wir

es.

The

Whi

le L

oop,

sho

wn

at le

ft, a

ppea

rs w

ith

a ST

OP

but

ton

wir

ed to

th

e co

nditi

onal

term

inal

. Thi

s W

hile

Loo

p is

con

figu

red

to s

top

whe

n th

e us

er c

lick

s th

e ST

OP

but

ton.

8.D

ispl

ay th

e fr

ont p

anel

and

run

the

VI.

The

VI

now

run

s un

til y

ou c

lick

the

STO

P b

utto

n. A

Whi

le L

oop

exec

utes

the

VIs

and

fun

ctio

ns in

side

the

loop

unt

il th

e us

er c

licks

the

STO

P b

utto

n.

9.C

lick

the

STO

P b

utto

n an

d sa

ve th

e V

I.

Chap

ter 2

Cust

omizi

ng a

VI

Getti

ng S

tarte

d w

ith L

abVI

EW2-

8ni

.com

Usin

g th

e Er

ror L

ist W

indo

wIf

a V

I co

ntai

ns a

n in

dica

tor

you

do n

ot w

ant t

o us

e, y

ou c

an d

elet

e it.

Com

plet

e th

e fo

llow

ing

step

s to

rem

ove

the

Mea

n in

dica

tor f

rom

the

fron

t pa

nel.

1.D

ispl

ay th

e fr

ont p

anel

and

mov

e th

e cu

rsor

ove

r th

e M

ean

indi

cato

r un

til t

he P

osit

ioni

ng to

ol a

ppea

rs.

2.C

lick

the

Mea

n in

dica

tor,

sho

wn

at le

ft, t

o se

lect

it a

nd p

ress

the

<D

elet

e> k

ey.

3.D

ispl

ay th

e bl

ock

diag

ram

.

A w

ire

appe

ars

as a

das

hed

blac

k li

ne w

ith

a re

d X

in th

e m

iddl

e, s

how

n at

left

. The

das

hed

blac

k li

ne is

a b

roke

n w

ire.

The

Run

but

ton,

sho

wn

at le

ft, a

ppea

rs b

roke

n to

indi

cate

the

VI

cann

ot r

un.

4.C

lick

the

brok

en R

un b

utto

n to

dis

play

the

Err

or li

st w

indo

w.

The

Err

or li

st w

indo

w li

sts

all e

rror

s in

the

VI

and

prov

ides

det

ails

ab

out e

ach

erro

r. Y

ou c

an u

se th

e E

rror

list

win

dow

to lo

cate

err

ors.

5.In

the

erro

rs a

nd w

arni

ngs

list,

sele

ct th

e Wire: has loose ends

er

ror

and

clic

k th

e H

elp

butt

on to

dis

play

mor

e in

form

atio

n ab

out t

he

erro

r.

Tip

You

als

o ca

n m

ove

the

Wir

ing

tool

ove

r a

brok

en w

ire

to d

ispl

ay a

tip

stri

p th

at

desc

ribe

s w

hy th

e w

ire

is b

roke

n. T

his

info

rmat

ion

also

app

ears

in th

e C

onte

xt H

elp

win

dow

whe

n yo

u m

ove

the

Wir

ing

tool

ove

r a

brok

en w

ire.

6.In

the

erro

rs a

nd w

arni

ngs

list

, dou

ble-

clic

k th

e Wire: has loose

ends

err

or to

hig

hlig

ht th

e br

oken

wir

e.

7.Pr

ess

the

<C

trl-

B>

key

s to

del

ete

the

brok

en w

ire.

Pres

sing

the

<Ctr

l-B

> ke

ys d

elet

es a

ll b

roke

n w

ires

on

the

bloc

k di

agra

m.

You

can

pre

ss th

e <D

elet

e> k

ey to

del

ete

only

the

sele

cted

wir

e.

8.Se

lect

Vie

w»E

rror

Lis

t to

dis

play

the

Err

or li

st w

indo

w. N

o er

rors

ap

pear

in th

e er

rors

and

war

ning

s fi

eld.

Tip

You

als

o ca

n pr

ess

the

<C

trl-

L>

key

s to

dis

play

the

Err

or li

st w

indo

w.

9.C

lick

the

Clo

se b

utto

n to

clo

se th

e E

rror

list

win

dow

.

The

Run

but

ton

no lo

nger

app

ears

bro

ken.

Page 20: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 2

Cust

omizi

ng a

VI

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n2-

9Ge

tting

Sta

rted

with

Lab

VIEW

Cont

rolli

ng th

e Sp

eed

of E

xecu

tion

To

plot

the

poin

ts o

n th

e w

avef

orm

gra

ph m

ore

slow

ly, y

ou c

an a

dd a

tim

e de

lay

to th

e bl

ock

diag

ram

.

Com

plet

e th

e fo

llow

ing

step

s to

con

trol

the

spee

d at

whi

ch th

e V

I ru

ns.

1.O

n th

e bl

ock

diag

ram

, sea

rch

for t

he T

ime

Del

ay E

xpre

ss V

I, s

how

n at

le

ft, o

n th

e F

unct

ions

pal

ette

and

pla

ce it

insi

de th

e W

hile

Loo

p.

You

can

use

the

Tim

e D

elay

Exp

ress

VI

to c

ontr

ol th

e ex

ecut

ion

rate

of

the

VI.

2.E

nter

0.25

in th

e T

ime

dela

y (s

econ

ds)

text

box

.

Thi

s ti

me

dela

y sp

ecif

ies

how

fas

t the

loop

run

s. W

ith

a 0.

25 s

econ

d ti

me

dela

y, th

e lo

op it

erat

es o

nce

ever

y qu

arte

r of

a s

econ

d.

3.C

lick

the

OK

but

ton

to s

ave

the

curr

ent c

onfi

gura

tion

and

clo

se th

e C

onfi

gure

Tim

e D

elay

dia

log

box.

4.D

ispl

ay th

e fr

ont p

anel

and

run

the

VI.

5.C

lick

the

Ena

ble

swit

ch a

nd e

xam

ine

the

chan

ge o

n th

e gr

aph.

If th

e E

nabl

e sw

itch

is o

n, th

e gr

aph

disp

lays

the

redu

ced

sign

al. I

f the

E

nabl

e sw

itch

is o

ff, t

he g

raph

doe

s no

t dis

play

the

redu

ced

sign

al.

6.C

lick

the

STO

P b

utto

n to

sto

p th

e V

I.

Usin

g a

Tabl

e to

Dis

play

Dat

aC

ompl

ete

the

foll

owin

g st

eps

to d

ispl

ay a

col

lect

ion

of m

ean

valu

es in

a

fron

t pan

el ta

ble.

1.D

ispl

ay th

e fr

ont p

anel

.

2.O

n th

e C

ontr

ols

pale

tte

sear

ch f

or th

e E

xpre

ss T

able

indi

cato

r an

d ad

d it

to th

e ri

ght o

f th

e w

avef

orm

gra

ph.

3.D

ispl

ay th

e bl

ock

diag

ram

.

Lab

VIE

W w

ired

the

Tab

le te

rmin

al to

the

Bui

ld T

able

Exp

ress

VI.

4.If

the

Bui

ld T

able

Exp

ress

VI

and

the

Tab

le te

rmin

al a

re n

ot s

elec

ted

alre

ady,

cli

ck a

n op

en a

rea

on th

e bl

ock

diag

ram

to th

e le

ft o

f the

Bui

ld

Tabl

e E

xpre

ss V

I an

d th

e T

able

term

inal

. Dra

g th

e cu

rsor

dia

gona

lly

unti

l the

sel

ecti

on r

ecta

ngle

enc

lose

s th

e B

uild

Tab

le E

xpre

ss V

I an

d th

e T

able

term

inal

, sho

wn

at le

ft.

A m

ovin

g da

shed

out

line

, cal

led

a m

arqu

ee, h

ighl

ight

s th

e B

uild

Tab

le

Exp

ress

VI,

the

Tab

le te

rmin

al, a

nd th

e w

ire

join

ing

the

two.

Chap

ter 2

Cust

omizi

ng a

VI

Getti

ng S

tarte

d w

ith L

abVI

EW2-

10ni

.com

5.D

rag

the

obje

cts

into

the

Whi

le L

oop

to th

e ri

ght o

f th

e Sa

mpl

e C

ompr

essi

on E

xpre

ss V

I.

If y

ou d

rag

obje

cts

near

the

bord

er o

f the

Whi

le L

oop,

the

loop

resi

zes

to e

nclo

se th

e B

uild

Tab

le E

xpre

ss V

I and

the

Tab

le te

rmin

al a

fter

you

ad

d th

e ob

ject

to th

e bl

ock

diag

ram

.

6.U

se th

e W

irin

g to

ol to

wir

e th

e M

ean

outp

ut o

f th

e Sa

mpl

e C

ompr

essi

on E

xpre

ss V

I to

the

Sign

als

inpu

t of

the

Bui

ld T

able

E

xpre

ss V

I.

7.T

he b

lock

dia

gram

sho

uld

appe

ar s

imil

ar to

Fig

ure

2-5.

Figu

re 2

-5.

Bloc

k Di

agra

m o

f the

Red

uce

Sam

ples

VI

8.D

ispl

ay th

e fr

ont p

anel

and

arr

ange

the

cont

rols

and

indi

cato

rs a

s sh

own

in F

igur

e 2-

1.

9.R

un th

e V

I.

10.

Clic

k th

e E

nabl

e sw

itch

.

If th

e E

nabl

e sw

itch

is o

n, th

e ta

ble

disp

lays

the

mea

n va

lues

of

ever

y 25

sam

ples

of t

he s

ine

wav

e. If

the

Ena

ble

swit

ch is

off

, the

tabl

e do

es

not r

ecor

d th

e m

ean

valu

es.

11.

Stop

the

VI.

12.

Exp

erim

ent w

ith

prop

erti

es o

f the

tabl

e by

usi

ng th

e T

able

Pro

pert

ies

dial

og b

ox. F

or e

xam

ple,

try

chan

ging

the

num

ber

of c

olum

ns to

one

.

13.

Save

and

clo

se th

e V

I.

Page 21: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 2

Cust

omizi

ng a

VI

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n2-

11Ge

tting

Sta

rted

with

Lab

VIEW

Sear

chin

g fo

r Exa

mpl

esT

o le

arn

mor

e ab

out h

ow y

ou c

an u

se a

cer

tain

VI,

you

can

sea

rch

for

and

view

an

exam

ple

that

use

s th

e V

I.

Com

plet

e th

e fo

llow

ing

step

s to

fin

d an

d op

en a

n ex

ampl

e th

at u

ses

the

Tim

e D

elay

Exp

ress

VI.

1.In

the

Hel

p se

ctio

n of

the

Get

ting

Sta

rted

win

dow

, sel

ect L

abV

IEW

H

elp

to d

ispl

ay th

e L

abV

IEW

Hel

p.

2.C

lick

the

Sear

ch ta

b. I

n th

e T

ype

in t

he w

ord(

s) t

o se

arch

for

text

bo

x en

ter time delay express VI

and

pre

ss th

e <

Ent

er>

key

. (M

ac O

S X

and

Linu

x) C

hoos

e th

e F

ull T

ext

optio

n in

the

Sear

ch

Opt

ions

sec

tion

of th

e Se

arch

the

Lab

VIE

W H

elp

dial

og b

ox to

na

rrow

the

sear

ch r

esul

ts.

Tip

Ref

er to

the

Usi

ng H

elp

book

on

the

Con

tent

s ta

b in

the

Lab

VIE

W H

elp

for

mor

e in

form

atio

n ab

out s

earc

hing

hel

p. (W

indo

ws)

Bef

ore

you

sear

ch, y

ou c

an n

arro

w th

e se

arch

re

sult

s by

pla

cing

a c

heck

mar

k in

the

Sear

ch t

itle

s on

ly c

heck

box

near

the

bott

om o

f th

e he

lp w

indo

w. Y

ou a

lso

can

use

oper

ator

s su

ch a

s AND

, OR

, and

NEAR

in th

e T

ype

in t

he

wor

d(s)

to

sear

ch f

or te

xt b

ox to

nar

row

the

sear

ch r

esul

ts.

3.(W

indo

ws)

Cli

ck th

e L

ocat

ion

colu

mn

head

er to

sor

t the

sea

rch

resu

lts

by c

onte

nt ty

pe. R

efer

ence

topi

cs c

onta

in re

fere

nce

info

rmat

ion

abou

t L

abV

IEW

obj

ects

suc

h as

VIs

, fun

ctio

ns, p

alet

tes,

men

us, a

nd to

ols.

H

ow-T

o to

pics

con

tain

ste

p-by

-ste

p in

stru

ctio

ns f

or u

sing

Lab

VIE

W.

Con

cept

topi

cs c

onta

in in

form

atio

n ab

out L

abV

IEW

pro

gram

min

g co

ncep

ts.

4.D

oubl

e-cl

ick

the

Tim

e D

elay

Exp

ress

VI

sear

ch r

esul

t to

disp

lay

the

refe

renc

e to

pic

that

des

crib

es th

e T

ime

Del

ay E

xpre

ss V

I.

5.A

fter

you

rea

d th

e de

scri

ptio

n of

the

Exp

ress

VI,

cli

ck th

e O

pen

exam

ple

butto

n in

the

Exa

mpl

e se

ctio

n ne

ar th

e bo

ttom

of t

he to

pic

to

open

an

exam

ple

that

use

s th

e T

ime

Del

ay E

xpre

ss V

I.

6.R

un th

e V

I an

d m

ove

the

vert

ical

poi

nter

sli

des.

The

am

plit

udes

of

Val

ue A

and

B c

hang

e as

you

mov

e th

e ve

rtic

al p

oint

er s

lide

s.

7.St

op th

e V

I.

8.Se

lect

Win

dow

»Sho

w B

lock

Dia

gram

and

rea

d th

e bl

ock

diag

ram

co

mm

ents

.

9.C

lose

the

exam

ple

VI

and

open

the

Lab

VIE

W H

elp

win

dow

.

10.

Cli

ck th

e F

ind

rela

ted

exam

ples

but

ton

to o

pen

the

NI

Exa

mpl

e Fi

nder

and

dis

play

a li

st o

f ex

ampl

es s

imil

ar to

the

exam

ple

that

use

s th

is V

I. T

he N

IE

xam

ple

Find

er s

earc

hes

amon

g hu

ndre

ds o

f

Chap

ter 2

Cust

omizi

ng a

VI

Getti

ng S

tarte

d w

ith L

abVI

EW2-

12ni

.com

exam

ples

, inc

ludi

ng a

ll in

stal

led

exam

ples

and

the

exam

ples

loca

ted

on th

e N

ID

evel

oper

Zon

e at

ni.com/zone

. You

can

mod

ify

an

exam

ple

to f

it a

n ap

plic

atio

n, o

r yo

u ca

n co

py a

nd p

aste

fro

m o

ne o

r m

ore

exam

ples

into

a V

I th

at y

ou c

reat

e.

Note

Alw

ays

sele

ct F

ile»S

ave

As w

hen

you

save

a m

odif

ied

exam

ple

to a

void

ove

rwri

ting

th

e ex

ampl

e pr

ogra

m in

the

NI

Exa

mpl

e Fi

nder

.

You

als

o ca

n ri

ght-

clic

k a

VI

or f

unct

ion

on th

e bl

ock

diag

ram

or

on a

pi

nned

pal

ette

and

sel

ect E

xam

ples

from

the

shor

tcut

men

u to

dis

play

a

help

topi

c w

ith li

nks

to e

xam

ples

for

that

VI

or f

unct

ion.

To

laun

ch

the

NI

Exa

mpl

e Fi

nder

and

bro

wse

or

sear

ch e

xam

ples

, sel

ect

Hel

p»F

ind

Exa

mpl

es o

r cl

ick

the

Fin

d E

xam

ples

link

in th

e E

xam

ples

sec

tion

of

the

Get

ting

Sta

rted

win

dow

.

Note

The

re is

not

an

exam

ple

for

all V

Is.

11.

Aft

er y

ou e

xper

imen

t wit

h th

e N

I E

xam

ple

Find

er a

nd th

e ex

ampl

e V

Is, c

lose

the

NI

Exa

mpl

e Fi

nder

.

Sum

mar

yT

he f

ollo

win

g to

pics

are

a s

umm

ary

of th

e m

ain

conc

epts

you

lear

ned

in

this

cha

pter

.

Usin

g th

e La

bVIE

W H

elp

Reso

urce

sIn

this

cha

pter

, you

lear

ned

to u

se th

e he

lp re

sour

ces

in th

e fo

llow

ing

way

s:

•T

he C

onte

xt H

elp

win

dow

dis

play

s ba

sic

info

rmat

ion

abou

t L

abV

IEW

obj

ects

whe

n yo

u m

ove

the

curs

or o

ver e

ach

obje

ct. O

bjec

ts

wit

h co

ntex

t hel

p in

form

atio

n in

clud

e V

Is, f

unct

ions

, str

uctu

res,

pa

lett

es, d

ialo

g bo

x co

mpo

nent

s, a

nd s

o on

. To

acce

ss th

e C

onte

xt

Hel

p w

indo

w, s

elec

t Hel

p»Sh

ow C

onte

xt H

elp

or p

ress

the

<C

trl-

H>

ke

ys. (

Mac

OS

X) P

ress

the

<C

omm

and-

Shif

t-H

> k

eys.

•W

hen

you

mov

e th

e cu

rsor

ove

r an

Exp

ress

VI

on th

e bl

ock

diag

ram

, th

e C

onte

xt H

elp

win

dow

dis

play

s a

brie

f de

scri

ptio

n of

the

Exp

ress

V

I an

d in

form

atio

n ab

out h

ow y

ou c

onfi

gure

d th

e E

xpre

ss V

I.

•T

he L

abV

IEW

Hel

p co

ntai

ns d

etai

led

info

rmat

ion

abou

t Lab

VIE

W

obje

cts.

To

acce

ss th

e L

abV

IEW

Hel

p to

pic

for

an o

bjec

t, m

ove

the

curs

or o

ver

the

obje

ct a

nd c

lick

the

Det

aile

d he

lp li

nk in

the

Con

text

H

elp

win

dow

. You

als

o ca

n ri

ght-

clic

k an

obj

ect o

n th

e bl

ock

diag

ram

or

on

a pi

nned

pal

ette

and

sel

ect H

elp

from

the

shor

tcut

men

u.

Page 22: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 2

Cust

omizi

ng a

VI

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n2-

13Ge

tting

Sta

rted

with

Lab

VIEW

•To

nav

igat

e th

e L

abV

IEW

Hel

p, u

se th

e C

onte

nts,

Ind

ex, a

nd S

earc

h ta

bs. U

se th

e C

onte

nts

tab

to g

et a

n ov

ervi

ew o

f th

e to

pics

and

st

ruct

ure

of th

e he

lp. U

se th

e In

dex

tab

to f

ind

a to

pic

by k

eyw

ord.

U

seth

e Se

arch

tab

to s

earc

h th

e he

lp f

or a

wor

d or

phr

ase.

•If

you

fin

d an

obj

ect i

n th

e L

abV

IEW

Hel

p yo

u w

ant t

o us

e, y

ou c

an

clic

k an

Add

to

the

bloc

k di

agra

m b

utto

n to

pla

ce th

e ob

ject

on

the

bloc

k di

agra

m.

•O

n th

e Se

arch

tab

of th

e L

abV

IEW

Hel

p, u

se o

pera

tors

suc

h as

AND

, OR

, and

NEAR

to n

arro

w th

e se

arch

res

ults

. To

sear

ch f

or a

n ex

act

phra

se, p

lace

quo

tati

on m

arks

aro

und

the

phra

se. B

efor

e yo

u se

arch

, yo

u al

so c

an n

arro

w th

e se

arch

res

ults

by

plac

ing

a ch

eckm

ark

in th

e Se

arch

tit

les

only

che

ckbo

x ne

ar th

e bo

ttom

of

the

help

win

dow

.

•O

n th

e Se

arch

tab

of th

e L

abV

IEW

Hel

p, y

ou c

an c

lick

the

Loc

atio

n co

lum

n he

ader

abo

ve th

e lis

t of

sear

ch r

esul

ts to

sor

t the

res

ults

by

cont

ent t

ype.

Ref

eren

ce to

pics

con

tain

ref

eren

ce in

form

atio

n ab

out

Lab

VIE

W o

bjec

ts s

uch

as V

Is, f

unct

ions

, pal

ette

s, m

enus

, and

tool

s.

How

-To

topi

cs c

onta

in s

tep-

by-s

tep

inst

ruct

ions

for

usi

ng L

abV

IEW

. C

once

pt to

pics

con

tain

info

rmat

ion

abou

t Lab

VIE

W p

rogr

amm

ing

conc

epts

.

Cust

omiz

ing

the

Bloc

k Di

agra

m C

ode

You

als

o ca

n us

e m

any

cont

rols

, ind

icat

ors,

Exp

ress

VIs

, and

str

uctu

res

to

buil

d a

VI.

You

can

cus

tom

ize

VIs

in m

any

way

s. T

he fo

llow

ing

exam

ples

re

view

a f

ew c

omm

on w

ays

to c

usto

miz

e V

Is, i

nclu

ding

cre

atin

g co

ntro

ls

and

indi

cato

rs, c

onfi

guri

ng w

hen

VI

stop

s, c

orre

ctin

g br

oken

wir

es, a

nd

disp

layi

ng d

ata

in a

tabl

e.

Crea

ting

Cont

rols

and

Indi

cato

rsC

reat

e co

ntro

ls a

nd in

dica

tors

on

the

bloc

k di

agra

m b

y ri

ght-

clic

king

the

Exp

ress

VI i

nput

, out

put,

or w

ire,

sel

ecti

ng C

reat

e fr

om th

e sh

ortc

ut m

enu,

an

d se

lect

ing

amon

g th

e av

aila

ble

opti

ons.

Lab

VIE

W w

ires

the

cont

rol o

r in

dica

tor

you

crea

ted

to th

e in

put,

outp

ut, o

r w

ire

you

righ

t-cl

icke

d.

Con

trol

term

inal

s ha

ve a

thic

ker

bord

er th

an in

dica

tor

term

inal

s. A

lso,

an

arro

w a

ppea

rs o

n th

e ri

ght o

f th

e te

rmin

al if

the

term

inal

is a

con

trol

, and

an

arr

ow a

ppea

rs o

n th

e le

ft o

f th

e te

rmin

al if

the

term

inal

is a

n in

dica

tor.

Chap

ter 2

Cust

omizi

ng a

VI

Getti

ng S

tarte

d w

ith L

abVI

EW2-

14ni

.com

Cont

rolli

ng W

hen

a VI

Sto

ps R

unni

ngU

se a

Whi

le L

oop

to r

un th

e co

de e

nclo

sed

wit

hin

the

loop

con

tinua

lly.

A W

hile

Loo

p st

ops

runn

ing

whe

n a

stop

con

diti

on o

ccur

s. A

fter

you

pla

ce

or m

ove

an o

bjec

t in

a W

hile

Loo

p ne

ar th

e bo

rder

, the

loop

res

izes

to a

dd

spac

e fo

r th

at o

bjec

t.

The

Exe

cuti

on C

ontr

ol p

alet

te in

clud

es o

bjec

ts y

ou c

an u

se to

con

trol

the

num

ber

of ti

mes

a V

I ru

ns, a

s w

ell a

s th

e sp

eed

at w

hich

the

VI

runs

.

Erro

rs a

nd B

roke

n W

ires

The

Run

but

ton

appe

ars

brok

en w

hen

the

VI

you

are

crea

ting

or

edit

ing

cont

ains

err

ors.

If th

e R

un b

utto

n is

stil

l bro

ken

whe

n yo

u fi

nish

wir

ing

the

bloc

k di

agra

m, t

he V

I is

bro

ken

and

cann

ot r

un.

Clic

k th

e br

oken

Run

but

ton

or s

elec

t Vie

w»E

rror

Lis

t to

fin

d ou

t why

a

VI i

s br

oken

. You

can

use

the

Err

or li

st w

indo

w to

loca

te e

rror

s. C

lick

the

Hel

p bu

tton

for m

ore

info

rmat

ion

abou

t the

err

or. D

oubl

e-cl

ick

the

erro

r in

the

erro

rs a

nd w

arni

ngs

fiel

d to

hig

hlig

ht th

e pr

oble

m c

ausi

ng th

e er

ror.

A b

roke

n w

ire

appe

ars

as a

das

hed

blac

k li

ne w

ith

a re

d X

in th

e m

iddl

e.

Bro

ken

wir

es o

ccur

for

a v

arie

ty o

f re

ason

s, s

uch

as if

you

del

ete

wir

ed

obje

cts.

The

VI

cann

ot r

un if

the

bloc

k di

agra

m c

onta

ins

brok

en w

ires

.

Mov

e th

e W

irin

g to

ol o

ver a

bro

ken

wir

e to

dis

play

a ti

p st

rip

that

des

crib

es

why

the

wir

e is

bro

ken.

Thi

s in

form

atio

n al

so a

ppea

rs in

the

Con

text

Hel

p w

indo

w w

hen

you

mov

e th

e W

irin

g to

ol o

ver a

bro

ken

wir

e. R

ight

-clic

k th

e w

ire

and

sele

ct L

ist

Err

ors

from

the

shor

tcut

men

u to

dis

play

the

Err

or

list

win

dow

. Clic

k th

e H

elp

butto

n fo

r m

ore

info

rmat

ion

abou

t why

the

wir

e is

bro

ken.

Disp

layi

ng D

ata

in a

Tab

leT

he ta

ble

indi

cato

r dis

play

s ge

nera

ted

data

. Use

the

Bui

ld T

able

Exp

ress

VI

to b

uild

a ta

ble

of g

ener

ated

dat

a.

Usin

g th

e NI

Exa

mpl

e Fi

nder

Use

the

NI E

xam

ple

Find

er to

bro

wse

or s

earc

h ex

ampl

es in

stal

led

on y

our

com

pute

r or

on

the

NI

Dev

elop

er Z

one

at ni.com/zone

. The

se e

xam

ples

de

mon

stra

te h

ow to

use

Lab

VIE

W to

per

form

a w

ide

vari

ety

of te

st,

mea

sure

men

t, co

ntro

l, an

d de

sign

task

s. S

elec

t Hel

p»F

ind

Exa

mpl

es o

r cl

ick

the

Fin

d E

xam

ples

link

in th

e E

xam

ples

sec

tion

of th

e G

etti

ng

Star

ted

win

dow

to la

unch

the

NI

Exa

mpl

e Fi

nder

.

Page 23: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 2

Cust

omizi

ng a

VI

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n2-

15Ge

tting

Sta

rted

with

Lab

VIEW

Exa

mpl

es c

an s

how

you

how

to u

se s

peci

fic

VIs

or

func

tion

s. Y

ou c

an

righ

t-cl

ick

a V

I or f

unct

ion

on th

e bl

ock

diag

ram

or o

n a

pinn

ed p

alet

te a

nd

sele

ct E

xam

ples

fro

m th

e sh

ortc

ut m

enu

to d

ispl

ay a

hel

p to

pic

wit

h li

nks

to e

xam

ples

for t

hat V

I or f

unct

ion.

You

can

mod

ify

an e

xam

ple

VI t

o fi

t an

appl

icat

ion,

or

you

can

copy

and

pas

te f

rom

one

or

mor

e ex

ampl

es in

to a

V

I th

at y

ou c

reat

e.

Alw

ays

sele

ct F

ile»S

ave

As

whe

n yo

u sa

ve a

mod

ifie

d ex

ampl

e to

avo

id

acci

dent

ally

ove

rwri

ting

the

exam

ple

prog

ram

in th

e N

I E

xam

ple

Find

er.

Shor

tcut

sT

his

chap

ter

intr

oduc

ed th

e fo

llow

ing

keyb

oard

sho

rtcu

ts.

Note

The

<C

trl>

key

in th

ese

shor

tcut

s co

rres

pond

s to

the

(Mac

OS

X) <

Opt

ion>

or

<C

omm

and>

key

or

(Lin

ux) <

Alt

> k

ey.

Shor

tcut

Fun

ctio

n

<C

trl-

N>

Ope

ns a

new

, bla

nk V

I.

<C

trl-

H>

Show

s or

hid

es th

e C

onte

xt H

elp

win

dow

. (M

ac O

S X)

Pre

ss th

e <

Com

man

d-Sh

ift-

H>

key

s.

<C

trl-

Spac

e>D

ispl

ays

the

Qui

ck D

rop

dial

og b

ox.

(Mac

OS

X) P

ress

the

<C

omm

and-

Shif

t-Sp

ace>

ke

ys.

<C

trl-

B>

Del

etes

all

bro

ken

wir

es in

a V

I.

<C

trl-

L>

Dis

play

s th

e E

rror

list

win

dow

.

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n3-

1Ge

tting

Sta

rted

with

Lab

VIEW3

Anal

yzin

g an

d Sa

ving

a S

igna

l

Lab

VIE

W in

clud

es a

set

of E

xpre

ss V

Is th

at h

elp

you

anal

yze

sign

als.

Thi

s ch

apte

r te

ache

s yo

u ho

w to

use

Lab

VIE

W to

per

form

a b

asic

ana

lysi

s of

a

sign

al a

nd h

ow to

sav

e th

e an

alyz

ed d

ata

to a

fil

e.

Note

The

exe

rcis

es in

this

cha

pter

use

Exp

ress

VIs

that

are

ava

ilab

le o

nly

in th

e L

abV

IEW

Fu

ll a

nd P

rofe

ssio

nal D

evel

opm

ent S

yste

ms.

Page 24: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 3

Anal

yzin

g an

d Sa

ving

a S

igna

l

Getti

ng S

tarte

d w

ith L

abVI

EW3-

2ni

.com

Build

ing

an A

naly

sis

VIIn

the

follo

win

g ex

erci

ses,

you

will

bui

ld a

VI t

hat g

ener

ates

a s

igna

l, fi

lters

th

e si

gnal

, ind

icat

es if

the

sign

al e

xcee

ds a

cer

tain

lim

it, a

nd r

ecor

ds th

e da

ta. A

fter

you

com

plet

e th

e ex

erci

ses,

the

fron

t pan

el o

f th

e V

I w

ill l

ook

sim

ilar

to th

e fr

ont p

anel

in F

igur

e3-

1.

You

can

com

plet

e th

e ex

erci

ses

in th

is c

hapt

er in

app

roxi

mat

ely

40 m

inut

es.

Figu

re 3

-1.

Fron

t Pan

el o

f the

Sav

e Da

ta V

I

Mod

ifyin

g a

VI C

reat

ed fr

om a

Tem

plat

eC

ompl

ete

the

foll

owin

g st

eps

to c

reat

e a

VI

that

gen

erat

es, a

naly

zes,

and

di

spla

ys a

sig

nal.

1.In

the

Get

ting

Sta

rted

win

dow

, clic

k N

ew to

dis

play

the

New

dia

log

box.

2.Fr

om th

e C

reat

e N

ew li

st, s

elec

t VI»

Fro

m T

empl

ate»

Tut

oria

l (G

etti

ng S

tart

ed)»

Gen

erat

e, A

naly

ze, a

nd D

ispl

ay. T

his

tem

plat

e V

I si

mul

ates

a s

igna

l and

ana

lyze

s it

for

its r

oot m

ean

squa

re (

RM

S)

valu

e.

Chap

ter 3

Anal

yzin

g an

d Sa

ving

a S

igna

l

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n3-

3Ge

tting

Sta

rted

with

Lab

VIEW

3.C

lick

the

OK

but

ton

or d

oubl

e-cl

ick

the

nam

e of

the

tem

plat

e to

cre

ate

a V

I fr

om th

e te

mpl

ate.

4.If

the

Con

text

Hel

p w

indo

w is

not

vis

ible

, pre

ss th

e <

Ctr

l-H

> k

eys

to

disp

lay

the

win

dow

. (M

ac O

S X)

Pre

ss th

e <

Com

man

d-Sh

ift-

H>

key

s.

5.D

ispl

ay th

e bl

ock

diag

ram

by

pres

sing

the

<C

trl-

E>

key

s.

6.M

ove

the

curs

or o

ver t

he A

mpl

itud

e an

d L

evel

Mea

sure

men

ts E

xpre

ss

VI,

sho

wn

at le

ft.

The

Con

text

Hel

p w

indo

w d

ispl

ays

info

rmat

ion

abou

t the

beh

avio

r of

the

Exp

ress

VI.

Kee

p th

e C

onte

xt H

elp

win

dow

ope

n. I

t wil

l pro

vide

use

ful

info

rmat

ion

as y

ou c

ompl

ete

the

rest

of

this

exe

rcis

e.

7.D

ispl

ay th

e fr

ont p

anel

and

rem

ove

the

RM

S in

dica

tor,

show

n at

left

.

You

will

not

use

the

RM

S fu

nctio

nalit

y of

the

Am

plitu

de a

nd L

evel

M

easu

rem

ents

Exp

ress

VI

for

this

exe

rcis

e. H

owev

er, y

ou c

an u

se th

e G

ener

ate,

Ana

lyze

, and

Dis

play

tem

plat

e V

I w

ith th

e R

MS

func

tiona

lity

in th

e fu

ture

to r

educ

e de

velo

pmen

t tim

e.

8.D

ispl

ay th

e bl

ock

diag

ram

and

rem

ove

any

brok

en w

ires

that

res

ult

from

rem

ovin

g th

e R

MS

indi

cato

r. To

rem

ove

all b

roke

n w

ires

fro

m

the

bloc

k di

agra

m, y

ou c

an p

ress

the

<C

trl-

B>

key

s.

9.T

hen

retu

rn to

the

fron

t pan

el w

indo

w a

nd r

ight

-clic

k th

e w

avef

orm

gr

aph

indi

cato

r. Se

lect

Pro

pert

ies f

rom

the

shor

tcut

men

u. T

he G

raph

P

rope

rtie

s di

alog

box

app

ears

.

10.

On

the

App

eara

nce

page

, pla

ce a

che

ckm

ark

in th

e V

isib

le c

heck

box

in th

e L

abel

sec

tion

and

ente

r Unfiltered Signal

in th

e te

xt b

ox.

11.

Clic

k th

e O

K b

utto

n to

sav

e th

e co

nfig

urat

ion

and

clos

e th

e G

raph

P

rope

rtie

s di

alog

box

.

12.

Run

the

VI.

The

sig

nal a

ppea

rs in

the

grap

h.

13.

Clic

k th

e ST

OP

but

ton

to s

top

the

VI.

Page 25: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 3

Anal

yzin

g an

d Sa

ving

a S

igna

l

Getti

ng S

tarte

d w

ith L

abVI

EW3-

4ni

.com

Addi

ng a

Sig

nal

The

Sim

ulat

e Si

gnal

Exp

ress

VI s

imul

ates

a s

ine

wav

e by

def

ault.

You

can

cu

stom

ize

the

sim

ulat

ed s

igna

l by

chan

ging

the

optio

ns in

the

Con

figu

re

Sim

ulat

e Si

gnal

dia

log

box.

Com

plet

e th

e fo

llow

ing

step

s to

cre

ate

an a

dditi

onal

sim

ulat

ed s

igna

l tha

t ad

ds u

nifo

rm w

hite

noi

se to

the

sine

wav

e.

1.O

n th

e bl

ock

diag

ram

, use

the

Posi

tion

ing

tool

to s

elec

t the

Sim

ulat

e Si

gnal

Exp

ress

VI.

Hol

d do

wn

the

<C

trl>

key

and

cli

ck a

nd d

rag

to c

reat

e an

add

itio

nal

Sim

ulat

e Si

gnal

Exp

ress

VI

on th

e bl

ock

diag

ram

. (M

ac O

S X)

Hol

d do

wn

the

<O

ptio

n> k

ey a

nd d

rag.

(Lin

ux) Y

ou a

lso

can

hold

dow

n th

e m

iddl

e m

ouse

but

ton

and

drag

.

2.R

elea

se th

e m

ouse

but

ton

to p

lace

the

copi

ed S

imul

ate

Sign

al E

xpre

ss

VI

belo

w th

e or

igin

al S

imul

ate

Sign

al E

xpre

ss V

I. L

abV

IEW

upd

ates

th

e na

me

of th

e co

pied

Sim

ulat

e Si

gnal

Exp

ress

VI

to S

imul

ate

Sign

al2.

3.D

oubl

e-cl

ick

the

Sim

ulat

e Si

gnal

2 E

xpre

ss V

I to

dis

play

the

Con

figu

re S

imul

ate

Sign

al d

ialo

g bo

x.

4.Se

lect

Sin

e fr

om th

e Si

gnal

typ

e pu

ll-do

wn

men

u.

5.E

nter

60

in th

e F

requ

ency

(H

z) te

xt b

ox.

6.E

nter

0.1

in th

e A

mpl

itud

e te

xt b

ox.

7.Pl

ace

a ch

eckm

ark

in th

e A

dd n

oise

che

ckbo

x to

add

noi

se to

the

sine

si

gnal

.

8.Se

lect

Uni

form

Whi

te N

oise

fro

m th

e N

oise

typ

e pu

ll-d

own

men

u.

9.E

nter

0.1

in th

e N

oise

am

plit

ude

text

box

.

10.

Ent

er -1

in th

e Se

ed n

umbe

r te

xt b

ox.

11.

In th

e T

imin

g se

ctio

n, s

elec

t the

Run

as

fast

as

poss

ible

opt

ion.

12.

In th

e Si

gnal

Nam

e se

ctio

n, r

emov

e th

e ch

eckm

ark

from

the

Use

si

gnal

typ

e na

me

chec

kbox

.

13.

Ent

er 60 Hz and Noise

in th

e Si

gnal

nam

e te

xt b

ox.

Whe

n yo

u ch

ange

the

sign

al n

ame

in th

e C

onfi

gure

Sim

ulat

e Si

gnal

di

alog

box

, Lab

VIE

W c

hang

es th

e na

me

of th

e si

gnal

out

put o

n th

e bl

ock

diag

ram

. Cha

ngin

g th

e si

gnal

nam

e m

akes

it e

asie

r fo

r yo

u to

id

enti

fy th

e si

gnal

type

whe

n yo

u vi

ew th

e E

xpre

ss V

I on

the

bloc

k di

agra

m.

Chap

ter 3

Anal

yzin

g an

d Sa

ving

a S

igna

l

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n3-

5Ge

tting

Sta

rted

with

Lab

VIEW

The

Res

ult P

revi

ew s

ecti

on d

ispl

ays

a ra

ndom

sig

nal.

The

Con

figu

re

Sim

ulat

e Si

gnal

dia

log

box

shou

ld a

ppea

r si

mil

ar to

Figu

re3-

2.

Figu

re 3

-2.

Conf

igur

e Si

mul

ate

Sign

al D

ialo

g Bo

x

14.

Cli

ck th

e O

K b

utto

n to

sav

e th

e cu

rren

t con

figu

rati

on a

nd c

lose

th

eC

onfi

gure

Sim

ulat

e Si

gnal

dia

log

box.

Addi

ng T

wo

Sign

als T

o ad

d tw

o si

gnal

s to

geth

er to

cre

ate

one

sign

al, y

ou c

an u

se th

e Fo

rmul

a E

xpre

ss V

I. R

athe

r th

an m

ergi

ng tw

o si

gnal

s on

one

gra

ph, t

he F

orm

ula

Exp

ress

VI a

dds

both

sig

nals

toge

ther

to c

reat

e a

sing

le s

igna

l on

the

grap

h.

You

can

use

this

Exp

ress

VI

to a

dd n

oise

to a

sig

nal.

Page 26: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 3

Anal

yzin

g an

d Sa

ving

a S

igna

l

Getti

ng S

tarte

d w

ith L

abVI

EW3-

6ni

.com

Com

plet

e th

e fo

llow

ing

step

s to

add

the

60 H

z an

d N

oise

sig

nal t

o th

e Si

ne

sign

al.

1.In

the

bloc

k di

agra

m w

indo

w, t

ripl

e-cl

ick

the

wir

e th

at c

onne

cts

the

Sine

out

put o

f th

e Si

mul

ate

Sign

al E

xpre

ss V

I to

the

Sign

als

inpu

t of

the

Am

plit

ude

and

Lev

el M

easu

rem

ents

Exp

ress

VI

and

to th

e U

nfilt

ered

Sig

nal i

ndic

ator

. Rem

ove

the

wir

e.

2.O

n th

e F

unct

ions

pal

ette

, clic

k th

e Se

arch

but

ton

to s

earc

h fo

r th

e Fo

rmul

a E

xpre

ss V

I, s

how

n at

left

, and

add

it to

the

bloc

k di

agra

m

betw

een

the

Sim

ulat

e Si

gnal

Exp

ress

VIs

and

the

Am

plit

ude

and

Lev

el

Mea

sure

men

ts E

xpre

ss V

I. T

he C

onfi

gure

For

mul

a di

alog

box

ap

pear

s.

Note

Lab

VIE

W d

ispl

ays

a fo

lder

gly

ph to

the

left

of

subp

alet

tes

in th

e se

arch

res

ults

and

di

spla

ys a

ligh

t blu

e gl

yph

to th

e le

ft o

f E

xpre

ss V

Is in

the

sear

ch r

esul

ts.

3.In

the

Lab

el c

olum

n, c

hang

e th

e la

bel f

or X

1 to

Sine

and

the

labe

l for

X

2 to

60 Hz and Noise

.

The

For

mul

a E

xpre

ss V

I au

tom

atic

ally

ent

ers

the

firs

t inp

ut, S

ine,

in

the

For

mul

a te

xt b

ox.

4.C

lick

the

+ bu

tton

and

then

the

X2

butto

n to

add

Sin

e an

d 60

Hz

and

Noi

se to

geth

er in

the

For

mul

a te

xt b

ox.

5.C

lick

the

OK

but

ton

to s

ave

the

curr

ent c

onfi

gura

tion

and

clo

se th

e C

onfi

gure

For

mul

a di

alog

box

.

6.U

se th

e W

irin

g to

ol to

wir

e th

e Si

ne o

utpu

t of

the

Sim

ulat

e Si

gnal

E

xpre

ss V

I to

the

Sine

inpu

t of

the

Form

ula

Exp

ress

VI.

7.W

ire

the

60 H

z an

d N

oise

out

put o

f th

e Si

mul

ate

Sign

al2

Exp

ress

VI

to th

e 60

Hz

and

Noi

se in

put o

f th

e Fo

rmul

a E

xpre

ss V

I.

8.W

ire

the

Res

ult

outp

ut o

f th

e Fo

rmul

a E

xpre

ss V

I to

the

Unf

ilter

ed

Sign

al in

dica

tor

and

to th

e Si

gnal

s in

put o

f th

e A

mpl

itude

and

Lev

el

Mea

sure

men

ts E

xpre

ss V

I.

9.D

ispl

ay th

e fr

ont p

anel

by

pres

sing

the

<C

trl-

E>

key

s.

10.

Run

the

VI.

The

sig

nal w

ith

adde

d no

ise

appe

ars

in th

e gr

aph.

11.

Cli

ck th

e ST

OP

but

ton

to s

top

the

VI.

12.

Sele

ct F

ile»S

ave

As

and

save

the

VI

as Analysis.vi

in a

n ea

sily

ac

cess

ible

loca

tion

.

Chap

ter 3

Anal

yzin

g an

d Sa

ving

a S

igna

l

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n3-

7Ge

tting

Sta

rted

with

Lab

VIEW

Filte

ring

a Si

gnal

You

can

use

the

Filt

er E

xpre

ss V

I to

pro

cess

sig

nals

thro

ugh

filt

ers

and

win

dow

s.

Com

plet

e th

e fo

llow

ing

step

s to

con

figu

re th

e Fi

lter E

xpre

ss V

I to

filte

r the

si

gnal

usi

ng a

n in

fini

te im

puls

e re

spon

se (

IIR

) fi

lter.

1.D

ispl

ay th

e bl

ock

diag

ram

win

dow

and

rem

ove

the

wir

e th

at c

onne

cts

the

Res

ult o

utpu

t of t

he F

orm

ula

Exp

ress

VI t

o th

e Si

gnal

s inp

ut o

f the

A

mpl

itud

e an

d L

evel

Mea

sure

men

ts E

xpre

ss V

I.

2.R

emov

e al

l bro

ken

wir

es th

at r

esul

t fro

m r

emov

ing

the

wir

e.

3.Se

arch

for

the

Filt

er E

xpre

ss V

I, s

how

n at

left

, and

add

it to

the

bloc

k di

agra

m b

etw

een

the

Sim

ulat

e Si

gnal

2 E

xpre

ss V

I an

d th

e A

mpl

itud

e an

d L

evel

Mea

sure

men

ts E

xpre

ss V

I. T

he C

onfi

gure

Filt

er d

ialo

g bo

x ap

pear

s.

4.In

the

Filt

er S

peci

fica

tion

s se

ctio

n, c

hang

e th

e C

utof

f F

requ

ency

(H

z) to

25

.

5.C

lick

the

OK

but

ton

to s

ave

the

conf

igur

atio

n an

d cl

ose

the

Con

figu

re

Filt

er d

ialo

g bo

x.

6.D

ispl

ay th

e fr

ont p

anel

.

7.C

lick

the

Unf

ilter

ed S

igna

l wav

efor

m g

raph

indi

cato

r an

d pr

ess

the

<C

trl>

key

whi

le y

ou d

rag

with

the

Posi

tioni

ng to

ol to

cre

ate

an

addi

tiona

l wav

efor

m g

raph

indi

cato

r.

8.T

ripl

e-cl

ick

the

Unf

ilter

ed S

igna

l 2 la

bel a

bove

the

new

wav

efor

m

grap

h in

dica

tor

and

ente

r Filtered Signal

to c

hang

e th

e la

bel o

f th

e in

dica

tor.

You

als

o ca

n ch

ange

the

labe

l on

the

App

eara

nce

page

of

the

Gra

ph P

rope

rtie

s di

alog

box

.

9.O

n th

e bl

ock

diag

ram

, wir

e th

e R

esul

t out

put o

f th

e Fo

rmul

a E

xpre

ss

VI

to th

e Si

gnal

inpu

t of

the

Filt

er E

xpre

ss V

I an

d to

the

Unf

ilter

ed

Sign

al w

avef

orm

gra

ph in

dica

tor.

10.

Wir

e th

e F

ilter

ed S

igna

l out

put o

f the

Fil

ter E

xpre

ss V

I to

the

Sign

als

inpu

t of t

he A

mpl

itud

e an

d L

evel

Mea

sure

men

ts E

xpre

ss V

I and

to th

e in

put o

f th

e F

ilter

ed S

igna

l wav

efor

m g

raph

indi

cato

r.

Page 27: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 3

Anal

yzin

g an

d Sa

ving

a S

igna

l

Getti

ng S

tarte

d w

ith L

abVI

EW3-

8ni

.com

11.

Sele

ct F

ile»S

ave.

The

blo

ck d

iagr

am o

f the

Ana

lysi

s V

I sho

uld

appe

ar

sim

ilar

to F

igur

e3-

3.

Figu

re 3

-3.

Bloc

k Di

agra

m o

f the

Ana

lysi

s VI

Mod

ifyin

g th

e Ap

pear

ance

of G

raph

sY

ou c

an u

se th

e D

ispl

ay F

orm

at p

age

of th

e G

raph

Pro

pert

ies

dial

og b

ox

to s

peci

fy h

ow th

e sc

ales

of

the

x-ax

is a

nd y

-axi

s ap

pear

on

the

grap

h.

Com

plet

e th

e fo

llow

ing

step

s to

cha

nge

the

form

at o

f the

x-a

xis

and

y-ax

is

of th

e U

nfilt

ered

Sig

nal a

nd F

ilter

ed S

igna

l gra

phs.

1.In

the

fron

t pan

el w

indo

w, r

ight

-clic

k th

e U

nfilt

ered

Sig

nal g

raph

in

dica

tor

and

sele

ct P

rope

rtie

s fr

om th

e sh

ortc

ut m

enu.

The

Gra

ph

Pro

pert

ies

dial

og b

ox a

ppea

rs.

2.O

n th

e D

ispl

ay F

orm

at p

age,

sel

ect T

ime

(X-A

xis)

fro

m th

e to

p pu

ll-do

wn

men

u.

3.Se

lect

the

Def

ault

edi

ting

mod

e op

tion

.

4.In

the

Typ

e li

st, s

elec

t Aut

omat

ic f

orm

atti

ng.

5.In

the

Dig

its

fiel

d, e

nter

6 a

nd s

elec

t Sig

nifi

cant

dig

its

from

the

Pre

cisi

on T

ype

pull-

dow

n m

enu.

6.Pl

ace

a ch

eckm

ark

in th

e H

ide

trai

ling

zero

s ch

eckb

ox.

7.Se

lect

Am

plit

ude

(Y-A

xis)

fro

m th

e to

p pu

ll-do

wn

men

u an

d re

peat

st

eps

3–6

so th

e y-

axis

con

figu

rati

on m

atch

es th

e x-

axis

con

figu

rati

on.

8.O

n th

e Sc

ales

pag

e, s

elec

t Am

plit

ude

(Y-A

xis)

.

9.R

emov

e th

e ch

eckm

ark

from

the

Aut

osca

le c

heck

box.

Chap

ter 3

Anal

yzin

g an

d Sa

ving

a S

igna

l

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n3-

9Ge

tting

Sta

rted

with

Lab

VIEW

10.

Ent

er -2.5

in th

e M

inim

um te

xt b

ox a

nd 2.5

in th

e M

axim

um te

xt

box.

11.

Clic

k th

e O

K b

utto

n to

sav

e th

e co

nfig

urat

ion

and

clos

e th

e G

raph

P

rope

rtie

s di

alog

box

.

12.

Rep

eat s

teps

1–1

1 to

con

figu

re th

e F

ilter

ed S

igna

l gra

ph in

dica

tor.

The

x-a

xis

and

the

y-ax

is o

n th

e U

nfilt

ered

Sig

nal a

nd F

ilter

ed

Sign

al g

raph

indi

cato

rs c

hang

e to

ref

lect

the

new

con

figu

rati

on.

Anal

yzin

g th

e Am

plitu

de o

f a S

igna

lY

ou c

an u

se th

e A

mpl

itud

e an

d L

evel

Mea

sure

men

ts E

xpre

ss V

I to

anal

yze

the

volt

age

char

acte

rist

ics

of a

sig

nal.

Com

plet

e th

e fo

llow

ing

step

s to

reco

nfig

ure

the

Exp

ress

VI t

o m

easu

re th

e pe

ak-t

o-pe

ak a

mpl

itud

e va

lues

of

the

sign

al.

1.O

n th

e bl

ock

diag

ram

, dou

ble-

clic

k th

e A

mpl

itude

and

Lev

el

Mea

sure

men

ts E

xpre

ss V

I to

dis

play

the

Con

figu

re A

mpl

itud

e an

d L

evel

Mea

sure

men

ts d

ialo

g bo

x.

2.In

the

Am

plit

ude

Mea

sure

men

ts s

ecti

on, r

emov

e th

e ch

eckm

ark

from

the

RM

S ch

eckb

ox.

3.Pl

ace

a ch

eckm

ark

in th

e P

eak

to p

eak

chec

kbox

. Pea

k to

pea

k ap

pear

s in

the

Res

ults

sec

tion

wit

h th

e co

rres

pond

ing

valu

e of

the

mea

sure

men

t.

4.C

lick

the

OK

but

ton

to s

ave

the

curr

ent c

onfi

gura

tion

and

clo

se

the

Con

figu

re A

mpl

itud

e an

d L

evel

Mea

sure

men

ts d

ialo

g bo

x.

The

RM

S ou

tput

of

the

Am

plit

ude

and

Lev

el M

easu

rem

ents

Exp

ress

V

I ch

ange

s to

ref

lect

the

new

Pea

k to

Pea

k ou

tput

, sho

wn

at le

ft.

You

will

use

the

Pea

k to

Pea

k ou

tput

in a

late

r ex

erci

se.

Cont

rolli

ng th

e Sp

eed

of E

xecu

tion

To

plot

the

poin

ts o

n th

e w

avef

orm

gra

phs

mor

e sl

owly

, you

can

add

a ti

me

dela

y to

the

bloc

k di

agra

m. A

tim

e de

lay

slow

s th

e sp

eed

at w

hich

a V

I ru

ns.

Com

plet

e th

e fo

llow

ing

step

s to

con

trol

the

spee

d at

whi

ch th

e V

I ru

ns.

1.O

n th

e bl

ock

diag

ram

, sea

rch

for

the

Tim

e D

elay

Exp

ress

VI.

2.Pl

ace

the

Tim

e D

elay

Exp

ress

VI

insi

de th

e W

hile

Loo

p. T

he

Con

figu

re T

ime

Del

ay d

ialo

g bo

x ap

pear

s.

3.E

nter

1.000

in th

e T

ime

dela

y (s

econ

ds)

text

box

and

clic

k th

e O

K

butto

n.

Page 28: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 3

Anal

yzin

g an

d Sa

ving

a S

igna

l

Getti

ng S

tarte

d w

ith L

abVI

EW3-

10ni

.com

4.D

ispl

ay th

e fr

ont p

anel

and

run

the

VI.

The

VI

runs

mor

e sl

owly

.

The

loop

iter

ates

onc

e ev

ery

seco

nd.

5.St

op th

e V

I.

Ano

ther

way

to c

ontr

ol th

e sp

eed

of th

e V

I is

to a

lter

the

rate

of

data

ac

quis

ition

. On

the

bloc

k di

agra

m, d

oubl

e cl

ick

the

Sim

ulat

e Si

gnal

E

xpre

ss V

I to

dis

play

the

Con

figu

re S

imul

ate

Sign

al d

ialo

g bo

x.

Loc

ate

the

Tim

ing

sect

ion

in th

e di

alog

box

. The

Tim

ing

sect

ion

cont

ains

a n

umbe

r of

way

s to

alt

er th

e ra

te o

f da

ta a

cqui

siti

on a

nd th

e sp

eed

at w

hich

a V

I ru

ns.

For

exam

ple,

one

of

the

defa

ult s

etti

ngs

of th

e V

I is

Sim

ulat

e A

cqui

siti

on T

imin

g. T

his

mea

ns th

at th

e V

I m

imic

s th

e ac

quis

itio

n ra

te o

f a

hard

war

e de

vice

. You

can

sel

ect R

un a

s fa

st a

s po

ssib

le to

di

spla

y da

ta m

ore

quic

kly.

In

the

Sam

ples

per

sec

ond

(Hz)

text

box

, th

e de

faul

t val

ue is

100

0, w

hile

the

defa

ult v

alue

in th

e N

umbe

r of

Sa

mpl

es te

xt b

ox is

100

. Thi

s m

eans

that

the

VI

will

out

put 1

00 d

ata

poin

ts s

pann

ing

0.1

seco

nd. Y

ou c

an c

hang

e th

ese

valu

es to

cha

nge

the

amou

nt o

f da

ta th

e V

I di

spla

ys, a

s w

ell a

s th

e ra

te a

t whi

ch th

e V

I di

spla

ys th

e da

ta.

Addi

ng a

War

ning

Lig

htIf

you

wan

t a v

isua

l cue

to in

dica

te w

hen

a va

lue

exce

eds

a sp

ecif

ied

limit,

yo

u ca

n us

e a

war

ning

ligh

t.

Com

plet

e th

e fo

llow

ing

step

s to

add

a w

arni

ng li

ght t

o th

e V

I.

1.D

ispl

ay th

e C

ontr

ols

pale

tte

by r

ight

-cli

ckin

g an

y bl

ank

spac

e in

the

fron

t pan

el w

indo

w.

2.O

n th

e E

xpre

ss p

alet

te, s

elec

t the

LE

Ds

pale

tte.

3.Se

lect

the

roun

d L

ED

indi

cato

r an

d ad

d it

to th

e fr

ont p

anel

toth

e le

ft

of th

e w

avef

orm

gra

phs.

4.D

oubl

e-cl

ick

the

Boo

lean

labe

l abo

ve th

e L

ED

and

ent

er Warning

to

chan

ge th

e la

bel o

f th

e L

ED

.

You

wil

l use

this

LE

D in

a la

ter

exer

cise

to in

dica

te w

hen

a va

lue

has

exce

eded

its

lim

it.

5.Se

lect

File

»Sav

e A

s to

dis

play

the

Save

As

dial

og b

ox.

6.R

ead

the

vari

ous

dial

og b

ox o

ptio

ns. S

elec

t the

Cop

y an

d Su

bsti

tute

co

py f

or o

rigi

nal o

ptio

ns to

cre

ate

a co

py o

f th

e or

igin

al V

I an

d im

med

iate

ly e

dit t

he c

opy.

7.C

lick

the

Con

tinu

e bu

tton

and

sav

e th

e V

I as Warning Light.vi

in

an e

asil

y ac

cess

ible

loca

tion

.

Chap

ter 3

Anal

yzin

g an

d Sa

ving

a S

igna

l

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n3-

11Ge

tting

Sta

rted

with

Lab

VIEW

Setti

ng a

War

ning

Lev

el L

imit

To

spec

ify

the

valu

e at

whi

ch y

ou w

ant t

he L

ED

to li

ght,

use

the

Com

pari

son

Exp

ress

VI.

Com

plet

e th

e fo

llow

ing

step

s to

com

pare

the

peak

-to-

peak

val

ue to

a li

mit

yo

u se

t.

1.O

n th

e bl

ock

diag

ram

, sea

rch

for t

he C

ompa

riso

n E

xpre

ss V

I and

pla

ce

it to

the

righ

t of

the

Am

plit

ude

and

Lev

el M

easu

rem

ents

Exp

ress

VI.

T

he C

onfi

gure

Com

pari

son

dial

og b

ox a

ppea

rs.

2.In

the

Com

pare

Con

diti

on s

ectio

n, s

elec

t the

>G

reat

er o

ptio

n.

3.In

the

Com

pari

son

Inpu

ts s

ecti

on, s

elec

t Val

ue a

nd e

nter

2 in

the

Val

ue n

umer

ic c

ontr

ol to

ass

ign

a co

nsta

nt v

alue

at w

hich

you

wan

t the

L

ED

to li

ght.

4.C

lick

the

OK

but

ton

to s

ave

the

curr

ent c

onfi

gura

tion

and

clo

se

the

Con

figu

re C

ompa

riso

n di

alog

box

.

The

nam

e of

the

Com

pari

son

Exp

ress

VI

chan

ges

to r

efle

ct th

e op

erat

ion

of th

e E

xpre

ss V

I, s

how

n at

left

. Gre

ater

indi

cate

s th

at th

e E

xpre

ss V

I do

es a

gre

ater

than

com

pari

son.

5.W

ire

the

Pea

k to

Pea

k ou

tput

of

the

Am

plitu

de a

nd L

evel

M

easu

rem

ents

Exp

ress

VI

to th

e O

pera

nd 1

inpu

t of

the

Gre

ater

E

xpre

ss V

I.

6.M

ove

the

curs

or o

ver

the

wir

e th

at c

onne

cts

the

Pea

k to

Pea

k ou

tput

to

the

Ope

rand

1 in

put.

7.W

hen

the

Posi

tion

ing

tool

app

ears

, rig

ht-c

lick

the

wir

e th

at c

onne

cts

the

Pea

k to

Pea

k ou

tput

to th

e O

pera

nd 1

inpu

t and

sel

ect C

reat

Num

eric

Ind

icat

or f

rom

the

shor

tcut

men

u.

A P

eak

to P

eak

term

inal

, sho

wn

at le

ft, a

ppea

rs o

n th

e bl

ock

diag

ram

. If

the

Pea

k to

Pea

k te

rmin

al a

ppea

rs to

be

on to

p of

the

wir

es b

etw

een

the

Exp

ress

VIs

, mov

e th

e E

xpre

ss V

Is a

nd P

eak

to P

eak

term

inal

ar

ound

to c

reat

e m

ore

spac

e. F

or e

xam

ple,

mov

e th

e P

eak

to P

eak

term

inal

into

bla

nk s

pace

abo

ve th

e E

xpre

ss V

Is.

Tip

You

als

o ca

n pr

ess

<C

trl>

and

dra

g a

rect

angl

e in

ope

n sp

ace

to a

dd m

ore

wor

king

sp

ace

to th

e fr

ont p

anel

or

bloc

k di

agra

m.

Page 29: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 3

Anal

yzin

g an

d Sa

ving

a S

igna

l

Getti

ng S

tarte

d w

ith L

abVI

EW3-

12ni

.com

War

ning

the

User

Aft

er y

ou s

peci

fy th

e va

lues

at w

hich

you

wan

t the

LE

D to

ligh

t, yo

u m

ust

wir

e th

e L

ED

to th

e G

reat

er E

xpre

ss V

I.

Com

plet

e th

e fo

llow

ing

step

s to

pro

vide

a v

isua

l cue

whe

n th

e pe

ak-t

o-pe

ak

valu

e of

the

sign

al e

xcee

ds a

spe

cifi

ed li

mit

.

1.In

the

bloc

k di

agra

m w

indo

w, m

ove

the

War

ning

term

inal

to th

e ri

ght

of th

e G

reat

er E

xpre

ss V

I. M

ake

sure

the

War

ning

term

inal

is in

side

th

e W

hile

Loo

p, a

s sh

own

in F

igur

e3-

4.

Figu

re 3

-4.

Bloc

k Di

agra

m o

f the

War

ning

Lig

ht V

I

2.W

ire

the

Res

ult

outp

ut o

f th

e G

reat

er E

xpre

ss V

I to

the

War

ning

te

rmin

al.

The

blo

ck d

iagr

am s

houl

d ap

pear

sim

ilar

to F

igur

e3-

4.

Note

Red

coe

rcio

n do

ts a

ppea

r au

tom

atic

ally

at t

he P

eak

to P

eak

and

War

ning

inpu

t te

rmin

als

to a

lert

you

that

you

wir

ed tw

o di

ffer

ent d

ata

type

s to

geth

er a

nd L

abV

IEW

co

nver

ted

the

valu

e pa

ssed

into

the

node

to a

dif

fere

nt r

epre

sent

atio

n. T

he b

lock

dia

gram

pl

aces

the

coer

cion

dot

s on

the

bord

er o

f the

term

inal

whe

re th

e co

nver

sion

take

s pl

ace.

For

th

is e

xerc

ise,

the

conv

ersi

on d

oes

not a

ffec

t how

the

VI

runs

. Ref

er to

the

Lab

VIE

W H

elp

for

mor

e in

form

atio

n ab

out c

oerc

ion

dots

.

Chap

ter 3

Anal

yzin

g an

d Sa

ving

a S

igna

l

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n3-

13Ge

tting

Sta

rted

with

Lab

VIEW

3.D

ispl

ay th

e fr

ont p

anel

.

A n

umer

ic in

dica

tor

labe

led

Pea

k to

Pea

k ap

pear

s in

the

fron

t pan

el

win

dow

. Thi

s in

dica

tor

disp

lays

the

peak

-to-

peak

val

ue o

f th

e si

gnal

.

4.R

un th

e V

I.

Whe

n th

e pe

ak-t

o-pe

ak v

alue

exc

eeds

2.0

, the

War

ning

indi

cato

r lig

hts.

5.C

lick

the

STO

P b

utto

n to

sto

p th

e V

I.

6.Sa

ve th

e V

I.

Conf

igur

ing

a VI

to S

ave

Data

to a

File

To

stor

e in

form

atio

n ab

out t

he d

ata

a V

I ge

nera

tes,

use

the

Wri

te T

o M

easu

rem

ent F

ile

Exp

ress

VI.

Com

plet

e th

e fo

llow

ing

step

s to

buil

d a

VI

that

sav

es p

eak-

to-p

eak

valu

es

and

othe

r in

form

atio

n to

a L

abV

IEW

dat

a fi

le.

1.Se

arch

for t

he W

rite

To

Mea

sure

men

t File

Exp

ress

VI a

nd a

dd it

to th

e bl

ock

diag

ram

bel

ow a

nd to

the

righ

t of

the

Am

plitu

de a

nd L

evel

M

easu

rem

ents

Exp

ress

VI.

The

Con

figu

re W

rite

To

Mea

sure

men

t F

ile d

ialo

g bo

x ap

pear

s.

The

File

nam

e te

xt b

ox d

ispl

ays

the

full

pat

h to

the

outp

ut f

ile,

test.lvm

. A .lvm

fil

e is

a ta

b-de

limite

d te

xt m

easu

rem

ent f

ile y

ou

can

open

with

a s

prea

dshe

et a

pplic

atio

n or

a te

xt-e

ditin

g ap

plic

atio

n.

Lab

VIE

W s

aves

dat

a w

ith u

p to

six

dig

its o

f pr

ecis

ion

in a

.lvm

fi

le. L

abV

IEW

sav

es th

e .lvm

fil

e in

the

defa

ult LabVIEW Data

di

rect

ory.

Lab

VIE

W in

stal

ls th

e LabVIEW Data

dir

ecto

ry in

the

defa

ult f

ile

dire

ctor

y of

the

oper

atin

g sy

stem

.

Whe

n yo

u w

ant t

o vi

ew th

e da

ta, u

se th

e fi

le p

ath

disp

laye

d in

the

File

nam

e te

xt b

ox to

acc

ess

the test.lvm

fil

e.

2.In

the

Con

figu

re W

rite

to

Mea

sure

men

t F

ile d

ialo

g bo

x, lo

cate

the

If a

file

alr

eady

exi

sts

sect

ion

and

sele

ct th

e A

ppen

d to

file

opt

ion

to

wri

te a

ll th

e da

ta to

the test.lvm

file

with

out e

rasi

ng a

ny e

xist

ing

data

in th

e fi

le.

3.In

the

Segm

ent

Hea

ders

sec

tion

, sel

ect t

he O

ne h

eade

r on

ly o

ptio

n to

cre

ate

only

one

hea

der i

n th

e fi

le to

whi

ch L

abV

IEW

wri

tes

the

data

.

4.E

nter

the

follo

win

g te

xt in

the

File

Des

crip

tion

text

box

: Sample of

peak to peak values

. Lab

VIE

W a

ppen

ds th

e te

xt y

ou e

nter

in th

is

text

box

to th

e he

ader

of

the

file

.

5.C

lick

the

OK

but

ton

to s

ave

the

curr

ent c

onfi

gura

tion

and

clo

se

the

Con

figu

re W

rite

To

Mea

sure

men

t F

ile d

ialo

g bo

x.

Page 30: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 3

Anal

yzin

g an

d Sa

ving

a S

igna

l

Getti

ng S

tarte

d w

ith L

abVI

EW3-

14ni

.com

Savi

ng D

ata

to a

File W

hen

you

run

the

VI,

Lab

VIE

W s

aves

the

data

to th

e test.lvm

file

.

Com

plet

e th

e fo

llow

ing

step

s to

gen

erat

e th

e test.lvm

fil

e.

1.O

n th

e bl

ock

diag

ram

, wir

e th

e P

eak

to P

eak

outp

ut o

f the

Am

plit

ude

and

Lev

el M

easu

rem

ents

Exp

ress

VI

to th

e Si

gnal

s in

put o

f th

e W

rite

To

Mea

sure

men

t Fil

e E

xpre

ss V

I.

2.Se

lect

File

»Sav

e A

s an

d sa

ve th

e V

I as

Save Data.vi

in a

n ea

sily

ac

cess

ible

loca

tion

.

3.D

ispl

ay th

e fr

ont p

anel

and

run

the

VI.

4.C

lick

the

fron

t pan

el S

TO

P b

utto

n.

5.To

vie

w th

e da

ta y

ou s

aved

, ope

n th

e test.lvm

file

in th

e LabVIEW

Data

dir

ecto

ry w

ith

a sp

read

shee

t or

text

-edi

ting

app

lica

tion

.

The

file

has

a h

eade

r th

at c

onta

ins

info

rmat

ion

abou

t the

Exp

ress

VI.

6.C

lose

the

file

aft

er y

ou f

inis

h lo

okin

g at

it a

nd r

etur

n to

the

Save

D

ata

VI.

Addi

ng a

But

ton

That

Sto

res

Data

Whe

n Cl

icke

dIf

you

wan

t to

stor

e on

ly c

erta

in d

ata

poin

ts, y

ou c

an c

onfi

gure

the

Wri

te

To

Mea

sure

men

t Fil

e E

xpre

ss V

I to

save

pea

k-to

-pea

k va

lues

onl

y w

hen

a us

er c

lick

s a

butt

on.

Com

plet

e th

e fo

llow

ing

step

s to

add

a b

utto

n to

the

VI

and

conf

igur

e ho

w

the

butto

n re

spon

ds w

hen

a us

er c

licks

it.

1.D

ispl

ay th

e fr

ont p

anel

and

sea

rch

the

Con

trol

s pa

lett

e fo

r a

rock

er

butto

n. S

elec

t one

of

the

rock

er b

utto

ns a

nd p

lace

it to

the

righ

t of

the

wav

efor

m g

raph

s.

2.R

ight

-cli

ck th

e ro

cker

but

ton

and

sele

ct P

rope

rtie

s fr

om th

e sh

ortc

ut

men

u to

dis

play

the

Boo

lean

Pro

pert

ies

dial

og b

ox.

3.C

hang

e th

e la

bel o

f th

e bu

tton

to Write to File

.

4.O

n th

e O

pera

tion

pag

e of

the

Boo

lean

Pro

pert

ies

dial

og b

ox, s

elec

t L

atch

whe

n pr

esse

d fr

om th

e B

utto

n be

havi

or li

st.

Use

the

Ope

rati

on p

age

to s

peci

fy h

ow a

but

ton

beha

ves

whe

n a

user

cl

icks

it. T

o se

e ho

w th

e bu

tton

reac

ts to

a c

lick

, cli

ck th

e bu

tton

in th

e P

revi

ew S

elec

ted

Beh

avio

r se

ctio

n.

5.C

lick

the

OK

but

ton

to s

ave

the

curr

ent c

onfi

gura

tion

and

clo

se

the

Boo

lean

Pro

pert

ies

dial

og b

ox.

6.Sa

ve th

e V

I.

Chap

ter 3

Anal

yzin

g an

d Sa

ving

a S

igna

l

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n3-

15Ge

tting

Sta

rted

with

Lab

VIEW

Savi

ng D

ata

Whe

n Pr

ompt

ed b

y a

User

Com

plet

e th

e fo

llow

ing

step

s to

bui

ld a

VI

that

logs

dat

a to

a f

ile w

hen

the

user

clic

ks a

but

ton

on th

e fr

ont p

anel

.

1.In

the

bloc

k di

agra

m w

indo

w, d

oubl

e-cl

ick

the

Wri

te T

o M

easu

rem

ent

File

Exp

ress

VI

to d

ispl

ay th

e C

onfi

gure

Wri

te T

o M

easu

rem

ent

File

dia

log

box.

2.C

hang

e th

e fi

lena

me test.lvm

in th

e F

ilena

me

text

box

to

Selected Samples.lvm

to s

ave

the

data

to a

dif

fere

nt f

ile.

3.C

lick

the

OK

but

ton

to s

ave

the

curr

ent c

onfi

gura

tion

and

clo

se

the

Con

figu

re W

rite

To

Mea

sure

men

t F

ile d

ialo

g bo

x.

4.R

ight

-clic

k th

e Si

gnal

s in

put o

f th

e W

rite

To

Mea

sure

men

t File

E

xpre

ss V

I and

sel

ect I

nser

t Inp

ut/O

utpu

t fro

m th

e sh

ortc

ut m

enu

to

inse

rt th

e C

omm

ent

inpu

t.

5.R

ight

-clic

k th

e C

omm

ent

inpu

t of

the

Wri

te T

o M

easu

rem

ent F

ile

Exp

ress

VI a

nd s

elec

t Sel

ect I

nput

/Out

put»

Ena

ble

from

the

shor

tcut

m

enu

to r

epla

ce th

e C

omm

ent

inpu

t wit

h th

e E

nabl

e in

put.

The

inpu

ts a

nd o

utpu

ts o

f an

Exp

ress

VI

appe

ar in

a p

rede

term

ined

or

der w

hen

you

add

new

inpu

ts a

nd o

utpu

ts. T

o se

lect

a s

peci

fic

inpu

t, yo

u m

ight

nee

d to

add

an

inpu

t fir

st, a

nd th

en c

hang

e th

e in

put t

o th

e sp

ecif

ic o

ne y

ou w

ant t

o us

e by

rig

ht-c

lick

ing

the

inpu

t and

sel

ecti

ng

Sele

ct I

nput

/Out

put

from

the

shor

tcut

men

u.

6.M

ove

the

Wri

te t

o F

ile te

rmin

al to

the

left

of

the

Wri

te T

o M

easu

rem

ent F

ile

Exp

ress

VI.

7.W

ire

the

Wri

te t

o F

ile te

rmin

al to

the

Ena

ble

inpu

t of

the

Wri

te T

o M

easu

rem

ent F

ile

Exp

ress

VI.

Page 31: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 3

Anal

yzin

g an

d Sa

ving

a S

igna

l

Getti

ng S

tarte

d w

ith L

abVI

EW3-

16ni

.com

The

blo

ck d

iagr

am s

houl

d ap

pear

sim

ilar

to F

igur

e3-

5.

Figu

re 3

-5.

Bloc

k Di

agra

m o

f the

Sav

e Da

ta V

I

View

ing

Save

d Da

ta Com

plet

e th

e fo

llow

ing

step

s to

vie

w th

e da

ta th

at y

ou s

ave

to th

e Selected Samples.lvm

fil

e.

1.D

ispl

ay th

e fr

ont p

anel

and

run

the

VI.

Cli

ck th

e W

rite

to F

ile b

utto

n se

vera

l tim

es.

2.C

lick

the

STO

P b

utto

n.

3.O

pen

the Selected Samples.lvm

file

wit

h a

spre

adsh

eet o

r te

xt-e

diti

ng a

ppli

cati

on.

The

Selected Samples.lvm

file

dif

fers

fro

m th

e test.lvm

fil

e.

test.lvm

rec

orde

d al

l the

dat

a ge

nera

ted

by th

e Sa

ve D

ata

VI,

w

here

as Selected Samples.lvm

rec

orde

d da

ta o

nly

whe

n yo

u cl

icke

d th

e W

rite

to

File

but

ton.

4.C

lose

the

file

aft

er y

ou f

inis

h lo

okin

g at

it.

5.Sa

ve a

nd c

lose

the

VI.

Chap

ter 3

Anal

yzin

g an

d Sa

ving

a S

igna

l

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n3-

17Ge

tting

Sta

rted

with

Lab

VIEW

Sum

mar

yT

he f

ollo

win

g to

pics

are

a s

umm

ary

of th

e m

ain

conc

epts

you

lear

ned

in

this

cha

pter

.

Cont

rols

and

Indi

cato

rsY

ou c

an c

onfi

gure

fro

nt p

anel

con

trol

s an

d in

dica

tors

to p

erfo

rm ta

sks

depe

ndin

g on

wha

t you

wan

t a V

I to

do.

In

this

cha

pter

, you

lear

ned

to u

se

cont

rols

and

indi

cato

rs in

the

follo

win

g w

ays:

•Y

ou c

an b

uild

VIs

that

per

form

a ta

sk w

hen

cert

ain

cond

ition

s oc

cur,

such

as

disp

layi

ng a

war

ning

ligh

t whe

n a

valu

e ex

ceed

s a

cert

ain

lim

it.

•Y

ou c

an b

uild

VIs

that

let u

sers

con

trol

whe

n an

Exp

ress

VI

exec

utes

by

usi

ng b

utto

ns a

nd th

e E

nabl

e in

put.

You

can

con

figu

re th

e bu

ttons

to

ope

rate

in o

ne o

f six

way

s us

ing

the

Ope

rati

on p

age

of th

e B

oole

an

Pro

pert

ies

dial

og b

ox.

Filte

ring

Data

The

Filt

er E

xpre

ss V

I pr

oces

ses

sign

als

thro

ugh

filt

ers

and

win

dow

s. Y

ou

can

use

the

Filt

er E

xpre

ss V

I to

rem

ove

nois

e fr

om a

sig

nal.

Savi

ng D

ata

The

Wri

te T

o M

easu

rem

ent F

ile

Exp

ress

VI

save

s da

ta th

at a

VI

gene

rate

s an

d an

alyz

es to

a .lvm

, .tdm

, or .tdms

mea

sure

men

t fil

e. T

he te

xt-b

ased

m

easu

rem

ent f

ile

(.lvm

) is

a ta

b-de

limite

d te

xt f

ile

you

can

open

with

a

spre

adsh

eet a

pplic

atio

n or

a te

xt-e

ditin

g ap

plic

atio

n. L

abV

IEW

sav

es d

ata

with

up

to s

ix d

igit

s of

pre

cisi

on in

a .lvm

fil

e. I

n ad

diti

on to

the

data

an

Exp

ress

VI

gene

rate

s, th

e .lvm

fil

e in

clud

es h

eade

rs th

at c

onta

in

info

rmat

ion

abou

t the

dat

a, s

uch

as th

e da

te a

nd ti

me

Lab

VIE

W g

ener

ated

th

e da

ta. T

he b

inar

y m

easu

rem

ent f

ile

(.tdm

) is

a b

inar

y fi

le th

at c

onta

ins

wav

efor

m d

ata.

Bin

ary .tdm

fil

es p

rovi

de h

ighe

r ac

cura

cy f

or

floa

ting

-poi

nt n

umbe

rs, t

ake

up le

ss s

pace

on

disk

, and

per

form

fast

er th

an

text

-bas

ed m

easu

rem

ent f

iles

(.lvm

). T

he T

DM

Str

eam

ing

file

(.tdms

) is

a

bina

ry f

ile

that

pro

vide

s fa

ster

wri

ting

per

form

ance

than

the .tdm

fil

e fo

rmat

and

all

ows

a si

mpl

er in

terf

ace

for

defi

ning

pro

pert

ies.

Lab

VIE

W in

stal

ls th

e LabVIEW Data

dir

ecto

ry in

the

defa

ult f

ile d

irec

tory

of

the

oper

atin

g sy

stem

to h

elp

you

orga

nize

and

loca

te th

e da

ta f

iles

L

abV

IEW

gen

erat

es. R

efer

to th

e L

abV

IEW

Hel

p fo

r m

ore

info

rmat

ion

abou

t wri

ting

data

to a

nd r

eadi

ng d

ata

from

.lvm

and

.tdm

fil

es.

Page 32: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n4-

1Ge

tting

Sta

rted

with

Lab

VIEW4

Hard

war

e: A

cqui

ring

Data

and

Co

mm

unic

atin

g w

ith

Inst

rum

ents

(Win

dow

s)

Lab

VIE

W h

as th

e ca

pabi

lity

to c

onne

ct a

nd in

tera

ct w

ith

a la

rge

num

ber o

f ha

rdw

are

devi

ces.

Thi

s ch

apte

r in

trod

uces

you

to tw

o E

xpre

ss V

Is th

at

mak

e ac

quir

ing

data

and

com

mun

icat

ing

with

trad

ition

al, t

hird

-par

ty

inst

rum

ents

eas

ier.

Hard

war

e an

d So

ftwar

e Re

quire

men

tsIn

the

firs

t exe

rcis

e, y

ou u

se th

e D

AQ

Ass

ista

nt E

xpre

ss V

I to

acqu

ire

data

w

ith

a D

AQ

dev

ice.

Thi

s ex

erci

se r

equi

res

data

acq

uisi

tion

har

dwar

e an

d th

at y

ou h

ave

NI-

DA

Qm

x in

stal

led.

Ref

er to

the

NI-

DA

Q R

eadm

e fo

r mor

e in

form

atio

n ab

out p

latf

orm

s su

ppor

ted

by N

I-D

AQ

mx

soft

war

e.

Ref

er to

the

Tak

ing

Mea

sure

men

ts b

ook

on th

e C

onte

nts

tab

in th

e L

abV

IEW

Hel

p fo

r in

form

atio

n ab

out a

cqui

ring

dat

a an

d co

mm

unic

atin

g w

ith

inst

rum

ents

on

all p

latf

orm

s.

Note

With

NI-

DA

Qm

x 7.

4 or

late

r you

can

cre

ate

NI-

DA

Qm

x si

mul

ated

dev

ices

in M

AX

. A

n N

I-D

AQ

mx

sim

ulat

ed d

evic

e is

a s

oftw

are

repl

ica

of a

DA

Q d

evic

e. R

efer

to th

e M

easu

rem

ent &

Aut

omat

ion

Exp

lore

r H

elp

for

NI-

DA

Qm

x fo

r de

taile

d in

stru

ctio

ns o

n cr

eati

ng a

n N

I-D

AQ

mx

sim

ulat

ed d

evic

e th

at y

ou c

an u

se to

com

plet

e th

e fi

rst e

xerc

ise.

In th

e se

cond

exe

rcis

e, y

ou u

se th

e N

I Ins

trum

ent D

rive

r Fin

der t

o fi

nd a

nd

inst

all i

nstr

umen

t dri

vers

. To

use

the

Inst

rum

ent D

rive

r Fi

nder

, you

mus

t ha

ve in

tern

et a

cces

s. In

the

seco

nd e

xerc

ise,

you

als

o us

e th

e In

stru

men

t I/O

A

ssis

tant

Exp

ress

VI

to c

omm

unic

ate

wit

h a

trad

itio

nal,

thir

d-pa

rty

inst

rum

ent.

Thi

s ex

erci

se r

equi

res

an in

stru

men

t and

that

you

hav

e th

e In

stru

men

t I/O

Ass

ista

nt in

stal

led.

Ref

er to

the

Con

trol

ling

Inst

rum

ents

boo

k on

the

Con

tent

s ta

b in

the

Lab

VIE

W H

elp

for

mor

e in

form

atio

n ab

out c

omm

unic

atin

g w

ith

inst

rum

ents

.

Chap

ter 4

Hard

war

e: A

cqui

ring

Data

and

Com

mun

icat

ing

with

Inst

rum

ents

(Win

dow

s)

Getti

ng S

tarte

d w

ith L

abVI

EW4-

2ni

.com

Note

Lab

VIE

W s

uppo

rts

the

DA

Q a

nd I

nstr

umen

t I/O

Ass

ista

nts

used

in th

is c

hapt

er o

n W

indo

ws

only

. The

Ins

trum

ent D

rive

r Fi

nder

is a

vail

able

on

Win

dow

s an

d L

inux

Acqu

iring

a S

igna

l in

NI-D

AQm

xY

ou w

ill u

se th

e D

AQ

Ass

ista

nt E

xpre

ss V

I to

crea

te a

task

in N

I-D

AQ

mx.

N

I-D

AQ

mx

is a

pro

gram

min

g in

terf

ace

you

can

use

to c

omm

unic

ate

wit

h da

ta a

cqui

siti

on d

evic

es. R

efer

to th

e G

etti

ng S

tart

ed w

ith

Lab

VIE

Get

ting

Sta

rted

wit

h D

AQ

»Tak

ing

an N

I-D

AQ

mx

Mea

sure

men

t in

L

abV

IEW

boo

k on

the

Con

tent

s tab

in th

e L

abV

IEW

Hel

p fo

r inf

orm

atio

n ab

out a

dditi

onal

way

s to

cre

ate

NI-

DA

Qm

x ta

sks.

In th

e fo

llow

ing

exer

cise

s, y

ou w

ill c

reat

e an

NI-

DA

Qm

x ta

sk th

at

cont

inuo

usly

take

s a

volta

ge r

eadi

ng a

nd p

lots

the

data

on

a w

avef

orm

gr

aph.

You

can

com

plet

e th

e ex

erci

ses

in th

is c

hapt

er in

app

roxi

mat

ely

30 m

inut

es.

Crea

ting

an N

I-DAQ

mx

Task

In N

I-D

AQ

mx,

a ta

sk is

a c

olle

ctio

n of

one

or

mor

e ch

anne

ls, w

hich

co

ntai

ns ti

min

g, tr

igge

ring

, and

oth

er p

rope

rtie

s. C

once

ptua

lly, a

task

re

pres

ents

a m

easu

rem

ent o

r gen

erat

ion

you

wan

t to

perf

orm

. For

exa

mpl

e,

you

can

crea

te a

task

to m

easu

re te

mpe

ratu

re fr

om o

ne o

r mor

e ch

anne

ls o

n a

DA

Q d

evic

e.

Com

plet

e th

e fo

llow

ing

step

s to

cre

ate

and

conf

igur

e a

task

that

rea

ds a

vo

ltag

e le

vel f

rom

a D

AQ

dev

ice.

1.O

pen

a ne

w, b

lank

VI.

2.O

n th

e bl

ock

diag

ram

, dis

play

the

Fun

ctio

ns p

alet

te a

nd s

elec

t E

xpre

ss»I

nput

to d

ispl

ay th

e In

put

pale

tte.

3.Se

lect

the

DA

Q A

ssis

tant

Exp

ress

VI,

sho

wn

at le

ft, o

n th

e In

put

pale

tte

and

plac

e it

on

the

bloc

k di

agra

m. T

he D

AQ

Ass

ista

nt la

unch

es

and

the

Cre

ate

New

Exp

ress

Tas

k di

alog

box

app

ears

.

4.C

lick

Acq

uire

Sig

nals

»Ana

log

Inpu

t to

dis

play

the

Ana

log

Inpu

t op

tions

.

5.Se

lect

Vol

tage

to c

reat

e a

new

vol

tage

ana

log

inpu

t tas

k.

The

dia

log

box

disp

lays

a li

st o

f ch

anne

ls o

n ea

ch in

stal

led

DA

Q

devi

ce. T

he n

umbe

r of

cha

nnel

s li

sted

dep

ends

on

the

num

ber

of

chan

nels

you

hav

e on

the

DA

Q d

evic

e.

Page 33: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 4

Hard

war

e: A

cqui

ring

Data

and

Com

mun

icat

ing

with

Inst

rum

ents

(Win

dow

s)

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n4-

3Ge

tting

Sta

rted

with

Lab

VIEW

6.In

the

Supp

orte

d P

hysi

cal C

hann

els

list

, sel

ect t

he p

hysi

cal c

hann

el

to w

hich

the

devi

ce c

onne

cts

the

sign

al, s

uch

as a

i0, a

nd th

en c

lick

the

Fin

ish

butt

on. T

he D

AQ

Ass

ista

nt o

pens

a n

ew d

ialo

g bo

x, s

how

n in

Fi

gure

4-1,

that

dis

play

s op

tions

for

con

figu

ring

the

chan

nel y

ou

sele

cted

to c

ompl

ete

a ta

sk.

Chap

ter 4

Hard

war

e: A

cqui

ring

Data

and

Com

mun

icat

ing

with

Inst

rum

ents

(Win

dow

s)

Getti

ng S

tarte

d w

ith L

abVI

EW4-

4ni

.com

Figu

re 4

-1.

Conf

igur

ing

a Ta

sk U

sing

the

DAQ

Assi

stan

t

7.In

the

DA

Q A

ssis

tant

dia

log

box

sele

ct th

e C

onfi

gura

tion

tab

and

loca

te th

e V

olta

ge I

nput

Set

up s

ecti

on.

8.L

ocat

e th

e Se

ttin

gs ta

b. I

n th

e Si

gnal

Inp

ut R

ange

sec

tion

ente

r 10

fo

r th

e M

ax v

alue

and

ent

er -10

for

the

Min

val

ue.

Page 34: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 4

Hard

war

e: A

cqui

ring

Data

and

Com

mun

icat

ing

with

Inst

rum

ents

(Win

dow

s)

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n4-

5Ge

tting

Sta

rted

with

Lab

VIEW

9.L

ocat

e th

e T

imin

g Se

ttin

gs s

ecti

on a

t the

bot

tom

of

the

Con

figu

rati

on p

age.

Fro

m th

e A

cqui

siti

on M

ode

pull

-dow

n m

enu,

se

lect

NSa

mpl

es.

10.

Ent

er a

val

ue o

f 1000

in th

e Sa

mpl

es t

o R

ead

text

box

.

11.

Cli

ck th

e O

K b

utto

n to

sav

e th

e cu

rren

t con

figu

rati

on a

nd c

lose

the

DA

Q A

ssis

tant

. Lab

VIE

W b

uild

s th

e V

I.

12.

Save

the

VI

as Read Voltage.vi

in a

n ea

sily

acc

essi

ble

loca

tion.

Grap

hing

Dat

a fro

m a

DAQ

Dev

ice

You

can

use

the

task

you

cre

ated

in th

e pr

evio

us e

xerc

ise

to g

raph

the

data

ac

quir

ed f

rom

a D

AQ

dev

ice.

Com

plet

e th

e fo

llow

ing

step

s to

plo

t the

dat

a fr

om th

e ch

anne

l on

a w

avef

orm

gra

ph a

nd c

hang

e th

e na

me

of th

e si

gnal

.

1.O

n th

e bl

ock

diag

ram

, rig

ht-c

lick

the

data

out

put a

nd s

elec

t Cre

ate»

G

raph

Ind

icat

or f

rom

the

shor

tcut

men

u.

2.D

ispl

ay th

e fr

ont p

anel

and

run

the

VI t

hree

or f

our t

imes

. Obs

erve

the

wav

efor

m g

raph

.

Voltage

app

ears

in th

e pl

ot le

gend

at t

he to

p of

the

wav

efor

m g

raph

.

3.O

n th

e bl

ock

diag

ram

, rig

ht-c

lick

the

DA

Q A

ssis

tant

Exp

ress

VI

and

sele

ct P

rope

rtie

s fr

om th

e sh

ortc

ut m

enu

to o

pen

the

DA

Q A

ssis

tant

.

4.R

ight

-clic

k V

olta

ge in

the

list

of c

hann

els

and

sele

ct R

enam

e fr

om th

e sh

ortc

ut m

enu

to d

ispl

ay th

e R

enam

e a

chan

nel o

r ch

anne

ls d

ialo

g bo

x.

Tip

You

als

o ca

n se

lect

the

nam

e of

the

chan

nel a

nd p

ress

the

<F2

> k

ey to

dis

play

the

Ren

ame

a ch

anne

l or

chan

nels

dia

log

box.

5.In

the

New

Nam

e te

xt b

ox, e

nter

First Voltage Reading

, and

cl

ick

the

OK

but

ton.

6.In

the

DA

Q A

ssis

tant

dia

log

box,

cli

ck th

e O

K b

utto

n to

sav

e th

e cu

rren

t con

figu

rati

on a

nd c

lose

the

DA

Q A

ssis

tant

.

7.D

ispl

ay th

e fr

ont p

anel

and

run

the

VI.

First Voltage Reading

app

ears

in th

e w

avef

orm

gra

ph p

lot

lege

nd.

8.Sa

ve th

e V

I.

Chap

ter 4

Hard

war

e: A

cqui

ring

Data

and

Com

mun

icat

ing

with

Inst

rum

ents

(Win

dow

s)

Getti

ng S

tarte

d w

ith L

abVI

EW4-

6ni

.com

Editi

ng a

n NI

-DAQ

mx

Task

You

can

add

a c

hann

el to

the

task

so

you

can

com

pare

two

sepa

rate

vol

tage

re

adin

gs. Y

ou a

lso

can

cust

omiz

e th

e ta

sk to

acq

uire

the

volt

age

read

ings

co

ntin

uous

ly.

Com

plet

e th

e fo

llow

ing

step

s to

add

a n

ew c

hann

el to

the

task

and

acq

uire

da

ta c

ontin

uous

ly.

1.In

the

bloc

k di

agra

m w

indo

w, d

oubl

e-cl

ick

the

DA

Q A

ssis

tant

Exp

ress

V

I to

ope

n th

e D

AQ

Ass

ista

nt.

2.C

lick

the

Add

Cha

nnel

s bu

tton

, sho

wn

at le

ft, a

nd s

elec

t Vol

tage

to

disp

lay

the

Add

Cha

nnel

s T

o T

ask

dial

og b

ox.

3.Se

lect

any

unu

sed

phys

ical

cha

nnel

in th

e Su

ppor

ted

Phy

sica

l C

hann

els

list

, and

cli

ck th

e O

K b

utto

n to

retu

rn to

the

DA

Q A

ssis

tant

.

4.R

enam

e th

e ch

anne

l Second Voltage Reading

.

5.In

the

Tim

ing

Sett

ings

sec

tion

of

the

Con

figu

rati

on p

age,

sel

ect

Con

tinu

ous

Sam

ples

fro

m th

e A

cqui

siti

on M

ode

pull-

dow

n m

enu.

Whe

n yo

u se

t tim

ing

and

trig

geri

ng o

ptio

ns in

the

DA

Q A

ssis

tant

, th

ese

opti

ons

appl

y to

all

the

chan

nels

in th

e li

st o

f ch

anne

ls.

6.C

lick

the

OK

but

ton

to s

ave

the

curr

ent c

onfi

gura

tion

and

clo

se

the

DA

Q A

ssis

tant

. The

Con

firm

Aut

o L

oop

Cre

atio

n di

alog

box

ap

pear

s.

7.C

lick

the

Yes

but

ton.

Lab

VIE

W p

lace

s a

Whi

le L

oop

arou

nd th

e D

AQ

A

ssis

tant

Exp

ress

VI

and

the

grap

h in

dica

tor

on th

e bl

ock

diag

ram

. A

sto

p bu

tton

appe

ars

wir

ed to

the

stop

inpu

t of

the

DA

Q A

ssis

tant

E

xpre

ss V

I. T

he s

topp

ed o

utpu

t of

the

Exp

ress

VI

is w

ired

to th

e co

ndit

iona

l ter

min

al o

f th

e W

hile

Loo

p. T

he b

lock

dia

gram

sho

uld

appe

ar s

imil

ar to

Fig

ure

4-2.

Figu

re 4

-2.

Bloc

k Di

agra

m o

f the

Rea

d Vo

ltage

VI

If a

n er

ror o

ccur

s or

you

cli

ck th

e st

op b

utto

n w

hile

the

VI

is r

unni

ng,

the

DA

Q A

ssis

tant

Exp

ress

VI

stop

s re

adin

g da

ta a

nd th

e st

oppe

d ou

tput

ret

urns

a T

RU

E v

alue

and

sto

ps th

e W

hile

Loo

p.

Page 35: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 4

Hard

war

e: A

cqui

ring

Data

and

Com

mun

icat

ing

with

Inst

rum

ents

(Win

dow

s)

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n4-

7Ge

tting

Sta

rted

with

Lab

VIEW

Visu

ally

Com

parin

g Tw

o Vo

ltage

Rea

ding

sB

ecau

se y

ou h

ave

two

volt

age

read

ings

dis

play

ed o

n a

grap

h, y

ou c

an

cust

omiz

e th

e pl

ots

to d

istin

guis

h be

twee

n th

e tw

o.

Com

plet

e th

e fo

llow

ing

step

s to

cus

tom

ize

the

plot

col

or o

f the

fron

t pan

el

wav

efor

m g

raph

.

1.E

xpan

d th

e pl

ot le

gend

of

the

wav

efor

m g

raph

to d

ispl

ay tw

o pl

ots.

2.R

un th

e V

I.

Two

plot

s ap

pear

on

the

grap

h an

d th

e pl

ot le

gend

dis

play

s bo

th p

lot

nam

es.

3.C

lick

the

icon

that

is to

the

righ

t of

Fir

st V

olta

ge R

eadi

ng in

the

plot

le

gend

and

sel

ect C

olor

fro

m th

e sh

ortc

ut m

enu.

Usi

ng th

e co

lor

pick

er, s

elec

t a c

olor

, suc

h as

yel

low

, so

the

plot

is e

asy

to r

ead.

4.C

hang

e th

e pl

ot c

olor

of

Seco

nd V

olta

ge R

eadi

ng.

5.St

op th

e V

I.

6.Sa

ve th

e V

I.

7.C

lose

the

VI.

The

Get

ting

Sta

rted

win

dow

ope

ns.

Com

mun

icat

ing

with

an

Inst

rum

ent:

Usin

g In

stru

men

t Dr

iver

s an

d th

e In

stru

men

t I/O

Ass

ista

ntA

n in

stru

men

t dri

ver

is a

set

of

soft

war

e ro

utin

es th

at c

ontr

ol a

pr

ogra

mm

able

inst

rum

ent.

Eac

h ro

utin

e co

rres

pond

s to

a p

rogr

amm

atic

op

erat

ion

such

as

conf

igur

ing,

rea

ding

fro

m, w

ritin

g to

, and

trig

geri

ng th

e in

stru

men

t. In

stru

men

t dri

vers

sim

plif

y in

stru

men

t con

trol

and

red

uce

test

pr

ogra

m d

evel

opm

ent t

ime

by e

lim

inat

ing

the

need

to le

arn

the

prog

ram

min

g pr

otoc

ol f

or e

ach

inst

rum

ent.

Use

an

inst

rum

ent d

rive

r fo

r in

stru

men

t con

trol

whe

n po

ssib

le. N

atio

nal I

nstr

umen

ts p

rovi

des

thou

sand

s of

inst

rum

ent d

rive

rs f

or a

wid

e va

riet

y of

inst

rum

ents

.

In th

e fo

llow

ing

exer

cise

s, y

ou w

ill u

se in

stru

men

t dri

vers

and

the

Inst

rum

ent I

/O A

ssis

tant

to c

omm

unic

ate

wit

h an

inst

rum

ent.

You

mus

t ha

ve in

stru

men

t ins

talle

d to

ful

ly c

ompl

ete

the

follo

win

g ex

erci

ses.

Note

The

se e

xerc

ises

ref

er to

trad

ition

al, t

hird

-par

ty in

stru

men

ts. R

efer

to ni.com/

modularinstruments

for

mor

e in

form

atio

n ab

out c

omm

unic

atin

g w

ith N

Im

odul

ar

inst

rum

ents

.

Chap

ter 4

Hard

war

e: A

cqui

ring

Data

and

Com

mun

icat

ing

with

Inst

rum

ents

(Win

dow

s)

Getti

ng S

tarte

d w

ith L

abVI

EW4-

8ni

.com

Getti

ng S

tarte

d w

ith th

e In

stru

men

t Driv

er F

inde

rU

se th

e N

I In

stru

men

t Dri

ver

Find

er to

sea

rch

for

and

inst

all L

abV

IEW

Pl

ug a

nd P

lay

inst

rum

ent d

rive

rs w

itho

ut le

avin

g th

e L

abV

IEW

de

velo

pmen

t env

iron

men

t.

Tip

You

als

o ca

n vi

sit t

he N

I In

stru

men

t Dri

ver

Net

wor

k at

ni.com/idnet

to f

ind

a dr

iver

for

an

inst

rum

ent,

requ

est a

dri

ver

for

an in

stru

men

t, an

d re

ad h

elpf

ul a

rtic

les

and

tuto

rial

s ab

out u

sing

inst

rum

ent d

rive

rs.

Com

plet

e th

e fo

llow

ing

step

s to

laun

ch a

nd c

onfi

gure

the

NI

Inst

rum

ent

Dri

ver

Find

er.

1.Fr

om th

e G

etti

ng S

tart

ed w

indo

w, s

elec

t Fin

d In

stru

men

t D

rive

rs

to la

unch

the

Inst

rum

ent D

rive

r Fi

nder

. You

als

o ca

n la

unch

the

Inst

rum

ent D

rive

r Fi

nder

by

sele

ctin

g H

elp»

Fin

d In

stru

men

t D

rive

rs o

r T

ools

»Ins

trum

enta

tion

»Fin

d In

stru

men

t D

rive

rs.

2.C

lick

the

Log

in b

utto

n to

sig

n-in

usi

ng y

our N

I.co

m p

rofi

le. I

f you

do

not h

ave

an ni.com

pro

file

, ski

p to

ste

p 4.

3.If

you

alr

eady

hav

e an

ni.com

prof

ile, e

nter

you

r em

ail a

ddre

ss a

nd

pass

wor

d an

d cl

ick

the

Log

in b

utto

n.

4.If

you

do

not h

ave

an ni.com

pro

file

, sel

ect t

he N

o, I

nee

d to

cre

ate

a pr

ofile

opt

ion

and

clic

k th

e C

reat

e P

rofi

le b

utto

n. T

his

acti

on

laun

ches

a b

row

ser

win

dow

whe

re y

ou c

an c

reat

e an

ni.com

pro

file

. A

fter

you

cre

ate

a pr

ofile

, ret

urn

to th

e In

stru

men

t Dri

ver

Fin

der

win

dow

and

logi

n w

ith y

our

new

info

rmat

ion.

You

are

now

read

y to

sea

rch

for,

inst

all,

and

use

inst

rum

ent d

rive

rs w

ith

the

Inst

rum

ent D

rive

r Fi

nder

.

Find

ing

and

Inst

allin

g In

stru

men

t Driv

ers

Com

plet

e th

e fo

llow

ing

step

s to

sea

rch

for

and

inst

all a

n in

stru

men

t dri

ver

usin

g th

e In

stru

men

t Dri

ver

Find

er.

1.O

n th

e C

onfi

gure

Sea

rch

page

, cli

ck th

e Sc

an f

or I

nstr

umen

ts

butt

on. T

his

acti

on p

rom

pts

the

NI

Inst

rum

ent D

rive

r Fi

nder

to s

earc

h fo

r co

nnec

ted

inst

rum

ents

. All

res

ults

dis

play

und

er th

e C

onne

cted

In

stru

men

ts f

olde

r in

the

left

-han

d si

deba

r. If

you

do

not c

urre

ntly

ha

ve a

n in

stru

men

t con

nect

ed, t

he In

stru

men

t Dri

ver F

inde

r wil

l ret

urn

a re

sult

that

rea

ds <

no c

onne

cted

inst

rum

ent

dete

cted

>.

2.E

xpan

d th

e C

onne

cted

Ins

trum

ents

fol

der

to d

ispl

ay th

e se

arch

re

sult

s an

d se

lect

an

inst

rum

ent f

rom

the

list

.

Page 36: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 4

Hard

war

e: A

cqui

ring

Data

and

Com

mun

icat

ing

with

Inst

rum

ents

(Win

dow

s)

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n4-

9Ge

tting

Sta

rted

with

Lab

VIEW

3.Se

lect

a m

anuf

actu

rer

from

the

Man

ufac

ture

r pu

ll-do

wn

men

u, a

nd

ente

r an

y ke

ywor

ds in

the

Add

itio

nal K

eyw

ords

sec

tion.

The

n cl

ick

the

Sear

ch b

utto

n.

A li

st o

f av

aila

ble

inst

rum

ent d

rive

rs a

ppea

rs o

n th

e Se

arch

Res

ults

pa

ge. T

he d

rive

r re

sult

for

the

mos

t rec

ent v

ersi

on o

f L

abV

IEW

ap

pear

s fi

rst i

n th

e li

st.

If y

our

sear

ch d

oes

not r

etur

n an

y re

sult

s, a

sid

ebar

wit

h se

arch

tips

ap

pear

s. R

efer

to th

e ID

Net

Web

site

at ni.com/idnet

for

mor

e in

form

atio

n ab

out s

earc

hing

for

inst

rum

ent d

rive

rs.

Note

The

NI

Inst

rum

ent D

rive

r Fi

nder

dis

play

s dr

iver

s on

ly f

or L

abV

IEW

7.0.

or

late

r. If

you

nee

d to

dow

nloa

d an

old

er v

ersi

on o

f an

inst

rum

ent d

rive

r, go

to th

e ID

Net

Web

site

at

ni.com/idnet

to s

earc

h fo

r an

d do

wnl

oad

inst

rum

ent d

rive

rs c

ompa

tibl

e w

ith

olde

r ve

rsio

ns o

f L

abV

IEW

.

4.Se

lect

the

driv

er y

ou w

ant t

o in

stal

l and

then

cli

ck th

e In

stal

l but

ton.

Aft

er th

e dr

iver

dow

nloa

ds s

ucce

ssfu

lly, t

he D

ownl

oad

Succ

ess

win

dow

dis

play

s. T

his

win

dow

con

tain

s op

tion

s fo

r ex

plor

ing

and

usin

g th

e ne

w d

rive

r. A

fter

dow

nloa

ding

, the

new

dri

ver

also

app

ears

in

the

Con

figu

re S

earc

h pa

ge u

nder

the

Inst

alle

d In

stru

men

t Dri

ver

fold

er.

5.C

lose

the

Dow

nloa

d Su

cces

s w

indo

w to

ret

urn

to th

e C

onfi

gure

Se

arch

win

dow

.

Note

You

als

o ca

n cr

eate

you

r ow

n in

stru

men

t dri

vers

. Ref

er to

the

Con

trol

ling

Inst

rum

ents

»Usi

ng I

nstr

umen

t Dri

vers

boo

k on

the

Con

tent

s ta

b in

the

Lab

VIE

W H

elp

for

mor

e in

form

atio

n ab

out c

reat

ing

inst

rum

ent d

rive

rs.

Usin

g In

stru

men

t Driv

ers

Aft

er in

stal

ling

an

inst

rum

ent d

rive

r, y

ou c

an e

xplo

re e

xam

ple

prog

ram

s to

le

arn

mor

e ab

out u

sing

the

inst

rum

ent d

rive

r.

1.D

oubl

e-cl

ick

the

new

ly in

stal

led

inst

rum

ent d

rive

r in

the

Inst

alle

d In

stru

men

t D

rive

r fo

lder

to d

ispl

ay th

e St

art

Usi

ng I

nstr

umen

t D

rive

r pa

ge.

2.T

he S

tart

Usi

ng I

nstr

umen

t D

rive

r pa

ge a

llow

s yo

u to

exp

lore

and

cu

stom

ize

the

new

dri

ver.

The

foll

owin

g ar

e re

com

men

dati

ons

to h

elp

you

star

t usi

ng th

e ne

w d

rive

r.

•To

vie

w th

e ne

w d

rive

r in

the

Pro

ject

Exp

lore

r w

indo

w, c

lick

the

Ope

n P

roje

ct b

utto

n. I

n th

e P

roje

ct E

xplo

rer

win

dow

, you

can

ex

plor

e th

e V

Is, f

olde

rs, a

nd s

uppl

emen

tal f

iles

that

mak

e up

the

Chap

ter 4

Hard

war

e: A

cqui

ring

Data

and

Com

mun

icat

ing

with

Inst

rum

ents

(Win

dow

s)

Getti

ng S

tarte

d w

ith L

abVI

EW4-

10ni

.com

driv

er. Y

ou a

lso

can

acce

ss th

e dr

iver

rea

dme

file

in th

e P

roje

ct

Exp

lore

r w

indo

w.

•To

vie

w th

e dr

iver

’s p

alet

te, c

lick

the

Ope

n P

alet

te b

utto

n. F

rom

th

e pa

lett

e, y

ou c

an s

elec

t and

add

the

driv

er V

Is to

the

fron

t pan

el

and

the

bloc

k di

agra

m.

•To

vie

w a

n ex

ampl

e pr

ogra

m, d

oubl

e-cl

ick

on th

e li

sted

exa

mpl

e pr

ogra

ms

in th

e E

xam

ples

sec

tion

of t

he S

tart

Usi

ng In

stru

men

t D

rive

r pa

ge.

Note

Not

all

dri

vers

hav

e al

l opt

ions

ava

ilab

le. F

or e

xam

ple,

if a

dri

ver

does

not

hav

e a

proj

ect f

ile,

the

Ope

n P

roje

ct b

utto

n ap

pear

s di

mm

ed. R

efer

to th

e ID

Net

Web

site

at

ni.com/idnet

for

mor

e in

form

atio

n ab

out a

ll in

stru

men

t dri

vers

.

Sele

ctin

g an

Inst

rum

ent U

sing

the

Inst

rum

ent I

/O A

ssis

tant

If a

dri

ver i

s no

t ava

ilab

le fo

r an

inst

rum

ent,

you

can

use

the

Inst

rum

entI

/O

Ass

ista

nt E

xpre

ss V

I to

com

mun

icat

e w

ith

the

inst

rum

ent.

Note

You

mus

t hav

e th

e In

stru

men

t I/O

Ass

ista

nt in

stal

led

to u

se th

e In

stru

men

t I/O

A

ssis

tant

Exp

ress

VI.

You

inst

all t

he I

nstr

umen

t I/O

Ass

ista

nt f

rom

the

Nat

iona

l In

stru

men

ts D

evic

e D

rive

rs C

D.

Com

plet

e th

e fo

llow

ing

step

s to

use

the

Inst

rum

ent I

/O A

ssis

tant

Exp

ress

V

I to

sel

ect a

n in

stru

men

t.

1.T

urn

on th

e in

stru

men

t you

wan

t to

use.

The

inst

rum

ent m

ust b

e po

wer

ed o

n to

use

the

Inst

rum

ent I

/O A

ssis

tant

Exp

ress

VI.

2.O

pen

a ne

w V

I an

d di

spla

y th

e fr

ont p

anel

win

dow

.

3.Fr

om th

e In

put p

alet

te, s

elec

t the

Inst

rum

ent I

/O A

ssis

tant

Exp

ress

VI

and

add

it to

the

bloc

k di

agra

m. T

he I

nstr

umen

t I/O

Ass

ista

nt d

ialo

g bo

x ap

pear

s.

4.If

the

help

is n

ot v

isib

le to

the

righ

t of

the

dial

og b

ox, c

lick

the

Show

H

elp

butt

on, s

how

n at

left

, in

the

uppe

r rig

ht c

orne

r of t

he I

nstr

umen

t I/

O A

ssis

tant

dia

log

box.

The

hel

p ap

pear

s to

the

righ

t of

the

dial

og b

ox. T

he to

p he

lp w

indo

w

cont

ains

how

-to

info

rmat

ion

abou

t usi

ng th

e In

stru

men

t I/O

Ass

ista

nt.

The

bot

tom

hel

p w

indo

w p

rovi

des

cont

ext-

sens

itiv

e he

lp a

bout

co

mpo

nent

s in

the

dial

og b

ox.

5.C

lick

the

Sele

ct I

nstr

umen

t li

nk in

the

top

help

win

dow

and

fol

low

th

e in

stru

ctio

ns in

the

help

win

dow

to s

elec

t the

inst

rum

ent w

ith w

hich

yo

u w

ant t

o co

mm

unic

ate.

Page 37: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 4

Hard

war

e: A

cqui

ring

Data

and

Com

mun

icat

ing

with

Inst

rum

ents

(Win

dow

s)

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n4-

11Ge

tting

Sta

rted

with

Lab

VIEW

6.If

nec

essa

ry, c

onfi

gure

the

prop

erti

es o

f th

e in

stru

men

t.

7.If

you

wan

t to

min

imiz

e th

e he

lp w

indo

w, c

lick

the

Hid

e H

elp

butt

on,

show

n at

left

, in

the

uppe

r ri

ght c

orne

r of

the

Inst

rum

ent

I/O

A

ssis

tant

dia

log

box.

Acqu

iring

and

Par

sing

Info

rmat

ion

for a

n In

stru

men

tA

fter

you

sel

ect t

he in

stru

men

t, yo

u ca

n se

nd c

omm

ands

to th

e in

stru

men

t to

ret

riev

e da

ta. I

n th

is e

xerc

ise,

you

will

lear

n to

use

the

Inst

rum

ent I

/O

Ass

ista

nt E

xpre

ss V

I to

acqu

ire

and

pars

e id

entif

icat

ion

info

rmat

ion

for a

n in

stru

men

t.

Com

plet

e th

e fo

llow

ing

step

s to

com

mun

icat

e w

ith th

e in

stru

men

t.

1.In

the

Inst

rum

ent

I/O

Ass

ista

nt d

ialo

g bo

x, c

lick

the

Add

Ste

p bu

tton

and

cli

ck th

e Q

uery

and

Par

se s

tep.

2.E

nter

*IDN?

in th

e E

nter

a c

omm

and

text

box

.

*IDN?

is a

que

ry th

at m

ost i

nstr

umen

ts r

ecog

nize

. The

res

pons

e is

an

iden

tifi

cati

on n

umbe

r st

ring

that

des

crib

es th

e in

stru

men

t. If

the

inst

rum

ent d

oes

not a

ccep

t thi

s co

mm

and,

ref

er to

the

refe

renc

e m

anua

l for

the

inst

rum

ent f

or a

list

of

com

man

ds th

e in

stru

men

t doe

s ac

cept

.

3.C

lick

the

Run

thi

s st

ep b

utto

n sh

own

at le

ft.

The

Ins

trum

ent I

/O A

ssis

tant

sen

ds th

e co

mm

and

to th

e in

stru

men

t, an

d th

e in

stru

men

t ret

urns

its

iden

tific

atio

n in

form

atio

n.

4.Se

lect

ASC

II o

nly

from

the

pull

-dow

n m

enu

belo

w th

e B

yte

inde

x co

lum

n of

the

resp

onse

win

dow

to p

arse

the

inst

rum

ent n

ame

as a

n A

SC

II s

trin

g. Y

ou a

lso

can

use

the

Inst

rum

ent I

/O A

ssis

tant

to p

arse

A

SCII

num

bers

and

bin

ary

data

.

5.C

lick

the

Par

sing

hel

p bu

tton,

sho

wn

at le

ft, i

n th

e In

stru

men

t I/

O

Ass

ista

nt d

ialo

g bo

x to

dis

play

info

rmat

ion

abou

t par

sing

dat

a.

6.In

the

ASC

II r

epre

sent

atio

n co

lum

n of

the

resp

onse

win

dow

, cli

ck

the

valu

e yo

u w

ant t

o pa

rse.

7.E

nter

a n

ame

for

the

toke

n, o

r pa

rsed

dat

a se

lect

ion,

in th

e T

oken

na

me

text

box

.

The

nam

e th

at y

ou e

nter

ed in

the

Tok

en n

ame

text

box

is th

e ou

tput

of

the

Inst

rum

ent I

/O A

ssis

tant

Exp

ress

VI,

sho

wn

at le

ft.

Chap

ter 4

Hard

war

e: A

cqui

ring

Data

and

Com

mun

icat

ing

with

Inst

rum

ents

(Win

dow

s)

Getti

ng S

tarte

d w

ith L

abVI

EW4-

12ni

.com

Wiri

ng a

Com

man

d to

an

Inst

rum

ent

Aft

er y

ou a

cqui

re d

ata

from

the

inst

rum

ent,

you

can

add

an in

put p

aram

eter

to

an

inst

rum

ent c

omm

and.

The

par

amet

er b

ecom

es a

n in

put t

o th

e V

I or

fu

nctio

n.

Com

plet

e th

e fo

llow

ing

step

s to

add

a p

aram

eter

to a

com

man

d.

1.C

lick

the

Add

Ste

p bu

tton

and

clic

k th

e W

rite

ste

p.

2.E

nter

*IDN?

in th

e E

nter

a c

omm

and

text

box

.

3.H

ighl

ight

the

com

man

d in

the

Ent

er a

com

man

d te

xt b

ox a

nd c

lick

the

Add

par

amet

er b

utto

n to

add

a p

aram

eter

to th

e co

mm

and.

4.E

nter

a d

efau

lt va

lue

for

the

para

met

er in

the

Tes

t va

lue

text

box

.

5.E

nter

a n

ame

for

the

para

met

er in

the

Par

amet

er n

ame

text

box

. You

us

e th

is n

ame

to r

efer

ence

the

para

met

er in

the

appl

icat

ion.

6.C

lick

the

OK

but

ton

to s

ave

the

curr

ent c

onfi

gura

tion

and

clo

se th

e In

stru

men

t I/

O A

ssis

tant

dia

log

box.

Sum

mar

yT

he f

ollo

win

g to

pics

are

a s

umm

ary

of th

e m

ain

conc

epts

you

lear

ned

in

this

cha

pter

.

DAQ

Assi

stan

t Exp

ress

VI

You

can

use

the

DA

Q A

ssis

tant

Exp

ress

VI

to in

tera

ctiv

ely

buil

d m

easu

rem

ent c

hann

els

or ta

sks.

Add

the

DA

Q A

ssis

tant

Exp

ress

VI

to th

e bl

ock

diag

ram

to c

onfi

gure

ch

anne

ls a

nd ta

sks

for

use

wit

h N

I-D

AQ

mx

for

data

acq

uisi

tion

. N

I-D

AQ

mx

is a

pro

gram

min

g in

terf

ace

you

can

use

to c

omm

unic

ate

wit

h da

ta a

cqui

siti

on d

evic

es. Y

ou c

an u

se th

e D

AQ

Ass

ista

nt E

xpre

ss V

I to

co

ntro

l dev

ices

sup

port

ed b

y N

I-D

AQ

mx.

Ref

er to

the

Get

ting

Sta

rted

wit

h L

abV

IEW

»Get

ting

Sta

rted

wit

h D

AQ

»Tak

ing

an N

I-D

AQ

mx

Mea

sure

men

t in

Lab

VIE

W b

ook

on th

e C

onte

nts

tab

in th

e L

abV

IEW

Hel

p fo

r in

form

atio

n ab

out t

he D

AQ

A

ssis

tant

.

Page 38: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 4

Hard

war

e: A

cqui

ring

Data

and

Com

mun

icat

ing

with

Inst

rum

ents

(Win

dow

s)

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n4-

13Ge

tting

Sta

rted

with

Lab

VIEW

Ref

er to

the

NI-

DA

Q R

eadm

e fo

r in

form

atio

n ab

out d

evic

es s

uppo

rted

by

NI-

DA

Qm

x. I

f N

I-D

AQ

mx

does

not

sup

port

the

devi

ce y

ou w

ant t

o us

e,

refe

r to

the

Tak

ing

Mea

sure

men

ts b

ook

on th

e C

onte

nts

tab

in th

e L

abV

IEW

Hel

p fo

r in

form

atio

n ab

out u

sing

Tra

ditio

nal N

I-D

AQ

(L

egac

y)

for

data

acq

uisi

tion.

Task

s in

NI-D

AQm

x In N

I-D

AQ

mx,

a ta

sk is

a c

olle

ctio

n of

one

or

mor

e vi

rtua

l cha

nnel

s w

ith

timin

g, tr

igge

ring

, and

oth

er p

rope

rtie

s. C

once

ptua

lly, a

task

rep

rese

nts

a m

easu

rem

ent o

r ge

nera

tion

you

wan

t to

perf

orm

.

For e

xam

ple,

you

can

con

figur

e a

colle

ctio

n of

cha

nnel

s fo

r ana

log

inpu

t op

erat

ions

. Aft

er y

ou c

reat

e a

task

, you

can

acc

ess

the

sing

le ta

sk in

stea

d of

co

nfig

urin

g th

e ch

anne

ls in

divi

dual

ly to

per

form

ana

log

inpu

t ope

ratio

ns. A

fter

yo

u cr

eate

a ta

sk, y

ou c

an a

dd o

r rem

ove

chan

nels

from

that

task

.

Ref

er to

the

Tak

ing

Mea

sure

men

ts b

ook

on th

e C

onte

nts

tab

in th

e L

abV

IEW

Hel

p fo

r m

ore

info

rmat

ion

abou

t cha

nnel

s an

d ta

sks.

Inst

rum

ent D

river

s Use

the

NI

Inst

rum

ent D

rive

r Fi

nder

to s

earc

h fo

r an

d in

stal

l Lab

VIE

W

Plug

and

Pla

y in

stru

men

t dri

vers

wit

hout

leav

ing

the

Lab

VIE

W

deve

lopm

ent e

nvir

onm

ent.

An

inst

rum

ent d

rive

r is

a s

et o

f so

ftw

are

rout

ines

that

con

trol

a

prog

ram

mab

le in

stru

men

t. E

ach

rout

ine

corr

espo

nds

to a

pro

gram

mat

ic

oper

atio

n su

ch a

s co

nfig

urin

g, r

eadi

ng f

rom

, wri

ting

to, a

nd tr

igge

ring

the

inst

rum

ent.

Use

an

inst

rum

ent d

rive

r for

inst

rum

ent c

ontr

ol w

hen

poss

ible

. N

atio

nal I

nstr

umen

ts p

rovi

des

thou

sand

s of

inst

rum

ent d

rive

rs f

or a

wid

e va

riet

y of

inst

rum

ents

.

Ref

er to

the

Con

trol

ling

Inst

rum

ents

»Usi

ng I

nstr

umen

t D

rive

rs b

ook

on th

e C

onte

nts

tab

in th

e L

abV

IEW

Hel

p fo

r m

ore

info

rmat

ion

abou

t the

In

stru

men

t Dri

ver

Find

er.

You

als

o ca

n vi

sit t

he N

I In

stru

men

t Dri

ver

Net

wor

k at

ni.com/idnet

to

find

a d

rive

r fo

r an

inst

rum

ent,

or y

ou c

an c

reat

e yo

ur o

wn

inst

rum

ent

driv

ers.

Ref

er to

the

Con

trol

ling

Inst

rum

ents

»Usi

ng In

stru

men

t Dri

vers

bo

ok o

n th

e C

onte

nts t

ab in

the

Lab

VIE

W H

elp

for m

ore

info

rmat

ion

abou

t cr

eati

ng in

stru

men

t dri

vers

.

Chap

ter 4

Hard

war

e: A

cqui

ring

Data

and

Com

mun

icat

ing

with

Inst

rum

ents

(Win

dow

s)

Getti

ng S

tarte

d w

ith L

abVI

EW4-

14ni

.com

Inst

rum

ent I

/O A

ssis

tant

Exp

ress

VI

If a

dri

ver i

s no

t ava

ilab

le fo

r an

inst

rum

ent,

you

can

use

the

Inst

rum

entI

/O

Ass

ista

nt E

xpre

ss V

I to

com

mun

icat

e w

ith

the

inst

rum

ent.

You

can

use

the

Inst

rum

ent I

/O A

ssis

tant

to c

omm

unic

ate

wit

h m

essa

ge-b

ased

inst

rum

ents

an

d gr

aphi

call

y pa

rse

the

resp

onse

. Sta

rt th

e In

stru

men

tI/O

Ass

ista

nt b

y ad

ding

the

Inst

rum

entI

/O A

ssis

tant

Exp

ress

VI t

o th

e bl

ock

diag

ram

or b

y do

uble

-clic

king

the

Inst

rum

entI

/O A

ssis

tant

Exp

ress

VI i

con

on th

e bl

ock

diag

ram

.

Ref

er to

the

Inst

rum

ent I

/O A

ssis

tant

Hel

p fo

r in

form

atio

n ab

out

com

mun

icat

ing

wit

h an

ext

erna

l dev

ice.

Dis

play

the

Inst

rum

ent I

/O

Ass

ista

nt H

elp

by c

licki

ng th

e Sh

ow H

elp

butt

on in

the

Inst

rum

ent

I/O

A

ssis

tant

dia

log

box.

Page 39: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n5-

1Ge

tting

Sta

rted

with

Lab

VIEW5

Usin

g Ot

her L

abVI

EW F

eatu

res

The

pre

viou

s ch

apte

rs in

this

man

ual i

ntro

duce

you

to m

ost o

f th

e L

abV

IEW

fea

ture

s yo

u ne

ed to

bui

ld c

omm

on m

easu

rem

ent a

pplic

atio

ns.

As

you

fam

ilia

rize

you

rsel

f w

ith

the

Lab

VIE

W e

nvir

onm

ent,

you

mig

ht

find

that

you

nee

d to

enh

ance

VIs

or t

hat y

ou n

eed

mor

e fi

ne-t

uned

con

trol

of

the

proc

esse

s th

e V

Is p

erfo

rm. T

his

chap

ter

intr

oduc

es y

ou to

som

e of

th

e co

ncep

ts y

ou s

houl

d be

fam

ilia

r wit

h as

you

sta

rt u

sing

oth

er L

abV

IEW

fe

atur

es. R

efer

to th

e F

unda

men

tals

boo

k on

the

Con

tent

s ta

b in

the

Lab

VIE

W H

elp

for

mor

e in

form

atio

n ab

out t

hese

con

cept

s. T

he C

once

pts

book

s co

ntai

n in

form

atio

n ab

out L

abV

IEW

pro

gram

min

g co

ncep

ts, a

nd

the

How

-To

book

s co

ntai

n st

ep-b

y-st

ep in

stru

ctio

ns f

or u

sing

Lab

VIE

W.

All C

ontro

ls a

nd In

dica

tors

The

con

trol

s an

d in

dica

tors

loca

ted

on th

e E

xpre

ss s

ubpa

lett

e of

the

Con

trol

s pa

lett

e ar

e a

subs

et o

f th

e co

mpl

ete

set o

f bu

ilt-

in c

ontr

ols

and

indi

cato

rs a

vail

able

in L

abV

IEW

. On

othe

r sub

pale

ttes

you

can

find

all

the

cont

rols

and

indi

cato

rs th

at y

ou c

an u

se to

cre

ate

the

fron

t pan

el. H

owev

er,

subp

alet

tes

othe

r th

an th

e E

xpre

ss s

ubpa

lett

e ca

tego

rize

con

trol

s an

d in

dica

tors

by

func

tiona

lity

inst

ead

of h

avin

g a

subp

alet

te fo

r con

trol

s an

d a

subp

alet

te f

or in

dica

tors

.

For

exam

ple,

the

top

leve

l of

the

Exp

ress

sub

pale

tte

has

a N

umer

ic

Con

trol

s sub

pale

tte

and

a N

umer

ic In

dica

tors

subp

alet

te. O

n th

e M

oder

n an

d C

lass

ic s

ubpa

lett

es, t

hese

con

trol

s an

d in

dica

tors

are

loca

ted

on th

e N

umer

ic s

ubpa

lett

e be

caus

e th

ey a

re a

ll n

umer

ic o

bjec

ts.

Cli

ck th

e V

iew

but

ton

on th

e pi

nned

Con

trol

s pa

lett

e an

d se

lect

Cha

nge

Vis

ible

Cat

egor

ies

from

the

shor

tcut

men

u to

dis

play

the

Cha

nge

Vis

ible

C

ateg

orie

s di

alog

box

. The

n pl

ace

chec

kmar

ks in

the

chec

kbox

es n

ext t

o th

e ca

tego

ries

you

wan

t to

view

on

the

Con

trol

s pa

lett

e.

Ref

er to

the

Fun

dam

enta

ls»B

uild

ing

the

Fro

nt P

anel

boo

k on

the

Con

tent

s ta

b in

the

Lab

VIE

W H

elp

for

mor

e in

form

atio

n ab

out u

sing

the

com

plet

e se

t of

built

-in

cont

rols

and

indi

cato

rs a

vaila

ble

in L

abV

IEW

.

Chap

ter 5

Usin

g Ot

her L

abVI

EW F

eatu

res

Getti

ng S

tarte

d w

ith L

abVI

EW5-

2ni

.com

All V

Is a

nd F

unct

ions

The

Exp

ress

VIs

and

str

uctu

res

loca

ted

on th

e E

xpre

ss s

ubpa

lette

of

the

Fun

ctio

ns p

alet

te a

re a

sm

all s

ubse

t of

the

com

plet

e se

t of

buil

t-in

VIs

, fu

ncti

ons,

and

str

uctu

res

avai

labl

e in

Lab

VIE

W.

Clic

k th

e V

iew

but

ton

on th

e pi

nned

Fun

ctio

ns p

alet

te a

nd s

elec

t Cha

nge

Vis

ible

Cat

egor

ies

from

the

shor

tcut

men

u to

dis

play

the

Cha

nge

Vis

ible

C

ateg

orie

s di

alog

box

. The

n pl

ace

chec

kmar

ks in

the

chec

kbox

es n

ext t

o th

e ca

tego

ries

you

wan

t to

view

on

the

Fun

ctio

ns p

alet

te.

Lab

VIE

W u

ses

colo

red

icon

s to

dis

ting

uish

bet

wee

n fu

ncti

ons,

VIs

, and

E

xpre

ss V

Is. I

cons

for f

unct

ions

hav

e pa

le y

ello

w b

ackg

roun

ds, m

ost i

cons

fo

r V

Is h

ave

whi

te b

ackg

roun

ds, a

nd ic

ons

for

Exp

ress

VIs

app

ear

surr

ound

ed b

y pa

le b

lue

fiel

ds.

Exp

ress

VIs

app

ear

on th

e bl

ock

diag

ram

as

expa

ndab

le n

odes

with

icon

s su

rrou

nded

by

a bl

ue fi

eld.

Unl

ike

Exp

ress

VIs

, mos

t fun

ctio

ns a

nd V

Is o

n th

e bl

ock

diag

ram

app

ear

as ic

ons

rath

er th

an e

xpan

dabl

e no

des.

VIs

You

can

use

an

exis

ting

VI

or a

VI

you

crea

te a

s a

subV

I. W

hen

you

plac

e a

VI

on th

e bl

ock

diag

ram

, the

VI

is a

sub

VI.

Whe

n yo

u do

uble

-cli

ck a

su

bVI,

its

fron

t pan

el a

ppea

rs, r

athe

r th

an a

dia

log

box

in w

hich

you

can

co

nfig

ure

opti

ons.

The

icon

for

a V

I ap

pear

s in

the

uppe

r ri

ght c

orne

r of

the

fron

t pan

el a

nd

bloc

k di

agra

m. T

his

icon

is th

e sa

me

as th

e ic

on th

at a

ppea

rs w

hen

you

plac

e th

e V

I on

the

bloc

k di

agra

m. Y

ou c

an u

se th

e de

faul

t ico

n or

cre

ate

a cu

stom

icon

usi

ng th

e Ic

on E

dito

r.

Ref

er to

the

Fun

dam

enta

ls»C

reat

ing

VIs

and

Sub

VIs

boo

k on

the

Con

tent

s ta

b in

the

Lab

VIE

W H

elp

for

mor

e in

form

atio

n ab

out c

reat

ing

VIs

, con

figu

ring

them

as

subV

Is, a

nd c

reat

ing

icon

s.

You

als

o ca

n sa

ve th

e co

nfig

urat

ion

of a

n E

xpre

ss V

I as

a s

ubV

I. R

efer

to

the

Fun

dam

enta

ls»B

uild

ing

the

Blo

ck D

iagr

am b

ook

on th

e C

onte

nts

tab

in th

e L

abV

IEW

Hel

p fo

r mor

e in

form

atio

n ab

out c

reat

ing

subV

Is fr

om

Exp

ress

VIs

.

Page 40: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 5

Usin

g Ot

her L

abVI

EW F

eatu

res

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n5-

3Ge

tting

Sta

rted

with

Lab

VIEW

Func

tions

Func

tion

s ar

e th

e fu

ndam

enta

l ope

rati

ng e

lem

ents

of

Lab

VIE

W. U

nlik

e V

Is, f

unct

ions

do

not h

ave

fron

t pan

els

or b

lock

dia

gram

s. F

unct

ions

pr

ovid

e th

e ba

sic

buil

ding

blo

cks

for

prog

ram

min

g a

VI,

inte

rfac

ing

wit

h ha

rdw

are

and

soft

war

e, a

nd p

erfo

rmin

g ot

her e

ssen

tial

task

s in

Lab

VIE

W.

Ref

er to

the

Fun

dam

enta

ls»B

uild

ing

the

Blo

ck D

iagr

am b

ook

on th

e C

onte

nts

tab

in th

e L

abV

IEW

Hel

p fo

r m

ore

info

rmat

ion

abou

t fun

ctio

ns.

Data

Typ

esO

n th

e bl

ock

diag

ram

of

a V

I, th

e te

rmin

als

for

the

fron

t pan

el o

bjec

ts a

re

diff

eren

t col

ors.

The

col

or a

nd s

ymbo

l of

a te

rmin

al in

dica

te th

e da

ta ty

pe

of th

e co

rres

pond

ing

cont

rol o

r in

dica

tor.

Col

ors

also

indi

cate

the

data

ty

pes

of w

ires

, inp

uts,

and

out

puts

. The

col

or o

f in

puts

and

out

puts

of

Exp

ress

VIs

indi

cate

wha

t typ

e of

dat

a th

e in

put o

r ou

tput

acc

epts

or

retu

rns.

Dat

a ty

pes

indi

cate

whi

ch o

bjec

ts, i

nput

s, a

nd o

utpu

ts y

ou c

an w

ire

toge

ther

. For

exa

mpl

e, a

sw

itch

has

a g

reen

bor

der,

so y

ou c

an w

ire

a sw

itch

to

any

Exp

ress

VI

inpu

t with

a g

reen

labe

l. A

kno

b ha

s an

ora

nge

bord

er,

so y

ou c

an w

ire

a kn

ob to

any

Exp

ress

VI

inpu

t with

an

oran

ge la

bel.

How

ever

, you

can

not w

ire

a kn

ob to

an

inpu

t with

a g

reen

labe

l. T

he w

ires

yo

u cr

eate

are

the

sam

e co

lor

as th

e te

rmin

al.

Exp

ress

VIs

gen

erat

e an

d ac

quir

e da

ta u

sing

the

dyna

mic

dat

a ty

pe. T

he

dyna

mic

dat

a ty

pe a

ppea

rs a

s a

dark

blu

e te

rmin

al, s

how

n at

left

. Mos

t E

xpre

ss V

Is a

ccep

t or

retu

rn d

ynam

ic d

ata.

You

can

wir

e dy

nam

ic d

ata

to

any

indi

cato

r or

inpu

t tha

t acc

epts

num

eric

, wav

efor

m, o

r B

oole

an d

ata.

W

ire

dyna

mic

dat

a to

an

indi

cato

r th

at c

an b

est p

rese

nt th

e da

ta. S

uch

indi

cato

rs in

clud

e gr

aphs

, cha

rts,

and

num

eric

indi

cato

rs.

Mos

t oth

er V

Is a

nd fu

ncti

ons

in L

abV

IEW

do

not a

ccep

t dyn

amic

dat

a. T

o us

e a

buil

t-in

VI

or f

unct

ion

to a

naly

ze o

r pr

oces

s dy

nam

ic d

ata,

you

mus

t co

nver

t the

dyn

amic

dat

a to

num

eric

, Boo

lean

, wav

efor

m, o

r ar

ray

data

.

Use

the

Con

vert

fro

m D

ynam

ic D

ata

Exp

ress

VI

to c

onve

rt d

ynam

ic d

ata

to n

umer

ic, B

oole

an, w

avef

orm

, and

arr

ay d

ata

for

use

wit

h ot

her

VIs

and

fu

ncti

ons.

Whe

n yo

u w

ire

dyna

mic

dat

a to

an

arra

y in

dica

tor,

Lab

VIE

W

inse

rts

the

Con

vert

fro

m D

ynam

ic D

ata

Exp

ress

VI

on th

e bl

ock

diag

ram

.

Use

the

Con

vert

to D

ynam

ic D

ata

Exp

ress

VI t

o co

nver

t num

eric

, Boo

lean

, w

avef

orm

, and

arr

ay d

ata

to d

ynam

ic d

ata

for

use

with

Exp

ress

VIs

.

Ref

er to

the

Fun

dam

enta

ls»B

uild

ing

the

Blo

ck D

iagr

am b

ook

on th

e C

onte

nts

tab

in th

e L

abV

IEW

Hel

p fo

r m

ore

info

rmat

ion

abou

t dat

a ty

pes.

Chap

ter 5

Usin

g Ot

her L

abVI

EW F

eatu

res

Getti

ng S

tarte

d w

ith L

abVI

EW5-

4ni

.com

Whe

n to

Use

Oth

er L

abVI

EW F

eatu

res

The

Exp

ress

VIs

, str

uctu

res,

and

con

trol

s an

d in

dica

tors

loca

ted

on th

e E

xpre

ss s

ubpa

lett

es o

f th

e C

ontr

ols

and

Fun

ctio

ns p

alet

tes

prov

ide

the

func

tion

alit

y yo

u ne

ed to

bui

ld c

omm

on m

easu

rem

ent a

ppli

cati

ons.

The

fo

llow

ing

list d

escr

ibes

the

appl

icat

ions

that

req

uire

you

to u

se th

e V

Is,

func

tion

s, s

truc

ture

s, c

ontr

ols,

and

indi

cato

rs lo

cate

d on

sub

pale

ttes

oth

er

than

the

Exp

ress

sub

pale

tte.

•P

rogr

amm

atic

ally

con

trol

pro

pert

ies

and

met

hods

for

the

L

abV

IEW

env

iron

men

t, V

Is, a

nd c

ontr

ols

and

indi

cato

rs—

You

ca

n co

ntro

l pro

gram

mat

ical

ly h

ow a

VI

beha

ves

whe

n it

run

s, s

et th

e ap

pear

ance

of

a co

ntro

l or

indi

cato

r, or

con

trol

how

the

Lab

VIE

W

envi

ronm

ent b

ehav

es. R

efer

to th

e F

unda

men

tals

»P

rogr

amm

atic

ally

Con

trol

ling

VIs

boo

k on

the

Con

tent

s ta

b in

the

Lab

VIE

W H

elp

for

mor

e in

form

atio

n ab

out t

hese

fea

ture

s.

•C

all c

ode

wri

tten

in te

xt-b

ased

lang

uage

s—Y

ou c

an u

se L

abV

IEW

to

com

mun

icat

e w

ith a

ppli

catio

ns w

ritte

n in

a te

xt-b

ased

pro

gram

min

g la

ngua

ge, s

uch

as C

or

C+

+. R

efer

to th

e F

unda

men

tals

»Cal

ling

Cod

e W

ritt

en in

Tex

t-B

ased

Pro

gram

min

g L

angu

ages

boo

k on

the

Con

tent

s ta

b in

the

Lab

VIE

W H

elp

for

mor

e in

form

atio

n ab

out t

hese

fe

atur

es.

•C

omm

unic

ate

wit

h V

Is a

cros

s a

netw

ork—

You

can

cal

l a V

I th

at

resi

des

on a

noth

er c

ompu

ter

runn

ing

Lab

VIE

W. R

efer

to th

e F

unda

men

tals

»Net

wor

king

in L

abV

IEW

boo

k on

the

Con

tent

s ta

b in

the

Lab

VIE

W H

elp

for

mor

e in

form

atio

n ab

out t

hese

fea

ture

s.

•Sh

are

data

wit

hin

an a

pplic

atio

n or

acr

oss

a ne

twor

k—Y

ou c

an

crea

te c

onfi

gure

d so

ftw

are

item

s ca

lled

sha

red

vari

able

s to

sha

re d

ata

amon

g V

Is o

r bet

wee

n lo

cati

ons

on th

e bl

ock

diag

ram

that

you

can

not

conn

ect w

ith w

ires

. Ref

er to

the

Fun

dam

enta

ls»N

etw

orki

ng in

L

abV

IEW

boo

k on

the

Con

tent

s ta

b in

the

Lab

VIE

W H

elp

for

mor

e in

form

atio

n ab

out t

hese

fea

ture

s.

•P

ublis

h V

Is o

n th

e W

eb—

You

can

pub

lish

the

fron

t pan

el o

f an

y V

I on

the

Web

, whe

re u

sers

can

inte

ract

wit

h th

e fr

ont p

anel

. Ref

er to

the

Fun

dam

enta

ls»N

etw

orki

ng in

Lab

VIE

W b

ook

on th

e C

onte

nts

tab

in th

e L

abV

IEW

Hel

p fo

r m

ore

info

rmat

ion

abou

t the

se f

eatu

res.

•Sa

ve d

ata

to a

var

iety

of

file

for

mat

s—In

add

ition

to th

e te

xt-b

ased

m

easu

rem

ent f

ile

form

at, y

ou c

an c

reat

e fi

les

that

oth

er a

ppli

cati

ons

can

use,

suc

h as

text

fil

es a

nd s

prea

dshe

et f

iles

. Ref

er to

the

Fun

dam

enta

ls»F

ile I

/O b

ook

on th

e C

onte

nts

tab

in th

e L

abV

IEW

H

elp

for

mor

e in

form

atio

n ab

out t

hese

fea

ture

s.

Page 41: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Chap

ter 5

Usin

g Ot

her L

abVI

EW F

eatu

res

© N

atio

nal I

nstru

men

ts C

orpo

ratio

n5-

5Ge

tting

Sta

rted

with

Lab

VIEW

•C

usto

miz

e m

enus

—Y

ou c

an c

onfi

gure

whi

ch m

enu

item

s ap

pear

w

hen

a us

er ru

ns a

VI.

You

als

o ca

n cr

eate

cus

tom

men

us. R

efer

to th

e F

unda

men

tals

»Cre

atin

g V

Is a

nd S

ubV

Is b

ook

on th

e C

onte

nts

tab

in th

e L

abV

IEW

Hel

p fo

r m

ore

info

rmat

ion

abou

t the

se f

eatu

res.

•U

se L

abV

IEW

pro

ject

s—Y

ou c

an u

se p

roje

cts

to g

roup

toge

ther

L

abV

IEW

fil

es a

nd f

iles

not

spe

cifi

c to

Lab

VIE

W, c

reat

e bu

ild

spec

ific

atio

ns, a

nd d

eplo

y or

dow

nloa

d fi

les

to m

ultip

le ta

rget

s fr

om

one

loca

tion

. You

mus

t use

a p

roje

ct to

bui

ld a

ppli

cati

ons

and

shar

ed

libra

ries

. You

als

o m

ust u

se a

pro

ject

to w

ork

with

an

RT,

FPG

A, P

DA

, To

uch

Pane

l, D

SP, o

r em

bedd

ed ta

rget

. Ref

er to

the

spec

ific

mod

ule

docu

men

tatio

n fo

r m

ore

info

rmat

ion

abou

t usi

ng p

roje

cts

with

thes

e ta

rget

s. R

efer

to th

e F

unda

men

tals

»Wor

king

wit

h P

roje

cts

and

Tar

gets

boo

k on

the

Con

tent

s ta

b in

the

Lab

VIE

W H

elp

for

mor

e in

form

atio

n ab

out u

sing

Lab

VIE

W p

roje

cts.

•A

cces

s ot

her

Win

dow

s ap

plic

atio

ns—

You

can

use

Lab

VIE

W a

s a

.NE

T o

r Act

iveX

cli

ent t

o ac

cess

the

obje

cts,

pro

pert

ies,

met

hods

, and

ev

ents

ass

ocia

ted

wit

h .N

ET

ser

ver

or A

ctiv

eX a

ppli

cati

ons.

Ref

er to

th

e F

unda

men

tals

»Win

dow

s Con

nect

ivit

y bo

ok o

n th

e C

onte

nts t

ab

in th

e L

abV

IEW

Hel

p fo

r m

ore

info

rmat

ion

abou

t the

se f

eatu

res.

•W

rite

mat

hem

atic

al fo

rmul

as, e

quat

ions

, and

scri

pts—

You

can

use

va

riou

s no

des

to p

erfo

rm m

athe

mat

ical

ope

ratio

ns o

n th

e bl

ock

diag

ram

. You

als

o ca

n us

e th

e L

abV

IEW

Mat

hScr

ipt t

ext-

base

d la

ngua

ge to

wri

te m

athe

mat

ical

fun

ctio

ns a

nd s

crip

ts. R

efer

to th

e F

unda

men

tals

»For

mul

as a

nd E

quat

ions

boo

k on

the

Con

tent

s ta

b in

the

Lab

VIE

W H

elp

for

mor

e in

form

atio

n ab

out t

hese

fea

ture

s.

© N

atio

nal I

nstru

men

ts C

orpo

ratio

nA-

1Ge

tting

Sta

rted

with

Lab

VIEWA

Tech

nica

l Sup

port

and

Prof

essi

onal

Ser

vice

s

Vis

it th

e fo

llow

ing

sect

ions

of

the

awar

d-w

inni

ng N

atio

nal I

nstr

umen

ts

Web

sit

e at

ni.com

for

tech

nica

l sup

port

and

pro

fess

iona

l ser

vice

s:

•Su

ppor

t—Te

chni

cal s

uppo

rt a

t ni.com/support

incl

udes

the

follo

win

g re

sour

ces:

–Se

lf-H

elp

Tec

hnic

al R

esou

rces

—Fo

r an

swer

s an

d so

lutio

ns,

visi

t ni.com/support

for

sof

twar

e dr

iver

s an

d up

date

s,

ase

arch

able

Kno

wle

dgeB

ase,

pro

duct

man

uals

, ste

p-by

-ste

p tr

oubl

esho

otin

g w

izar

ds, t

hous

ands

of

exam

ple

prog

ram

s,

tuto

rial

s, a

pplic

atio

n no

tes,

inst

rum

ent d

rive

rs, a

nd s

oon

. R

egis

tere

d us

ers

also

rec

eive

acc

ess

to th

e N

ID

iscu

ssio

n Fo

rum

s at

ni.com/forums

. NI

App

licat

ions

Eng

inee

rs m

ake

sure

eve

ry

ques

tion

sub

mit

ted

onli

ne r

ecei

ves

anan

swer

.

–St

anda

rd S

ervi

ce P

rogr

am M

embe

rshi

p—T

his

prog

ram

en

titl

es m

embe

rs to

dir

ect a

cces

s to

NI

App

lica

tion

s E

ngin

eers

vi

aph

one

and

emai

l for

one

-to-

one

tech

nica

l sup

port

as

wel

l as

excl

usiv

e ac

cess

to o

n de

man

d tr

aini

ng m

odul

es v

ia th

e Se

rvic

es

Res

ourc

e C

ente

r. N

I off

ers

com

plem

enta

ry m

embe

rshi

p fo

r a f

ull

year

aft

er p

urch

ase,

aft

er w

hich

you

may

ren

ew to

con

tinu

e yo

ur

bene

fits

.

For

info

rmat

ion

abou

t oth

er te

chni

cal s

uppo

rt o

ptio

ns in

you

r ar

ea, v

isit

ni.com/services

, or

cont

act y

our

loca

l off

ice

at

ni.com/contact

.

•T

rain

ing

and

Cer

tifi

cati

on—

Vis

it ni.com/training

for

se

lf-p

aced

trai

ning

, eL

earn

ing

virt

ual c

lass

room

s, in

tera

ctiv

e C

Ds,

an

dC

erti

fica

tion

pro

gram

info

rmat

ion.

You

als

o ca

n re

gist

er f

or

inst

ruct

or-l

ed, h

ands

-on

cour

ses

at lo

cati

ons

arou

nd th

e w

orld

.

•Sy

stem

Int

egra

tion

—If

you

hav

e tim

e co

nstr

aint

s, li

mite

d in

-hou

se

tech

nica

l res

ourc

es, o

r ot

her

proj

ect c

halle

nges

, Nat

iona

l Ins

trum

ents

A

llia

nce

Part

ner

mem

bers

can

hel

p. T

o le

arn

mor

e, c

all y

our

loca

l N

Iof

fice

or

visi

t ni.com/alliance

.

Page 42: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Appe

ndix

ATe

chni

cal S

uppo

rt an

d Pr

ofes

sion

al S

ervi

ces

Getti

ng S

tarte

d w

ith L

abVI

EWA-

2ni

.com

If y

ou s

earc

hed ni.com

and

cou

ld n

ot f

ind

the

answ

ers

you

need

, con

tact

yo

ur lo

cal o

ffic

e or

NI

corp

orat

e he

adqu

arte

rs. P

hone

num

bers

for

our

w

orld

wid

e of

fice

s ar

e li

sted

at t

he f

ront

of

this

man

ual.

You

als

o ca

n vi

sit

the

Wor

ldw

ide

Off

ices

sec

tion

of n

i.com/niglobal

to a

cces

s th

e br

anch

of

fice

Web

sit

es, w

hich

pro

vide

up-

to-d

ate

cont

act i

nfor

mat

ion,

sup

port

ph

one

num

bers

, em

ail a

ddre

sses

, and

cur

rent

eve

nts.

© N

atio

nal I

nstru

men

ts C

orpo

ratio

nG-

1Ge

tting

Sta

rted

with

Lab

VIEW

Glos

sary

A auto

mat

ic s

cali

ngA

bili

ty o

f sc

ales

to a

djus

t to

the

rang

e of

plo

tted

val

ues.

On

grap

h sc

ales

, au

tosc

alin

g de

term

ines

max

imum

and

min

imum

sca

le v

alue

s.

B bloc

k di

agra

mP

icto

rial

des

crip

tion

or

repr

esen

tati

on o

f a

prog

ram

or

algo

rith

m. T

he

bloc

k di

agra

m c

onsi

sts

of e

xecu

tabl

e ic

ons

call

ed n

odes

and

wir

es th

at

carr

y da

ta b

etw

een

the

node

s. T

he b

lock

dia

gram

is th

e so

urce

cod

e fo

r th

e V

I. T

he b

lock

dia

gram

resi

des

in th

e bl

ock

diag

ram

win

dow

of t

he V

I.

Boo

lean

con

trol

s an

d in

dica

tors

Fron

t pan

el o

bjec

ts to

man

ipul

ate

and

disp

lay

Boo

lean

(TR

UE

or F

AL

SE)

data

.

brok

en R

un b

utto

nB

utto

n th

at r

epla

ces

the

Run

but

ton

whe

n a

VI

cann

ot r

un b

ecau

se o

f er

rors

.

brok

en V

IV

I th

at c

anno

t run

bec

ause

of

erro

rs; s

igni

fied

by

a br

oken

arr

ow in

the

brok

en R

un b

utto

n.

Page 43: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Glos

sary

Getti

ng S

tarte

d w

ith L

abVI

EWG-

2ni

.com

C chan

nel

1. P

hysi

cal—

A te

rmin

al o

r pi

n at

whi

ch y

ou c

an m

easu

re o

r ge

nera

te a

n an

alog

or

digi

tal s

igna

l. A

sin

gle

phys

ical

cha

nnel

can

incl

ude

mor

e th

an

one

term

inal

, as

in th

e ca

se o

f a

diff

eren

tial

ana

log

inpu

t cha

nnel

or

a di

gita

l por

t of

eigh

t lin

es. A

cou

nter

als

o ca

n be

a p

hysi

cal c

hann

el,

alth

ough

the

coun

ter

nam

e is

not

the

nam

e of

the

term

inal

whe

re th

e co

unte

r m

easu

res

or g

ener

ates

the

digi

tal s

igna

l.

2. V

irtu

al—

A c

olle

ctio

n of

pro

pert

y se

ttin

gs th

at c

an in

clud

e a

nam

e, a

ph

ysic

al c

hann

el, i

nput

term

inal

con

nect

ions

, the

type

of m

easu

rem

ent o

r ge

nera

tion,

and

sca

ling

info

rmat

ion.

You

can

def

ine

NI-

DA

Qm

x vi

rtua

l ch

anne

ls o

utsi

de a

task

(gl

obal

) or

insi

de a

task

(lo

cal)

. Con

figu

ring

vi

rtua

l cha

nnel

s is

opt

iona

l in

Tra

diti

onal

NI-

DA

Q (

Leg

acy)

and

ear

lier

vers

ions

, but

is in

tegr

al to

eve

ry m

easu

rem

ent y

ou ta

ke in

NI-

DA

Qm

x. In

T

radi

tion

al N

I-D

AQ

(Leg

acy)

, you

con

figu

re v

irtu

al c

hann

els

in M

AX

. In

NI-

DA

Qm

x, y

ou c

an c

onfi

gure

vir

tual

cha

nnel

s ei

ther

in M

AX

or i

n yo

ur

prog

ram

, and

you

can

con

figu

re c

hann

els

as p

art o

f a

task

or

sepa

rate

ly.

3. S

witc

h—A

sw

itch

chan

nel r

epre

sent

s an

y co

nnec

tion

poin

t on

a sw

itch.

It

can

be

mad

e up

of

one

or m

ore

sign

al w

ires

(co

mm

only

one

, tw

o, o

r fo

ur),

dep

endi

ng o

n th

e sw

itch

topo

logy

. A v

irtu

al c

hann

el c

anno

t be

crea

ted

wit

h a

swit

ch c

hann

el. S

wit

ch c

hann

els

may

be

used

onl

y in

the

NI-

DA

Qm

x Sw

itch

func

tions

and

VIs

.

chec

kbox

Smal

l squ

are

box

in a

dia

log

box

whi

ch y

ou c

an s

elec

t or

clea

r. C

heck

boxe

s ge

nera

lly

are

asso

ciat

ed w

ith

mul

tipl

e op

tion

s th

at y

ou c

an

set.

You

can

sel

ect m

ore

than

one

che

ckbo

x.

cond

itio

nal t

erm

inal

Term

inal

of

a W

hile

Loo

p th

at c

onta

ins

a B

oole

an v

alue

that

det

erm

ines

if

the

VI

perf

orm

s an

othe

r it

erat

ion.

Con

text

Hel

p w

indo

wW

indo

w th

at d

ispl

ays

basi

c in

form

atio

n ab

out L

abV

IEW

obj

ects

whe

n yo

u m

ove

the

curs

or o

ver

each

obj

ect.

Obj

ects

wit

h co

ntex

t hel

p in

form

atio

n in

clud

e V

Is, f

unct

ions

, con

stan

ts, s

truc

ture

s, p

alet

tes,

pr

oper

ties

, met

hods

, eve

nts,

and

dia

log

box

com

pone

nts.

cont

rol

Fron

t pan

el o

bjec

t for

ent

erin

g da

ta to

a V

I in

tera

ctiv

ely

or to

a s

ubV

I pr

ogra

mm

atic

ally

, suc

h as

a k

nob,

pus

h bu

tton

, or

dial

.

Con

trol

s pa

lett

ePa

lett

e th

at c

onta

ins

fron

t pan

el c

ontr

ols,

indi

cato

rs, a

nd d

ecor

ativ

e ob

ject

s.

curr

ent V

IV

I w

hose

fro

nt p

anel

, blo

ck d

iagr

am, o

r Ico

n E

dito

r is

the

activ

e w

indo

w.

Glos

sary

© N

atio

nal I

nstru

men

ts C

orpo

ratio

nG-

3Ge

tting

Sta

rted

with

Lab

VIEW

D DA

QSe

e da

ta a

cqui

siti

on (

DA

Q).

DA

Q A

ssis

tant

A g

raph

ical

inte

rfac

e fo

r co

nfig

urin

g m

easu

rem

ent t

asks

, cha

nnel

s, a

nd

scal

es.

DA

Q d

evic

eA

dev

ice

that

acq

uire

s or

gen

erat

es d

ata

and

can

cont

ain

mul

tipl

e ch

anne

ls

and

conv

ersi

on d

evic

es. D

AQ

dev

ices

incl

ude

plug

-in

devi

ces,

PC

MC

IA

card

s, a

nd D

AQ

Pad

devi

ces,

whi

ch c

onne

ct to

a c

ompu

ter

USB

or

IEE

E13

94 p

ort.

SCX

I m

odul

es a

re c

onsi

dere

d D

AQ

dev

ices

.

data

acq

uisi

tion

(DA

Q)

1. A

cqui

ring

and

mea

suri

ng a

nalo

g or

dig

ital e

lect

rica

l sig

nals

fro

m

sens

ors,

acq

uisi

tion

tran

sduc

ers,

and

test

pro

bes

or f

ixtu

res.

2. G

ener

atin

g an

alog

or

digi

tal e

lect

rica

l sig

nals

.

data

flo

wPr

ogra

mm

ing

syst

em th

at c

onsi

sts

of e

xecu

tabl

e no

des

that

exe

cute

onl

y w

hen

they

rec

eive

all

req

uire

d in

put d

ata.

The

nod

es p

rodu

ce o

utpu

t dat

a au

tom

atic

ally

whe

n th

ey e

xecu

te. L

abV

IEW

is a

dat

aflo

w s

yste

m. T

he

mov

emen

t of d

ata

thro

ugh

the

node

s de

term

ines

the

exec

utio

n or

der o

f the

V

Is a

nd f

unct

ions

on

the

bloc

k di

agra

m.

data

type

Form

at fo

r inf

orm

atio

n. In

Lab

VIE

W, a

ccep

tabl

e da

ta ty

pes

for m

ost V

Is

and

func

tion

s ar

e nu

mer

ic, a

rray

, str

ing,

Boo

lean

, pat

h, r

efnu

m,

enum

erat

ion,

wav

efor

m, a

nd c

lust

er.

defa

ult

Pres

et v

alue

. Man

y V

I in

puts

use

a d

efau

lt va

lue

if y

ou d

o no

t spe

cify

a

valu

e.

devi

ceA

n in

stru

men

t or c

ontr

olle

r you

can

acc

ess

as a

sin

gle

enti

ty th

at c

ontr

ols

or m

onit

ors

real

-wor

ld I

/O p

oint

s. A

dev

ice

ofte

n is

con

nect

ed to

a h

ost

com

pute

r th

roug

h so

me

type

of

com

mun

icat

ion

netw

ork.

See

als

o D

AQ

de

vice

and

mea

sure

men

t dev

ice.

drag

To u

se th

e cu

rsor

on

the

scre

en to

sel

ect,

mov

e, c

opy,

or

dele

te o

bjec

ts.

driv

erSo

ftw

are

that

con

trol

s a

spec

ific

har

dwar

e de

vice

, suc

h as

a D

AQ

dev

ice.

dyna

mic

dat

a ty

peD

ata

type

use

d by

Exp

ress

VIs

that

incl

udes

the

data

ass

ocia

ted

with

a

sign

al a

nd a

ttri

bute

s th

at p

rovi

de in

form

atio

n ab

out t

he s

igna

l, su

ch a

s th

e na

me

of th

e si

gnal

or

the

date

and

tim

e L

abV

IEW

acq

uire

d th

e da

ta.

Att

ribu

tes

spec

ify

how

the

sign

al a

ppea

rs o

n a

grap

h or

cha

rt.

Page 44: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Glos

sary

Getti

ng S

tarte

d w

ith L

abVI

EWG-

4ni

.com

E Err

or li

st w

indo

wW

indo

w th

at d

ispl

ays

erro

rs a

nd w

arni

ngs

occu

rrin

g in

a V

I an

d in

som

e ca

ses

reco

mm

ends

how

to c

orre

ct th

e er

rors

.

erro

r m

essa

geIn

dica

tion

of

a so

ftw

are

or h

ardw

are

mal

func

tion

or

of a

n un

acce

ptab

le

data

ent

ry a

ttem

pt.

Exp

ress

VI

A s

ubV

I des

igne

d to

aid

in c

omm

on m

easu

rem

ent t

asks

. You

con

figu

re a

n E

xpre

ss V

I us

ing

a co

nfig

urat

ion

dial

og b

ox.

F For

Loo

pIt

erat

ive

loop

str

uctu

re th

at e

xecu

tes

its

subd

iagr

am a

set

num

ber o

f tim

es.

Equ

ival

ent t

o te

xt-b

ased

cod

e: For i = 0 to n – 1, do...

.

fron

t pan

elIn

tera

ctiv

e us

er in

terf

ace

of a

VI.

Fro

nt p

anel

app

eara

nce

imit

ates

ph

ysic

al in

stru

men

ts, s

uch

as o

scil

losc

opes

and

mul

tim

eter

s.

func

tion

Bui

lt-in

exe

cutio

n el

emen

t, co

mpa

rabl

e to

an

oper

ator

, fun

ctio

n, o

r st

atem

ent i

n a

text

-bas

ed p

rogr

amm

ing

lang

uage

.

Fun

ctio

ns p

alet

tePa

lett

e th

at c

onta

ins

VIs

, fun

ctio

ns, b

lock

dia

gram

str

uctu

res,

and

co

nsta

nts.

G Gen

eral

Pur

pose

In

terf

ace

Bus

GPI

B. S

ynon

ymou

s w

ith

HP-

IB. T

he s

tand

ard

bus

used

for

con

trol

ling

el

ectr

onic

inst

rum

ents

wit

h a

com

pute

r. A

lso

call

ed I

EE

E 4

88 b

us

beca

use

it is

def

ined

by

AN

SI/I

EE

E S

tand

ards

488

-197

8, 4

88.1

-198

7, a

nd

488.

2-19

92.

grap

h2D

dis

play

of

one

or m

ore

plot

s. A

gra

ph r

ecei

ves

and

plot

s da

ta a

s a

bloc

k.

Glos

sary

© N

atio

nal I

nstru

men

ts C

orpo

ratio

nG-

5Ge

tting

Sta

rted

with

Lab

VIEW

I I/O

Inpu

t/Out

put.

The

tran

sfer

of d

ata

to o

r fro

m a

com

pute

r sys

tem

invo

lvin

g co

mm

unic

atio

ns c

hann

els,

ope

rato

r inp

ut d

evic

es, a

nd/o

r dat

a ac

quis

itio

n an

d co

ntro

l int

erfa

ces.

icon

Gra

phic

al r

epre

sent

atio

n of

a n

ode

on a

blo

ck d

iagr

am.

indi

cato

rFr

ont p

anel

obj

ect t

hat d

ispl

ays

outp

ut, s

uch

as a

gra

ph o

r L

ED

.

inst

rum

ent d

rive

rA

set

of

high

-lev

el f

unct

ions

that

con

trol

and

com

mun

icat

e w

ith

inst

rum

ent h

ardw

are

in a

sys

tem

.

Inst

rum

ent I

/O A

ssis

tant

Add

-on

laun

ched

fro

m th

e In

stru

men

t I/O

Ass

ista

nt E

xpre

ss V

I th

at

com

mun

icat

es w

ith

mes

sage

-bas

ed in

stru

men

ts a

nd g

raph

ical

ly p

arse

s th

e re

spon

se.

L labe

lTe

xt o

bjec

t use

d to

nam

e or

des

crib

e ob

ject

s or

regi

ons

on th

e fr

ont p

anel

or

blo

ck d

iagr

am.

Lab

VIE

WL

abor

ator

y V

irtu

al I

nstr

umen

t Eng

inee

ring

Wor

kben

ch. L

abV

IEW

is a

gr

aphi

cal p

rogr

amm

ing

lang

uage

that

use

s ic

ons

inst

ead

of li

nes

of te

xt to

cr

eate

pro

gram

s.

LE

DL

ight

-em

ittin

g di

ode.

lege

ndO

bjec

t a g

raph

or c

hart

ow

ns to

dis

play

the

nam

es a

nd p

lot s

tyle

s of

plo

ts

on th

at g

raph

or

char

t.

M MA

XSe

e M

easu

rem

ent &

Aut

omat

ion

Exp

lore

r.

Mea

sure

men

t &

Aut

omat

ion

Exp

lore

rT

he s

tand

ard

Nat

iona

l Ins

trum

ents

har

dwar

e co

nfig

urat

ion

and

diag

nost

ic

envi

ronm

ent f

or W

indo

ws.

Page 45: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Glos

sary

Getti

ng S

tarte

d w

ith L

abVI

EWG-

6ni

.com

mea

sure

men

t dev

ice

DA

Q d

evic

es s

uch

as th

e E

Ser

ies

mul

tifu

ncti

on I/

O (M

IO) d

evic

es, S

CX

I si

gnal

con

diti

onin

g m

odul

es, a

nd s

wit

ch m

odul

es.

men

u ba

rH

oriz

onta

l bar

that

list

s th

e na

mes

of

the

mai

n m

enus

of

an a

pplic

atio

n.

The

men

u ba

r ap

pear

s be

low

the

titl

e ba

r of

a w

indo

w. E

ach

appl

icat

ion

has

a m

enu

bar

that

is d

isti

nct f

or th

at a

pplic

atio

n, a

lthou

gh s

ome

men

us

and

com

man

ds a

re c

omm

on to

man

y ap

plic

atio

ns.

N NI-

DA

QD

rive

r sof

twar

e in

clud

ed w

ith a

ll N

I DA

Q d

evic

es a

nd s

igna

l con

diti

onin

g co

mpo

nent

s. N

I-D

AQ

is a

n ex

tens

ive

libr

ary

of V

Is a

nd A

NSI

C fu

ncti

ons

you

can

call

from

an

appl

icat

ion

deve

lopm

ent e

nvir

onm

ent (

AD

E),

suc

h as

Lab

VIE

W, t

o pr

ogra

m a

n N

I mea

sure

men

t dev

ice,

suc

h as

the

M S

erie

s m

ultif

unct

ion

I/O

(MIO

) DA

Q d

evic

es, s

igna

l con

ditio

ning

mod

ules

, and

sw

itch

mod

ules

.

NI-

DA

Qm

xT

he la

test

NI-

DA

Q d

rive

r with

new

VIs

, fun

ctio

ns, a

nd d

evel

opm

ent t

ools

fo

r con

trol

ling

mea

sure

men

t dev

ices

. The

adv

anta

ges

of N

I-D

AQ

mx

over

ea

rlie

r ve

rsio

ns o

f N

I-D

AQ

incl

ude

the

DA

Q A

ssis

tant

for

con

figu

ring

ch

anne

ls a

nd m

easu

rem

ent t

asks

for

you

r de

vice

for

use

in L

abV

IEW

, L

abW

indo

ws™

/CV

I™, a

nd M

easu

rem

ent S

tudi

o; N

I-D

AQ

mx

sim

ulat

ion

for m

ost s

uppo

rted

dev

ices

for t

esti

ng a

nd m

odif

ying

app

lica

tion

s w

itho

ut

plug

ging

in h

ardw

are;

and

a s

impl

er, m

ore

intu

itive

API

for c

reat

ing

DA

Q

appl

icat

ions

usi

ng f

ewer

fun

ctio

ns a

nd V

Is th

an e

arli

er v

ersi

ons

of

NI-

DA

Q.

node

Pro

gram

exe

cuti

on e

lem

ent.

Nod

es a

re a

nalo

gous

to s

tate

men

ts,

oper

ator

s, f

unct

ions

, and

sub

rout

ines

in te

xt-b

ased

pro

gram

min

g la

ngua

ges.

On

abl

ock

diag

ram

, nod

es in

clud

e fu

ncti

ons,

str

uctu

res,

and

su

bVIs

.

num

eric

con

trol

s an

d in

dica

tors

Fron

t pan

el o

bjec

ts to

man

ipul

ate

and

disp

lay

num

eric

dat

a.

O obje

ctG

ener

ic te

rm f

or a

ny it

em o

n th

e fr

ont p

anel

or

bloc

k di

agra

m, i

nclu

ding

co

ntro

ls, i

ndic

ator

s, s

truc

ture

s, n

odes

, wir

es, a

nd im

port

ed p

ictu

res.

Ope

ratin

g to

olTo

ol to

ent

er d

ata

into

con

trol

s or

to o

pera

te th

em.

Glos

sary

© N

atio

nal I

nstru

men

ts C

orpo

ratio

nG-

7Ge

tting

Sta

rted

with

Lab

VIEW

P pale

tte

Dis

play

s ob

ject

s or

tool

s yo

u ca

n us

e to

bui

ld th

e fr

ont p

anel

or

bloc

k di

agra

m.

plot

Gra

phic

al r

epre

sent

atio

n of

an

arra

y of

dat

a sh

own

eith

er o

n a

grap

h or

a

char

t.

Posi

tioni

ng to

olTo

ol to

mov

e an

d re

size

obj

ects

.

proj

ect

A c

olle

ctio

n of

Lab

VIE

W fi

les

and

file

s no

t spe

cifi

c to

Lab

VIE

W th

at y

ou

can

use

to c

reat

e bu

ild

spec

ific

atio

ns a

nd d

eplo

y or

dow

nloa

d fi

les

to

targ

ets.

Pro

ject

Exp

lore

rw

indo

wW

indo

w in

whi

ch y

ou c

an c

reat

e an

d ed

it L

abV

IEW

pro

ject

s.

Pro

pert

ies

dial

og b

oxes

Dia

log

boxe

s ac

cess

ed f

rom

the

shor

tcut

men

u of

a c

ontr

ol o

r in

dica

tor

that

you

can

use

to c

onfi

gure

how

the

cont

rol o

r in

dica

tor

appe

ars

in th

e fr

ont p

anel

win

dow

.

pull

-dow

n m

enus

Men

us a

cces

sed

from

a m

enu

bar.

Pull

-dow

n m

enu

item

s ar

e us

uall

y ge

nera

l in

natu

re.

PXI

PC

I eX

tens

ions

for

Ins

trum

enta

tion.

A m

odul

ar, c

ompu

ter-

base

d in

stru

men

tatio

n pl

atfo

rm.

R RM

SR

oot M

ean

Squa

re.

S sam

ple

Sing

le a

nalo

g or

dig

ital i

nput

or

outp

ut d

ata

poin

t.

scal

ePa

rt o

f gr

aph,

cha

rt, a

nd s

ome

num

eric

con

trol

s an

d in

dica

tors

that

co

ntai

ns a

ser

ies

of m

arks

or

poin

ts a

t kno

wn

inte

rval

s to

den

ote

unit

s of

m

easu

re.

shor

tcut

men

uM

enu

acce

ssed

by

righ

t-cl

icki

ng a

n ob

ject

. Men

u ite

ms

pert

ain

to th

at

obje

ct s

peci

fica

lly.

Page 46: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Glos

sary

Getti

ng S

tarte

d w

ith L

abVI

EWG-

8ni

.com

stri

ngR

epre

sent

atio

n of

a v

alue

as

text

.

stru

ctur

ePr

ogra

m c

ontr

ol e

lem

ent,

such

as

a Fl

at S

eque

nce

stru

ctur

e, S

tack

ed

Sequ

ence

str

uctu

re, C

ase

stru

ctur

e, F

orL

oop,

Whi

leL

oop,

or

Tim

ed

Loo

p.

subp

alet

tePa

lett

e th

at y

ou a

cces

s fr

om a

noth

er p

alet

te th

at is

abo

ve th

e su

bpal

ette

in

hier

arch

y.

subV

IV

I us

ed o

n th

e bl

ock

diag

ram

of

anot

her

VI.

Com

para

ble

to a

sub

rout

ine.

T task

A c

olle

ctio

n of

one

or

mor

e ch

anne

ls, t

imin

g, tr

igge

ring

, and

oth

er

prop

erti

es in

NI-

DA

Qm

x. A

task

repr

esen

ts a

mea

sure

men

t or g

ener

atio

n yo

u w

ant t

o pe

rfor

m.

tem

plat

e V

IV

I th

at c

onta

ins

com

mon

con

trol

s an

d in

dica

tors

fro

m w

hich

you

can

bu

ild

mul

tipl

e V

Is th

at p

erfo

rm s

imil

ar f

unct

ions

. Acc

ess

tem

plat

e V

Is

from

the

New

dia

log

box.

term

inal

Obj

ect o

r re

gion

on

a no

de th

roug

h w

hich

dat

a pa

ss.

tip s

trip

Smal

l yel

low

text

ban

ners

that

iden

tify

the

term

inal

nam

e an

d m

ake

it

easi

er to

iden

tify

term

inal

s fo

r w

irin

g.

tool

Spec

ial c

urso

r to

per

form

spe

cifi

c op

erat

ions

.

tool

bar

Bar

that

con

tain

s co

mm

and

butt

ons

to r

un a

nd d

ebug

VIs

.

Tra

ditio

nal N

I-D

AQ

(L

egac

y)A

n ol

der

driv

er w

ith o

utda

ted

AP

Is f

or d

evel

opin

g da

ta a

cqui

sitio

n,

inst

rum

enta

tion,

and

con

trol

app

licat

ions

for

old

er N

atio

nal I

nstr

umen

ts

DA

Q d

evic

es. Y

ou s

houl

d us

e T

radi

tiona

l NI-

DA

Q (

Leg

acy)

onl

y in

ce

rtai

n ci

rcum

stan

ces.

Ref

er to

the

NI-

DA

Q R

eadm

e fo

r mor

e in

form

atio

n ab

out w

hen

to u

se T

radi

tion

al N

I-D

AQ

(L

egac

y), i

nclu

ding

a c

ompl

ete

list

of s

uppo

rted

dev

ices

, ope

rati

ng s

yste

ms,

and

app

lica

tion

sof

twar

e an

d la

ngua

ge v

ersi

ons.

Glos

sary

© N

atio

nal I

nstru

men

ts C

orpo

ratio

nG-

9Ge

tting

Sta

rted

with

Lab

VIEW

V VI

See

virt

ual i

nstr

umen

t (V

I).

virt

ual i

nstr

umen

t (V

I)Pr

ogra

m in

Lab

VIE

W th

at m

odel

s th

e ap

pear

ance

and

fun

ctio

n of

a

phys

ical

inst

rum

ent.

VX

IV

ME

eX

tens

ions

for

Ins

trum

enta

tion

(bus

).

W wav

efor

mM

ulti

ple

volt

age

read

ings

take

n at

a s

peci

fic

sam

plin

g ra

te.

wav

efor

m c

hart

Indi

cato

r th

at p

lots

dat

a po

ints

at a

cer

tain

rat

e.

Whi

le L

oop

Loo

p st

ruct

ure

that

rep

eats

a s

ecti

on o

f co

de u

ntil

a c

ondi

tion

occ

urs.

wir

eD

ata

path

bet

wee

n no

des.

Wir

ing

tool

Tool

to d

efin

e da

ta p

aths

bet

wee

n te

rmin

als.

Page 47: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

© N

atio

nal I

nstru

men

ts C

orpo

ratio

nI-1

Getti

ng S

tarte

d w

ith L

abVI

EW

Inde

x

A acqu

irin

gin

form

atio

n fo

r in

stru

men

ts, 4

-11

sign

als,

4-2

Acq

uiri

ng a

Sig

nal V

I bl

ock

diag

ram

(f

igur

e), 1

-14

addi

ng See

also

cre

atin

gch

anne

ls to

task

s, 4

-6co

ntro

ls f

rom

the

bloc

k di

agra

m, 2

-5co

ntro

ls to

the

fron

t pan

el, 1

-6gr

aph

indi

cato

rs, 2

-5in

puts

to E

xpre

ss V

Is, 1

-9, 2

-5, 3

-15

mul

tiple

sig

nals

, 3-5

num

eric

indi

cato

rs, 2

-5si

gnal

s, 3

-4vi

sual

cue

s on

fro

nt p

anel

, 3-1

0w

arni

ng li

ghts

, 3-1

0A

mpl

itud

e an

d L

evel

Mea

sure

men

ts E

xpre

ss

VI,

3-3

anal

yzin

g vo

ltag

e, 3

-9an

alyz

ing

sign

als,

3-9

appl

icat

ions

buil

ding

, 5-5

com

mun

icat

ing

with

acr

oss

netw

orks

, 5-4

Ari

thm

etic

& C

ompa

riso

n pa

lett

e, 1

-12

B blan

k V

Is, 2

-2bl

ock

diag

ram

, 1-6

, 1-1

9cu

stom

izin

g, 2

-13

indi

cato

rs, 3

-17

plac

ing

obje

cts

from

hel

p, 2

-13

show

ing,

1-8

brok

en Run

but

ton,

2-8

wir

es, 2

-8, 2

-14

Bui

ld T

able

Exp

ress

VI,

2-9

buil

ding appl

icat

ions

, 5-5

shar

ed li

brar

ies,

5-5

VIs

, 1-2

butto

ns addi

ng, 3

-14

Run

, 1-6

C calli

ng c

ode

from

text

-bas

ed la

ngua

ges,

5-4

, 5-

5ch

angi

ng s

igna

l typ

es, 1

-8ch

anne

ls, 4

-2ad

ding

to ta

sks,

4-6

rena

min

g, 4

-5co

mm

unic

atin

gw

ith

inst

rum

ents

, 4-7

wit

h L

abV

IEW

app

lica

tion

s ac

ross

ne

twor

ks, 5

-4C

ompa

riso

n E

xpre

ss V

I, 3

-11

conf

igur

atio

n di

alog

box

es, 1

-20

conf

igur

ing

cont

rols

, 1-2

1in

dica

tors

, 1-2

1C

onte

xt H

elp

win

dow

, 2-1

2bu

tton

, 2-2

, 3-3

disp

layi

ng c

onfi

gura

tion

of E

xpre

ss

VIs

, 3-3

disp

layi

ng e

rror

s, 2

-14

figu

re, 2

-2sh

owin

g, 2

-2

Inde

x

Getti

ng S

tarte

d w

ith L

abVI

EWI-2

ni.c

om

cont

rolli

ngex

ecut

ion

spee

d, 2

-9V

Is p

rogr

amm

atic

ally

, 5-4

cont

rols

, 1-1

9, 3

-17

addi

ng f

rom

the

bloc

k di

agra

m, 2

-5ad

ding

to th

e fr

ont p

anel

, 1-6

conf

igur

ing,

1-2

1cr

eatin

g, 2

-5, 2

-13

cust

omiz

ing,

1-1

6da

ta ty

pes,

5-3

num

eric

, 5-1

pale

tte,

1-6

Con

trol

s pa

lette

, 1-6

figu

re, 1

-7sh

owin

g al

l cat

egor

ies,

5-1

conv

enti

ons

used

in th

is m

anua

l, ix

Con

vert

fro

m/to

Dyn

amic

Dat

a E

xpre

ss

VIs

, 5-3

crea

ting Se

e al

so a

ddin

gco

ntro

ls, 2

-5, 2

-13

grap

h in

dica

tors

, 2-5

indi

cato

rs, 2

-13

NI-

DA

Qm

x ta

sks,

4-2

cust

omiz

ing

bloc

k di

agra

ms,

2-1

3co

ntro

ls, 1

-16

fron

t pan

els,

2-5

indi

cato

rs, 1

-17

men

us, 5

-5si

mul

ated

sig

nals

, 3-4

D DA

Q A

ssis

tant

Exp

ress

VI,

4-2

, 4-1

2D

AQ

dev

ices

, 4-2

data

disp

layi

ngfr

om D

AQ

dev

ices

, 4-5

in ta

bles

, 2-9

, 2-1

4gr

aphi

ng f

rom

DA

Q d

evic

es, 4

-5

savi

ng to a

file

, 3-1

3, 3

-14

whe

n pr

ompt

ed b

y a

user

, 3-1

5st

orin

g, 3

-14

data

flo

w, 1

-10,

1-1

4, 1

-19

data

type

sdy

nam

ic, 5

-3ov

ervi

ew, 5

-3de

letin

g w

ires

, 1-1

1de

sele

ctin

g ob

ject

s, 1

-10

diag

nost

ic to

ols

(NI

reso

urce

s), A

-1di

spla

ying

data

fro

m D

AQ

dev

ices

, 4-5

data

in ta

bles

, 2-9

, 2-1

4er

rors

in C

onte

xt H

elp

win

dow

, 2-1

4si

gnal

s in

a g

raph

, 1-1

5do

cum

enta

tion

conv

entio

ns u

sed

in th

is m

anua

l, ix

intr

oduc

tion

to th

is m

anua

l, ix

NI

reso

urce

s, A

-1dr

iver

s inst

rum

ent,

4-7

NI

reso

urce

s, A

-1dy

nam

ic d

ata,

con

vert

ing

from

and

to, 5

-3

E Err

or li

st w

indo

w, 2

-8, 2

-14

erro

rs, 2

-14

disp

layi

ng in

Con

text

Hel

p w

indo

w, 2

-14

list

, 2-8

, 2-1

4w

indo

w, 2

-8, 2

-14

exam

ple

VIs

NI

Exa

mpl

e Fi

nder

, 2-1

1ex

ampl

es (

NI

reso

urce

s), A

-1E

xecu

tion

Con

trol

pal

ette

, 2-6

exec

utio

n sp

eed,

con

trol

ling,

2-9

Exp

ress

VIs

, 1-2

0A

mpl

itud

e an

d L

evel

Mea

sure

men

ts, 3

-3,

3-9

Bui

ld T

able

, 2-9

Page 48: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Inde

x

© N

atio

nal I

nstru

men

ts C

orpo

ratio

nI-3

Getti

ng S

tarte

d w

ith L

abVI

EW

Com

pari

son,

3-1

1co

nfig

urat

ion

dial

og b

oxes

, 1-2

0C

onve

rt f

rom

/to D

ynam

ic D

ata,

5-3

DA

Q A

ssis

tant

, 4-2

, 4-1

2Fi

lter,

3-7

Form

ula,

1-1

2in

puts

, 1-2

0In

stru

men

t I/O

Ass

ista

nt, 4

-9, 4

-14

Scal

ing

and

Map

ping

, 1-1

2Si

mul

ate

Sign

als,

1-8

Tim

e D

elay

, 2-9

Wri

te T

o M

easu

rem

ent F

ile,

3-1

3, 3

-17

F file

s grou

ping

, 5-5

savi

ng to

oth

er f

orm

ats,

5-4

Filt

er E

xpre

ss V

I, 3

-7Fo

rmul

a E

xpre

ss V

I, 1

-12,

3-5

fron

t pan

el, 1

-5, 1

-19,

2-9

Acq

uiri

ng a

Sig

nal V

I (f

igur

e), 1

-2ad

ding co

ntro

ls, 1

-6vi

sual

cue

s, 3

-10

cont

rols

, 1-1

9, 3

-17

cust

omiz

ing,

2-5

indi

cato

rs, 1

-19

mod

ifyi

ng, 2

-8sh

owin

g, 1

-11

War

ning

Lig

ht V

I (f

igur

e), 3

-2fu

nctio

ns, 5

-2M

erge

Sig

nals

, 1-1

5, 2

-5Fu

nctio

ns p

alet

tefi

gure

, 1-1

2sh

owin

g al

l cat

egor

ies,

5-2

G Get

ting

Sta

rted

win

dow

, 1-4

, 3-2

figu

re, 1

-3

grap

h in

dica

tors

, cre

atin

g, 2

-5gr

aphi

ngda

ta f

rom

DA

Q d

evic

es, 4

-5tw

o si

gnal

s, 1

-15

grou

ping

fil

es, 5

-5

H help

Con

text

Hel

p w

indo

w, 2

-2, 2

-12,

3-3

Lab

VIE

W H

elp,

1-1

2, 1

-20

sear

chin

g, 2

-3, 2

-11,

2-1

3L

abV

IEW

res

ourc

es, 1

-20,

2-1

2se

arch

ing,

2-4

, 2-1

1, 2

-13

tech

nica

l sup

port

, A-1

I indi

cato

rs, 1

-19,

3-1

7, 5

-1ad

ding

num

eric

, 2-5

conf

igur

ing,

1-2

1cr

eati

ng, 2

-13

cust

omiz

ing,

1-1

7da

ta ty

pe, 5

-3nu

mer

ic, 5

-1re

mov

ing,

2-8

Inpu

t pal

ette

, 2-3

inpu

ts, E

xpre

ss V

I, 1

-20

Inst

rum

ent D

rive

r N

etw

ork,

4-7

inst

rum

ent d

rive

rs, 4

-7fi

ndin

g, 4

-13

inst

allin

g, 4

-13

NI

reso

urce

s, A

-1In

stru

men

t I/O

Ass

ista

nt E

xpre

ss V

I, 4

-9, 4

-14

inst

rum

ents

acqu

irin

g in

form

atio

n, 4

-11

com

mun

icat

ing,

4-7

pars

ing

info

rmat

ion,

4-1

1se

lect

ing,

4-1

0in

trod

uctio

n to

this

man

ual,

ix

Inde

x

Getti

ng S

tarte

d w

ith L

abVI

EWI-4

ni.c

om

K knob

con

trol

, cus

tom

izin

g (f

igur

e), 1

-16

Kno

wle

dgeB

ase,

A-1

L Lab

VIE

Whe

lp r

esou

rces

, 2-1

2ot

her

feat

ures

, 5-1

proj

ects

, 5-5

Lab

VIE

W H

elp,

1-1

2, 1

-20

sear

chin

g, 2

-3, 2

-11,

2-1

3L

ED

s, p

alet

te, 3

-10

LVM

. See

.lvm

file

s.lv

m f

iles

, 3-1

4, 3

-17

M man

ual.

See

docu

men

tati

onm

arqu

ee, 2

-9m

enus

, cus

tom

izin

g, 5

-5M

erge

Sig

nals

fun

ctio

n, 2

-5fi

gure

, 1-1

5m

odif

ying

fron

t pan

els,

2-8

sign

als,

1-1

1, 2

-3

N Nat

iona

l Ins

trum

ents

sup

port

and

se

rvic

es, A

-1N

ew d

ialo

g bo

x, 1

-4, 1

-18,

3-2

figu

re, 1

-5N

I E

xam

ple

Find

er, 2

-11

NI

Inst

rum

ent D

rive

r F

inde

r, 4

-13

NI

Inst

rum

ent D

rive

r N

etw

ork,

4-7

NI-

DA

Qm

x ta

sks,

4-1

3cr

eatin

g, 4

-2nu

mer

ic c

ontr

ols,

5-1

pale

tte,

1-7

O obje

cts

dese

lect

ing,

1-1

0w

irin

g on

the

bloc

k di

agra

m, 1

-10

Ope

rati

ng to

ol, 1

-11

outp

uts,

Exp

ress

VI,

1-2

0

P pale

ttes Ari

thm

etic

& C

ompa

riso

n, 1

-12

Con

trol

s, 1

-6E

xecu

tion

Con

trol

, 2-6

, 2-1

4Fu

ncti

ons,

1-1

2In

put,

2-3

LE

Ds,

3-1

0se

arch

ing,

2-6

show

ing

all c

ateg

orie

s, 5

-1, 5

-2pa

rsin

g in

form

atio

n fo

r in

stru

men

ts, 4

-11

plac

ing

obje

cts

on th

e bl

ock

diag

ram

fro

m th

e he

lp, 2

-13

Posi

tion

ing

tool

, 1-1

0pr

ogra

mm

atic

ally

con

trol

ling

VIs

, 5-4

prog

ram

min

g ex

ampl

es (

NI

reso

urce

s), A

-1pr

ojec

ts, 5

-5pr

oper

ty d

ialo

g bo

xes,

1-2

1pu

blis

hing

VIs

on

the

Web

, 5-4

R rela

ted

docu

men

tatio

n, x

rem

ovin

g in

dica

tors

, 2-8

Run

but

ton,

1-6

, 1-1

1br

oken

, 2-8

, 2-1

4ru

nnin

g V

Is, 1

-11

cont

inuo

usly

, 2-6

S savi

ng d

ata

diff

eren

t file

for

mat

s, 5

-4Sa

ve D

ata

VI b

lock

dia

gram

(fig

ure)

, 3-1

6

Page 49: Getting Started with LabVIEW - SFSU Physics & Astronomybland/courses/490/labs/L15gettingstartedwithlabview.pdfLabVIEW TM Getting Started with LabVIEW Getting Started with LabVIEW June

Inde

x

© N

atio

nal I

nstru

men

ts C

orpo

ratio

nI-5

Getti

ng S

tarte

d w

ith L

abVI

EW

to f

iles,

3-1

3, 3

-14,

3-1

7w

hen

prom

pted

by

user

, 3-1

5, 3

-16

Scal

ing

and

Map

ping

Exp

ress

VI

defi

ning

slo

pe, 1

-12

sear

chin

gex

ampl

es, 2

-11

help

, 2-4

, 2-1

1, 2

-13

pale

ttes,

2-6

sele

ctin

gin

stru

men

ts, 4

-10

obje

cts,

1-1

0sh

ared

libr

arie

s, b

uild

ing,

5-5

sign

als

acqu

irin

g, 4

-2an

alyz

ing,

3-9

chan

ging

type

, 1-8

grap

hing

, 1-1

5m

odif

ying

, 1-1

1, 2

-3Si

mul

ate

Sign

al E

xpre

ss V

I, 1

-8si

mul

ated

sig

nals

, cus

tom

izin

g, 3

-4so

ftw

are

(NI

reso

urce

s), A

-1su

bVIs

, 5-2

syst

em r

equi

rem

ents

, x

T tabl

es, 2

-9di

spla

ying

dat

a, 2

-14

task

s addi

ng n

ew c

hann

els,

4-6

NI-

DA

Qm

x, 4

-13

TD

M. S

ee .t

dm f

iles

.tdm

fil

es, 3

-17

.tdm

s fi

les,

3-1

7te

chni

cal s

uppo

rt, A

-1te

mpl

ate

VIs

, 1-3

, 1-4

, 1-1

8te

xt-b

ased

lang

uage

s, c

allin

g co

de, 5

-4, 5

-5T

ime

Del

ay E

xpre

ss V

I, 2

-9to

ols O

pera

ting,

1-1

1Po

sitio

ning

, 1-1

0

Wir

ing,

1-1

0tr

aini

ng a

nd c

erti

fica

tion

(N

I re

sour

ces)

, A-1

trou

bles

hoot

ing

(NI

reso

urce

s), A

-1

U user

inte

rfac

e. S

ee f

ront

pan

el

V virt

ual i

nstr

umen

ts. S

ee V

IsV

Is, 1

-1bl

ank,

2-2

buil

ding

, 1-2

cust

omiz

ing

men

us, 5

-5ic

ons,

5-2

new

, 2-2

prog

ram

mat

ical

ly c

ontr

ollin

g, 5

-4pu

blis

hing

on

the

Web

, 5-4

runn

ing,

1-1

1co

ntin

uous

ly, 2

-6su

bVIs

, 5-2

tem

plat

e, 1

-3, 1

-4, 1

-18

volt

age,

ana

lyzi

ng, 3

-9

W War

ning

Lig

ht V

I blo

ck d

iagr

am (f

igur

e), 3

-12

war

ning

ligh

ts, a

ddin

g, 3

-10

Web

res

ourc

es, A

-1W

hile

Loo

p, 2

-7w

ires br

oken

, 2-8

, 2-1

4de

letin

g, 1

-11

wir

ing ob

ject

s on

the

bloc

k di

agra

m, 1

-10

tool

, 1-1

0W

rite

to M

easu

rem

ent F

ile

Exp

ress

VI,

3-1

4,

3-17 sa

ving

dat

a, 3

-14