LabVIEW Graphical Programming Course

Collection edited by:
National Instruments

LabVIEW Graphical Programming Course

Collection edited by:
National Instruments

By:
National Instruments Malan Shiralkar

(Authors listed in the order their modules appear)

Online:

<http://cnx.org/content/col10241/1.4/ >

C O N N E X I O N S
Rice University, Houston, Texas

©PHHU x—tion—l snstruments
This selection and arrangement of content is licensed under the Creative Commons Attribution License: http://creativecommons.org/licenses/by/1.0

Table of Contents
1 2
ƒtudent quide

1.1

v—˜†si‡ gourse ixer™ise gode F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F FI

sntrodu™tion

3

2.1 v—˜†si‡ F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F S 2.2 v—˜†si‡ invironment F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F S 2.3 pront €—nel F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IW 2.4 flo™k hi—gr—m F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PP 2.5 e™quiring — ƒign—l †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PU 2.6 h—t—)ow €rogr—mming F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F QU 2.7 ixpress pilter †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F QV 2.8 v—˜†si‡ ho™ument—tion ‚esour™es F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F QW 2.9 ‚edu™e ƒ—mples †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F RP 2.10 he˜ugging „e™hniques F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F RV 2.11 he˜ug ixer™ise @w—inA †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F RW 2.12 ƒumm—ryD „ipsD —nd „ri™ks on sntrodu™tion to v—˜†si‡ F F F F F F F F F F F F F F F F F F F F F F F F F F SP 3.1 3.2 3.3 3.4 3.5 3.6 3.7 4.1 4.2 4.3 4.4 4.5 4.6 4.7 5.1 5.2 5.3 5.4 5.5 5.6 5.7 6.1 6.2 6.3 6.4 6.5
wodul—r €rogr—mming F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F SU s™ons —nd gonne™tor €—nes F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F SW gonvert g to p †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F TQ …sing ƒu˜†ss F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F TT „hermometer †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F TU gre—ting — ƒu˜†s from ƒe™tions of — †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F UI ƒumm—ryD „ipsD —nd „ri™ks on wodul—r €rogr—mming F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F UP ‡hile voops F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F UQ euto w—t™h †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F US por voops F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F UW „imed „emper—ture †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F VI e™™essing €revious voop h—t— F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F VQ e™™essing €revious h—t— †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F VS ƒumm—ryD „ipsD —nd „ri™ks on ‚epetition —nd voops F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F FVV err—ys F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F WI eutoEsndexing F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F WQ err—y pun™tions F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F WR €olymorphism F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F WT err—y ixer™ise †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F WU ƒumm—ryD „ipsD —nd „ri™ks on err—ys F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F WV eddition—l ixer™ises for err—ys F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F WW glusters F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IHI gluster pun™tions F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IHQ gluster ixer™ise †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IHS gluster ƒ™—ling †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F FIHV irror glusters F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IHW

wodul—r €rogr—mming

4

‚epetition —nd voops

5

err—ys

6

glusters

iv

7

6.6

ƒumm—ryD „ipsD —nd „ri™ks on glusters F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F III

€lotting h—t—

8

7.1 ‡—veform gh—rts F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IIQ 7.2 „emper—ture wonitor †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IIS 7.3 „emper—ture ‚unning ever—ge †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IPI 7.4 ‡—veform —nd ˆ‰ qr—phs F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IPS 7.5 qr—ph ‡—veform err—y †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IPU 7.6 „emper—ture en—lysis †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IQP 7.7 qr—ph gir™le †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IQS 7.8 sntensity €lots F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IQU 7.9 sntensity qr—ph ix—mple †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IQV 7.10 ƒumm—ryD „ipsD —nd „ri™ks on €lotting h—t— F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IQW 7.11 eddition—l ixer™ises for €lotting h—t— F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IRH 8.1 8.2 8.3 8.4 8.5 8.6 8.7 8.8
w—king he™isions with the ƒele™t pun™tion F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IRQ g—se ƒtru™tures F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IRR ƒqu—re ‚oot †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IRV „emper—ture gontrol †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F FISH pormul— xode F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F ISQ pormul— xode ixer™ise †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F FISR ƒumm—ryD „ipsD —nd „ri™ks on w—king he™isions in — †s F F F F F F F F F F F F F F F F F F F F F F F F F F F ISS eddition—l ixer™ises for w—king he™isions in — †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IST

w—king he™isions in — †s

9

ƒtrings —nd pile sGy

10

9.1 ƒtrings F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F ISU 9.2 ƒtring pun™tions F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F ISW 9.3 gre—te ƒtring †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F ITP 9.4 pile sGy †ss —nd pun™tions F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F ITS 9.5 righEvevel pile sGy †ss F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F ITU 9.6 ƒpre—dsheet ix—mple †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F ITV 9.7 vowEvevel pile sGy †s —nd pun™tions F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IUI 9.8 pile ‡riter †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IUQ 9.9 pile ‚e—der †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IUS 9.10 porm—tting ƒpre—dsheet ƒtrings F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IUU 9.11 „emper—ture vogger †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IVH 9.12 „emper—ture eppli™—tion †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IVR 9.13 ƒumm—ryD „ipsD —nd „ri™ks on ƒtrings —nd pile sGy F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IVS 9.14 eddition—l ixer™ises for ƒtrings —nd pilesGy F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IVT 10.1 yverview —nd gon(gur—tion of he hevi™es F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IVU 10.2 we—surement 8—mpY eutom—tion ixplorer @‡indows ynlyA F F F F F F F F F F F F F F F F F F F F F F IWI 10.3 h—t— e™quisition in v—˜†si‡ F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IWR 10.4 en—log snput F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IWS 10.5 †oltmeter †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IWU 10.6 we—surement ever—ging †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F IWW 10.7 h—t— vogging F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PHH 10.8 ƒimple h—t— vogger †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PHI 10.9 en—log yutput F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PHR 10.10 †olt—ge yutput †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PHS 10.11 gounters F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PHV

h—t— e™quisition —nd ‡—veforms

v

11

10.12 10.13 10.14 10.15 10.16

ƒimple ivent gounting †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PHW higit—l sGy F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PIH higit—l ix—mple †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PIH ƒumm—ryD „ipsD —nd „ri™ks on h—t— e™quisition —nd ‡—veforms F F F F F F F F F F F F F F F F PII eddition—l ixer™ises for h—t— e™quisition —nd ‡—veforms F F F F F F F F F F F F F F F F F F F F F F F PIP

snstrument gontrol

12

11.1 snstrument gontrol yverview F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PIQ 11.2 q€sf gommuni™—tion —nd gon(gur—tion F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F FPIQ 11.3 q€sf gon(gur—tion with weˆ @‡indows ynlyA F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PIT 11.4 …sing the snstrument sGy essist—nt F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PIV 11.5 …sing the snstrument sGy essist—nt ixer™ise F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PIW 11.6 †sƒe F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PPH 11.7 €rogr—mming with †sƒe F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PPP 11.8 e˜out snstrument hrivers F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F FPPR 11.9 …sing snstrument hriver †ss F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PPR 11.10 †olt—ge wonitor †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PPU 11.11 ƒeri—l €ort gommuni™—tion F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PPW 11.12 ƒeri—l ‡rite 8—mpY ‚e—d †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PQR 11.13 ‡—veform „r—nsfers F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PQU 11.14 ‡—veform ix—mple †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F FPRH 11.15 ƒumm—ryD „ipsD —nd „ri™ks on snstrument gontrol F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PRQ 11.16 eddition—l ixer™ises for snstrument gontrol F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PRQ 12.1 12.2 12.3 12.4 12.5 12.6 12.7 12.8 12.9 13.1
gon(guring the eppe—r—n™e of pront €—nels F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PRS ypening ƒu˜†s pront €—nels when — †s ‚uns F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PRU €opEup qr—ph †s —nd …se €opEup qr—ph †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PRU uey˜o—rd ƒhort™uts for gontrols F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PSH „emper—ture ƒystem †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PSH iditing †s €roperties F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PSP idit we †s F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PSQ gustomizing the gontrols —nd pun™tions €—lettes F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PSR ƒumm—ryD „ipsD —nd „ri™ks on gustomizing †ss F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PSR eppendix F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PSU

gustomizing †ss

13

eppendix ettri˜utions F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F PTS

vi

Chapter 1

Student Guide
1.1 LabVIEW Course Exercise Code
1.1.1 A. About This Course
„his ™ourse te—™hes you how to use v—˜†si‡ to develop test —nd me—surementD d—t— —™quisitionD instrument ™ontrolD d—t—loggingD me—surement —n—lysisD —nd report gener—tion —ppli™—tionsF „his ™ourse —ssumes th—t you —re f—mili—r with ‡indowsD w—™ yƒD or …xsˆ —nd th—t you h—ve experien™e writing —lgorithms in the form of )ow™h—rts or ˜lo™k di—gr—msF „he ™ourse is divided into lessonsD e—™h ™overing — topi™ or — set of topi™sF i—™h lesson ™onsists of the followingX

• en introdu™tion th—t des™ri˜es the purpose of the lesson —nd wh—t you will le—rn • e des™ription of the topi™s in the lesson • e set of exer™ises to reinfor™e those topi™sF ƒome lessons in™lude option—l —nd ™h—llenge exer™ise se™tions or — set of —ddition—l exer™ises to ™omplete if time permitsF • e summ—ry th—t outlines import—nt ™on™epts —nd skills t—ught in the lesson
ƒever—l exer™ises in this m—nu—l use one of the following x—tion—l snstruments h—rdw—re produ™tsX

• e plugEin multifun™tion d—t— —™quisition @heA devi™e ™onne™ted to — he ƒign—l e™™essory ™ont—ining — temper—ture sensorD fun™tion gener—torD —nd vihs • e q€sf interf—™e ™onne™ted to —n xs snstrument ƒimul—tor
sf you do not h—ve this h—rdw—reD you still ™—n ™omplete most of the exer™isesF fe sure to use the demo versions of the †ss when you —re working through exer™isesF ixer™ises th—t expli™itly require h—rdw—re —re indi™—ted with —n i™onD shown in pigure IF ‰ou —lso ™—n su˜stitute other h—rdw—re for those previously mentionedF por ex—mpleD you ™—n use — q€sf instrument in pl—™e of the xs snstrument ƒimul—torD or —nother x—tion—l snstruments he devi™e ™onne™ted to — sign—l sour™eD su™h —s — fun™tion gener—torF

I

P

CHAPTER 1. STUDENT GUIDE

1.1.2 B. What You Need to Get Started
fefore you use this ™ourse m—nu—lD ensure you h—ve —ll the following itemsX

• @‡indowsA ‡indows WV or l—ter inst—lled on your ™omputerY @w—™ yƒA ƒystem IHFP or l—ter for w—™ yƒ ˆD ƒystem WFI or l—ter for yƒ WFx or e—rlierY @…xsˆA ƒun workst—tion running ƒol—ris PFSFI or l—ter —nd ˆ ‡indow ƒystem serverD su™h —s ypen‡indowsD ghiD or ˆII‚TD or — €g running vinux kernel PFHFx or l—ter for sntel xVT pro™essors • @‡indowsA wultifun™tion he devi™e ™on(gured —s devi™e I using we—surement 8 eutom—E tion ixplorer @weˆA • he ƒign—l e™™essoryD wiresD —nd ™—˜le • q€sf interf—™e • xs snstrument ƒimul—tor —nd power supply • v—˜†si‡ pull or €rofession—l hevelopment ƒystem UFH or l—terF
„his ™ourse —ssumes you —re using the def—ult inst—ll—tion of v—˜†si‡F sf you h—ve ™h—nged the p—lette views from the def—ult settingsD some p—lette p—ths des™ri˜ed in the ™ourse m—y not m—t™h your settingsF „o reset p—lette views to v—˜†si‡ def—ultsD sele™t „ools yptions —nd sele™t gontrolsGpun™tions €—lettes from the top pullEdown menuF ƒet €—lette †iew to ixpress —nd set porm—t to ƒt—nd—rdF gli™k the yu ˜utton to —pply the ™h—nges —nd ™lose the di—log ˜oxF

• e seri—l ™—˜le • e q€sf ™—˜le • @yption—lA e word pro™essing —ppli™—tion su™h —s xotep—d or ‡ord€—d • „he following (les provided
pilen—me ixer™ises1 nidevsimFzip ƒolutions2 hes™ription polder for s—ving †ss ™re—ted during the ™ourse —nd for ™ompleting ™ert—in ™ourse exer™isesY —lso in™ludes su˜†ss ne™ess—ry for some exer™ises ip (le ™ont—ining the v—˜†si‡ instrument driver for the xs snstrument ƒimul—tor @gont—ined in ixer™isesFzipA polder ™ont—ining the solutions to —ll the ™ourse exer™ises

1.1.3 C. Installing the Course Software
gomplete the following steps to inst—ll the ™ourse softw—reF IF gopy the ™ontents of the nidevsim dire™tory to the l—˜view\instrFli˜ dire™toryF efter you st—rt v—˜†si‡D the xs hevƒim instrument driver is lo™—ted on the pun™tions snput snstrument hrivers p—letteF PF gopy the ixer™ises dire™tory3 to the top level of the gX dire™toryF QF gopy the ƒolutions dire™tory4 to the top level of the gX dire™toryF
3 http://cnx.org/content/m14634/latest/Exercises.zip 4 http://cnx.org/content/m14634/latest/Solutions.zip

Q

1.1.4 D. Course Goals and Non-Goals
„his ™ourse prep—res you to do the followingX

• …nderst—nd front p—nelsD ˜lo™k di—gr—msD i™onsD —nd ™onne™tor p—nes • …se the progr—mming stru™tures —nd d—t— types th—t exist in v—˜†si‡ • …se v—rious editing —nd de˜ugging te™hniques • gre—te —nd s—ve †ss so you ™—n use them —s su˜†ss • hispl—y —nd log d—t— • gre—te —ppli™—tions th—t use plugEin he devi™es • gre—te —ppli™—tions th—t use seri—l port —nd q€sf instruments
„his ™ourse does not des™ri˜e —ny of the followingX

• ivery ˜uiltEin †sD fun™tionD or o˜je™tY refer to the v—˜†si‡ relp for more inform—tion —˜out v—˜†si‡ fe—tures not des™ri˜ed in this ™ourse • en—logEtoEdigit—l @eGhA theory • yper—tion of the seri—l port • yper—tion of the q€sf ˜us • heveloping —n instrument driver • heveloping — ™omplete —ppli™—tion for —ny student in the ™l—ssY refer to the xs ix—mple pinderD —v—il—˜le ˜y sele™ting relp pind ix—mplesD for ex—mple †ss you ™—n use —nd in™orpor—te into †ss you ™re—te
Note:

sf you need —ssist—n™e ˜eyond th—t provided in this ™ourseD you ™—n post — mess—ge to the x—tion—l snstruments dis™ussion forums —tX httpXGGforumsFniF™omG

R

CHAPTER 1. STUDENT GUIDE

Chapter 2

Introduction
2.1 LabVIEW
v—˜†si‡ progr—ms —re ™—lled virtual instrumentsD or VIsD ˜e™—use their —ppe—r—n™e —nd opE er—tion imit—te physi™—l instrumentsD su™h —s os™illos™opes —nd multimetersF v—˜†si‡ ™ont—ins — ™omprehensive set of tools for —™quiring —n—lyzingD displ—yingD —nd storing d—t—D —s well —s tools to help you trou˜leshoot your ™odeF v—˜†si‡ †ss ™ont—in three ™omponentsEthe front panelD the block diagramD —nd the icon —nd connector paneF „his lesson des™ri˜es the front p—nel —nd the ˜lo™k di—gr—mY refer to wodul—r €rogr—mming @ƒe™tion QFIA for more inform—tion —˜out the i™on —nd the ™onne™tor p—neF sn v—˜†si‡D you ˜uild — user interf—™eD or front p—nelD with ™ontrols —nd indi™—torsF gontrols —re kno˜sD push ˜uttonsD di—lsD —nd other input devi™esF sndi™—tors —re gr—phsD vihsD —nd other displ—ysF efter you ˜uild the user interf—™eD you —dd ™ode using †ss —nd stru™tures to ™ontrol the front p—nel o˜je™tsF „he ˜lo™k di—gr—m ™ont—ins this ™odeF sn some w—ysD the ˜lo™k di—gr—m resem˜les — )ow™h—rtF …se v—˜†si‡ to ™ommuni™—te with h—rdw—re su™h —s d—t— —™quisitionD visionD —nd motion ™ontrol devi™esD —nd q€sfD €ˆsD †ˆsD ‚ƒEPQPD —nd ‚ƒERVR devi™esF v—˜†si‡ —lso h—s ˜uiltEin fe—tures for ™onne™ting your —ppli™—tion to the ‡e˜ using the v—˜†si‡ ‡e˜ ƒerver —nd softw—re st—nd—rds su™h —s „g€Gs€ networking —nd e™tiveˆF …sing v—˜†si‡D you ™—n ™re—te test —nd me—surementD d—t— —™quisitionsD instrument ™ontrolD d—t—loggingD me—surement —n—lysisD —nd report gener—tion —ppli™—tionsF ‰ou —lso ™—n ™re—te st—ndE —lone exe™ut—˜les —nd sh—red li˜r—riesD like hvvsD ˜e™—use v—˜†si‡ is — true QPE˜it ™ompilerF

2.2 LabVIEW Environment
‡hen you l—un™h v—˜†si‡D the n—vig—tion di—log ˜ox @pigure PFIA —ppe—rs th—t in™ludes introdu™E tory m—teri—l —nd ™ommon ™omm—ndsF

S

T

CHAPTER 2. INTRODUCTION

Figure 2.1:

LabVIEW Dialog Box

„he v—˜†si‡ di—log ˜ox in™ludes the following ™omponentsX

• e menu with st—nd—rd items su™h —s pile

ixitF

• e set of ˜uttons for ™re—ting —nd opening †ssD ™on(guring d—t— —™quisition devi™esD —nd (nding helpful inform—tionF · gli™k the xew ˜utton to ™re—te — new †sF gli™k the —rrow on the xew ˜utton to ™hoose to open — ˜l—nk †s or to open the xew di—log ˜oxF · gli™k the ypen ˜utton to open —n existing †sF gli™k the —rrow on the ypen ˜utton to open re™ent (lesF · gli™k the gon(gure ˜utton to ™on(gure your d—t— —™quisition devi™esF gli™k the —rrow on the gon(gure ˜utton to ™on(gure v—˜†si‡F · gli™k the relp ˜utton to l—un™h the LabVIEW HelpF gli™k the —rrow on the relp ˜utton for other relp optionsD in™luding the xs ix—mple pinderF

2.2.1 Creating and Saving a VI
‡hen you ™li™k the xew ˜utton in the v—˜†si‡ di—log ˜oxD the xew di—log ˜ox —ppe—rsF ‰ou —lso ™—n sele™t pile xew to displ—y this di—log ˜oxF ‡hen you sele™t — templ—te in the gre—te new listD previews of the †s —ppe—r in the pront p—nel preview —nd the flo™k di—gr—m preview se™tionsD —nd — des™ription of the templ—te —ppe—rs in the hes™ription se™tionF pigure PFP shows the xew di—log ˜ox —nd the ƒu˜†s with irror r—ndling †s templ—teF

U

Figure 2.2:

New Dialog Box

gli™k the yu ˜utton to open the templ—teF ‰ou —lso ™—n dou˜leE™li™k the n—me of the templ—te †s in the gre—te new list to open the templ—teF sf no templ—te is —v—il—˜le for the t—sk you w—nt to ™re—teD you ™—n st—rt with — ˜l—nk †s —nd ™re—te — †s to —™™omplish the spe™i(™ t—skF sn the v—˜†si‡ di—log ˜oxD ™li™k the —rrow on the xew ˜utton —nd sele™t fl—nk †s from the short™ut menu or press the gtrlEx keys to open — ˜l—nk †sF
note:

‰ou —lso ™—n open — ˜l—nk †s ˜y sele™ting fl—nk †s from the gre—te new list in the xew di—log ˜ox or ˜y sele™ting pile xew †sF

2.2.1.1 Open/Templates
…se the xew di—log ˜ox to ™re—te di'erent ™omponents in v—˜†si‡ to help you ˜uild —n —ppli™—tionF ‰ou ™—n st—rt with — ˜l—nk †s to write — †s from s™r—t™hD or st—rt with — templ—te to simplify the progr—mmingF „he xew di—log ˜ox in™ludes the following ™omponentsX

Create new

E hispl—ys templ—tes you ™—n use to st—rt ˜uilding †ss —nd other v—˜†si‡

V

CHAPTER 2. INTRODUCTION

do™umentsF ƒele™t from the following templ—tes —nd ™li™k the yu ˜utton to st—rt ˜uilding — †s or other v—˜†si‡ do™umentF

· · ·

Blank VI E ypens — ˜l—nk front p—nel —nd ˜l—nk ˜lo™k di—gr—mF VI from Template E ypens — front p—nel —nd ˜lo™k di—gr—m with ™omponents you need
to ˜uild di'erent types of †ssF

or templ—teF sf you previously h—ve ˜rowsed for —nd sele™ted — templ—te from this di—log ˜oxD use the pullEdown menu of the frowse ˜utton to sele™t — templ—te to reopen itF

Other Document Types E ypens the tools you use to ˜uild other v—˜†si‡ o˜je™tsF Browse for Template E hispl—ys the frowse di—log ˜ox so you ™—n n—vig—te to — †sD ™ontrolD

• • •

Front panel preview
gre—te new listF the gre—te new listF

E hispl—ys the front p—nel for the †s templ—te you sele™ted in the

Block diagram preview E hispl—ys the ˜lo™k di—gr—m for the †s templ—te you sele™ted in

Description E hispl—ys — des™ription of the templ—te you sele™ted in the gre—te new list if the templ—te in™ludes — des™riptionF

2.2.1.2 Opening an Existing VI
‰ou lo—d — †s into memory ˜y sele™ting pile ypenF sn the ghoose the †s to open di—log ˜ox th—t —ppe—rsD n—vig—te to the †s you w—nt to openF „he †ss you edit in this ™ourse —re lo™—ted in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF es the †s lo—dsD — st—tus di—log ˜ox simil—r to pigure PFQ might —ppe—rF

Figure 2.3

„he vo—ding se™tion lists the su˜†ss of the †s —s they —re lo—ded into memoryF xum˜er vo—ded is the num˜er of su˜†ss lo—ded into memory so f—rF ‰ou ™—n ™—n™el the lo—d —t —ny time ˜y ™li™king the ƒtop ˜uttonF sf v—˜†si‡ ™—nnot immedi—tely lo™—te — su˜†sD it ˜egins se—r™hing through —ll dire™tories spe™i(ed ˜y the †s ƒe—r™h €—thF ‰ou ™—n edit the †s ƒe—r™h €—th ˜y sele™ting „ools yptions

W

—nd sele™ting €—ths from the top pullEdown menuF „he ƒe—r™hing se™tion lists dire™tories or †ss —s v—˜†si‡ se—r™hes through themF ‰ou ™—n h—ve v—˜†si‡ ignore — su˜†s ˜y ™li™king the sgnore ƒu˜†s ˜uttonD or you ™—n ™li™k the frowse ˜utton to se—r™h for the missing su˜†sF

2.2.1.3 Saving VIs
ƒele™t ƒ—veD ƒ—ve esD ƒ—ve ellD or ƒ—ve with yptions from the pile menu to s—ve †ss —s individu—l (les or group sever—l †ss together —nd s—ve them in — †s li˜r—ryF †s li˜r—ry (les end with the extension Fll˜F x—tion—l snstruments re™ommends th—t you s—ve †ss —s individu—l (lesD org—nized in dire™toriesD espe™i—lly if multiple developers —re working on the s—me proje™tF v—˜†si‡ uses the n—tive (le di—log ˜oxes so they —™t simil—r to other —ppli™—tions on the ™omputerF ‰ou ™—n dis—˜le this fe—ture ˜y sele™ting „ools yptions —nd sele™ting wis™ell—neous from the top pullEdown menuF sf you dis—˜le n—tive (le di—logsD v—˜†si‡ uses its own pl—tformE independent (le di—log ˜oxes with some ™onvenient fe—turesD su™h —s providing — list of re™ent p—ths —nd redu™ing the steps ne™ess—ry to s—ve †ss in †s li˜r—riesF

2.2.1.4 Moving VIs Across Platforms
‰ou ™—n tr—nsfer †ss from one pl—tform to —notherD su™h —s from w—™ yƒ to ‡indowsF v—˜†si‡ —utom—ti™—lly tr—nsl—tes —nd re™ompiles the †ss on the new pl—tformF fe™—use †ss —re (lesD you ™—n use —ny (le tr—nsfer method or utility to move †ss ˜etween pl—tformsF ‰ou ™—n port †ss over networks using p„€D  or ˆwodem proto™olsD or simil—r utilitiesF ƒu™h network tr—nsfers elimin—te the need for —ddition—l (le tr—nsl—tion softw—reF sf you port †ss using m—gneti™ medi—D su™h —s )oppy disks or — move—˜le extern—l h—rd driveD you need — generi™ (le tr—nsfer utility progr—mD su™h —s the followingX

• @Windows A w—™hisk —nd „r—nsfer€ro tr—nsfer w—™ yƒ (les to the €g form—t —nd vi™e vers—F • @Mac OS A hyƒ wounterD w—™vinkD —nd epple pile ix™h—nge ™onvert €g (les to the w—™ yƒ form—t —nd vi™e vers—F • @SunA €g pile ƒystem @€gpƒA ™onverts €g (les to the ƒun form—t —nd vi™e vers—F
note:

gert—in oper—ting systemEspe™i(™ †ss —re not port—˜le ˜etween pl—tformsD su™h —s hhi @hyn—mi™ h—t— ix™h—ngeA †ssD e™tiveˆ †ssD —nd eppleiventsF

‚efer to the Porting and Localizing LabVIEW VIs eppli™—tion xoteD —v—il—˜le ˜y sele™ting relp ƒe—r™h the v—˜†si‡ fookshelfD for more inform—tion —˜out porting †ssF

2.2.2 Menus
„he menus —t the top of — †s window ™ont—in items ™ommon to other —ppli™—tionsD su™h —s ypenD ƒ—veD gopyD —nd €—steD —nd other items spe™i(™ to v—˜†si‡F ƒome menu items —lso list short™ut key ™om˜in—tionsF @Mac OS A „he menus —ppe—r —t the top of the s™reenF @Windows —nd UNIX A „he menus displ—y only the most re™ently used items ˜y def—ultF gli™k the —rrows —t the ˜ottom of — menu to displ—y —ll itemsF ‰ou ™—n displ—y —ll menu items ˜y def—ult ˜y sele™ting „ools yptions —nd sele™ting wis™ell—neous from the top pullEdown menuF
note:

ƒome menu items —re un—v—il—˜le while — †s is in run modeF

• „he pile menu ™ont—ins items used for ˜—si™ (le oper—tionsD su™h —s openingD ™losingD s—vingD —nd printing (lesF

IH

CHAPTER 2. INTRODUCTION

• „he idit menu ™ont—ins items th—t —llow you to se—r™h for —nd modify v—˜†si‡ (les —nd their ™omponentsF • „he yper—te menu ™ont—ins items you use to ™ontrol the oper—tion of †ssF • „he „ools menu ™ont—ins items for ™on(guring v—˜†si‡D your proje™tsD —nd your †ssF • „he frowse menu ™ont—ins items th—t —llow you to view —spe™ts of the ™urrent †s —nd its hier—r™hyF • „he ‡indow menu ™ont—ins items th—t —llow you to ™on(gure the —ppe—r—n™e of the ™urrent windows —nd p—lettesF ‰ou —lso ™—n —™™ess the irror vist window —nd view the ™ontents of the ™lip˜o—rdF • „he relp menu ™ont—ins items to expl—in —nd de(ne v—˜†si‡ fe—tures —nd other ™omponentsD provide full v—˜†si‡ do™ument—tionD —nd —™™ess x—tion—l snstruments te™hni™—l supportF

2.2.3 Front Panel and Block Diagram Windows
‡hen you open — ˜l—nk †sD —n untitled front p—nel window —ppe—rsF „his window displ—ys the front p—nel —nd is one of the two v—˜†si‡ windows you use to ˜uild — †sF „he other window ™ont—ins the ˜lo™k di—gr—mF „he illustr—tion in pigure PFR shows — front p—nel —nd its ™orresponding ˜lo™k di—gr—m with front p—nel —nd ˜lo™k di—gr—m ™omponentsF

II

1. Toolbar, 2. Owned Label, 3. Numeric Control, 4. Free Label, 5. Numeric Control Terminal, 6. Knob Terminal, 7. Numeric Constant, 8. Multiply Function, 9. Icon, 10. Knob Control, 11. Plot Legend, 12. XY Graph, 13. Wire Data Path, 14. XY Graph Terminal, 15. Bundle Function, 16. SubVI, 17. For Loop Structure
Figure 2.4:

2.2.4 Front Panel Toolbar
…se the tool˜—r ˜uttons to run —nd edit — †sF „he tool˜—r in pigure PFS —ppe—rs on the front p—nelF

IP

CHAPTER 2. INTRODUCTION

Figure 2.5

gli™k the ‚un ˜utton to run — †sF v—˜†si‡ ™ompiles the †sD if ne™ess—ryF ‰ou ™—n run — †s if the ‚un ˜utton —ppe—rs —s — solid white —rrowF „he solid white —rrowD shown —˜oveD —lso indi™—tes you ™—n use the †s —s — su˜†s if you ™re—te — ™onne™tor p—ne for the †sF ‡hile the †s runsD the ‚un ˜utton —ppe—rs —s shown —t left if the †s is — topElevel †sD me—ning it h—s no ™—llers —nd therefore is not — su˜†sF sf the †s th—t is running is — su˜†sD the ‚un ˜utton —ppe—rs —s shown —t leftF „he ‚un ˜utton —ppe—rs ˜rokenD shown —t leftD when the †s you —re ™re—ting or editing ™ont—ins errorsF sf the ‚un ˜utton still —ppe—rs ˜roken —fter you (nish wiring the ˜lo™k di—gr—mD the †s is ˜roken —nd ™—nnot runF gli™k this ˜utton to displ—y the irror list windowD whi™h lists —ll errors —nd w—rningsF gli™k the ‚un gontinuously ˜uttonD shown —t leftD to run the †s until you —˜ort or p—use exe™utionF ‰ou —lso ™—n ™li™k the ˜utton —g—in to dis—˜le ™ontinuous runningF ‡hile the †s runsD the e˜ort ixe™ution ˜uttonD shown —t leftD —ppe—rsF gli™k this ˜utton to stop the †s immedi—tely if there is no other w—y to stop the †sF sf more th—n one running topElevel †s uses the †sD the ˜utton is dimmedF evoid using the e˜ort ixe™ution ˜utton to stop — †sF iither let the †s ™omplete its d—t— )ow or design — method to stop the †s progr—mm—ti™—llyF fy doing soD the †s is —t — known st—teF por ex—mpleD pl—™e — ˜utton on the front p—nel th—t stops the †s when you ™li™k itF
note:

gli™k the €—use ˜uttonD shown —t leftD to p—use — running †sF ‡hen you ™li™k the €—use ˜uttonD v—˜†si‡ highlights on the ˜lo™k di—gr—m the lo™—tion where you p—used exe™utionD —nd the €—use ˜utton —ppe—rs redF gli™k the ˜utton —g—in to ™ontinue running the †sF ƒele™t the „ext ƒettings pullEdown menuD shown —t leftD to ™h—nge the font settings for the sele™ted portions of the †sD in™luding sizeD styleD —nd ™olorF ƒele™t the elign y˜je™ts pullEdown menuD shown —t leftD to —lign o˜je™ts —long —xesD in™luding verti™—lD top edgeD leftD —nd so onF ƒele™t the histri˜ute y˜je™ts pullEdown menuD shown —t leftD to sp—™e o˜je™ts evenlyD in™luding g—psD ™ompressionD —nd so onF ƒele™t the ‚esize y˜je™ts pullEdown menuD shown —t leftD to resize multiple front p—nel o˜je™ts to the s—me sizeF

IQ

ƒele™t the ‚eorder pullEdown menuD shown —t leftD when you h—ve o˜je™ts th—t overl—p e—™h other —nd you w—nt to de(ne whi™h one is in front or ˜—™k of —notherF ƒele™t one of the o˜je™ts with the €ositioning tool —nd then sele™t from wove porw—rdD wove f—™kw—rdD wove „o prontD —nd wove „o f—™kF ƒele™t the ƒhow gontext relp ‡indow ˜uttonD shown —t leftD to toggle the displ—y of the gontext relp windowF „ype —ppe—rs to remind you th—t — new v—lue is —v—il—˜le to repl—™e —n old v—lueF „he inter ˜utton dis—ppe—rs when you ™li™k itD press the inter keyD or ™li™k the front p—nel or ˜lo™k di—gr—m worksp—™eF

2.2.5 Block Diagram Toolbar
‡hen you run — †sD ˜uttons —ppe—r on the ˜lo™k di—gr—m tool˜—r th—t you ™—n use to de˜ug the †sF „he tool˜—r in pigure PFT —ppe—rs on the ˜lo™k di—gr—mF

Figure 2.6

gli™k the righlight ixe™ution ˜uttonD shown —t leftD to displ—y —n —nim—tion of the ˜lo™k di—gr—m exe™ution when you ™li™k the ‚un ˜uttonF see the )ow of d—t— through the ˜lo™k di—gr—mF gli™k the ˜utton —g—in to dis—˜le exe™ution highlightingF gli™k the ƒtep snto ˜uttonD shown —t leftD to open — node —nd p—useF ‡hen you ™li™k the ƒtep snto ˜utton —g—inD it exe™utes the (rst —™tion —nd p—uses —t the next —™tion of the su˜†s or stru™tureF ‰ou —lso ™—n press the gtrl —nd down —rrow keysF ƒingleEstepping through — †s steps through the †s node ˜y nodeF i—™h node ˜links to denote when it is re—dy to exe™uteF fy stepping into the nodeD you —re re—dy to singleEstep inside the nodeF gli™k the ƒtep yver ˜uttonD shown —t leftD to exe™ute — node —nd p—use —t the next nodeF ‰ou —lso ™—n press the gtrl —nd right —rrow keysF fy stepping over the nodeD you exe™ute the node without singleEstepping through the nodeF gli™k the ƒtep yut ˜uttonD shown —t leftD to (nish exe™uting the ™urrent node —nd p—useF ‡hen the †s (nishes exe™utingD the ƒtep yut ˜utton ˜e™omes dimmedF ‰ou —lso ™—n press the gtrl —nd up —rrow keysF fy stepping out of — nodeD you ™omplete singleEstepping through the node —nd go to the next nodeF „he ‡—rning ˜uttonD shown —t leftD —ppe—rs if — †s in™ludes — w—rning —nd you pl—™ed — ™he™km—rk in the ƒhow ‡—rnings ™he™k˜ox in the irror vist windowF e w—rning indi™—tes there is — potenti—l pro˜lem with the ˜lo™k di—gr—mD ˜ut it does not stop the †s from runningF

IR

CHAPTER 2. INTRODUCTION

2.2.6 Palettes
v—˜†si‡ h—s gr—phi™—lD )o—ting p—lettes to help you ™re—te —nd run †ssF „he three p—lettes in™lude the „oolsD gontrolsD —nd pun™tions p—lettesF ‰ou ™—n pl—™e these p—lettes —nywhere on the s™reenF

2.2.6.1 Tools Palette
‰ou ™—n ™re—teD modifyD —nd de˜ug †ss using the tools lo™—ted on the )o—ting „ools @pigure PFUA p—letteF „he „ools p—lette is —v—il—˜le on ˜oth the front p—nel —nd the ˜lo™k di—gr—mF e tool is — spe™i—l oper—ting mode of the mouse ™ursorF „he ™ursor ™orresponds to the i™on of the tool sele™ted in the „ools p—letteF …se the tools to oper—te —nd modify front p—nel —nd ˜lo™k di—gr—m o˜je™tsF ƒele™t ‡indow ƒhow „ools €—lette to displ—y the „ools p—letteF
note:

€ress the ƒhift key —nd rightE™li™k to displ—y — tempor—ry version of the „ools p—lette —t the lo™—tion of the ™ursorF

Figure 2.7:

Tools Palette

sf —utom—ti™ tool sele™tion is en—˜led —nd you move the ™ursor over o˜je™ts on the front p—nel or ˜lo™k di—gr—mD v—˜†si‡ —utom—ti™—lly sele™ts the ™orresponding tool from the „ools p—letteF ‰ou ™—n dis—˜le —utom—ti™ tool sele™tion —nd sele™t — tool m—nu—lly ˜y ™li™king the tool you w—nt on the „ools p—letteF sf you w—nt to use the „—˜ key to ™y™le through the four most ™ommon tools on the „ools p—letteD ™li™k the eutom—ti™ „ool ƒele™tion ˜uttonD shown —t leftD on the „ools p—lette to dis—˜le —utom—ti™ tool sele™tionF €ress the ƒhiftE„—˜ keys or ™li™k the eutom—ti™ „ool ƒele™tion ˜utton to en—˜le —utom—ti™ tool sele™tion —g—inF ‰ou —lso ™—n m—nu—lly sele™t — tool on the „ools p—lette to dis—˜le —utom—ti™ tool sele™tionF €ress the „—˜ or ƒhiftE„—˜ keys or ™li™k the eutom—ti™ „ool ƒele™tion ˜utton on the „ools p—lette to en—˜le —utom—ti™ tool sele™tion —g—inF sf —utom—ti™ tool sele™tion is dis—˜ledD you ™—n press the sp—™e˜—r to swit™h to the next most useful toolF …se the yper—ting toolD shown —t leftD to ™h—nge the v—lues of — ™ontrol or sele™t the text within — ™ontrolF „he yper—ting tool ™h—nges to the i™on shown —t left when it moves over — text ™ontrolD su™h —s — numeri™ or string ™ontrolF …se the €ositioning toolD shown —t leftD to sele™tD moveD or resize o˜je™tsF „he €ositioning tool ™h—nges to resizing h—ndles when it moves over the edge of — resiz—˜le o˜je™tF

IS

…se the v—˜eling toolD shown —t leftD to edit text —nd ™re—te free l—˜elsF „he v—˜eling tool ™h—nges to the following i™on when you ™re—te free l—˜elsF …se the ‡iring toolD shown —t leftD to wire o˜je™ts together on the ˜lo™k di—gr—mF …se the y˜je™t ƒhort™ut wenuD shown —t leftD tool to —™™ess —n o˜je™t short™ut menu with the left mouse ˜uttonF …se the ƒ™rolling toolD shown —t leftD to s™roll through windows without using s™roll˜—rsF …se the fre—kpoint toolD shown —t leftD to set ˜re—kpoints on †ssD fun™tionsD nodesD wiresD —nd stru™tures to p—use exe™ution —t th—t lo™—tionF …se the €ro˜e toolD shown —t leftD to ™re—te pro˜es on wires on the ˜lo™k di—gr—mF …se the €ro˜e tool to ™he™k intermedi—te v—lues in — †s th—t produ™es question—˜le or unexpe™ted resultsF …se the golor gopy toolD shown —t leftD to ™opy ™olors for p—sting with the goloring toolF

…se the goloring toolD shown —t leftD to ™olor —n o˜je™tF st —lso displ—ys the ™urrent foreground —nd ˜—™kground ™olor settingsF

2.2.6.2 Controls and Functions Palettes
„he gontrols —nd pun™tions p—lettes ™ont—in su˜p—lettes of o˜je™ts you ™—n use to ™re—te — †sF ‡hen you ™li™k — su˜p—lette i™onD the entire p—lette ™h—nges to the su˜p—lette you sele™tedF „o use —n o˜je™t on the p—lettesD ™li™k the o˜je™t —nd pl—™e it on the front p—nel or ˜lo™k di—gr—mF „he gontrols p—letteD shown in pigure PFVD is —v—il—˜le only on the front p—nelF „he gontrols p—lette ™ont—ins the ™ontrols —nd indi™—tors you use to ˜uild the front p—nelF ‚efer to the pront €—nel @ƒe™tion PFQA se™tion for more inform—tion —˜out the using the gontrols p—lette on the front p—nelF „he ™ontrols —nd indi™—tors lo™—ted on the gontrols p—lette depend on the p—lette view ™urrently sele™tedF

Figure 2.8:

Controls Palette

IT

CHAPTER 2. INTRODUCTION

„he pun™tions p—letteD shown in the pigure PFWD is —v—il—˜le only on the ˜lo™k di—gr—mF „he pun™tions p—lette ™ont—ins the †ss —nd fun™tions you use to ˜uild the ˜lo™k di—gr—mF ‚efer to the flo™k hi—gr—m @ƒe™tion PFRA se™tion of this lesson for more inform—tion —˜out using the pun™tions p—lette on the ˜lo™k di—gr—mF „he †ss —nd fun™tions lo™—ted on the pun™tions p—lette depend on the p—lette view ™urrently sele™tedF „he †ss —nd fun™tions —re lo™—ted on su˜p—lettes ˜—sed on the types of †ss —nd fun™tionsF

Figure 2.9:

Functions Palette

2.2.6.3 Changing Palette Views
…se the yptions ˜utton on the gontrols or pun™tions p—lette tool˜—r to ™h—nge to —nother p—lette view or form—tX IF gli™k the yptions ˜uttonD shown —t leftD on the gontrols or pun™tions p—lette tool˜—r to displ—y the gontrolsGpun™tions €—lettes p—ge of the yptions di—log ˜oxF

PF ƒele™t — p—lette view from the €—lette †iew pullEdown menuF QF ƒele™t — form—t from the porm—t pullEdown menuD su™h —s ƒt—nd—rdD ell s™onsD ell „extD or s™ons —nd „extF RF gli™k the yu ˜uttonF „he gontrols —nd pun™tions p—lettes ™h—nge to the p—lette view —nd form—t you sele™tedF

2.2.6.4 Searching for Controls, VIs, and Functions
…se the following n—vig—tion ˜uttons on the gontrols —nd pun™tions p—lettes to n—vig—te —nd se—r™h for ™ontrolsD †ssD —nd fun™tionsX

• •

Up to Owning Palette E Search E

x—vig—tes up one level in the p—lette hier—r™hyF

gh—nges the p—lette to se—r™h modeF sn se—r™h modeD you ™—n perform textE ˜—sed se—r™hes to lo™—te ™ontrolsD †ssD or fun™tions on the p—lettesF por ex—mpleD if you w—nt to (nd the ‚—ndom xum˜er fun™tionD ™li™k the ƒe—r™h ˜utton on the pun™tions p—lette tool˜—r

IU

—nd st—rt typing ‚—ndom xum˜er in the text ˜ox —t the top of the p—letteF v—˜†si‡ lists —ll m—t™hing items th—t either st—rt with or ™ont—in the text you typedF ‰ou ™—n ™li™k one of the se—r™h results —nd dr—g it to the ˜lo™k di—gr—mD —s shown in pigure PFIHF

Figure 2.10

hou˜leE™li™k the se—r™h result to highlight its lo™—tion on the p—letteF ‰ou then ™—n ™li™k the …p to ywning €—lette ˜utton to view the hier—r™hy of where the o˜je™t residesF

2.2.7 Shortcut Menus
„he most oftenEused menu is the o˜je™t short™ut menuF ell v—˜†si‡ o˜je™ts —nd empty sp—™e on the front p—nel —nd ˜lo™k di—gr—m h—ve —sso™i—ted short™ut menusF …se the short™ut menu items to ™h—nge the look or ˜eh—vior of front p—nel —nd ˜lo™k di—gr—m o˜je™tsF „o —™™ess the short™ut menuD rightE™li™k the o˜je™tD front p—nelD or ˜lo™k di—gr—mF „he short™ut menu for — meter is shown in pigure PFIIF

IV

CHAPTER 2. INTRODUCTION

Figure 2.11:

Meter Shortcut Menu

2.2.7.1 Property Dialog Boxes
pront p—nel o˜je™ts —lso h—ve property di—log ˜oxes th—t you ™—n use to ™h—nge the look or ˜eh—vior of front p—nel o˜je™tsF ‚ightE™li™k — front p—nel o˜je™t —nd sele™t €roperties from the short™ut menu to —™™ess the property di—log ˜ox for —n o˜je™tF pigure PFIP shows the property di—log ˜ox for the meter in the previous (gureF „he options —v—il—˜le on the property di—log ˜ox for —n o˜je™t —re simil—r to the options —v—il—˜le on the short™ut menu for th—t o˜je™tF

IW

Figure 2.12:

Meter Property Dialog Box

2.3 Front Panel
„he front p—nel is the user interf—™e of the †sF pigure PFIQ shows —n ex—mple of — front p—nelF

PH

CHAPTER 2. INTRODUCTION

Figure 2.13:

Example of a Front Panel

2.3.1 Controls and Indicators
‰ou ˜uild the front p—nel with ™ontrols —nd indi™—torsD whi™h —re the inter—™tive input —nd output termin—ls of the †sD respe™tivelyF gontrols —re kno˜sD push ˜uttonsD di—lsD —nd other input devi™esF sndi™—tors —re gr—phsD vihsD —nd other displ—ysF gontrols simul—te instrument input devi™es —nd supply d—t— to the ˜lo™k di—gr—m of the †sF sndi™—tors simul—te instrument output devi™es —nd displ—y d—t— the ˜lo™k di—gr—m —™quires or gener—tesF

2.3.1.1 Controls Palette
„he gontrols p—lette is —v—il—˜le only on the front p—nelF „he gontrols p—lette ™ont—ins the ™ontrols —nd indi™—tors you use to ™re—te the front p—nelF ƒele™t ‡indow ƒhow gontrols €—lette or rightE ™li™k the front p—nel worksp—™e to displ—y the gontrols p—letteF „—™k down the gontrols p—lette ˜y ™li™king the thum˜t—™k on the top left ™orner of the p—letteF fy def—ultD the gontrols p—lette st—rts in the ixpress viewF „he ixpress p—lette view in™ludes su˜p—lettes on the top level of the gontrols —nd pun™tions p—lettes th—t ™ont—in ixpress †ss —nd other o˜je™ts you need to ˜uild ™ommon me—surement —ppliE ™—tionsF „he ell gontrols —nd ell pun™tions su˜p—lettes ™ont—in the ™omplete set of ˜uiltEin ™ontrolsD indi™—torsD †ssD —nd fun™tionsF „he edv—n™ed p—lette view in™ludes su˜p—lettes on the top level of the gontrols —nd pun™tions p—lettes th—t ™ont—in the ™omplete set of ˜uiltEin ™ontrolsD indi™—torsD †ssD —nd fun™tionsF „he ixpress su˜p—lettes ™ont—in ixpress †ss —nd other o˜je™ts you need to ˜uild ™ommon me—surement —ppli™—tionsF

PI

sn the ixpress p—lette viewD toolsets —nd modules do not inst—ll su˜p—lettes on the top level of the gontrols —nd pun™tions p—lettesF snste—dD toolsets —nd modules inst—ll on the ell gontrols —nd ell pun™tions su˜p—lettesF sn the edv—n™ed p—lette viewD toolsets —nd modules inst—ll su˜p—lettes on the top levelF
note:

gli™k the yptions ˜utton on the gontrols or pun™tions p—lette to ™h—nge to —nother p—lette view or form—tF

2.3.1.1.1 Numeric Controls and Indicators
„he two most ™ommonly used numeri™ o˜je™ts —re the numeri™ ™ontrol —nd the numeri™ indi™—torD —s shown in pigure PFIRF

Figure 2.14:

1. Increment and Decrement Buttons, 2. Numeric Control, 3. Numeric Indicator

„o enter or ™h—nge v—lues in — numeri™ ™ontrolD ™li™k the in™rement —nd de™rement ˜uttons with the yper—ting tool or dou˜leE™li™k the num˜er with either the v—˜eling tool or the yper—ting toolD type — new num˜erD —nd press the inter keyF

2.3.1.1.2 Boolean Controls and Indicators
…se foole—n ™ontrols —nd indi™—tors to enter —nd displ—y foole—n @„rue or p—lseA v—luesF foole—n o˜je™ts simul—te swit™hesD push ˜uttonsD —nd vihsF „he most ™ommon foole—n o˜je™ts —re the verti™—l toggle swit™h —nd the round vihD —s shown in pigure PFISF

PP

CHAPTER 2. INTRODUCTION

Figure 2.15

2.4 Block Diagram
efter you ˜uild the front p—nelD you —dd ™ode using gr—phi™—l represent—tions of fun™tions to ™ontrol the front p—nel o˜je™tsF „he ˜lo™k di—gr—m ™ont—ins this gr—phi™—l sour™e ™odeF pront p—nel o˜E je™ts —ppe—r —s termin—lsD on the ˜lo™k di—gr—mF flo™k di—gr—m o˜je™ts in™lude termin—lsD su˜†ssD fun™tionsD ™onst—ntsD stru™turesD —nd wiresD whi™h tr—nsfer d—t— —mong other ˜lo™k di—gr—m o˜je™tsF „he †s in pigure PFIT shows sever—l prim—ry ˜lo™k di—gr—m o˜je™tsEnodesD termin—lsD —nd wiresF

Figure 2.16:

1. Nodes, 2. Indicator Terminals, 3. Wires, 4. Control Terminals

2.4.1 Functions Palette
„he pun™tions p—lette is —v—il—˜le only on the ˜lo™k di—gr—mF „he pun™tions p—lette ™ont—ins the †ss —nd fun™tions you use to ˜uild the ˜lo™k di—gr—mF ƒele™t ‡indow ƒhow pun™tions €—lette or rightE™li™k the ˜lo™k di—gr—m worksp—™e to displ—y the pun™tions p—letteF „—™k down the pun™tions

PQ

p—lette ˜y ™li™king the thum˜t—™k on the top left ™orner of the p—letteF fy def—ultD the pun™tions p—lette st—rts in the ixpress viewF

2.4.2 Express VIs, VIs, and Functions
v—˜†si‡ uses ™olored i™ons to distinguish ˜etween ixpress †ssD †ssD —nd fun™tions on the ˜lo™k di—gr—mF fy def—ultD i™ons for ixpress †ss —ppe—r on the ˜lo™k di—gr—m —s exp—nd—˜le nodes with i™ons surrounded ˜y — ˜lue (eldF s™ons for †ss h—ve white ˜—™kgroundsD —nd i™ons for fun™tions h—ve p—le yellow ˜—™kgroundsF fy def—ultD most fun™tions —nd †ss on the ˜lo™k di—gr—m —ppe—r —s i™ons th—t —re not exp—nd—˜leD unlike ixpress †ssF

2.4.2.1 Express VIs
…se ixpress †ss for ™ommon me—surement t—sksF ixpress †ss —re nodes th—t require minim—l wiring ˜e™—use you ™on(gure them with di—log ˜oxesF ‰ou ™—n s—ve the ™on(gur—tion of —n ixpress †s —s — su˜†sF ‚efer to Building the Block DiagramD of the LabVIEW User Manual for more inform—tion —˜out ™re—ting su˜†ss from ixpress †ssF

2.4.2.2 VIs
‡hen you pl—™e — †s on the ˜lo™k di—gr—mD v—˜†si‡ ™onsiders the †s to ˜e — su˜†sF ‡hen you dou˜leE™li™k — su˜†sD its front p—nel —nd ˜lo™k di—gr—m —ppe—rD r—ther th—n — di—log ˜ox in whi™h you ™—n ™on(gure optionsF „he front p—nel in™ludes ™ontrols —nd indi™—torsF „he ˜lo™k di—gr—m in™ludes wiresD front p—nel i™onsD fun™tionsD possi˜ly su˜†ssD —nd other v—˜†si‡ o˜je™tsF „he upper right ™orner of the front p—nel —nd ˜lo™k di—gr—m displ—ys the i™on for the †sF „his is the i™on th—t —ppe—rs when you pl—™e the †s on the ˜lo™k di—gr—mF ‰ou ™—n ™re—te — †s to use —s — su˜†sF ‚efer to wodul—r €rogr—mming @ƒe™tion QFIA for more inform—tion —˜out ™re—ting †ss —nd ™on(guring them —s su˜†ssF

2.4.2.3 Functions
pun™tions —re the fund—ment—l oper—ting elements of v—˜†si‡F pun™tions do not h—ve front p—nels or ˜lo™k di—gr—ms ˜ut do h—ve ™onne™tor p—nesF hou˜leE™li™king — fun™tion only sele™ts the fun™tionF

2.4.3 Nodes
xodes —re o˜je™ts on the ˜lo™k di—gr—m th—t h—ve inputs —ndGor outputs —nd perform oper—tions when — †s runsF „hey —re —n—logous to st—tementsD oper—torsD fun™tionsD —nd su˜routines in textE ˜—sed progr—mming l—ngu—gesF xodes ™—n ˜e fun™tionsD su˜†ssD or stru™turesF ƒtru™tures —re pro™ess ™ontrol elementsD su™h —s g—se stru™turesD por voopsD or ‡hile voopsF „he edd —nd ƒu˜tr—™t fun™tions in pigure PFIT —re fun™tion nodesF

2.4.3.1 Expandable Nodes versus Icons
‰ou ™—n displ—y †ss —nd ixpress †ss —s i™ons or —s exp—nd—˜le nodesF ixp—nd—˜le nodes —ppe—r —s i™ons surrounded ˜y — ™olored (eldF ƒu˜†ss —ppe—r with — yellow (eldD —nd ixpress †ss —ppe—r with — ˜lue (eldF …se i™onsD su™h —s the f—si™ pun™tion qener—tor †s i™on if you w—nt to ™onserve sp—™e on the ˜lo™k di—gr—mF …se exp—nd—˜le nodesD su™h —s the f—si™ pun™tion qener—tor †s exp—nd—˜le node to m—ke wiring e—sier —nd to —id in do™umenting ˜lo™k di—gr—msF fy def—ultD su˜†ss —ppe—r —s i™ons on the ˜lo™k di—gr—mD —nd ixpress †ss —ppe—r —s exp—nd—˜le nodesF

PR

CHAPTER 2. INTRODUCTION

„o displ—y — su˜†s or ixpress †s —s —n exp—nd—˜le nodeD rightE™li™k the su˜†s or ixpress †s —nd sele™t †iew es s™on from the short™ut menu to remove the ™he™km—rkF ‰ou ™—n resize the exp—nd—˜le node to m—ke wiring even e—sierD ˜ut it —lso t—kes — l—rge —mount of sp—™e on the ˜lo™k di—gr—mF gomplete the following steps to resize — node on the ˜lo™k di—gr—mF IF wove the €ositioning tool over the nodeF ‚esizing h—ndles —ppe—r —t the top —nd ˜ottom of the nodeF PF wove the ™ursor over — resizing h—ndle to ™h—nge the ™ursor to the resizing ™ursorF QF …se the resizing ™ursor to dr—g the ˜order of the node down to displ—y —ddition—l termin—lsF RF ‚ele—se the mouse ˜uttonF „o ™—n™el — resizing oper—tionD dr—g the node ˜order p—st the ˜lo™k di—gr—m window ˜efore you rele—se the mouse ˜uttonF pigure PFIU shows the f—si™ pun™tion qener—tor †s —s — resized exp—nd—˜le nodeF

Figure 2.17

sf you displ—y — su˜†s or ixpress †s —s —n exp—nd—˜le nodeD you ™—nnot displ—y the termin—ls for th—t node —nd you ™—nnot en—˜le d—t—˜—se —™™ess for th—t nodeF
note:

PS

2.4.3.2 Terminals
pront p—nel o˜je™ts —ppe—r —s termin—ls on the ˜lo™k di—gr—mF „he termin—ls repreE sent the d—t— type of the ™ontrol or indi™—torF ‰ou ™—n ™on(gure front p—nel ™ontrols or indi™—tors to —ppe—r —s i™on or d—t— type termin—ls on the ˜lo™k di—gr—mF fy def—ultD front p—nel o˜je™ts —ppe—r —s i™on termin—lsF por ex—mpleD — kno˜ i™on termin—lD shown —t leftD represents — kno˜ on the front p—nelF „he hfv —t the ˜ottom of the termin—l represents — d—t— type of dou˜leEpre™isionD )o—tingEpoint numeri™F „o displ—y — termin—l —s — d—t— type on the ˜lo™k di—gr—mD rightE™li™k the termin—l —nd sele™t †iew es s™on from the short™ut menu to remove the ™he™km—rkF e hfv d—t— type termin—lD shown —˜ove —t leftD represents — dou˜leEpre™isionD )o—tingEpoint numeri™ ™ontrol or indi™—torF „ermin—ls —re entry —nd exit ports th—t ex™h—nge inform—tion ˜etween the front p—nel —nd ˜lo™k di—gr—mF „ermin—ls —re —n—logous to p—r—meters —nd ™onst—nts in textE˜—sed progr—mming l—ngu—gesF „ypes of termin—ls in™lude ™ontrol or indi™—tor termin—ls —nd node termin—lsF gontrol —nd indi™—tor termin—ls ˜elong to front p—nel ™ontrols —nd indi™—torsF h—t— you enter into the front p—nel ™ontrols @a —nd b in pigure PFITA enter the ˜lo™k di—gr—m through the ™ontrol termin—lsF „he d—t— then enter the edd —nd ƒu˜tr—™t fun™tionsF ‡hen the edd —nd ƒu˜tr—™t fun™tions ™omplete their intern—l ™—l™ul—tionsD they produ™e new d—t— v—luesF „he d—t— )ow to the indi™—tor termin—lsD where they exit the ˜lo™k di—gr—mD reenter the front p—nelD —nd —ppe—r in front p—nel indi™—tors @ a + b —nd a − b in pigure PFITAF „he termin—ls in pigure PFIT ˜elong to four front p—nel ™ontrols —nd indi™—torsF „he ™onne™tor p—nes of the edd —nd ƒu˜tr—™t fun™tionsD shown in pg PSD h—ve three node termin—lsF „o displ—y the termin—ls of the fun™tion on the ˜lo™k di—gr—mD rightE™li™k the fun™tion node —nd sele™t †isi˜le stems „ermin—ls from the short™ut menuF

2.4.3.3 Wires
‰ou tr—nsfer d—t— —mong ˜lo™k di—gr—m o˜je™ts through wiresF ‡ires —re —n—logous to v—ri—˜les in textE˜—sed progr—mming l—ngu—gesF sn pigure PFITD wires ™onne™t the ™ontrol —nd indi™—tor termin—ls to the edd —nd ƒu˜tr—™t fun™tionsF i—™h wire h—s — single d—t— sour™eD ˜ut you ™—n wire it to m—ny †ss —nd fun™tions th—t re—d the d—t—F ‡ires —re di'erent ™olorsD stylesD —nd thi™knessesD depending on their d—t— typesF e ˜roken wire —ppe—rs —s — d—shed ˜l—™k line with — red ˆ in the middleF „he ex—mples in pg PS —re the most ™ommon wire typesF xumeri™ foole—n ƒtring

Wire Type

Scalar

1D Array

2D Array

yr—nge @)o—tingEpointAD flue @integerA qreen €ink

Color

sn v—˜†si‡D you use wires to ™onne™t multiple termin—ls together to p—ss d—t— in — †sF „he wires must ˜e ™onne™ted to inputs —nd outputs th—t —re ™omp—ti˜le with the d—t— th—t is tr—nsferred with the wireF por ex—mpleD you ™—nnot wire —n —rr—y output to — numeri™ inputF sn —ddition the dire™tion of the wires must ˜e ™orre™tF „he wires must ˜e ™onne™ted to only one input —nd —t le—st one outputF por ex—mpleD you ™—nnot wire two indi™—tors togetherF „he ™omponents th—t determine wiring ™omp—ti˜ility in™lude the d—t— type of the ™ontrol —ndGor indi™—tor —nd the d—t— type of the termin—lF

PT

CHAPTER 2. INTRODUCTION

2.4.3.3.1 Data Types
h—t— types indi™—te wh—t o˜je™tsD inputsD —nd outputs you ™—n wire togetherF por ex—mpleD — swit™h h—s — green ˜order so you ™—n wire — swit™h to —ny input with — green l—˜el on —n ixpress †sF e kno˜ h—s —n or—nge ˜order so you ™—n wire — kno˜ to —ny input with —n or—nge l—˜elF roweverD you ™—nnot wire —n or—nge kno˜ to —n input with — green l—˜elF xoti™e the wires —re the s—me ™olor —s the termin—lF „he dyn—mi™ d—t— type stores the inform—tion gener—ted or —™quired ˜y —n ixpress †sF „he dyn—mi™ d—t— type —ppe—rs —s — d—rk ˜lue termin—lD shown —t leftF wost ixpress †ss —™™ept —ndGor return the dyn—mi™ d—t— typeF ‰ou ™—n wire the dyn—mi™ d—t— type to —ny indi™—tor or input th—t —™™epts numeri™D w—veformD or foole—n d—t—F ‡ire the dyn—mi™ d—t— type to —n indi™—tor th—t ™—n ˜est present the d—t—F sndi™—tors in™lude — gr—phD ™h—rtD or numeri™ indi™—torF wost other †ss —nd fun™tions in v—˜†si‡ do not —™™ept the dyn—mi™ d—t— typeF „o use — ˜uiltEin †s or fun™tion to —n—lyze or pro™ess the d—t— the dyn—mi™ d—t— type in™ludesD you must ™onvert the dyn—mi™ d—t— typeF …se the gonvert from hyn—mi™ h—t— ixpress †sD shown —t leftD to ™onvert the dyn—mi™ d—t— type to numeri™D foole—nD w—veformD —nd —rr—y d—t— types for use with other †ss —nd fun™tionsF ‡hen you pl—™e the gonvert from hyn—mi™ h—t— ixpress †s on the ˜lo™k di—gr—mD the gon(gure gonvert from hyn—mi™ h—t— di—log ˜ox —ppe—rsF „he gon(gure gonvert from hyn—mi™ h—t— di—log ˜ox displ—ys options th—t let you spe™ify how you w—nt to form—t the d—t— th—t the gonvert from hyn—mi™ h—t— ixpress †s returnsF ‡hen you wire — dyn—mi™ d—t— type to —n —rr—y indi™—torD v—˜†si‡ —utom—ti™—lly pl—™es the gonvert from hyn—mi™ h—t— ixpress †s on the ˜lo™k di—gr—mF hou˜leE™li™k the gonvert from hyn—mi™ h—t— ixpress †s to open the gon(gure gonvert from hyn—mi™ h—t— di—log ˜ox to ™ontrol how the d—t— —ppe—rs in the —rr—yF …se the gonvert to hyn—mi™ h—t— ixpress †s to ™onvert numeri™D foole—nD w—veformD —nd —rr—y d—t— types to the dyn—mi™ d—t— type for use with ixpress †ssF ‡hen you pl—™e the gonvert to hyn—mi™ h—t— ixpress †s on the ˜lo™k di—gr—mD the gon(gure gonvert to hyn—mi™ h—t— di—log ˜ox —ppe—rsF …se this di—log ˜ox to sele™t the kind of d—t— to ™onvert to the dyn—mi™ d—t— typeF

2.4.3.3.2 Automatically Wiring Objects
v—˜†si‡ —utom—ti™—lly wires o˜je™ts —s you pl—™e them on the ˜lo™k di—gr—mF ‰ou —lso ™—n —utom—ti™—lly wire o˜je™ts —lre—dy on the ˜lo™k di—gr—mF v—˜†si‡ ™onne™ts the termin—ls th—t ˜est m—t™h —nd le—ves termin—ls th—t do not m—t™h un™onne™tedF es you move — sele™ted o˜je™t ™lose to other o˜je™ts on the ˜lo™k di—gr—mD v—˜†si‡ dr—ws tempor—ry wires to show you v—lid ™onne™tionsF ‡hen you rele—se the mouse ˜utton to pl—™e the o˜je™t on the ˜lo™k di—gr—mD v—˜†si‡ —utom—ti™—lly ™onne™ts the wiresF „oggle —utom—ti™ wiring ˜y pressing the sp—™e˜—r while you move —n o˜je™t using the €ositioning toolF ‰ou ™—n —djust the —utom—ti™ wiring settings ˜y sele™ting „ools yptions —nd sele™ting flo™k hi—gr—m from the top pullEdown menuF

2.4.3.3.3 Manually Wiring Objects
‡hen you p—ss the ‡iring tool over — termin—lD — tip strip —ppe—rs with the n—me of the termin—lF sn —dditionD the termin—l ˜links in the gontext relp window —nd on the i™on to help you verify th—t you —re wiring to the ™orre™t termin—lF

PU

2.5 Acquiring a Signal VI
Exercise 2.1:
sn the following exer™iseD you will ˜uild — †s th—t gener—tes — sign—l —nd displ—ys th—t sign—l in — gr—phF v—˜†si‡ provides templ—tes ™ont—ining inform—tion from whi™h you ™—n ˜uild — †sF „hese templ—tes help you get st—rted with v—˜†si‡F gomplete the following steps to ™re—te — †s th—t gener—tes — sign—l —nd displ—ys it on the front p—nelF IFv—un™h v—˜†si‡F PFsn the v—˜†si‡ di—log ˜ox th—t —ppe—rsD shown in pigure PFIVD ™li™k the xew ˜utton to displ—y the xew di—log ˜oxF

Figure 2.18

QFƒele™t †s from „empl—te „utori—l @qetting ƒt—rtedA qener—te —nd hispl—y in the gre—te new listF „his templ—te †s gener—tes —nd displ—ys — sign—lF xoti™e th—t preE views of the templ—te †s —ppe—r in the pront p—nel preview —nd the flo™k di—gr—m preview se™tionsF „he pigure PFIW shows the xew di—log ˜ox —nd the qener—te —nd hispl—y templ—te †sF

PV

CHAPTER 2. INTRODUCTION

Figure 2.19

RFgli™k the yu ˜utton to open the templ—teF ‰ou —lso ™—n dou˜leE™li™k the n—me of the templ—te †s in the gre—te new list to open the templ—teF SFix—mine the front p—nel of the †sF „he user interf—™eD or front p—nelD —ppe—rs with — gr—y ˜—™kground —nd in™ludes ™ontrols —nd indi™—torsF „he title ˜—r of the front p—nel indi™—tes th—t this window is the front p—nel for the qener—te —nd hispl—y †sF sf the front p—nel is not visi˜leD you ™—n displ—y the front p—nel ˜y sele™ting ‡indow ƒhow pront €—nelF
note:

TFix—mine the ˜lo™k di—gr—m of the †sF „he ˜lo™k di—gr—m —ppe—rs with — white ˜—™kE ground —nd in™ludes †ss —nd stru™tures th—t ™ontrol the front p—nel o˜je™tsF „he title ˜—r of the ˜lo™k di—gr—m indi™—tes th—t this window is the ˜lo™k di—gr—m for the qener—te —nd hispl—y †sF sf the ˜lo™k di—gr—m is not visi˜leD you ™—n displ—y the ˜lo™k di—gr—m ˜y sele™ting ‡indow ƒhow flo™k hi—gr—mF
note:

UF

yn the front p—nel tool˜—rD ™li™k the ‚un ˜uttonD shown —t leftF xoti™e th—t — sine w—ve —ppe—rs on the gr—phF

PW

VF

p—nelF

ƒtop the †s ˜y ™li™king the ƒtop ˜uttonD shown —t leftD on the front

2.5.1 Adding a Control to the Front Panel
gontrols on the front p—nel simul—te the input devi™es on — physi™—l instrument —nd supply d—t— to the ˜lo™k di—gr—m of the †sF w—ny physi™—l instruments h—ve kno˜s you ™—n turn to ™h—nge —n input v—lueF gomplete the following steps to —dd — kno˜ ™ontrol to the front p—nelF
tip:

idit

„hroughout these exer™isesD you ™—n undo re™ent edits ˜y sele™ting …ndo or pressing the gtrlE keysF ƒhow gontrols

IFsf the gontrols p—lette is not visi˜le on the front p—nelD sele™t ‡indow €—lette to displ—y itF

PFwove the ™ursor over the i™ons on the gontrols p—lette to lo™—te the xumeri™ gontrols p—letteF xoti™e th—t when you move the ™ursor over i™ons on the gontrols p—letteD the n—me of th—t su˜p—lette —ppe—rs in the gr—y sp—™e —˜ove —ll the i™ons on the p—letteF ‡hen you idle the ™ursor over —ny i™on on —ny p—letteD the full n—me of the su˜p—letteD ™ontrolD or indi™—tor —ppe—rsF QFgli™k the xumeri™ gontrols i™on to —™™ess the xumeri™ gontrols p—letteF RFƒele™t the kno˜ ™ontrol on the xumeri™ gontrols p—lette —nd pl—™e it on the front p—nel to the left of the w—veform gr—phF ‰ou will use this kno˜ in — l—ter exer™ise to ™ontrol the —mplitude of — sign—lF SFƒele™t pile ƒ—ve es —nd s—ve this †s —s e™quiring — ƒign—lFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF ƒ—ve —ll the †ss you edit or ™re—te in this ™ourse in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF
note:

2.5.2 Changing the Signal Type
„he ˜lo™k di—gr—m h—s — ˜lue i™on l—˜eled ƒimul—te ƒign—lF „his i™on represents the ƒimul—te ƒign—l ixpress †sF „he ƒimul—te ƒign—l ixpress †s simul—tes — sine w—ve ˜y def—ultF gomplete the following steps to ™h—nge this sign—l to — s—wtooth w—veF IFhispl—y the ˜lo™k di—gr—m ˜y sele™ting ‡indow ƒhow flo™k hi—gr—m or ˜y ™li™king

the ˜lo™k di—gr—mF xoti™e the ƒimul—te ƒign—l ixpress †sD shown in pg PWF en ixpress †s is — ™omponent of the ˜lo™k di—gr—m th—t you ™—n ™on(gure to perform ™ommon me—surement t—sksF „he ƒimul—te ƒign—l ixpress †s simul—tes — sign—l ˜—sed on the ™on(gur—tion th—t you spe™ifyF PF‚ightE™li™k the ƒimul—te ƒign—l ixpress †s —nd sele™t €roperties from the short™ut menu to displ—y the gon(gure ƒimul—te ƒign—l di—log ˜oxF

QH

CHAPTER 2. INTRODUCTION

QFƒele™t ƒ—wtooth from the ƒign—l type pullEdown menuF xoti™e th—t the w—veform on the gr—ph in the ‚esult €review se™tion ™h—nges to — s—wtooth w—veF „he gon(gure ƒimul—te ƒign—l di—log ˜ox should —ppe—r simil—r to pigure PFPHF

Figure 2.20

RFgli™k the yu ˜utton to —pply the ™urrent ™on(gur—tion —nd ™lose the gon(gure ƒimE ul—te ƒign—l di—log ˜oxF SFwove the ™ursor over the down —rrows —t the ˜ottom of the ƒimul—te ƒign—l ixpress †sF

TF

‡hen — dou˜leEhe—ded —rrow —ppe—rsD shown —t leftD ™li™k —nd dr—g the ˜order of the ixpress †s until the emplitude input —ppe—rsF xoti™e how you exp—nded the ƒimul—te ƒign—l ixpress †s to displ—y — new inputF fe™—use the emplitude input —ppe—rs on the ˜lo™k di—gr—mD you ™—n ™on(gure the —mplitude of the s—wtooth w—ve on the ˜lo™k di—gr—mF sn pigure PFPHD noti™e how emplitude is —n option in the gon(gure ƒimul—te ƒign—l di—log ˜oxF ‡hen inputsD su™h —s emplitudeD —ppe—r on the ˜lo™k di—gr—m —nd in the ™on(gur—tion di—log ˜oxD you ™—n ™on(gure the inputs in either lo™—tionF

QI

2.5.3 Wiring Objects on the Block Diagram
„o use the kno˜ ™ontrol to ™h—nge the —mplitude of the sign—lD you must ™onne™t the two o˜je™ts on the ˜lo™k di—gr—mF gomplete the following steps to wire the kno˜ to the emplitude input on the ƒimul—te ƒign—l ixpress †sF

IF

wove the ™ursor over the uno˜ termin—lD shown —t leftD until the €ositioning xoti™e how the ™ursor ˜e™omes —n —rrowD or the €ositioning toolD tool —ppe—rsF shown in pg QIF …se the €ositioning tool to sele™tD positionD —nd resize o˜je™tsF

PF

gli™k the uno˜ termin—l to sele™t itD then dr—g the termin—l to the left of the ƒimul—te ƒign—l ixpress †sF w—ke sure the uno˜ termin—l is inside the loopD shown in pg QIF „he termin—ls —re represent—tions of front p—nel ™ontrols —nd indi™—torsF „ermin—ls —re entry —nd exit ports th—t ex™h—nge inform—tion ˜etween the front p—nel —nd ˜lo™k di—gr—mF

QFhesele™t the uno˜ termin—l ˜y ™li™king — ˜l—nk sp—™e on the ˜lo™k di—gr—mF RF wove the ™ursor over the —rrow of the uno˜ termin—lD shown in pg QIF xoti™e how the ™ursor ˜e™omes — wire spoolD or the ‡iring toolD shown —t leftF …se the ‡iring tool to wire o˜je™ts together on the ˜lo™k di—gr—mF
note:

„he ™ursor does not swit™h to —nother tool while —n o˜je™t is sele™tedF

SF

‡hen the ‡iring tool —ppe—rsD ™li™k the —rrow —nd then ™li™k the emplitude input of the ƒimul—te ƒign—l ixpress †sD shown in pg QID to wire the two o˜je™ts togetherF xoti™e th—t — wire —ppe—rs —nd ™onne™ts the two o˜je™tsF h—t— )ows —long this wire from the termin—l to the ixpress †sF ƒ—ve to s—ve this †sF

TFƒele™t pile

2.5.4 Running the VI
‚unning — †s exe™utes your solutionF gomplete the following steps to run the e™quiring — ƒign—l †sF IFhispl—y the front p—nel ˜y sele™ting ‡indow front p—nelF ƒhow pront €—nel or ˜y ™li™king the

tip: €ress the gtrlEi keys to swit™h from the front p—nel to the ˜lo™k di—gr—m or from the ˜lo™k di—gr—m to the front p—nelF

PFgli™k the ‚un ˜uttonF

QP

CHAPTER 2. INTRODUCTION

QFwove the ™ursor over the kno˜ ™ontrolF xoti™e how the ™ursor ˜e™omes — h—ndD or the yper—ting toolD shown —t leftF …se the yper—ting tool to ™h—nge the v—lue of — ™ontrol or sele™t the text within — ™ontrolF RF…sing the yper—ting toolD turn the kno˜ to —djust the —mplitude of the s—wtooth w—veF xoti™e how the —mplitude of the s—wtooth w—ve ™h—nges —s you turn the kno˜F elso noti™e th—t the yE—xis on the gr—ph —utos™—les to —™™ount for the ™h—nge in —mplitudeF „o indi™—te th—t the †s is runningD the ‚un ˜utton ™h—nges to — d—rkened —rrowD shown —t leftF ‰ou ™—nnot edit the front p—nel or ˜lo™k di—gr—m while the †s runsF SF
note:

gli™k the ƒtop ˜uttonD shown —t leftD to stop the †sF

elthough e˜ort ixe™ution ˜utton looks like — stop ˜uttonD the e˜ort ixe™ution ˜utton does not —lw—ys properly ™lose the †sF x—tion—l snstruments re™ommends stopping your †ss using the ƒtop ˜utton on the front p—nelF …se the e˜ort ixe™ution ˜utton only when errors prevent you from termin—ting the —ppli™—tion using the ƒtop ˜uttonF

2.5.5 Modifying the Signal
gomplete the following steps to —dd s™—ling to the sign—l —nd displ—y the results in the gr—ph on the front p—nelF

IF

yn the ˜lo™k di—gr—mD use the €ositioning tool to dou˜leE™li™k the wire th—t ™onne™ts the ƒimul—te ƒign—l ixpress †s to the ‡—veform qr—ph termin—l shown in pg QPF ƒhow

PF€ress the helete key to delete this wireF QFsf the pun™tions p—lette is not visi˜le on the ˜lo™k di—gr—mD sele™t ‡indow pun™tions €—lette to displ—y itF

RF

ƒele™t the ƒ™—ling —nd w—pping ixpress †sD shown —t leftD on the erithE meti™ 8 gomp—rison p—lette —nd pl—™e it on the ˜lo™k di—gr—m inside the loop ˜etween the ƒimul—te ƒign—l ixpress †s —nd the ‡—veform qr—ph termin—lF sf there is no room ˜etween the ixpress †s —nd the termin—lD move the ‡—veform qr—ph termin—l to the rightF xoti™e th—t the gon(gure ƒ™—ling —nd w—pping di—log ˜ox —utom—ti™—lly opens when you pl—™e the ixpress †s on the ˜lo™k di—gr—mF

SFhe(ne the v—lue of the s™—ling f—™tor ˜y entering 10 in the ƒlope @mA text ˜oxF „he gon(gure ƒ™—ling —nd w—pping di—log ˜ox should —ppe—r simil—r to pigure PFPIF

QQ

Figure 2.21

TFgli™k the yu ˜utton to —pply the ™urrent ™on(gur—tion —nd ™lose the gon(gure ƒ™—ling —nd w—pping di—log ˜oxF UFwove the ™ursor over the —rrow on the ƒ—wtooth output of the ƒimul—te ƒign—l ixpress †sF

VF

‡hen the ‡iring tool —ppe—rsD ™li™k the —rrow —nd then ™li™k the —rrow on the ƒign—ls input of the ƒ™—ling —nd w—pping ixpress †sD shown in pg QQD to wire the two o˜je™ts togetherF

WF…sing the ‡iring toolD wire the ƒ™—led ƒign—ls output of the ƒ™—ling —nd w—pping ixpress †s to the ‡—veform qr—ph termin—lF xoti™e the wires ™onne™ting the ixpress †ss —nd termin—lsF „he —rrows on the ixpress †ss —nd termin—ls indi™—te the dire™tion th—t the d—t— )ows —long these wiresF „he ˜lo™k di—gr—m should —ppe—r simil—r to pigure PFPPF

QR

CHAPTER 2. INTRODUCTION

Figure 2.22

„he termin—ls in the ˜lo™k di—gr—m —re set to displ—y —s i™onsF „o displ—y — termin—l —s — d—t— type on the ˜lo™k di—gr—mD rightE™li™k the termin—l —nd sele™t †iew es s™on from the short™ut menu to remove the ™he™km—rkF
note:

IHFƒele™t pile

ƒ—ve to s—ve this †sF

2.5.6 Displaying Two Signals on the Graph
„o ™omp—re the sign—l gener—ted ˜y the ƒimul—te ƒign—l ixpress †s —nd the sign—l modi(ed ˜y the ƒ™—ling —nd w—pping ixpress †s on the s—me gr—phD use the werge ƒign—ls fun™tionF gomplete the following steps to displ—y two sign—ls on the s—me gr—phF IFwove the ™ursor over the —rrow on the ƒ—wtooth output of the ƒimul—te ƒign—l ixpress †sF PF…sing the ‡iring toolD wire the ƒ—wtooth output to the ‡—veform qr—ph termin—lF „he werge ƒign—ls fun™tionD shown in pg QRD —ppe—rs where the two wires ™onne™tF „his fun™tion t—kes the two sep—r—te sign—ls —nd ™om˜ines them so th—t ˜oth ™—n ˜e displ—yed on the s—me gr—phF „he ˜lo™k di—gr—m should —ppe—r simil—r to pigure PFPQF

QS

Figure 2.23

QFƒele™t pile

ƒ—ve to s—ve this †sF ‰ou —lso ™—n press the gtrlEƒ keys to s—ve — †sF

RF‚eturn to the front p—nelD run the †sD —nd turn the kno˜ ™ontrolF xoti™e th—t the gr—ph plots the s—wtooth w—ve —nd the s™—led sign—lF elso noti™e th—t the m—ximum v—lue on the yE—xis —utom—ti™—lly ™h—nges to ˜e 10 times the kno˜ v—lueF „his s™—ling o™™urs ˜e™—use you set the slope to 10 in the ƒ™—ling —nd w—pping ixpress †sF SFgli™k the ƒtop ˜uttonF

2.5.7 Customizing the Knob
„he kno˜ ™ontrol ™h—nges the —mplitude of the s—wtooth w—ve so l—˜eling it emplitude —™™ur—tely des™ri˜es the fun™tion of the kno˜F gomplete the following steps to ™ustomize the —ppe—r—n™e of — ™ontrol on the front p—nelF IF‚ightE™li™k the kno˜ —nd sele™t €roperties from the short™ut menu to displ—y the uno˜ €roperties di—log ˜oxF PFsn the v—˜el se™tion on the eppe—r—n™e t—˜D delete the l—˜el uno˜D —nd type emplitude in the text ˜oxF „he uno˜ €roperties di—log ˜ox should —ppe—r simil—r to pigure PFPRF

QT

CHAPTER 2. INTRODUCTION

Figure 2.24

QFgli™k the ƒ™—le t—˜ —ndD in the ƒ™—le ‚—nge se™tionD ™h—nge the m—ximum v—lue to 5.0F xoti™e how the kno˜ on the front p—nel inst—ntly upd—tes to re)e™t these ™h—ngesF RFgli™k the yu ˜utton to —pply the ™urrent ™on(gur—tion —nd ™lose the uno˜ €roperties di—log ˜oxF SFƒ—ve this †sF es you ˜uild †ssD you ™—n experiment with di'erent properties —nd ™on(gur—tionsF ‰ou —lso ™—n —dd —nd delete o˜je™tsF ‚emem˜erD you ™—n undo re™ent edits ˜y sele™ting idit …ndo or pressing the gtrlE keysF
tip:

TFixperiment with other properties of the kno˜ ˜y using the uno˜ €roperties di—log ˜oxF por ex—mpleD try ™h—nging the ™olors for the w—rker „ext golor ˜y ™li™king the ™olor ˜ox lo™—ted on the ƒ™—le t—˜F UFgli™k the g—n™el ˜utton to —void —pplying the ™h—nges you m—de while experimentingF sf you w—nt to keep the ™h—nges you m—deD ™li™k the yu ˜uttonF

2.5.8 Customizing the Waveform Graph
„he w—veform gr—ph indi™—tor displ—ys the two sign—lsF „o indi™—te whi™h plot is the s™—led sign—l —nd whi™h is the simul—ted sign—lD you ™ustomize the plotsF gomplete the following steps to ™ustomize the —ppe—r—n™e of —n indi™—tor on the front p—nelF IFwove the ™ursor over the top of the plot legend on the w—veform gr—phF xoti™e th—t while there —re two plots on the gr—phD the plot legend displ—ys only one plotF

QU

PF‡hen — dou˜leEhe—ded —rrow —ppe—rsD shown in pigure PFPSD ™li™k —nd dr—g the ˜order of the plot legend until the se™ond plot n—me —ppe—rsF

Figure 2.25

QF‚ightE™li™k the w—veform gr—ph —nd sele™t €roperties from the short™ut menu to disE pl—y the qr—ph €roperties di—log ˜oxF RFyn the €lots t—˜D sele™t ƒ—wtooth from the pullEdown menuF gli™k the vine golor ™olor ˜ox to displ—y the ™olor pi™kerF ƒele™t — new line ™olorF SFƒele™t ƒ—wtooth @ƒ™—ledA from the pullEdown menuF TF€l—™e — ™he™km—rk in the hon9t use w—veform n—mes for plot n—mes ™he™k˜oxF UFsn the x—me text ˜oxD delete the ™urrent l—˜el —nd ™h—nge the n—me of this plot to ƒ™—led ƒ—wtoothF VFgli™k the yu ˜utton to —pply the ™urrent ™on(gur—tion —nd ™lose the qr—ph €roperties di—log ˜oxF xoti™e how the plot ™olor on the front p—nel ™h—ngesF WFixperiment with other properties of the gr—ph ˜y using the qr—ph €roperties di—log ˜oxF por ex—mpleD try dis—˜ling the —utos™—le fe—ture lo™—ted on the ƒ™—les t—˜F IHFgli™k the g—n™el ˜utton to —void —pplying the ™h—nges you m—de while experimentingF sf you w—nt to keep the ™h—nges you m—deD ™li™k the yu ˜uttonF IIFƒ—ve —nd ™lose this †sF

2.6 Dataow Programming
v—˜†si‡ follows — d—t—)ow model for running †ssF e ˜lo™k di—gr—m node exe™utes when —ll its inputs —re —v—il—˜leF ‡hen — node ™ompletes exe™utionD it supplies d—t— to its output termin—ls —nd p—sses the output d—t— to the next node in the d—t—)ow p—thF †isu—l f—si™D gCCD te†eD —nd most other textE˜—sed progr—mming l—ngu—ges follow — ™onE trol )ow model of progr—m exe™utionF sn ™ontrol )owD the sequenti—l order of progr—m elements determines the exe™ution order of — progr—mF

Example 2.1:
por — d—t—)ow progr—mming ex—mpleD ™onsider — ˜lo™k di—gr—m @pigure PFPTA th—t —dds two num˜ers —nd then su˜tr—™ts 50.00 from the result of the —dditionF sn this ™—seD the

QV

CHAPTER 2. INTRODUCTION

˜lo™k di—gr—m exe™utes from left to rightD not ˜e™—use the o˜je™ts —re pl—™ed in th—t orderD ˜ut ˜e™—use the ƒu˜tr—™t fun™tion ™—nnot exe™ute until the edd fun™tion (nishes exe™uting —nd p—sses the d—t— to the ƒu˜tr—™t fun™tionF ‚emem˜er th—t — node exe™utes only when d—t— —re —v—il—˜le —t —ll of its input termin—lsD —nd it supplies d—t— to its output termin—ls only when it (nishes exe™utionF

Figure 2.26

Example 2.2:
sn the following ex—mple @pigure PFPUAD ™onsider whi™h ™ode segment would exe™ute (rstEthe eddD ‚—ndom xum˜erD or hivide fun™tionF ‰ou ™—nnot know ˜e™—use inputs to the edd —nd hivide fun™tions —re —v—il—˜le —t the s—me timeD —nd the ‚—ndom xum˜er fun™tion h—s no inputsF sn — situ—tion where one ™ode segment must exe™ute ˜efore —notherD —nd no d—t— dependen™y exists ˜etween the fun™tionsD use other progr—mming methodsD su™h —s error ™lustersD to for™e the order of exe™utionF ‚efer to the irror r—ndling @ƒe™tion TFSA se™tion of glusters for more inform—tion —˜out error ™lustersF

Figure 2.27

2.7 Express Filter VI
Exercise 2.2:
gomplete the following steps to use the xs ix—mple pinder to se—r™h for —n ex—mple †s th—t gener—tes — sine w—ve with — frequen™y of 10Hz —nd —n —mplitude of 10V with white noise of 1V of —mplitude —nd —pplies — (lterF IFƒele™t relp pind ix—mples to open the xs ix—mple pinderF PFgli™k the ƒe—r™h t—˜ —nd type (lter in the „ype in the word@sA to se—r™h for text ˜oxF xoti™e th—t this word ™hoi™e re)e™ts wh—t you w—nt this ixpress †s to doE(lter — sign—lF

QW

QFƒele™t (lter to displ—y the ex—mple †ss th—t in™lude (lter in the titleF RFpind the ex—mple †s ™—lled ixpress pilterFvi —nd dou˜leE™li™k to open itF SFypen the ˜lo™k di—gr—m of the †sD shown in pigure PFPVF

Figure 2.28

TFgli™k the righlight ixe™ution ˜uttonD shown —t leftD on the tool˜—r to slow down the exe™ution of the progr—m so you ™—n o˜serve the exe™ution order on the ˜lo™k di—gr—mF UFgli™k the ‚un ˜utton VFy˜serve the ˜lo™k di—gr—mF xoti™e the )ow of d—t— on the ˜lo™k di—gr—mF por ex—mpleD noti™e th—t the „one we—surementsP ixpress †s ™—nnot output d—t— until it re™eives d—t— from the pilter ixpress †sF WFglose the †s when (nishedF ho not s—ve ™h—ngesF

2.8 LabVIEW Documentation Resources
2.8.1 LabVIEW Documentation Resources
…se the gontext relp windowD the LabVIEW HelpD —nd the xs ix—mple pinder to help you ˜uild —nd edit †ssF ‚efer to the LabVIEW Help —nd m—nu—ls for more inform—tion —˜out v—˜†si‡F

RH

CHAPTER 2. INTRODUCTION

2.8.1.1 Context Help Window
„he gontext relp window displ—ys ˜—si™ inform—tion —˜out v—˜†si‡ o˜je™ts when you move the ™ursor over e—™h o˜je™tF „he gontext relp window is visi˜le ˜y def—ultF „o toggle displ—y of the gontext relp windowD sele™t relp ƒhow gontext relpD press the gtrlEr keysD or ™li™k the ƒhow gontext relp ‡indow ˜uttonD shown in pg RHD on the tool˜—rF ‡hen you move the ™ursor over front p—nel —nd ˜lo™k di—gr—m o˜je™tsD the gontext relp window displ—ys the i™on for su˜†ssD fun™tionsD ™onst—ntsD ™ontrolsD —nd indi™—torsD with wires —tt—™hed to e—™h termin—lF ‡hen you move the ™ursor over di—log ˜ox optionsD the gontext relp window displ—ys des™riptions of those optionsF sn the windowD required ™onne™tions —re ˜oldD re™ommended ™onne™tions —re pl—in textD —nd option—l ™onne™tions —re dimmed or do not —ppe—rF pigure PFPW shows —n ex—mple gontext relp windowF

Figure 2.29:

Context Help Window

gli™k the ride yption—l „ermin—ls —nd pull €—th ˜utton lo™—ted on the lower left ™orner of the gontext relp window to displ—y the option—l termin—ls of — ™onne™tor p—ne —nd to displ—y the full p—th to — †sF yption—l termin—ls —re shown ˜y wire stu˜sD informing you th—t other ™onne™tions existF „he det—iled mode displ—ys —ll termin—lsD —s shown in pigure PFQHF

RI

Figure 2.30:

Detailed Context Help Window

gli™k the vo™k gontext relp ˜utton to lo™k the ™urrent ™ontents of the gontext relp windowF ‡hen the ™ontents —re lo™kedD moving the ™ursor over —nother o˜je™t does not ™h—nge the ™ontents of the windowF „o unlo™k the windowD ™li™k the ˜utton —g—inF ‰ou —lso ™—n —™™ess this option from the relp menuF sf — ™orresponding LabVIEW Help topi™ exists for —n o˜je™t the gontext relp window des™ri˜esD — ˜lue gli™k here for more helpF link —ppe—rs in the gontext relp windowF elsoD the wore relp ˜uttonD shown —t leftD is en—˜ledF gli™k the link or the ˜utton to displ—y the LabVIEW Help for more inform—tion —˜out the o˜je™tF

2.8.1.2 LabVIEW Help
‰ou ™—n —™™ess the LabVIEW Help either ˜y ™li™king the wore relp ˜utton in the gontext relp windowD sele™ting relp †sD pun™tionD 8 rowE„o relpD or ™li™king the ˜lue gli™k here for more helpF link in the gontext relp windowF „he LabVIEW Help ™ont—ins det—iled des™riptions of most p—lettesD menusD toolsD †ssD —nd fun™tionsF „he LabVIEW Help —lso in™ludes stepE˜yEstep instru™tions for using v—˜†si‡ fe—turesF „he LabVIEW Help in™ludes links to the following resour™esX

• LabVIEW BookshelfD whi™h in™ludes €hp versions of —ll the v—˜†si‡ m—nu—ls —nd eppli™—E tion xotesF • „e™hni™—l support resour™es on the x—tion—l snstruments ‡e˜ site1 D su™h —s the xs heveloper one2 D the unowledge f—se3 D —nd the €rodu™t w—nu—ls vi˜r—ry4 F

2.8.1.3 NI Example Finder
„he xew di—log ˜ox ™ont—ins m—ny v—˜†si‡ templ—te †ss th—t you ™—n use to st—rt ˜uilding †ssF roweverD these templ—te †ss —re only — su˜set of the hundreds of ex—mple †ss in™luded with
1 http://ni.com 2 http://zone.ni.com/zone/jsp/zone.jsp 3 http://digital.ni.com/public.nsf/MainPage?OpenForm&node=133020_US 4 http://digital.ni.com/manuals.nsf/MainPage?ReadForm&node=132020_US

RP

CHAPTER 2. INTRODUCTION

v—˜†si‡F ‰ou ™—n modify —ny ex—mple †s to (t —n —ppli™—tionD or you ™—n ™opy —nd p—ste from —n ex—mple into — †s th—t you ™re—teF sn —ddition to the ex—mple †ss th—t ship with v—˜†si‡D you —lso ™—n —™™ess hundreds of ex—mple †ss on the NI Developer Zone —t niF™omGzone5 F „o se—r™h —ll ex—mples using v—˜†si‡ †ssD use the xs ix—mple pinderF „he xs ix—mple pinder is the g—tew—y to —ll inst—lled ex—mples —nd the ex—mples lo™—ted on the NI Developer ZoneF „o l—un™h the xs ix—mple pinderD sele™t relp pind ix—mples from the front p—nel or ˜lo™k di—gr—m menu ˜—rF ‰ou —lso ™—n l—un™h the xs ix—mple pinder ˜y ™li™king the —rrow on the ypen ˜utton on the v—˜†si‡ di—log ˜ox —nd sele™ting ix—mples from the short™ut menuF

2.9 Reduce Samples VI
Exercise 2.3:
sn the following exer™isesD you will open — ˜l—nk †s —nd —dd ixpress †ss —nd stru™tures to the ˜lo™k di—gr—m to ˜uild — new †sF ‡hen you ™omplete the exer™iseD the front p—nel of the †s will —ppe—r simil—r to the pigure PFQIF

Figure 2.31

2.9.1 Opening a Blank VI
sf no templ—te is —v—il—˜le for the t—sk you w—nt to ™re—teD you ™—n st—rt with — ˜l—nk †s —nd —dd ixpress †ss to —™™omplish the spe™i(™ t—skF gomplete the following steps to open — ˜l—nk †sF
5 http://www.ni.com/zone

RQ

IFsn the v—˜†si‡ di—log ˜oxD ™li™k the —rrow on the xew ˜utton —nd sele™t fl—nk †s from the short™ut menu or press the gtrlEx keys to open — ˜l—nk †sF xoti™e th—t — ˜l—nk front p—nel —nd ˜lo™k di—gr—m —ppe—rF PF sf the pun™tions p—lette is not visi˜leD rightE™li™k —ny ˜l—nk sp—™e on the ˜lo™k di—gr—m to displ—y the pun™tions p—letteF gli™k the thum˜t—™kD shown in pg RQD in the upper left ™orner of the pun™tions p—lette to pl—™e the p—lette on the s™reenF

note:

‰ou ™—n rightE™li™k — ˜l—nk sp—™e on the ˜lo™k di—gr—m or the front p—nel to displ—y the pun™tions or gontrols p—lettesF

2.9.2 Adding an Express VI that Simulates a Signal
gomplete the following steps to (nd the ixpress †s you w—nt to use —nd then —dd it to the ˜lo™k di—gr—mF IF sf the gontext relp window is not visi˜leD press the gtrlEr keys to open the gontext relp windowF ‰ou —lso ™—n press the ƒhow gontext relp ‡indow ˜uttonD shown in pg RQD to open the gontext relp windowF

PFƒele™t the snput p—lette on the pun™tions p—lette —nd move the ™ursor over the ixpress †ss on the snput p—letteF xoti™e th—t the gontext relp window displ—ys inform—tion —˜out the fun™tion of e—™h ixpress †sF QFprom the inform—tion provided in the gontext relp windowD (nd the ixpress †s th—t ™—n simul—te — sine w—ve sign—lF RFƒele™t the ixpress †s —nd pl—™e it on the ˜lo™k di—gr—mF „he gon(gure ƒimul—te ƒign—l di—log ˜ox —ppe—rsF SFsdle the ™ursor over the v—rious options in the gon(gure ƒimul—te ƒign—l di—log ˜oxD su™h —s prequen™y @rzAD emplitudeD —nd ƒ—mples per se™ond @rzAF ‚e—d the inform—E tion th—t —ppe—rs in the gontext relp windowF TFgon(gure the ƒimul—te ƒign—l ixpress †s to gener—te — sine w—ve with — frequen™y of 10.7 —nd —mplitude of 2F UFxoti™e how the sign—l displ—yed in the ‚esult €review window ™h—nges to re)e™t the ™on(gured sine w—veF VFglose the gon(gure ƒimul—te ƒign—l di—log ˜ox ˜y ™li™king the yu ˜uttonF WFwove the ™ursor over the ƒimul—te ƒign—l ixpress †s —nd re—d the inform—tion th—t —ppe—rs in the gontext relp windowF xoti™e th—t the gontext relp window now displ—ys the ™on(gur—tion of the ƒimul—te ƒign—l ixpress †sF IHFƒ—ve this †s —s ‚edu™e ƒ—mplesFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

2.9.3 Modifying the Signal
gomplete the following steps to use the LabVIEW Help to se—r™h for the ixpress †s th—t redu™es the num˜er of s—mples in — sign—lF IFƒele™t relp †sD pun™tionD 8 rowE„o relp to open the LabVIEW HelpF

RR

CHAPTER 2. INTRODUCTION

PFgli™k the ƒe—r™h t—˜ —nd type s—mple ™ompression in the „ype in the word@sA to se—r™h for text ˜oxF xoti™e th—t this word ™hoi™e re)e™ts wh—t you w—nt this ixpress †s to doE™ompressD or redu™eD the num˜er of s—mples in — sign—lF QF„o ˜egin the se—r™hD press the inter key or ™li™k the vist „opi™s ˜uttonF RFhou˜leE™li™k the ƒ—mple gompression topi™ to displ—y the topi™ th—t des™ri˜es the ƒ—mple gompression ixpress †sF SFefter you re—d the des™ription of the ixpress †sD ™li™k the €l—™e on the ˜lo™k di—gr—m ˜utton to sele™t the ixpress †sF TFwove the ™ursor to the ˜lo™k di—gr—mF xoti™e how v—˜†si‡ —tt—™hes the ƒ—mple gompression ixpress †s to the ™ursorF UF€l—™e the ƒ—mple gompression ixpress †s on the ˜lo™k di—gr—m to the right of the ƒimul—te ƒign—l ixpress †sF VFgon(gure the ƒ—mple gompression ixpress †s to redu™e the sign—l ˜y — f—™tor of 25 using the me—n of these v—luesF WFglose the gon(gure ƒ—mple gompression di—log ˜oxF IHF…sing the ‡iring toolD wire the ƒine output in the ƒimul—te ƒign—l ixpress †s to the ƒign—ls input in the ƒ—mple gompression ixpress †sF

2.9.4 Customizing the Front Panel
sn — previous exer™ise @ƒe™tion PFSAD you —dded ™ontrols —nd indi™—tors to the front p—nel using the gontrols p—letteF ‰ou —lso ™—n —dd ™ontrols —nd indi™—tors from the ˜lo™k di—gr—mF gomplete the following steps to ™re—te ™ontrols —nd indi™—tors —s shown in pigure PFQPF

Figure 2.32

IF‚ightE™li™k the we—n output in the ƒ—mple gompression ixpress †s —nd sele™t gre—te xumeri™ sndi™—tor from the short™ut menu to ™re—te — numeri™ indi™—torF

RS

PF‚ightE™li™k the we—n output of the ƒ—mple gompression ixpress †s —nd sele™t snsert snputGyutput from the short™ut menu to insert the in—˜le inputF QF‚ightE™li™k the in—˜le input —nd sele™t gre—te gontrol from the short™ut menu to ™re—te the in—˜leswit™hF RF‚ightE™li™k the wire linking the ƒine output in the ƒimul—te ƒign—l ixpress †s to the ƒign—ls input in the ƒign—l gompression ixpress †s —nd sele™t gre—te qr—ph sndi™—tor from the short™ut menuF xoti™e th—t you ™—n ™re—te ™ontrols —nd indi™—tors from the ˜lo™k di—gr—mF ‡hen you ™re—te ™ontrols —nd indi™—tors using this methodD v—˜†si‡ —utom—ti™—lly ™re—tes termin—ls th—t —re l—˜eled —nd form—tted ™orre™tlyF SF…sing the ‡iring toolD wire the we—n output in the ƒ—mple gompression ixpress †s to the ƒine gr—ph indi™—tor termin—l ™re—ted in the previous stepF xoti™e th—t the werge ƒign—ls fun™tion —ppe—rsF TFerr—nge the o˜je™ts on the ˜lo™k di—gr—m so th—t they —ppe—r simil—r to pigure PFQPF ‰ou ™—n rightE™li™k —ny wire —nd sele™t gle—n …p ‡ire from the short™ut menu to —utom—ti™—lly route —n existing wireF
tip:

UFhispl—y the front p—nelF xoti™e th—t the ™ontrols —nd indi™—tors you —dded —utom—tiE ™—lly —ppe—r on the front p—nel with l—˜els th—t ™orrespond to their fun™tionF VFƒ—ve this †sF

2.9.5 Conguring the VI to Run Continuously Until the User Stops It
sn the ™urrent st—teD the †s runs on™eD gener—tes one sign—lD then stops exe™utingF „o run the †s until — ™ondition is metD you ™—n —dd — ‡hile voop to the ˜lo™k di—gr—mF gomplete the following steps to —dd — ‡hile voopF IFhispl—y the front p—nel —nd run the †sF xoti™e how the †s runs on™e —nd then stopsF elso noti™e how there is no ƒtop ˜uttonF PFhispl—y the ˜lo™k di—gr—m —nd sele™t the ‡hile voop on the pun™tions gontrol p—letteF ixe™ution

QFwove the ™ursor to the upper left ™orner of the ˜lo™k di—gr—mF €l—™e the top left ™orner of the ‡hile voop hereF RFgli™k —nd dr—g the ™ursor di—gon—lly to en™lose all the ixpress †ss —nd wiresD —s shown in pigure PFQQF

RT

CHAPTER 2. INTRODUCTION

Figure 2.33

xoti™e th—t the ‡hile voopD shown in pg RTD —ppe—rs with — ƒtop ˜utton wired to the ™ondition termin—lF „his ‡hile voop is ™on(gured to stop when the user ™li™ks the ƒtop ˜uttonF SFhispl—y the front p—nel —nd run the †sF xoti™e th—t the †s now runs until you ™li™k the ƒtop ˜uttonF e ‡hile voop exe™utes the fun™tions inside the loop until the user presses the ƒtop ˜uttonF ‚efer to ‚epetition —nd voops @ƒe™tion RFIA for more inform—tion —˜out ‡hile voopsF

2.9.6 Controlling the Speed of Execution
„o plot the points on the w—veform gr—ph more slowlyD you ™—n —dd — time del—y to the ˜lo™k di—gr—mF gomplete the following steps to ™ontrol the speed —t whi™h the †s exe™utesF IFyn the ˜lo™k di—gr—mD sele™t the „ime hel—y ixpress †s on the pun™tions ixe™ution gontrol p—lette —nd pl—™e it inside the loopF PF„ype .250 in the „ime del—y @se™ondsA text ˜oxF „his time del—y spe™i(es how f—st the loop runsF ‡ith — .250 se™ond time del—yD the loop iter—tes on™e every qu—rter of — se™ondF QFglose the gon(gure „ime hel—y di—log ˜oxF RFƒ—ve this †sF SFhispl—y the front p—nel —nd run the †sF TFgli™k the in—˜le swit™h —nd noti™e the ™h—nge on the gr—phF xoti™e how if the in—˜le swit™h is onD the gr—ph displ—ys the redu™ed sign—lF sf the in—˜le swit™h is o'D the gr—ph does not displ—y the redu™ed sign—lF UFgli™k the ƒtop ˜utton to stop the †sF

RU

2.9.7 Using a Table to Display Data
gomplete the following steps to displ—y — ™olle™tion of me—n v—lues in — t—˜le on the front p—nelF IFyn the front p—nelD sele™t the ixpress „—˜le indi™—tor on the gontrols „ext sndi™—tors p—lette —nd pl—™e it on the front p—nel to the right of the w—veform gr—phF PFhispl—y the ˜lo™k di—gr—mF xoti™e th—t the „—˜le termin—l —ppe—rs wired to the fuild „—˜le ixpress †s —utom—ti™—llyF

QF

sf the fuild „—˜le ixpress †s —nd the „—˜le termin—l —re not sele™ted —lre—dyD ™li™k —n open sp—™e on the ˜lo™k di—gr—m to the left of the fuild „—˜le ixpress †s —nd the „—˜le termin—lF hr—g the ™ursor di—gon—lly until the sele™tion re™t—ngle en™loses the fuild „—˜le ixpress †s —nd the „—˜le termin—lD shown in pg RUF e moving d—shed outline ™—lled — m—rquee highlights the fuild „—˜le ixpress †sD the „—˜le termin—lD —nd the wire joining the twoF RFhr—g the o˜je™ts into the ‡hile voop to the right of the we—n termin—lF xoti™e th—t the ‡hile voop —utom—ti™—lly resizes to en™lose the fuild „—˜le ixpress †s —nd the „—˜le termin—lF SF…sing the ‡iring toolD wire the we—n termin—l of the ƒ—mple gompression ixpress †s to the ƒign—ls input of the fuild „—˜le ixpress †sF „he ˜lo™k di—gr—m should —ppe—r simil—r to pigure PFQRF

Figure 2.34

TFhispl—y the front p—nel —nd run the †sF

RV

CHAPTER 2. INTRODUCTION

UFgli™k the in—˜le swit™hF „he t—˜le displ—ys the me—n v—lues of every 25 s—mples of the sine w—veF xoti™e if the in—˜le swit™h is o'D the t—˜le does not re™ord the me—n v—luesF VFƒtop the †sF WFixperiment with properties of the t—˜le ˜y using the „—˜le €roperties di—log ˜oxF por ex—mpleD try ™h—nging the num˜er of ™olumns to oneF IHFƒ—ve —nd ™lose this †sF

2.10 Debugging Techniques
sf — †s does not runD it is — ˜rokenD or nonexe™ut—˜leD †sF „he ‚un ˜utton often —ppe—rs ˜rokenD shown —t leftD when you ™re—te or edit — †sF sf it is still ˜roken when you (nish wiring the ˜lo™k di—gr—mD the †s is ˜roken —nd will not runF qener—llyD this me—ns th—t — required input is not wiredD or — wire is ˜rokenF

2.10.1 Finding Errors
gli™k the ˜roken ‚un ˜utton or sele™t ‡indows ƒhow irror vist to displ—y the irror list windowD whi™h lists —ll the errorsF hou˜leE™li™k —n error des™ription to displ—y the relev—nt ˜lo™k di—gr—m or front p—nel —nd highlight the o˜je™t th—t ™ont—ins the errorF

2.10.2 Execution Highlighting
†iew —n —nim—tion of the exe™ution of the ˜lo™k di—gr—m ˜y ™li™king the righlight ixe™ution ˜uttonD shown in pg RVF ixe™ution highlighting shows the )ow of d—t— on the ˜lo™k di—gr—m from one node to —nother using ˜u˜˜les th—t move —long the wiresF …se exe™ution highlighting in ™onjun™tion with singleEstepping to see how d—t— move from node to node through — †sF
note:

ixe™ution highlighting gre—tly redu™es the speed —t whi™h the †s runsF

2.10.3 Single-Stepping
ƒingleEstep through — †s to view e—™h —™tion of the †s on the ˜lo™k di—gr—m —s the †s runsF „he singleEstepping ˜uttons —'e™t exe™ution only in — †s or su˜†s in singleEstep modeF inter singleEstep mode ˜y ™li™king the ƒtep yver or ƒtep snto ˜uttonF wove the ™ursor over the ƒtep yverD ƒtep sntoD or ƒtep yut ˜utton to view — tip strip th—t des™ri˜es the next step if you ™li™k th—t ˜uttonF ‰ou ™—n singleEstep through su˜†ss or run them norm—llyF sf you singleEstep through — †s with exe™ution highlighting onD —n exe™ution glyphD shown in pg RVD —ppe—rs on the i™ons of the su˜†ss th—t —re ™urrently runningF

2.10.4 Probes
…se the €ro˜e toolD shown in pg RVD to ™he™k intermedi—te v—lues on — wire —s — †ps runsF ‡hen exe™ution p—uses —t — node ˜e™—use of singleEstepping or — ˜re—kpointD you —lso ™—n pro˜e the wire th—t just exe™uted to see the v—lue th—t )owed through th—t wireF

RW

‰ou —lso ™—n ™re—te — ™ustom pro˜e to spe™ify whi™h indi™—tor you use to view the pro˜ed d—t—F por ex—mpleD if you —re viewing numeri™ d—t—D you ™—n ™hoose to see th—t d—t— in — ™h—rt within the pro˜eF „o ™re—te — ™ustom pro˜eD rightE™li™k — wire —nd sele™t gustom €ro˜e xew from the short™ut menuF

2.10.5 Breakpoints
…se the fre—kpoint toolD shown in pg RWD to pl—™e — ˜re—kpoint on — †sD nodeD or wire on the ˜lo™k di—gr—m —nd p—use exe™ution —t th—t lo™—tiponF ‡hen you set — ˜re—kpoint on — wireD exe™ution p—uses —fter d—t— p—ss through the wireF €l—™e — ˜re—kpoint on the ˜lo™k di—gr—m worksp—™e to p—use exe™ution —fter —ll nodes on the ˜lo™k di—gr—m exe™uteF ‡hen — †s p—uses —t — ˜re—kpointD v—˜†si‡ ˜rings the ˜lo™k di—gr—m to the front —nd uses — m—rquee to highlight the node or wire th—t ™ont—ins the ˜re—kpointF v—˜†si‡ highlights ˜re—kpoints with red ˜orders for nodes —nd ˜lo™k di—gr—ms —nd red ˜ullets for wiresF ‡hen you move the ™ursor over —n existing ˜re—kpointD the ˜l—™k —re— of the fre—kpoint tool ™ursor —ppe—rs whiteF …se the fre—kpoint tool to ™li™k —n existing ˜re—kpoint to remove itF

2.11 Debug Exercise (Main) VI
Exercise 2.4:
gomplete the following steps to lo—d — ˜roken †s —nd ™orre™t the errorF …se singleEstepping —nd exe™ution highlighting to step through the †sF

2.11.1 Front Panel
IFƒele™t pile ypen —nd n—vig—te to gX\ixer™ises\v—˜†si‡ f—si™s s to open the he˜ug ixer™ise @w—inA †sF „he front p—nel shown in pigure PFQS —ppe—rsF

Figure 2.35

xoti™e the ‚un ˜utton on the tool˜—r —ppe—rs ˜rokenD shown in pg RWD indi™—ting th—t the †s is ˜roken —nd ™—nnot runF

2.11.2 Block Diagram
IFƒele™t ‡indow ure PFQTF ƒhow flo™k hi—gr—m to displ—y the ˜lo™k di—gr—m shown in pigE

SH

CHAPTER 2. INTRODUCTION

Figure 2.36

„he ‚—ndom xum˜er @HEIA fun™tionD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress xumeri™ p—letteD produ™es — r—ndom num˜er ˜etween 0 —nd 1F „he wultiply fun™tionD lo™—ted on the pun™tions erithmeti™ 8

gomp—rison ixpress xumeri™ p—letteD multiplies the r—ndom num˜er ˜y 10.0F „he numeri™ ™onst—ntD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress xumeri™ p—letteD is the num˜er to multiply ˜y the r—ndom num˜erF „he heE ˜ug ixer™ise @ƒu˜A †sD lo™—ted in the gX\ixer™ises\ v—˜†si‡ f—si™s s dire™toryD —dds 100.0 —nd ™—l™ul—tes the squ—re root of the v—lueF PFpind —nd (x e—™h errorF @—Agli™k the ˜roken ‚un ˜utton to displ—y the irror list windowD whi™h lists —ll the errorsF @˜Aƒele™t —n error des™ription in the irror list windowF „he het—ils se™tion des™ri˜es the error —nd in some ™—ses re™ommends how to ™orre™t the errorF @™Agli™k the relp ˜utton to displ—y — topi™ in the LabVIEW Help th—t des™ri˜es the error in det—il —nd in™ludes stepE˜yEstep instru™tions for ™orre™ting the errorF @dAgli™k the ƒhow irror ˜utton or dou˜leE™li™k the error des™ription to highlight the —re— on the ˜lo™k di—gr—m th—t ™ont—ins the errorF @eA…se the irror list window to (x e—™h errorF QFƒele™t pile ƒ—ve to s—ve the †sF ƒhow pront €—nelF RFhispl—y the front p—nel ˜y ™li™king it or ˜y sele™ting ‡indow

2.11.3 Run the VI
IFgli™k the ‚un ˜utton to run the †s sever—l timesF PFƒele™t ‡indow ƒhow flo™k hi—gr—m to displ—y the ˜lo™k di—gr—mF QFenim—te the )ow of d—t— through the ˜lo™k di—gr—mF @—A gli™k the righlight ixe™ution ˜uttonD shown in pg SHD on the tool˜—r to en—˜le exe™ution highlightingF

SI

@˜A gli™k the ƒtep snto ˜uttonD shown in pg SID to st—rt singleEsteppingF ixeE ™ution highlighting shows the movement of d—t— on the ˜lo™k di—gr—m from one node to —nother using ˜u˜˜les th—t move —long the wiresF xodes ˜link to indi™—te they —re re—dy to exe™uteF @™A gli™k the ƒtep yver ˜uttonD shown in pg SID —fter e—™h node to step through the entire ˜lo™k di—gr—mF i—™h time you ™li™k the ƒtep yver ˜uttonD the ™urrent node exe™utes —nd p—uses —t the next nodeF h—t— —ppe—r on the front p—nel —s you step through the †sF „he †s gener—tes — r—ndom num˜er —nd multiplies it ˜y 10.0F „he su˜†s —dds 100.0 —nd t—kes the squ—re root of the resultF @dA ‡hen — ˜linking ˜order surrounds the entire ˜lo™k di—gr—mD ™li™k the ƒtep yut ˜uttonD shown in pg SID to stop singleEstepping through the he˜ug ixer™ise @w—inA †sF RFƒingleEstep through the †s —nd its su˜†sF @—Agli™k the ƒtep snto ˜utton to st—rt singleEsteppingF @˜A ‡hen the he˜ug ixer™ise @ƒu˜A †s ˜linksD ™li™k the ƒtep snto ˜uttonF xoti™e the run ˜utton on the su˜†sF hispl—y the he˜ug ixer™ise @w—inA †s ˜lo™k di—gr—m ˜y ™li™king itF e @™A green glyphD shown in pg SID —ppe—rs on the su˜†s i™on on the he˜ug ixer™ise @w—inA †s ˜lo™k di—gr—mD indi™—ting th—t the su˜†s is runningF @dAhispl—y the he˜ug ixer™ise @ƒu˜A †s ˜lo™k di—gr—m ˜y ™li™king itF @eAgli™k the ƒtep yut ˜utton twi™e to (nish singleEstepping through the su˜†s ˜lo™k di—gr—mF „he he˜ug ixer™ise @w—inA †s ˜lo™k di—gr—m is —™tiveF @fAgli™k the ƒtep yut ˜utton to stop singleEsteppingF SF…se — pro˜e to ™he™k intermedi—te v—lues on — wire —s — †s runsF @—A …se the €ro˜e toolD shown pg SID to ™li™k —ny wireF e window simil—r to pigure PFQU —ppe—rsF

Figure 2.37

v—˜†si‡ num˜ers the €ro˜e window —utom—ti™—lly —nd displ—ys the s—me numE ˜er in — glyph on the wire you ™li™kedF @˜AƒingleEstep through the †s —g—inF „he €ro˜e window displ—ys d—t— p—ssed —long the wireF TF€l—™e ˜re—kpoints on the ˜lo™k di—gr—m to p—use exe™ution —t th—t lo™—tionF

SP

CHAPTER 2. INTRODUCTION

@—A …se the fre—kpoint toolD shown in pg SPD to ™li™k nodes or wiresF €l—™e — ˜re—kpoint on the ˜lo™k di—gr—m to p—use exe™ution —fter —ll nodes on the ˜lo™k di—gr—m exe™uteF @˜Agli™k the ‚un ˜utton to run the †sF ‡hen you re—™h — ˜re—kpoint during exe™uE tionD the †s p—uses —nd the €—use ˜utton on the tool˜—r —ppe—rs redF @™A gli™k the gontinue ˜uttonD shown pg SPD to ™ontinue running to the next ˜re—kpoint or until the †s (nishes runningF @dA…se the fre—kpoint tool to ™li™k the ˜re—kpoints you set —nd remove themF UFgli™k the righlight ixe™ution ˜utton to dis—˜le exe™ution highlightingF VFƒele™t pile glose to ™lose the †s —nd —ll open windowsF

2.12 Summary, Tips, and Tricks on Introduction to LabVIEW
2.12.1 Summary
• †irtu—l instruments @†ssA ™ont—in three m—in ™omponentsEthe front p—nelD the ˜lo™k di—gr—mD —nd the i™on —nd ™onne™tor p—neF • „he front p—nel is the user interf—™e of — †s —nd spe™i(es the inputs —nd displ—ys the outputs of the †sF • „he ˜lo™k di—gr—m ™ont—ins the gr—phi™—l sour™e ™ode ™omposed of nodesD termin—lsD —nd wiresF • …se the „ools p—lette to ™re—teD modifyD —nd de˜ug †ssF €ress the ƒhift key —nd rightE™li™k to displ—y — tempor—ry version of the „ools p—lette —t the lo™—tion of the ™ursorF • …se the gontrols p—lette to pl—™e ™ontrols —nd indi™—tors on the front p—nelF ‚ightE™li™k —n open sp—™e on the front p—nel to displ—y the gontrols p—letteF • …se the pun™tions p—lette to pl—™e †ss —nd fun™tions on the ˜lo™k di—gr—mF ‚ightE™li™k —n open sp—™e on the ˜lo™k di—gr—m to displ—y the pun™tions p—letteF • …se the ƒe—r™h ˜utton on the gontrols —nd pun™tions p—lettes to se—r™h for ™ontrolsD †ssD —nd fun™tionsF • ell v—˜†si‡ o˜je™ts —nd empty sp—™e on the front p—nel —nd ˜lo™k di—gr—m h—ve —sso™i—ted short™ut menusD whi™h you —™™ess ˜y rightE™li™king —n o˜je™tD the front p—nelD or the ˜lo™k di—gr—mF • …se the relp menu to displ—y the gontext relp window —nd the LabVIEW HelpD whi™h des™ri˜es most p—lettesD menusD toolsD †ssD fun™tionsD —nd fe—turesF • ƒele™t relp ƒe—r™h the v—˜†si‡ fookshelf to displ—y the LabVIEW BookshelfD whi™h you ™—n use to se—r™h €hp versions of —ll the v—˜†si‡ m—nu—ls —nd Application NotesF • ‰ou ˜uild the front p—nel with ™ontrols —nd indi™—torsD whi™h —re the inter—™tive input —nd output termin—ls of the †sD respe™tivelyF • gontrol termin—ls h—ve — thi™ker ˜order th—n indi™—tor termin—lsF „o ™h—nge — ™ontrol to —n indi™—tor or to ™h—nge —n indi™—tor to — ™ontrolD rightE™li™k the o˜je™t —nd sele™t gh—nge to sndi™—tor or gh—nge to gontrol from the short™ut menuF

SQ

• „he ˜lo™k di—gr—m is ™omposed of nodesD termin—lsD —nd wiresF • „he ˜roken ‚un ˜utton —ppe—rs on the tool˜—r to indi™—te the †s is ˜rokenF gli™k the ˜roken ‚un ˜utton to displ—y the irror list windowD whi™h lists —ll the errorsF • …se exe™ution highlightingD singleEsteppingD pro˜esD —nd ˜re—kpoints to de˜ug †ss ˜y —nim—ting the )ow of d—t— through the ˜lo™k di—gr—mF

2.12.2 Tips and Tricks
2.12.2.1 Operating
• prequently used menu options h—ve equiv—lent key˜o—rd short™utsF por ex—mpleD to s—ve — †sD you ™—n sele™t pile ƒ—ve or press the gtrlEƒ keysF gommon key˜o—rd short™uts in™lude the followingX • • • • •

Ctrl-R E ‚uns — †sF Ctrl-E E „oggles ˜etween the front p—nel —nd ˜lo™k di—gr—mF Ctrl-H E „oggles displ—y of the gontext relp windowF Ctrl-B E ‚emoves —ll ˜roken wiresF Ctrl-F E pinds †ssD glo˜—lsD fun™tionsD textD or other o˜je™ts lo—ded in memory or in — spe™i(ed
list of †ssF

• „o in™rement or de™rement numeri™ ™ontrols f—sterD use the yper—ting or v—˜eling tools to pl—™e the ™ursor in the ™ontrol —nd press the ƒhift key while pressing the up or down —rrow keysF • ‰ou ™—n dis—˜le the de˜ugging tools to redu™e memory requirements —nd to in™re—se perforE m—n™e slightlyF ƒele™t pile †s €ropertiesD sele™t ixe™ution from the top pullEdown menuD —nd remove the ™he™km—rk from the ellow he˜ugging ™he™k˜oxF

2.12.2.2 Wiring
• gli™k the ƒhow gontext relp ‡indow ˜utton on the tool˜—r to displ—y the gontext relp windowF …se the gontext relp window to determine whi™h termin—ls —re requiredF ‚equired termin—ls —re ˜oldD re™ommended ™onne™tions —re pl—in textD —nd option—l ™onne™tions —re dimmedF • €ress the sp—™e˜—r to toggle the wire dire™tionF • „o move o˜je™ts one pixelD press the —rrow keysF „o move o˜je™ts sever—l pixelsD press the ƒhift key while you press the —rrow keysF • „o ™—n™el — wire you st—rtedD press the is™ keyD rightE™li™kD or ™li™k the termin—l where you st—rted the wireF • …se the tip strips th—t —ppe—r —s you move the ‡iring tool over termin—lsF • hispl—y the ™onne™tor p—ne ˜y rightE™li™king the node —nd sele™ting †isi˜le stems from the short™ut menuF
„ermin—ls

SR

CHAPTER 2. INTRODUCTION

• ‰ou ™—n ˜end — wire ˜y ™li™king to t—™k the wire down —nd moving the ™ursor in — perpendi™ul—r dire™tionF „o t—™k down — wire —nd ˜re—k itD dou˜leE™li™kF

Figure 2.38:

1. Tack Down a Wire by Clicking, 2. Tack and Break the Wire by Double-clicking

2.12.2.3 Editing
• …se the following short™uts to ™re—te ™onst—ntsD ™ontrolsD —nd indi™—torsX · ‚ightE™li™k — fun™tion termin—l —nd sele™t gre—te gre—te sndi™—tor from the short™ut menuF
gonst—ntD gre—te gontrolD or

· hr—g ™ontrols —nd indi™—tors from the front p—nel to the ˜lo™k di—gr—m to ™re—te — ™onE st—ntF · hr—g ™onst—nts from the ˜lo™k di—gr—m to the front p—nel to ™re—te — ™ontrolF • „o dupli™—te —n o˜je™tD press the gtrl key while using the €ositioning tool to ™li™k —nd dr—g — sele™tionF • „o restri™t —n o˜je™t9s dire™tion of movement horizont—lly or verti™—llyD use the €ositioning tool to sele™t the o˜je™t —nd press the ƒhift key while you move the o˜je™tF • „o keep —n o˜je™t proportion—l to its origin—l size —s you resize itD press the ƒhift key while you dr—g the resizing h—ndles or ™ir™lesF • „o resize —n o˜je™t —s you pl—™e it on the front p—nelD press the gtrl key while you ™li™k to pl—™e the o˜je™t —nd dr—g the resizing h—ndles or ™ir™lesF • „o repl—™e nodesD rightE™li™k the node —nd sele™t ‚epl—™e from the short™ut menuF • „o displ—y the ˜lo™k di—gr—m of — su˜†s from the ™—lling †sD press the gtrl key —nd use the yper—ting or €ositioning tool to dou˜leE™li™k the su˜†s on the ˜lo™k di—gr—mF • „o displ—y the front p—nel of — su˜†s from the ™—lling †sD use the yper—ting or €ositioning tool to dou˜leE™li™k the su˜†s on the ˜lo™k di—gr—mF ‰ou —lso ™—n sele™t frowse „his †s9s ƒu˜†ssF • efter you type — l—˜elD press the inter key to end text entryF

SS

• „o —dd items qui™kly to ring ™ontrols —nd g—se stru™turesD press the ƒhiftEinter keys —fter e—™h itemF €ressing ƒhiftEinter —™™epts the item —nd positions the ™ursor to —dd the next itemF ‚efer to w—king he™isions in — †s @ƒe™tion VFPA for more inform—tion —˜out g—se stru™turesF • „o ™opy the ™olor of one o˜je™t —nd tr—nsfer it to — se™ond o˜je™t without using — ™olor pi™kerD use the golor gopy tool to ™li™k the o˜je™t whose ™olor you w—nt to ™opyF …se the goloring tool to ™li™k the o˜je™t to whi™h you w—nt to —pply the ™olorF ‰ou —lso ™—n ™opy the ™olor of one o˜je™t ˜y using the goloring tool —nd pressing the gtrl keyF • ƒele™t idit
…ndo if you m—ke — mist—keF

• „o ™re—te more ˜l—nk sp—™e on the ˜lo™k di—gr—mD press the gtrl key while you use the €osiE tioning tool to dr—w — re™t—ngle on the ˜lo™k di—gr—mF

2.12.2.4 Debugging
• ‡hen singleEsteppingD use the following key˜o—rd short™utsX • • •

Ctrl-down arrow E ƒteps into — nodeF Ctrl-right arrow E ƒteps over — nodeF Ctrl-up arrow E ƒteps out of — nodeF

ST

CHAPTER 2. INTRODUCTION

Chapter 3

Modular Programming
3.1 Modular Programming
„he power of v—˜†si‡ lies in the hier—r™hi™—l n—ture of the †sF efter you ™re—te — †sD you ™—n use it on the ˜lo™k di—gr—m of —nother †sF „here is no limit on the num˜er of l—yers in the hier—r™hyF …sing modul—r progr—mming helps you m—n—ge ™h—nges —nd de˜ug the ˜lo™k di—gr—m qui™klyF e †s within —nother †s is ™—lled — su˜†sF e su˜†s ™orresponds to — su˜routine in textE˜—sed progr—mming l—ngu—gesF ‡hen you dou˜leE™li™k — su˜†sD — front p—nel —nd ˜lo™k di—gr—m —ppe—rD r—ther th—n — di—log ˜ox in whi™h you ™—n ™on(gure optionsF „he front p—nel in™ludes ™ontrols —nd indi™—tors th—t might look f—mili—rF „he ˜lo™k di—gr—m in™ludes wiresD front p—nel i™onsD fun™tionsD possi˜ly su˜†ssD —nd other v—˜†si‡ o˜je™ts th—t —lso might look f—mili—rF „he upper right ™orner of the front p—nel —nd ˜lo™k di—gr—m displ—ys the i™on for the †sF „his i™on is the s—me —s the i™on th—t —ppe—rs when you pl—™e the †s on the ˜lo™k di—gr—mF

3.1.1 Icon and Connector Pane
efter you ˜uild — front p—nel —nd ˜lo™k di—gr—mD ˜uild the i™on —nd the ™onne™tor p—ne so you ™—n use the †s —s — su˜†sF ivery †s displ—ys —n i™onD su™h —s the one shown in pg SUD in the upper right ™orner of the front p—nel —nd ˜lo™k di—gr—m windowsF en i™on is — gr—phi™—l represent—tion of — †sF st ™—n ™ont—in textD im—gesD or — ™om˜in—tion of ˜othF sf you use — †s —s — su˜†sD the i™on identi(es the su˜†s on the ˜lo™k di—gr—m of the †sF ‰ou ™—n dou˜leE™li™k the i™on to ™ustomize or edit itF ‰ou —lso need to ˜uild — ™onne™tor p—neD shown in pg SUD to use the †s —s — su˜†sF „he ™onne™tor p—ne is — set of termin—ls th—t ™orrespond to the ™ontrols —nd indi™—tors of th—t †sD simil—r to the p—r—meter list of — fun™tion ™—ll in textE˜—sed progr—mming l—ngu—gesF „he ™onne™tor p—ne de(nes the inputs —nd outputs you ™—n wire to the †s so you ™—n use it —s — su˜†sF e ™onne™tor p—ne re™eives d—t— —t its input termin—ls —nd p—sses the d—t— to the ˜lo™k di—gr—m ™ode through the front p—nel ™ontrols —nd re™eives the results —t its output termin—ls from the front p—nel indi™—torsF es you ™re—te †ssD you might (nd th—t you perform — ™ert—in oper—tion frequentlyF gonsider using su˜†ss or loops to perform th—t oper—tion repetitivelyF por ex—mpleD the ˜lo™k di—gr—m in pigure QFI ™ont—ins two identi™—l oper—tionsF

SU

SV

CHAPTER 3. MODULAR PROGRAMMING

Figure 3.1

‰ou ™—n ™re—te — su˜†s th—t performs th—t oper—tion —nd ™—ll the su˜†s twi™eF „he ex—mple in pigure QFP ™—lls the „emper—ture †s —s — su˜†s twi™e on its ˜lo™k di—gr—m —nd fun™tions the s—me —s the previous ˜lo™k di—gr—mF‰ou —lso ™—n reuse the su˜†s in other †ssF ‚efer to ‚epetition —nd voops @ƒe™tion RFIA for more inform—tion —˜out using loops to ™om˜ine ™ommon oper—tionsF

Figure 3.2

‚efer to the LabVIEW Basics II: Development Course Manual for more inform—tion —˜out —pE pli™—tion developmentF „he following pseudoE™ode —nd ˜lo™k di—gr—ms demonstr—te the —n—logy ˜etween su˜†ss —nd su˜routinesF

SW

Function Code
main { average (point1, point2, pointavg) } ƒu˜†s flo™k hi—gr—m

Calling Program Code
function average (in1, in2, out) { out = (in1 + in2)/2.0; } g—lling†s flo™k hi—gr—m

3.2 Icons and Connector Panes
efter you ˜uild — †s front p—nel —nd ˜lo™k di—gr—mD ˜uild the i™on —nd the ™onne™tor p—ne so you ™—n use the †s —s — su˜†sF

3.2.1 Creating an Icon
ivery †s displ—ys —n i™onD shown in pg SWD in the upper right ™orner of the front p—nel —nd ˜lo™k di—gr—m windowsF en i™on is — gr—phi™—l represent—tion of — †sF st ™—n ™ont—in textD im—gesD or — ™om˜in—tion of ˜othF sf you use — †s —s — su˜†sD the i™on identi(es the su˜†s on the ˜lo™k di—gr—m of the †sF „he def—ult i™on ™ont—ins — num˜er th—t indi™—tes how m—ny new †ss you h—ve opened sin™e l—un™hing v—˜†si‡F gre—te ™ustom i™ons to repl—™e the def—ult i™on ˜y rightE™li™king the i™on in the upper right ™orner of the front p—nel or ˜lo™k di—gr—m —nd sele™ting idit s™on from the short™ut menu or dou˜leE™li™king the i™on in the upper right ™orner of the front p—nelF ‰ou —lso ™—n edit i™ons ˜y sele™ting pile †s €roperties sele™ting qener—l from the g—tegory pullEdown menuD —nd ™li™king the idit s™on ˜uttonF …se the tools on the left side of the s™on iditor di—log ˜ox to ™re—te the i™on design in the editing —re—F „he norm—l size im—ge of the i™on —ppe—rs in the —ppropri—te ˜ox to the right of the editing —re—D —s shown in the di—log ˜ox in pigure QFQF

TH

CHAPTER 3. MODULAR PROGRAMMING

Figure 3.3

hepending on the type of monitor you useD you ™—n design — sep—r—te i™on for mono™hromeD ITE™olorD —nd PSTE™olor modeF v—˜†si‡ uses the mono™hrome i™on for printing unless you h—ve — ™olor printerF …se the idit menu to ™utD ™opyD —nd p—ste im—ges from —nd to the i™onF ‡hen you sele™t — portion of the i™on —nd p—ste —n im—geD v—˜†si‡ resizes the im—ge to (t into the sele™tion —re—F ‰ou —lso ™—n dr—g — gr—phi™ from —nywhere in your (le system —nd drop it in the upper right ™orner of the front p—nel or ˜lo™k di—gr—mF v—˜†si‡ ™onverts the gr—phi™ to — 32 × 32 pixel i™onF …se the gopy from option on the right side of the s™on iditor di—log ˜ox to ™opy from — ™olor i™on to — ˜l—™kE—ndEwhite i™on —nd vi™e vers—F efter you sele™t — gopy from optionD ™li™k the yu ˜utton to ™omplete the ™h—ngeF sf you do not dr—w — ™omplete ˜order —round — †s i™onD the i™on ˜—™kground —ppe—rs tr—nsp—rentF ‡hen you sele™t the i™on on the ˜lo™k di—gr—mD — sele™tion m—rquee —ppe—rs —round e—™h individu—l gr—phi™ element in the i™onF
Note:

…se the tools on the left side of the s™on iditor di—log ˜ox to ™re—te the i™on design in the editing —re—F „he norm—l size im—ge of the i™on —ppe—rs in the —ppropri—te ˜ox to the right of the editing —re—F „he following t—sks ™—n ˜e performed with these toolsX

• •

…se the €en™il tool to dr—w —nd er—se pixel ˜y pixelF …se the vine tool to dr—w str—ight linesF „o dr—w horizont—lD verti™—lD —nd di—gon—l linesD press the <ƒhift> key while you use this tool to dr—g the ™ursorF …se the golor gopy tool to ™opy the foreground ™olor from —n element in the i™onF …se the pill tool to (ll —n outlined —re— with the foreground ™olorF …se the ‚e™t—ngle tool to dr—w — re™t—ngul—r ˜order in the foreground ™olorF hou˜leE™li™k this tool to fr—me the i™on in the foreground ™olorF

• • •

TI

…se the pilled ‚e™t—ngle tool to dr—w — re™t—ngle with — foreground ™olor fr—me —nd (lled with the ˜—™kground ™olorF hou˜leE™li™k this tool to fr—me the i™on in the foreground ™olor —nd (ll it with the ˜—™kground ™olorF …se the ƒele™t tool to sele™t —n —re— of the i™on to ™utD ™opyD moveD or m—ke other ™h—ngesF hou˜leE™li™k this tool —nd press the <helete> key to delete the entire i™onF …se the „ext tool to enter text into the i™onF hou˜leE™li™k this tool to sele™t — di'erent fontF @‡indowsA „he ƒm—ll ponts option works well in i™onsF …se the poregroundGf—™kground tool to displ—y the ™urrent foreground —nd ˜—™kE ground ™olorsF gli™k e—™h re™t—ngle to displ—y — ™olor p—lette from whi™h you ™—n sele™t new ™olorsF

• …se the options on the right side of the editing —re— to perform the following t—sksX · · ·

Show Terminals E hispl—ys the termin—l p—ttern of the ™onne™tor p—neF OK E ƒ—ves the dr—wing —s the i™on —nd returns to the front p—nelF Cancel E ‚eturns to the front p—nel without s—ving —ny ™h—ngesF

• „he menu ˜—r in the s™on iditor di—log ˜ox ™ont—ins more editing options su™h —s …ndoD ‚edoD gutD gopyD €—ste D —nd gle—r F

3.2.2 Setting Up the Connector Pane
„o use — †s —s — su˜†sD you need to ˜uild — connector paneD shown in pg TIF „he ™onne™tor p—ne is — set of termin—ls th—t ™orresponds to the ™ontrols —nd indi™—tors of th—t †sD simil—r to the p—r—meter list of — fun™tion ™—ll in textE˜—sed progr—mming l—ngu—gesF „he ™onne™tor p—ne de(nes the inputs —nd outputs you ™—n wire to the †s so you ™—n use it —s — su˜†sF he(ne ™onne™tions ˜y —ssigning — front p—nel ™ontrol or indi™—tor to e—™h of the ™onne™tor p—ne termin—lsF „o de(ne — ™onne™tor p—neD rightE™li™k the i™on in the upper right ™orner of the front p—nel window —nd sele™t ƒhow gonne™tor from the short™ut menuF „he ™onne™tor p—ne repl—™es the i™onF i—™h re™t—ngle on the ™onne™tor p—ne represents — termin—lF …se the re™t—ngles to —ssign inputs —nd outputsF „he num˜er of termin—ls v—˜†si‡ displ—ys on the ™onne™tor p—ne depends on the num˜er of ™ontrols —nd indi™—tors on the front p—nelF „he following front p—nel h—s four ™ontrols —nd one indi™—torD so v—˜†si‡ displ—ys four input termin—ls —nd one output termin—l on the ™onne™tor p—neF

TP

CHAPTER 3. MODULAR PROGRAMMING

Figure 3.4

3.2.3 Selecting and Modifying Terminal Patterns
ƒele™t — di'erent termin—l p—ttern for — †s ˜y rightE™li™king the ™onne™tor p—ne —nd sele™ting €—tterns from the short™ut menuF ƒele™t — ™onne™tor p—ne p—ttern with extr— termin—lsF ‰ou ™—n le—ve the extr— termin—ls un™onne™ted until you need themF „his )exi˜ility en—˜les you to m—ke ™h—nges with minim—l e'e™t on the hier—r™hy of the †ssF ‰ou —lso ™—n h—ve more front p—nel ™ontrols or indi™—tors th—n termin—lsF e solid ˜order highlights the p—ttern ™urrently —sso™i—ted with the i™onF „he m—ximum num˜er of termin—ls —v—il—˜le for — su˜†s is PVF „he most ™ommonly used p—ttern is shown in pg TPF „his p—ttern is used —s — st—nd—rd to —ssist in simplifying wiringF „he top inputs —nd outputs —re ™ommonly used for p—ssing referen™es —nd the ˜ottom inputs —nd outputs —re used for error h—ndlingF ‚efer to the se™tion on glusters @ƒe™tion TFSA for more inform—tion —˜out error h—ndlingF
Note:

„ry not to —ssign more th—n IT termin—ls to — †sF „oo m—ny termin—ls ™—n redu™e the re—d—˜ility —nd us—˜ility of the †sF

„o ™h—nge the sp—ti—l —rr—ngement of the ™onne™tor p—ne p—tternsD rightE™li™k the ™onne™tor p—ne —nd sele™t plip rorizont—lD plip †erti™—lD or ‚ot—te WH hegrees from the short™ut menuF

3.2.4 Assigning Terminals to Controls and Indicators
efter you sele™t — p—ttern to use for the ™onne™tor p—neD you must de(ne ™onne™tions ˜y —ssigning — front p—nel ™ontrol or indi™—tor to e—™h of the ™onne™tor p—ne termin—lsF ‡hen you link ™ontrols —nd indi™—tors to the ™onne™tor p—neD pl—™e inputs on the left —nd outputs on the right to prevent ™ompli™—tedD un™le—r wiring p—tterns in your †ssF „o —ssign — termin—l to — front p—nel ™ontrol or indi™—torD ™li™k — termin—l of the ™onne™tor p—neD then ™li™k the front p—nel ™ontrol or indi™—tor you w—nt to —ssign to th—t termin—lF gli™k —n open sp—™e on the front p—nelF „he termin—l ™h—nges to the d—t— type ™olor of the ™ontrol to indi™—te th—t you ™onne™ted the termin—lF ‰ou —lso ™—n sele™t the ™ontrol or indi™—tor (rst —nd then sele™t the termin—lF

TQ

elthough you use the ‡iring tool to —ssign termin—ls on the ™onne™tor p—ne to front p—nel ™ontrols —nd indi™—torsD no wires —re dr—wn ˜etween the ™onne™tor p—ne —nd these ™ontrols —nd indi™—torsF
Note:

3.3 Convert C to F VI
Exercise 3.1:
gomplete the following steps to ™re—te — †s th—t t—kes — num˜er representing degrees gelsius —nd ™onverts it to — num˜er representing degrees p—hrenheitF

3.3.1 Front Panel
IFypen — ˜l—nk †s —nd ˜egin ˜uilding the following front p—nelF

Figure 3.5

PF@yption—lA ƒele™t ‡indow „ile veft —nd ‚ight to displ—y the front p—nel —nd ˜lo™k di—gr—m side ˜y side or ‡indow „ile …p —nd hown to displ—y the front p—nel —nd ˜lo™k di—gr—m st—™kedF QFgre—te — numeri™ ™ontrolF ‰ou will use this ™ontrol to enter the v—lue for degrees gelsiusF @—Aƒele™t gontrols xumeri™ gontrols to displ—y the xumeri™ gontrols p—letteF sf the gontrols p—lette is not visi˜leD rightE™li™k —n open sp—™e on the front p—nel worksp—™e to displ—y itF @˜A ƒele™t the xumeri™ gontrolF wove the ™ontrol to the front p—nel —nd ™li™k to pl—™e the ™ontrolF @™A „ype deg g in the l—˜el of the ™ontrol —nd press the <inter> key or ™li™k the inter ˜uttonD shown in pg TQD on the tool˜—rF sf you do not type the n—me immedi—telyD v—˜†si‡ uses — def—ult l—˜elF ‰ou ™—n edit — l—˜el —t —ny time ˜y dou˜leE™li™king the l—˜elD using the v—˜eling toolD or rightE™li™king —nd sele™ting €roperties from the short™ut menu to displ—y the property di—log ˜oxF
Note:

RFgre—te — numeri™ indi™—torF ‰ou will use this indi™—tor to displ—y the v—lue for degrees p—hrenheitF @—A ƒele™t the xumeri™ sndi™—tor lo™—ted on the gontrols xumeri™ sndi™—tors p—letteF @˜Awove the indi™—tor to the front p—nel —nd ™li™k to pl—™e the indi™—torF @™A„ype deg p in the l—˜el —nd press the <inter> key or ™li™k the inter ˜uttonF

TR

CHAPTER 3. MODULAR PROGRAMMING

3.3.2 Block Diagram
IFhispl—y the ˜lo™k di—gr—m ˜y ™li™king it or ˜y sele™ting ‡indow ƒhow flo™k hi—E gr—mF v—˜†si‡ ™re—tes ™orresponding ™ontrol —nd indi™—tor termin—l i™ons on the ˜lo™k di—gr—m when you pl—™e ™ontrols —nd indi™—tors on the front p—nelF „he termiE n—ls represent the d—t— type of the ™ontrol or indi™—torF ‰ou should see two dou˜leE pre™isionD )o—tingEpoint termin—ls on the ˜lo™k di—gr—mD one indi™—torD —nd one ™onE trolF
Note:

gontrol termin—ls h—ve — thi™ker ˜order th—n indi™—tor termin—lsF

PF

€l—™e the wultiply fun™tionD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress xumeri™ p—letteD on the ˜lo™k di—gr—m to the right of the deg g indi™—torF sf the pun™tions p—lette is not visi˜leD rightE™li™k —n open sp—™e on the ˜lo™k di—gr—m worksp—™e to displ—y itF €l—™e the edd fun™tionD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress xumeri™ p—letteD on the ˜lo™k di—gr—m to the right of the wulE tiply fun™tionF €l—™e — xumeri™ gonst—ntD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress xumeri™ p—letteD to the lower left of the wultiply fun™tionF „ype IFVH in the ™onst—ntF ‡hen you (rst pl—™e — numeri™ ™onst—ntD it is highlighted so you ™—n type — v—lueF sf the ™onst—nt is no longer highlightedD dou˜leE™li™k the ™onst—nt to —™tiv—te the v—˜eling toolF €l—™e — xumeri™ gonst—ntD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress xumeri™ p—letteD to the left of the edd fun™tionF „ype QPFH in the ™onst—ntF …se the ‡iring toolD shown in pg TRD to wire the i™ons —s shown in pigure QFTF

QF

RF

SF

TF

Figure 3.6

• „o wire from one termin—l to —notherD use the ‡iring tool to ™li™k the (rst terE min—lD move the tool to the se™ond termin—lD —nd ™li™k the se™ond termin—lF ‰ou ™—n st—rt wiring —t either termin—lF • ‰ou ™—n ˜end — wire ˜y ™li™king to t—™k down the wire —nd moving the ™ursor in — perpendi™ul—r dire™tionF €ress the sp—™e˜—r to toggle the wire dire™tionF • „o identify termin—ls on the nodesD rightE™li™k the wultiply —nd edd fun™tions —nd sele™t †isi˜le stems „ermin—ls from the short™ut menu to displ—y the ™onne™tor p—ne on the ˜lo™k di—gr—mF ‚eturn to the i™ons —fter wiring ˜y rightE™li™king the fun™tions —nd sele™ting †isi˜le stems „ermin—ls from the short™ut menu to remove the ™he™km—rkF

TS

• ‡hen you move the ‡iring tool over — termin—lD the termin—l —re— ˜linksD indiE ™—ting th—t ™li™king will ™onne™t the wire to th—t termin—l —nd — tip strip —ppe—rsD displ—ying the n—me of the termin—lF sf the gontext relp window is openD the termin—l —re— —lso ˜links in the gontext relp windowF • „o ™—n™el — wire you st—rtedD press the <is™> keyD rightE™li™kD or ™li™k the termin—l where you st—rted the wireF UFhispl—y the front p—nel ˜y ™li™king it or ˜y sele™ting ‡indow ƒhow pront €—nelF VFƒ—ve the †s —s gonvert g to pFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

3.3.3 Run the VI
IFinter — num˜er in the numeri™ ™ontrol —nd run the †sF @—A …se the yper—ting toolD shown in pg TSD or the v—˜eling tool to dou˜leE™li™k the numeri™ ™ontrol —nd type — new num˜erF gli™k the ‚un ˜uttonD shown —t leftD to run the †sF @˜A @™A„ry sever—l di'erent num˜ers —nd run the †s —g—inF

3.3.4 Icon and Connector Pane
IF‚ightE™li™k the i™on in the upper right ™orner of the front p—nel window —nd sele™t idit s™on from the short™ut menuF „he s™on iditor di—log ˜ox —ppe—rsF PF hou˜leE™li™k the ƒele™t toolD shown in pg TSD on the left side of the s™on iditor di—log ˜ox to sele™t the def—ult i™onF QF€ress the <helete> key to remove the def—ult i™onF

RF hou˜leE™li™k the ‚e™t—ngle toolD shown in pg TSD to redr—w the ˜orderF SFgre—te the i™on in pigure QFUF

Figure 3.7

TT

CHAPTER 3. MODULAR PROGRAMMING

hou˜leE™li™k the „ext toolD shown in pg TTD —nd ™h—nge the font to ƒm—ll @—A ponts F @˜A…se the „ext tool to ™li™k the editing —re— where you will ˜egin typingF @™A„ype g —nd pF ‡hile the text is —™tiveD you ™—n move the text ˜y pressing the —rrow keysF …se the €en™il toolD shown in pg TTD to ™re—te the —rrowF „o dr—w horizont—l or verti™—l str—ight linesD press the <ƒhift> key while you use the €en™il tool to dr—g the ™ursorF @eA…se the ƒele™t tool —nd the —rrow keys to move the text —nd —rrow you ™re—tedF @fAƒele™t the f 8 ‡ i™on —nd ™li™k the PST golors ˜utton in the gopy from se™tion to ™re—te — ˜l—™k —nd white i™onD whi™h v—˜†si‡ uses for printing unless you h—ve — ™olor printerF @gAƒele™t the IT golors i™on —nd ™li™k the PST golors ˜utton in the gopy from se™tionF @hA‡hen you ™omplete the i™onD ™li™k the yu ˜utton to ™lose the s™on iditor di—log ˜oxF „he i™on —ppe—rs in the upper right ™orner of the front p—nel —nd ˜lo™k di—gr—mF @dA
Note:

TF

‚ightE™li™k the i™on on the front p—nel —nd sele™t ƒhow gonne™tor from the short™ut menu to de(ne the ™onne™tor p—ne termin—l p—tternF v—˜†si‡ sele™ts — def—ult ™onne™tor p—ne p—ttern ˜—sed on the num˜er of ™ontrols —nd indi™—tors on the front p—nelF por ex—mpleD this front p—nel h—s two termin—lsD deg g —nd deg p D so v—˜†si‡ sele™ts — ™onne™tor p—ne p—ttern with two termin—lsD shown in pg TTF @—Aƒele™t relp ƒhow gontext relp to displ—y the gontext relp windowF @˜Agli™k the left termin—l in the ™onne™tor p—neF „he tool —utom—ti™—lly ™h—nges to the ‡iring toolD —nd the termin—l turns ˜l—™kF @™Agli™k the deg g ™ontrolF e m—rquee highlights the ™ontrol on the front p—nelF @dAgli™k —n open sp—™e on the front p—nelF „he m—rquee dis—ppe—rsD —nd the termin—l ™h—nges to the d—t— type ™olor of the ™ontrol to indi™—te th—t you ™onne™ted the termin—lF @eAgli™k the right termin—l in the ™onne™tor p—neD —nd ™li™k the deg p indi™—torF @fAgli™k —n open sp—™e on the front p—nelF foth termin—ls of the ™onne™tor p—ne —re or—ngeF @gAwove the ™ursor over the ™onne™tor p—neF „he gontext relp window shows th—t ˜oth termin—ls —re ™onne™ted to dou˜leEpre™isionD )o—tingEpoint v—luesF

UFessign the termin—ls to the numeri™ ™ontrol —nd numeri™ indi™—torF

VFƒ—ve —nd ™lose the †sF ‰ou will use this †s l—ter in the ™ourseF

3.4 Using SubVIs
efter you ˜uild — †s —nd ™re—te its i™on —nd ™onne™tor p—neD you ™—n use the †s —s — su˜†sF „o pl—™e — su˜†s on the ˜lo™k di—gr—mD sele™t pun™tions ell pun™tions ƒele™t — †s F x—vig—te to the †s you w—nt to use —s — su˜†s —nd —nd dou˜leE™li™k to pl—™e it on the ˜lo™k di—gr—mF ‰ou —lso ™—n pl—™e —n open †s on the ˜lo™k di—gr—m of —nother open †sF …se the €ositioning tool to ™li™k the i™on in the upper right ™orner of the front p—nel or ˜lo™k di—gr—m of the †s you w—nt to use —s — su˜†s —nd dr—g the i™on to the ˜lo™k di—gr—m of the other †sF

TU

3.4.1 Opening and Editing SubVIs
„o displ—y the front p—nel of — su˜†s from the ™—lling †sD use the yper—ting or €ositioning tool to dou˜leE™li™k the su˜†s on the ˜lo™k di—gr—mF ‰ou —lso ™—n sele™t frowse „his †s9s ƒu˜†ssF „o displ—y the ˜lo™k di—gr—m of — su˜†s from the ™—lling †sD press the <gtrl> key —nd use the yper—ting or €ositioning tool to dou˜leE™li™k the su˜†s on the ˜lo™k di—gr—mF eny ™h—nges you m—ke to — su˜†s —'e™t only the ™urrent inst—n™e of the su˜†s until you s—ve the su˜†sF ‡hen you s—ve the su˜†sD the ™h—nges —'e™t —ll ™—lls to the su˜†sD not just the ™urrent inst—n™eF

3.4.2 Setting Required, Recommended, and Optional Inputs and Outputs
sn the gontext relp windowD whi™h you ™—n —™™ess ˜y sele™ting relp ƒhow gontext relp required termin—ls —ppe—r ˜oldD re™ommended termin—ls —ppe—r —s pl—in textD —nd option—l termin—ls —ppe—r dimmedF „he l—˜els of option—l termin—ls do not —ppe—r if you ™li™k the ride yption—l „ermin—ls —nd pull €—th ˜utton in the gontext relp windowF ‰ou ™—n design—te whi™h inputs —nd outputs —re requiredD re™ommendedD —nd option—l to prevent users from forgetting to wire su˜†s termin—lsF ‚ightE™li™k — termin—l in the ™onne™tor p—ne —nd sele™t „his gonne™tion ss from the short™ut menuF e ™he™km—rk indi™—tes the termin—l settingF ƒele™t ‚equiredD ‚e™ommendedD or yption—l F por termin—l inputsD required me—ns th—t the ˜lo™k di—gr—m on whi™h you pl—™ed the su˜†s will ˜e ˜roken if you do not wire the required inputsF ‚equired is not —v—il—˜le for termin—l outputsF por termin—l inputs —nd outputsD re™ommended or option—l me—ns th—t the ˜lo™k di—gr—m on whi™h you pl—™ed the su˜†s ™—n exe™ute if you do not wire the re™ommended or option—l termin—lsF sf you do not wire the termin—lsD the †s does not gener—te —ny w—rningsF v—˜†si‡ sets inputs —nd outputs of †ss you ™re—te to ‚e™ommended ˜y def—ultF ƒet — termin—l setting to required only if the †s must h—ve the input or output to run properlyF ‚efer to the ‚e—d pile fun™tion lo™—ted on the pun™tions ell pun™tions pile sGy p—lette for ex—mples of requiredD re™ommendedD —nd option—l inputs —nd outputsF

3.5 Thermometer VI
Exercise 3.2:
gomplete the following steps to ™re—te — †s th—t re—ds — me—surement from the temper—ture sensor on the he ƒign—l e™™essory —nd displ—ys the temper—ture in gelsius or p—hrenheitF „he sensor returns — volt—ge proportion—l to temper—tureF por ex—mpleD if the temper—ture is PQ ◦ D the sensor output volt—ge is HFPQ †F „he sensor is ™onne™ted to gh—nnel H of hevi™e IF hevi™e I is the he devi™eF yn some systemsD the he devi™e m—y h—ve —nother devi™e num˜erF

3.5.1 Front Panel
IFsn the v—˜†si‡ di—log ˜oxD ™li™k the —rrow on the xew ˜utton —nd sele™t fl—nk †s from the short™ut menu or press the <gtrlEx> keys to open — ˜l—nk †sF PFgre—te the following front p—nelF

TV

CHAPTER 3. MODULAR PROGRAMMING

Figure 3.8

@—A€l—™e — thermometerD lo™—ted on the gontrols the front p—nelF

xumeri™ sndi™—tors p—letteD on

„ype „emper—ture in the l—˜el —nd press the <inter> key or ™li™k the inter @˜A ˜utton on the tool˜—rD shown —t leftF @™A‚ightE™li™k the thermometer —nd sele™t †isi˜le stems higit—l hispl—y from the short™ut menu to show the digit—l displ—y for the thermometerF @dA€l—™e — verti™—l toggle swit™h ™ontrolD lo™—ted on the gontrols futtons 8 ƒwit™hes p—letteD on the front p—nelF @eA„ype „emp ƒ™—le in the l—˜el —nd press the <inter> key or ™li™k the inter ˜uttonF @fA …se the v—˜eling toolD shown in pg TVD to pl—™e — free l—˜elD deg gD next to the „rue position of the swit™hF sf you —re using —utom—ti™ tool sele™tionD dou˜leE™li™k the ˜l—nk —re— of the front p—nel to ˜egin typing — free l—˜elF @gA€l—™e — free l—˜elD deg p D next to the p—lse position of the swit™hF

3.5.2 User Documentation
IFho™ument the †s so — des™ription —ppe—rs in the gontext relp window when you move the ™ursor over the †s i™onF @—Aƒele™t pile †s €roperties to displ—y the †s €roperties di—log ˜oxF @˜Aƒele™t ho™ument—tion from the g—tegory pullEdown menuF @™A„ype the following des™ription for the †s in the †s des™ription text ˜oxX „his †s me—sures temper—ture using the temper—ture sensor on the he ƒign—l e™™essoryF @dAgli™k the yu ˜uttonF PFho™ument the thermometer indi™—tor —nd swit™h ™ontrol so des™riptions —ppe—r in the gontext relp window when you move the ™ursor over the o˜je™ts —nd tip strips —ppe—r on the front p—nel or ˜lo™k di—gr—m when you move the ™ursor over the o˜je™ts while the †s runsF

• ‚ightE™li™k the thermometer indi™—tor —nd sele™t hes™ription —nd „ip from the short™ut menuF • „ype the following des™ription for the thermometer in the hes™ription text ˜oxX hispl—ys the temper—ture me—surementF • „ype temper—ture in the „ip text ˜oxF • gli™k the yu ˜uttonF

TW

• ‚ightE™li™k the swit™h ™ontrol —nd sele™t hes™ription —nd „ip from the short™ut menuF • „ype the following des™ription for the verti™—l swit™h ™ontrol in the hes™ription text ˜oxX hetermines the s™—le @p—hrenheit or gelsiusA to use for the temper—ture me—surementF • „ype s™—le E g or p in the „ip text ˜oxF • gli™k the yu ˜uttonF
QFƒele™t relp ƒhow gontext relp to displ—y the gontext relp windowF RFwove the ™ursor over the front p—nel o˜je™ts —nd the †s i™on to displ—y the des™riptions in the gontext relp windowF

3.5.3 Block Diagram
IFƒele™t ‡indow ƒhow flo™k hi—gr—m to displ—y the ˜lo™k di—gr—m @pigure QFWAF

Figure 3.9

PF

€l—™e the he essist—nt ixpress †sD lo™—ted on the pun™tions snput p—letteD on the ˜lo™k di—gr—mF ‡hen you pl—™e this ixpress †s on the ˜lo™k di—E gr—m the he essist—nt ™on(gur—tion di—log ˜ox —ppe—rsF @—Aƒele™t en—log snput †olt—ge for the type of me—surement to m—keF @˜Aƒele™t hevI —iH @or hevP —iHA for the physi™—l ™h—nnel —nd ™li™k the pinish ˜uttonF @™A‰ou must multiply the temper—ture ˜y IHH to ™onvert it from volt—ge to gelsiusF yn the ƒettings t—˜D sele™t gustom ƒ™—ling gre—te xewF ƒele™t — vine—r s™—leF x—me the s™—le „emper—tureF inter — slope s™—le of IHHF gli™k the yu ˜uttonF @dAƒet min a HF ƒet m—x a IHH @eAƒele™t the e™quire I ƒ—mple option on the „—sk „iming t—˜F gli™k the yu ˜uttonF Note: sf you do not h—ve — he devi™e with — temper—ture sensor ™onne™ted to your ™omputerD use the @hemoA ‚e—d †olt—ge †sD lo™—ted in the gX\ixer™ises v—˜†si‡ f—si™s s dire™toryF

QF

€l—™e the gonvert from hyn—mi™ h—t— ixpress †sD lo™—ted on the pun™tions ƒign—l w—nipul—tion p—letteD on the ˜lo™k di—gr—mF „his †s ™onverts

UH

CHAPTER 3. MODULAR PROGRAMMING

the dyn—mi™ d—t— typeF sn the ™on(gur—tion di—log ˜oxD sele™t ƒingle s™—l—r in the ‚esulting d—t— type list˜oxF

RF

€l—™e the gonvert g to p †s on the ˜lo™k di—gr—mF ƒele™t pun™tions ell pun™tions ƒele™t — †sD n—vig—te to gX\ixer™ises\v—˜†si‡ f—si™s s\gonvert g to pFviF „his †s ™onverts the gelsius re—dings to p—hrenheitF €l—™e the ƒele™t fun™tionD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress gomp—rison p—letteD on the ˜lo™k di—gr—mF „his fun™tion reE turns either the p—hrenheit @p—lseA or gelsius @„rueA temper—ture v—lueD depending on the v—lue of „emp ƒ™—leF …se the €ositioning tool to pl—™e the i™ons —s shown in the ˜lo™k di—gr—m @pigure QFWA —nd use the ‡iring tool to wire them togetherF „o displ—y termin—ls for — nodeD rightE™li™k the i™on —nd sele™t †isi˜le stems „ermin—ls from the short™ut menuF
Note:

SF

3.5.4 Front Panel
IFhispl—y the front p—nel ˜y ™li™king it or ˜y sele™ting ‡indow PF ƒhow pront €—nel F gli™k the ‚un gontinuously ˜uttonD shown —t leftD to run the †s ™ontinuouslyF

QF€ut your (nger on the temper—ture sensor —nd noti™e the temper—ture in™re—seF RFgli™k the ‚un gontinuously ˜utton —g—in to stop the †sF „his —llows the †s to (nish the ™urrent run of the †sF

3.5.5 Icon and Connector Pane
IFgre—te —n i™on so you ™—n use the „hermometer †s —s — su˜†sF „he following i™on is —n ex—mpleF sf ne™ess—ryD ™re—te — simpler i™on to s—ve timeF

Figure 3.10

UI

@—A‚ightE™li™k the i™on in the upper right ™orner of the front p—nel —nd sele™t idit s™on from the short™ut menuF „he s™on iditor di—log ˜ox —ppe—rsF @˜A hou˜leE™li™k the ƒele™t toolD shown —t leftD on the left side of the s™on iditor di—log ˜ox to sele™t the def—ult i™onF @™A€ress the <helete> key to remove the def—ult i™onF @dA hou˜leE™li™k the ‚e™t—ngle toolD shown —t pg UID to redr—w the ˜orderF

@eA …se the €en™il toolD shown in pg UID to dr—w —n i™on th—t represents the thermometerF @fA…se the poreground —nd pill tools to ™olor the thermometer redF Note: „o dr—w horizont—l or verti™—l str—ight linesD press the <ƒhift> key while you use the €en™il tool to dr—g the ™ursorF hou˜leE™li™k the „ext toolD shown in pg UID —nd ™h—nge the font to ƒm—ll @gA pontsF @hA„ype „empF ‚eposition the text if ne™ess—ryF @iAƒele™t the f 8 ‡ i™on —nd sele™t PST golors in the gopy from se™tion to ™re—te — ˜l—™k —nd white i™onD whi™h v—˜†si‡ uses for printing unless you h—ve — ™olor printerF @jA‡hen the i™on is ™ompleteD ™li™k the yu ˜uttonF „he i™on —ppe—rs in the upper right ™orner of the front p—nelF PF‚ightE™li™k the i™on —nd sele™t ƒhow gonne™tor from the short™ut menu —nd —ssign termin—ls to the swit™h —nd the thermometerF @—Agli™k @˜Agli™k @™Agli™k @dAgli™k @eAgli™k the left termin—l in the ™onne™tor p—neF the „emp ƒ™—le ™ontrolF „he left termin—l turns greenF the right termin—l in the ™onne™tor p—neF the „emper—ture indi™—torF „he right termin—l turns or—ngeF —n open sp—™e on the front p—nelF

QFƒ—ve the †s —s „hermometerFvi in the gX\ixer™ises\ v—˜†si‡ f—si™s s dire™toryF‰ou will use this †s l—ter in the ™ourseF RFglose the †sF

3.6 Creating a SubVI from Sections of a VI
‰ou ™—n simplify the ˜lo™k di—gr—m of — †s ˜y ™onverting se™tions of the ˜lo™k di—gr—m into su˜†ssF gonvert — se™tion of — †s into — su˜†s ˜y using the €ositioning tool to sele™t the se™tion of the ˜lo™k di—gr—m you w—nt to reuse —nd sele™ting idit gre—te ƒu˜†sF en i™on for the new su˜†s repl—™es the sele™ted se™tion of the ˜lo™k di—gr—mF v—˜†si‡ ™re—tes ™ontrols —nd indi™—tors for the new su˜†s —nd wires the su˜†s to the existing wiresF pigure QFII shows how to ™onvert — sele™tion into — su˜†sF

UP

CHAPTER 3. MODULAR PROGRAMMING

Figure 3.11

„he new su˜†s uses — def—ult p—ttern for the ™onne™tor p—ne —nd — def—ult i™onF hou˜leE™li™k the su˜†s to edit the ™onne™tor p—ne —nd i™onD —nd to s—ve the su˜†sF
Note:

ho not sele™t more th—n PV o˜je™ts to ™re—te — su˜†s ˜e™—use PV is the m—ximum num˜er of ™onne™tions on — ™onne™tor p—neF

3.7 Summary, Tips, and Tricks on Modular Programming
• e †s within —nother †s is ™—lled — su˜†sF …sing su˜†ss helps you m—n—ge ™h—nges —nd de˜ug the ˜lo™k di—gr—m qui™klyF • efter you ˜uild — †s front p—nel —nd ˜lo™k di—gr—mD ˜uild the i™on —nd the ™onne™tor p—ne so you ™—n use the †s —s — su˜†sF • „he ™onne™tor p—ne is — set of termin—ls th—t ™orresponds to the ™ontrols —nd indi™—tors of th—t †sF he(ne ™onne™tions ˜y —ssigning — front p—nel ™ontrol or indi™—tor to e—™h of the ™onne™tor p—ne termin—lsF • gre—te ™ustom i™ons to repl—™e the def—ult i™on ˜y dou˜leE™li™king the i™on in the upper right ™orner of the front p—nel to open the s™on iditorF • sn the s™on iditor di—log ˜oxD dou˜leE™li™k the „ext tool to sele™t — di'erent fontF • ‰ou ™—n design—te whi™h inputs —nd outputs —re requiredD re™ommendedD —nd option—l to prevent users from forgetting to wire su˜†s ™onne™tionsF ‚ightE™li™k — termin—l in the ™onne™tor p—ne —nd sele™t „his gonne™tion ss from the short™ut menuF • ho™ument — †s ˜y sele™ting pile †s €roperties —nd sele™ting ho™ument—tion from the g—tE egory pullEdown menuF ‡hen you move the ™ursor over — †s i™onD the gontext relp window displ—ys this des™ription —nd indi™—tes whi™h termin—ls —re requiredD re™ommendedD or option—lF • edd des™riptions —nd tip strips to ™ontrols —nd indi™—tors ˜y rightE™li™king them —nd sele™ting hes™ription —nd „ip from the short™ut menuF ‡hen you move the ™ursor over ™ontrols —nd indi™—torsD the gontext relp window displ—ys this des™riptionF • gonvert — se™tion of — †s into — su˜†s ˜y using the €ositioning tool to sele™t the se™tion of the ˜lo™k di—gr—m you w—nt to reuse —nd sele™ting idit gre—te ƒu˜†sF

Chapter 4

Repetition and Loops
4.1 While Loops
e ‡hile voop exe™utes — su˜di—gr—m until — ™ondition is metF „he ‡hile voop is simil—r to — ho voop or — ‚epe—tE…ntil voop in textE˜—sed progr—mmingF pigure RFI shows — ‡hile voop in v—˜†si‡D — )ow ™h—rt equiv—lent of the ‡hile voop fun™tion—lityD —nd — pseudo ™ode ex—mple of the fun™tion—lity of the ‡hile voopF

Figure 4.1

„he ‡hile voop is lo™—ted on the pun™tions ixe™ution gontrol p—letteF ƒele™t the ‡hile voop from the p—lette then use the ™ursor to dr—g — sele™tion re™t—ngle —round the se™tion of the ˜lo™k di—gr—m you w—nt to repe—tF ‡hen you rele—se the mouse ˜uttonD — ‡hile voop ˜ound—ry en™loses the se™tion you sele™tedF edd ˜lo™k di—gr—m o˜je™ts to the ‡hile voop ˜y dr—gging —nd dropping them inside the ‡hile voopF
Note:

„he ‡hile voop —lw—ys exe™utes —t le—st on™eF

„he ‡hile voop exe™utes the su˜di—gr—m until the ™ondition—l termin—lD —n input termin—lD re™eives — spe™i(™ foole—n v—lueF „he def—ult ˜eh—vior —nd —ppe—r—n™e of the ™ondition—l termin—l is ƒtop sf „rueD shown in pg UQF ‡hen — ™ondition—l termin—l is ƒtop sf „rueD the ‡hile voop exe™utes its su˜di—gr—m until the ™ondition—l termin—l re™eives — „rue v—lueF „he iter—tion termin—lD —n output termin—lD shown in pg UQD ™ont—ins the num˜er of ™ompleted

UQ

UR

CHAPTER 4. REPETITION AND LOOPS

iter—tionsF „he iter—tion ™ount —lw—ys st—rts —t zeroF huring the (rst iter—tionD the iter—tion termin—l returns HF sn the ˜lo™k di—gr—m in pigure RFPD the ‡hile voop exe™utes until the su˜†s output is gre—ter th—n or equ—l to IHFHH —nd the in—˜le ™ontrol is „rueF „he end fun™tion returns „rue only if ˜oth inputs —re „rueF ytherwiseD it returns p—lseF

Figure 4.2

sn the previous ex—mple @pigure RFPAD there is —n in™re—sed pro˜—˜ility of —n in(nite loopF qenE er—llyD the desired ˜eh—vior is to h—ve one ™ondition met to stop the loopD r—ther th—n requiring ˜oth ™onditions to ˜e metF ‰ou ™—n ™h—nge the ˜eh—vior —nd —ppe—r—n™e of the ™ondition—l termin—l ˜y rightE™li™king the termin—l or the ˜order of the ‡hile voop —nd sele™ting gontinue if „rueD shown —t leftF ‰ou —lso ™—n use the yper—ting tool to ™li™k the ™ondition—l termin—l to ™h—nge the ™onditionF ‡hen — ™ondition—l termin—l is gontinue if „rueD the ‡hile voop exe™utes its su˜di—gr—m until the ™ondition—l termin—l re™eives — p—lse v—lueD —s shown in pigure RFQF

Figure 4.3

„he ‡hile voop exe™utes until the su˜†s output is less th—n IHFHH or the in—˜le ™ontrol is p—lseF

4.1.1 Structure Tunnels
h—t— ™—n ˜e p—ssed out of or into — ‡hile voop through — tunnelF „unnels feed d—t— into —nd out of stru™turesF „he tunnel —ppe—rs —s — solid ˜lo™k on the ˜order of the ‡hile voopF „he ˜lo™k is the ™olor of the d—t— type wired to the tunnelF h—t— p—ss out of — loop —fter the loop termin—tesF ‡hen — tunnel p—sses d—t— into — loopD the loop exe™utes only —fter d—t— —rrive —t the tunnelF

US

sn pigure RFRD the iter—tion termin—l is ™onne™ted to — tunnelF „he v—lue in the tunnel does not get p—ssed to the ster—tion xum˜er indi™—tor until the ‡hile voop h—s (nished exe™utionF

Figure 4.4

ynly the l—st v—lue of the iter—tion termin—l displ—ys in the ster—tion xum˜er indi™—torF

4.2 Auto Match VI
Exercise 4.1:
gomplete the following steps to ˜uild — †s th—t gener—tes r—ndom num˜ers until the num˜er gener—ted m—t™hes — num˜er you spe™ifyF „he iter—tion termin—l re™ords the num˜er of r—ndom num˜ers gener—ted until — m—t™h o™™ursF

4.2.1 Front Panel
IFypen — ˜l—nk †s —nd ˜uild the front p—nel shown in pigure RFSF wodify the ™ontrols —nd indi™—tors —s shown in the front p—nel @pigure RFSA —nd —s des™ri˜ed in the following steps @pg UTAF

UT

CHAPTER 4. REPETITION AND LOOPS

Figure 4.5

@—A€l—™e — numeri™ ™ontrolD lo™—ted on the gontrols xumeri™ gontrols p—letteD on the front p—nelF v—˜el the ™ontrol xum˜er to w—t™hF „his ™ontrol spe™i(es the num˜er to m—t™hF @˜A€l—™e — numeri™ indi™—torD lo™—ted on the gontrols xumeri™ sndi™—tors p—letteD on the front p—nelF v—˜el the indi™—tor gurrent xum˜erF „his indi™—tor displ—ys the ™urrent r—ndom num˜erF @™A€l—™e —nother numeri™ indi™—tor on the front p—nelF v—˜el the indi™—tor xum˜er of iter—tionsF „his indi™—tor displ—ys the num˜er of iter—tions ˜efore — m—t™hF

4.2.2 Setting the Data Range
ƒet — d—t— r—nge for — ™ontrol to prevent the user from sele™ting — v—lue th—t is not ™omE p—ti˜le with — r—nge or in™rementF ‰ou ™—n ™hoose to ignore — v—lue th—t is out of r—nge or ™oer™e it to within the r—ngeF gomplete the following steps @pg UTA to set the r—nge ˜etween H —nd IHHHH with —n in™rement of I —nd — def—ult v—lue of SHF IF‚ightE™li™k the xum˜er to w—t™h ™ontrol —nd sele™t h—t— ‚—nge from the short™ut menuF „he h—t— ‚—nge p—ge of the xumeri™ €roperties di—log ˜ox —ppe—rsF @—A‚emove the ™he™km—rk from the …se hef—ult ‚—nge ™he™k˜oxF @˜Aƒet the hef—ult †—lue to SHF @™Aƒet the winimum v—lue to H —nd sele™t goer™e from the yut of ‚—nge e™tion pullEdown menuF @dAƒet the w—ximum v—lue to IHHHH —nd sele™t goer™e from the yut of ‚—nge e™tion pullEdown menuF @eAƒet the sn™rement v—lue to I —nd sele™t goer™e to xe—rest from the yut of ‚—nge e™tion pullEdown menuF ho not ™lose the di—log ˜oxF

4.2.3 Modifying Digits of Precision
fy def—ultD v—˜†si‡ —utom—ti™—lly form—ts numeri™ ™ontrolsF ‰ou —lso ™—n spe™ify the pre™ision or not—tionF ‰ou ™—n displ—y numeri™ v—lues in )o—tingEpointD s™ienti(™D or ƒs not—tionF gomplete the following steps to ™h—nge the pre™ision to HF

UU

IFƒele™t the porm—t —nd €re™ision t—˜F sf you ™losed the xumeri™ €roperties di—log ˜oxD rightE™li™k the gurrent xum˜er indi™—tor —nd sele™t porm—t 8 €re™ision from the short™ut menuF „he porm—t 8 €re™ision p—ge of the xumeri™ €roperties di—log ˜ox —ppe—rsF @—Aƒele™t plo—ting €oint —nd ™h—nge ƒigni(™—nt digits to higits of pre™isionF @˜A„ype H in the higits of pre™ision text ˜ox —nd ™li™k the yu ˜uttonF PF‚epe—t the instru™tions to set the pre™ision for gurrent xum˜er —nd xum˜er of iterE —tions indi™—torsF

4.2.4 Block Diagram
IFfuild the ˜lo™k di—gr—m in pigure RFTF

Figure 4.6

@—A €l—™e the ‚—ndom xum˜er @HEIA fun™tionD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress xumeri™ p—letteD on the ˜lo™k di—gr—mF „his fun™tion produ™es — r—ndom num˜er ˜etween 0 —nd 1F @˜A €l—™e the wultiply fun™tionD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress xumeri™ p—letteD on the ˜lo™k di—gr—mF „his fun™tion mulE tiplies the r—ndom num˜er ˜y 10, 000 to produ™e — r—ndom num˜er ˜etween 0 —nd 10, 000F @™A ‚ightE™li™k the y termin—l of the wultiply fun™tionD sele™t gre—te gonst—nt from the short™ut menuD type IHHHHD —nd press the <inter> key to ™re—te — numeri™ ™onst—ntF @dA €l—™e the ‚ound „o xe—rest fun™tionD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress xumeri™ p—letteD on the ˜lo™k di—gr—mF „his fun™tion rounds the r—ndom num˜er to the ne—rest integerF

UV

CHAPTER 4. REPETITION AND LOOPS

@eA €l—™e the xot iqu—lc fun™tionD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress gomp—rison p—letteD on the ˜lo™k di—gr—mF „his fun™tion ™omp—res the r—ndom num˜er with xum˜er to w—t™h —nd returns „rue if the num˜ers —re not equ—lY otherwiseD it returns p—lseF @fA €l—™e the ‡hile voopD lo™—ted on the pun™tions ell pun™tions ƒtru™tures p—letteD on the ˜lo™k di—gr—mF ‚ightE™li™k the ™onE dition—l termin—l —nd sele™t gontinue if „rue from the short™ut menuF Note: …se the ‡hile voop with ƒtop ˜uttonD lo™—ted on the ixe™ution gontrol p—letteD when you need — stop ˜utton to stop the ‡hile voopF sn this exer™iseD you use the xum˜er to w—t™h ™ontrol to stop the loopY you do not need — ƒtop ˜uttonF ‡ire the iter—tion termin—l to the ˜order of the ‡hile voopF e ˜lue tunnel @gA —ppe—rs on the ‡hile voop ˜orderF ‰ou will wire the tunnel to the sn™rement fun™tionF i—™h time the loop exe™utesD the iter—tion termin—l in™rements ˜y oneF „he iter—tion ™ount p—sses out of the loop upon ™ompletionF sn™rement this v—lue ˜y one outside the loop ˜e™—use the ™ount st—rts —t 0F @hA €l—™e the sn™rement fun™tionD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress xumeri™ p—letteD on the ˜lo™k di—gr—mF „his fun™tion —dds 1 to the ‡hile voop ™ountF e ™oer™ion dot —ppe—rs on the xum˜er of iter—tions output to indi™—te th—t v—˜†si‡ ™oer™ed the numeri™ represent—tion of the iterE —tion termin—l to m—t™h the numeri™ represent—tion of the xum˜er of iter—tions outputF ‚efer to the por voops @ƒe™tion RFQA se™tion for more inform—tion —˜out numeri™ ™onversionF PFƒ—ve the †s —s euto w—t™hFviF

4.2.5 Run the VI
IFhispl—y the front p—nel —nd ™h—nge the num˜er in xum˜er to w—t™hF PF‚un the †sF gh—nge xum˜er to w—t™h —nd run the †s —g—inF gurrent xum˜er upd—tes —t every iter—tion of the loop ˜e™—use it is inside the loopF xum˜er of iter—tions upd—tes upon ™ompletion ˜e™—use it is outside the loopF QF „o see how the †s upd—tes the indi™—torsD en—˜le exe™ution highlightingF yn the ˜lo™k di—gr—m tool˜—rD ™li™k the righlight ixe™ution ˜uttonD shown —t leftD to en—˜le exe™ution highlightingF ixe™ution highlighting shows the movement of d—t— on the ˜lo™k di—gr—m from one node to —nother so you ™—n see e—™h num˜er —s the †s gener—tes itF

RFgh—nge xum˜er to w—t™h to — num˜er th—t is out of the d—t— r—ngeD whi™h is 0 to 10000 with —n in™rement of 1F SF‚un the †sF v—˜†si‡ ™oer™es the outEofEr—nge v—lue to the ne—rest v—lue in the spe™i(ed d—t— r—ngeF TFglose the †sF

UW

4.3 For Loops
e por voop exe™utes — su˜di—gr—m — set num˜er of timesF pigure RFU shows — por voop in v—˜†si‡D — )ow ™h—rt equiv—lent of the por voop fun™tion—lityD —nd — pseudo ™ode ex—mple of the fun™tion—lity of the por voopF

Figure 4.7

„he por voop is lo™—ted on the pun™tions ell pun™tions ƒtru™tures p—letteF ‰ou —lso ™—n pl—™e — ‡hile voop on the ˜lo™k di—gr—mD rightE™li™k the ˜order of the ‡hile voopD —nd sele™t ‚epl—™e with por voop from the short™ut menu to ™h—nge — ‡hile voop to — por voopF „he v—lue in the ™ount termin—l @—n input termin—lAD shown in pg UWD indi™—tes how m—ny times to repe—t the su˜di—gr—mF „he iter—tion termin—l @—n output termin—lAD shown in pg UWD ™ont—ins the num˜er of ™omE pleted iter—tionsF „he iter—tion ™ount —lw—ys st—rts —t zeroF huring the (rst iter—tionD the iter—tion termin—l returns HF „he por voop di'ers from the ‡hile voop in th—t the por voop exe™utes — set num˜er of timesF e ‡hile voop stops exe™uting the su˜di—gr—m only if the v—lue —t the ™ondition—l termin—l existsF „he por voop in pigure RFV gener—tes — r—ndom num˜er every se™ond for 100 se™onds —nd displ—ys the r—ndom num˜ers in — numeri™ indi™—torF

VH

CHAPTER 4. REPETITION AND LOOPS

Figure 4.8

4.3.1 Wait Functions
„he ‡—it …ntil xext ms wultiple fun™tionD shown in pg VHD monitors — millise™ond ™ounter —nd w—its until the millise™ond ™ounter re—™hes — multiple of the —mount you spe™ifyF …se this fun™tion to syn™hronize —™tivitiesF €l—™e this fun™tion within — loop to ™ontrol the loop exe™ution r—teF „he ‡—it @msA fun™tionD shown in pg VHD —dds the w—it time to the ™ode exe™ution timeF „his ™—n ™—use — pro˜lem if ™ode exe™ution time is v—ri—˜leF „he „ime hel—y ixpress †sD lo™—ted on the pun™tions ixe™ution gontrol p—letteD ˜eh—ves simil—r to the ‡—it @msA fun™tion with the —ddition of ˜uiltEin error ™lustersF ‚efer to glusters @ƒe™tion TFSA for more inform—tion —˜out error ™lustersF
Note:

4.3.2 Wait Functions
v—˜†si‡ ™—n represent numeri™ d—t— types —s signed or unsigned integers @VE˜itD ITE˜itD or QPE˜itAD )o—tingEpoint numeri™ v—lues @singleED dou˜leED or extendedEpre™isionAD or ™omplex numeri™ v—lues @singleED dou˜leED or extendedEpre™isionAF ‡hen you wire two or more numeri™ inputs of di'erent represent—tions to — fun™tionD the fun™tion usu—lly returns output in the l—rger or wider form—tF „he fun™tions ™oer™e the sm—ller represent—tions to the widest represent—tion ˜efore exe™utionD —nd v—˜†si‡ pl—™es — ™oer™ion dot on the termin—l where the ™onversion t—kes pl—™eF por ex—mpleD the por voop ™ount termin—l is — QPE˜it signed integerF sf you wire — dou˜leE pre™isionD )o—tingEpoint numeri™ to the ™ount termin—lD v—˜†si‡ ™onverts the numeri™ to — QPE˜it signed integerF e ™oer™ion dot —ppe—rs on the ™ount termin—l of the (rst por voopD —s shown in pigure RFWF

VI

Figure 4.9

sf you wire two di'erent numeri™ d—t— types to — numeri™ fun™tion th—t expe™ts the inputs to ˜e the s—me d—t— typeD v—˜†si‡ ™onverts one of the termin—ls to the s—me represent—tion —s the other termin—lF v—˜†si‡ ™hooses the represent—tion th—t uses more ˜itsF sf the num˜er of ˜its is the s—meD v—˜†si‡ ™hooses unsigned over signedF sn the ex—mple in pigure RFIHD — QPE˜it signed integer @sQPA —nd — dou˜leEpre™isionD )o—tingEpoint numeri™ v—lue @hfvA —re wired to the hivide fun™tionF „he QPE˜it signed integer is ™oer™ed sin™e it uses fewer ˜its th—n the dou˜leEpre™isionD )o—tingEpoint numeri™ v—lueF

Figure 4.10

„o ™h—nge the represent—tion of — numeri™ o˜je™tD rightE™li™k the o˜je™t —nd sele™t ‚epresent—tion from the short™ut menuF ƒele™t the d—t— type th—t ˜est represents the d—t—Fut d—t— typesF ‡hen v—˜†si‡ ™onverts dou˜leEpre™isionD )o—tingEpoint numeri™ v—lues to integersD it rounds to the ne—rest integerF v—˜†si‡ rounds xFS to the ne—rest even integerF por ex—mpleD v—˜†si‡ rounds 2.5 to 2 —nd 3.5 to 4F ‚efer to the h—t— „ypes se™tion of sntrodu™tion to v—˜†si‡D of this m—nu—l or to the v—˜†si‡ relp for more inform—tion —˜out d—t— typesF

4.4 Timed Temperature VI
Exercise 4.2:
gomplete the following steps to ˜uild — †s th—t uses the „hermometer †s to re—d — temE per—ture on™e every se™ond for — dur—tion of one minuteF

VP

CHAPTER 4. REPETITION AND LOOPS

4.4.1 Front Panel
IFypen — ˜l—nk †s —nd ˜uild the front p—nel shown in pigure RFIIF

Figure 4.11

@—A€l—™e — thermometerD lo™—ted on the gontrols xumeri™ sndi™—tors p—letteD on the front p—nelF „his provides — visu—l indi™—tion of the temper—ture re—dingF @˜A€l—™e — numeri™ indi™—torD lo™—ted on the gontrols xumeri™ sndi™—tors p—letteD on the front p—nelF v—˜el this indi™—tor ƒe™onds il—psedF ‚ightE™li™k the indi™—tor —nd sele™t ‚epresent—tion sQP from the short™ut menuF

4.4.2 Block Diagram
IFfuild the ˜lo™k di—gr—m shown in pigure RFIPF

Figure 4.12

€l—™e — por voopD lo™—ted on the pun™tions ell pun™tions ƒtru™tures p—letteD on the ˜lo™k di—gr—mF ‚ightE™li™k the voop gount termin—l in the upper left ™orner of the por voop —nd sele™t gre—te gonst—nt from the short™ut menuF „ype TH in the ™onst—nt to set the por voop to repe—t TH timesF €l—™e the „hermometer †s on the ˜lo™k di—gr—mF ƒele™t pun™tions ell pun™tions ƒele™t — †s —nd n—vig—te to gX\ixer™ises\v—˜†si‡ f—si™s

VQ

s\„hermometerFvito pl—™e the †sF „his †s re—ds the temper—ture from the he devi™eF ‚ightE™li™k the „emp ƒ™—le input —nd sele™t gre—te gonst—nt from the short™ut menuF …se — p—lse ™onst—nt for p—hrenheit or — „rue ™onst—nt for gelsiusF Note: sf you do not h—ve — he devi™e with — temper—ture sensor on gh—nnel HD use the @hemoA „hermometer †s inste—dF

€l—™e the ‡—it …ntil xext ms wultiple fun™tionD lo™—ted on the pun™tions ell pun™tions „ime 8 hi—log p—letteD on the ˜lo™k di—gr—mF ‚ightE ™li™k the input —nd sele™t gre—te gonst—nt from the short™ut menuF inter — v—lue of IHHH to set the w—it to every se™ondF €l—™e the sn™rement fun™tionD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress xumeri™ p—letteD on the ˜lo™k di—gr—mF „his fun™tion —dds one to the iter—tion termin—l outputF

PFƒ—ve this †s —s „imed „emper—tureFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™E toryF QF‚un the †sF „he (rst re—ding might t—ke longer th—n one se™ond to retrieve if the ™omputer needs to ™on(gure the he devi™eF RFsf time permitsD ™omplete the following option—l —nd ™h—llenge stepsD otherwise ™lose the †sF

4.4.3 Optional
IFfuild — †s th—t gener—tes r—ndom num˜ers in — ‡hile voop —nd stops when you ™li™k — stop ˜utton on the front p—nelF PFƒ—ve the †s —s qener—l ‡hile voopFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™E toryF

4.4.4 Challenge
IFwodify the qener—l ‡hile voop †s to stop when the stop ˜utton is ™li™ked or when the ‡hile voop re—™hes — num˜er of iter—tions spe™i(ed ˜y — front p—nel ™ontrolF PFƒele™t pile ƒ—ve es to s—ve the †s —s gom˜o ‡hileEpor voopFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

4.5 Accessing Previous Loop Data
‡hen progr—mming with loopsD you often need to —™™ess d—t— from previous iter—tions of the loopF por ex—mpleD you m—y h—ve — †s th—t re—ds the temper—ture —nd displ—ys it on — gr—phF sf you w—nt to displ—y — running —ver—ge of the temper—ture —s wellD you need to use d—t— gener—ted in previous iter—tionsF „wo w—ys of —™™essing this d—t— in™lude the shift register —nd the Feedback NodeF

VR

CHAPTER 4. REPETITION AND LOOPS

4.5.1 Shift Registers
…se shift registers on por voops —nd ‡hile voops to tr—nsfer v—lues from one loop iter—tion to the nextF ƒhift registers —re simil—r to st—ti™ v—ri—˜les in textE˜—sed progr—mming l—ngu—gesF e shift register —ppe—rs —s — p—ir of termin—lsD shown in pg VRD dire™tly opposite e—™h other on the verti™—l sides of the loop ˜orderF „he right termin—l ™ont—ins —n up —rrow —nd stores d—t— on the ™ompletion of —n iter—tionF v—˜†si‡ tr—nsfers the d—t— ™onne™ted to the right side of the register to the next iter—tionF gre—te — shift register ˜y rightE™li™king the left or right ˜order of — loop —nd sele™ting edd ƒhift ‚egister from the short™ut menuF e shift register tr—nsfers —ny d—t— type —nd —utom—ti™—lly ™h—nges to the d—t— type of the (rst o˜je™t wired to the shift registerF „he d—t— you wire to the termin—ls of e—™h shift register must ˜e the s—me typeF „o initi—lize — shift registerD wire —ny v—lue from outside the loop to the left termin—lF sf you do not initi—lize the shift registerD the loop uses the v—lue written to the shift register when the loop l—st exe™uted or the def—ult v—lue for the d—t— type if the loop h—s never exe™utedF …se — loop with —n uniniti—lized shift register to run — †s repe—tedly so th—t e—™h time the †s runsD the initi—l output of the shift register is the l—st v—lue from the previous exe™utionF …se —n uniniti—lized shift register to preserve st—te inform—tion ˜etween su˜sequent exe™utions of — †sF efter the loop exe™utesD the l—st v—lue stored in the shift register rem—ins —t the right termin—lF sf you wire the right termin—l outside the loopD the wire tr—nsfers the l—st v—lue stored in the shift registerF ‰ou ™—n —dd more th—n one shift register to — loopF sf you h—ve multiple oper—tions within — loopD use multiple shift registers to store the d—t— v—lues from those di'erent pro™esses in the stru™tureF „he ˜lo™k di—gr—m in pigure RFIQ uses two initi—lized shift registersF

Figure 4.13

4.5.2 Stacked Shift Registers
„o ™re—te — st—™ked shift registerD rightE™li™k the left termin—l —nd sele™t edd ilement from the short™ut menuF ƒt—™ked shift registers let you —™™ess d—t— from previous loop iter—tionsF ƒt—™ked shift registers remem˜er v—lues from previous iter—tions —nd ™—rry those v—lues to the next iter—tionsF ƒt—™ked shift registersD —s shown in pigure RFIRD ™—n only o™™ur on the left side of the loop ˜e™—use the right termin—l only tr—nsfers the d—t— gener—ted from the ™urrent iter—tion to the next iter—tionF

VS

Figure 4.14

sf you —dd two more elements to the left termin—lD v—lues from the l—st three iter—tions ™—rry over to the next iter—tionD with the most re™ent iter—tion v—lue stored in the top shift registerF „he se™ond termin—l stores the d—t— p—ssed to it from the previous iter—tionD —nd the ˜ottom termin—l stores d—t— from two iter—tions —goF

4.5.3 Feedback Nodes
„he peed˜—™k xodeD shown in pg VSD —ppe—rs —utom—ti™—lly in — por voop or ‡hile voop if you wire the output of — su˜†sD fun™tionD or group of su˜†ss —nd fun™tions to the input of th—t s—me †sD fun™tionD or groupF vike — shift registerD the peed˜—™k xode stores d—t— when the loop ™ompletes —n iter—tionD sends th—t v—lue to the next iter—tion of the loopD —nd tr—nsfers —ny d—t— typeF …se the peed˜—™k xode to —void unne™ess—rily long wires in loopsF „he peed˜—™k xode —rrow indi™—tes in whi™h dire™tion the d—t— )ows —long the wireF ‰ou —lso ™—n sele™t the peed˜—™k xode on the ƒtru™tures p—lette —nd pl—™e it inside — por voop or ‡hile voopF sf you pl—™e the peed˜—™k xode on the wire ˜efore you ˜r—n™h the wire th—t ™onne™ts the d—t— to the tunnelD the peed˜—™k xode p—sses e—™h v—lue to the tunnelF sf you pl—™e the peed˜—™k xode on the wire —fter you ˜r—n™h the wire th—t ™onne™ts d—t— to the tunnelD the peed˜—™k xode p—sses e—™h v—lue ˜—™k to the input of the †s or fun™tion —nd then p—sses the l—st v—lue to the tunnelF „he e™™essing €revious h—t— †s @ƒe™tion RFTA exer™ise ™ont—ins —n ex—mple of this ˜eh—viorF

4.6 Accessing Previous Data VI
Exercise 4.3:

4.6.1 Front Panel
IFypen the peed˜—™k †s lo™—ted in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF „he front p—nel shown in pigure RFIS is —lre—dy ˜uiltF

Figure 4.15

VT

CHAPTER 4. REPETITION AND LOOPS

4.6.2 Block Diagram
IFhispl—y the ˜lo™k di—gr—m @pigure RFITA —nd m—ke sure ˜oth the front p—nel —nd ˜lo™k di—gr—m —re visi˜leF sf ne™ess—ryD ™lose or move the „ools —nd pun™tions p—lettesF

Figure 4.16

„he I wired to the left termin—ls on the por voop initi—lizes the peed˜—™k xode to IF „he ‡—it …ntil xext ms „imer slows the oper—tion of the ™odeF ‰ou —lso ™ould use righlight ixe™ution inste—d of the w—it fun™tion to slow the oper—tionF „he s—me ™ode is used twi™e in this ˜lo™k di—gr—m with the peed˜—™k xode in — di'erent portion of the wireF

4.6.3 Run the VI
IF‚un the †sF „he top se™tion of the ™ode re—ds the initi—lized peed˜—™k xode —nd p—sses this v—lue to the wultiply fun™tionF „he ˜ottom se™tion of the ™ode re—ds the initi—lized peed˜—™k xode —nd p—sses this v—lue to the indi™—torF „his wultiply fun™tion does not exe™ute until the next iter—tion of the loopF PF gli™k the righlight ixe™ution ˜uttonD shown in pg VTD to en—˜le exe™ution highlightingF ‚un the †s —g—in to o˜serve the order of exe™utionF „urn o' exe™ution highlighting when you underst—nd the exe™ution orderF „he †s ™ontinues exe™uting —t norm—l speedF

QF‚epl—™e the ˜ottom peed˜—™k xode with — shift registerD —s shown in pigure RFIUF

VU

Figure 4.17

@—Aƒele™t the ˜ottom peed˜—™k xode —nd press the <helete key to delete itF @˜A‚ightE™li™k the ˜order of the por voop —nd sele™t edd ƒhift ‚egisterF @™Asniti—lize the shift register ˜y wiring I to the left shift registerF @dAgh—nge the l—˜el of the ˜ottom indi™—tor to ƒhift ‚egister —nd the top indi™—tor to peed˜—™k xodeF RF‚un the †sF xoti™e th—t ˜oth the peed˜—™k xode —nd the shift register portions of the ˜lo™k di—gr—m h—ve the s—me fun™tion—lityF SFsf time permitsD ™omplete the following option—l stepsY otherwiseD ™lose the †s —nd do not s—ve ™h—ngesF

4.6.4 Optional
IF‚evise the shift register to displ—y the l—st three iter—tions of the por voop d—t—D —s shown in pigure RFIVF

VV

CHAPTER 4. REPETITION AND LOOPS

Figure 4.18

@—A‚esize the left shift register to three elementsF ‚ightE™li™k the shift register —nd sele™t edd ilement from the short™ut menu to —dd e—™h shift registerF @˜Asniti—lize e—™h elements of the shift register to IF @™A‚ightE™li™k e—™h element of the shift register —nd sele™t gre—te sndi™—torF v—˜el e—™h indi™—torF PF‚un the †sF QFglose the †sF ho not s—ve ™h—ngesF

4.7 Summary, Tips, and Tricks on Repetition and Loops
• …se stru™tures on the ˜lo™k di—gr—m to repe—t ˜lo™ks of ™ode —nd to exe™ute ™ode ™ondition—lly or in — spe™i(™ orderF • „he ‡hile voop exe™utes the su˜di—gr—m until the ™ondition—l termin—l re™eives — spe™i(™ foole—n v—lueF fy def—ultD the ‡hile voop exe™utes its su˜di—gr—m until the ™ondition—l termin—l re™eives — „rue v—lueF • „he por voop exe™utes — su˜di—gr—m — set num˜er of timesF • ‰ou ™re—te loops ˜y using the ™ursor to dr—g — sele™tion re™t—ngle —round the se™tion of the ˜lo™k di—gr—m you w—nt to repe—t or ˜y dr—gging —nd dropping ˜lo™k di—gr—m o˜je™ts inside the loopF • „he ‡—it …ntil xext ms wultiple fun™tion m—kes sure th—t e—™h iter—tion o™™urs —t ™ert—in interv—lsF …se this fun™tion to —dd timing to loopsF • „he ‡—it @msA fun™tion w—its — set —mount of timeF

VW

• goer™ion dots —ppe—r where v—˜†si‡ ™oer™es — numeri™ represent—tion of one termin—l to m—t™h the numeri™ represent—tion of —nother termin—lF • …se shift registers on por voops —nd ‡hile voops to tr—nsfer v—lues from one loop iter—tion to the nextF • gre—te — shift register ˜y rightE™li™king the left or right ˜order of — loop —nd sele™ting edd ƒhift ‚egister from the short™ut menuF • „o ™on(gure — shift register to ™—rry over v—lues to the next iter—tionD rightE™li™k the left termin—l —nd sele™t edd ilement from the short™ut menuF • „he peed˜—™k xode stores d—t— when the loop ™ompletes —n iter—tionD sends th—t v—lue to the next iter—tion of the loopD —nd tr—nsfers —ny d—t— typeF • …se the peed˜—™k xode to —void unne™ess—rily long wiresF

WH

CHAPTER 4. REPETITION AND LOOPS

Solutions to Exercises in Chapter 4
Solution to Exercise 4.1:
„his is —n unsupported medi— typeF „o viewD ple—se see httpXGG™nxForgG™ontentGmIPPIQGl—testGeutow—t™hFvi

Chapter 5

Arrays
5.1 Arrays
group d—t— elements of the s—me typeF en —rr—y ™onsists of elements —nd dimensionsF ilements —re the d—t— th—t m—ke up the —rr—yF e dimension is the lengthD heightD or depth of —n —rr—yF en —rr—y ™—n h—ve one or more dimensions —nd —s m—ny —s 231 − 1 elements per dimensionD memory permittingF ‰ou ™—n ˜uild —rr—ys of numeri™D foole—nD p—thD stringD w—veformD —nd ™luster d—t— typesF gonE sider using —rr—ys when you work with — ™olle™tion of simil—r d—t— —nd when you perform repetitive ™omput—tionsF err—ys —re ide—l for storing d—t— you ™olle™t from w—veforms or d—t— gener—ted in loopsD where e—™h iter—tion of — loop produ™es one element of the —rr—yF ‰ou ™—nnot ™re—te —n —rr—y of —rr—ysF roweverD you ™—n ™re—te —n —rr—y of clustersD where e—™h ™luster ™ont—ins one or more —rr—ysF ‚efer to glusters @ƒe™tion TFIA for more inform—tion —˜out ™lustersF err—y elements —re orderedF en —rr—y uses —n index so you ™—n re—dily —™™ess —ny p—rti™ul—r elementF „he index is zeroE˜—sedD whi™h me—ns it is in the r—nge 0 to n − 1D where n is the num˜er of elements in the —rr—yF por ex—mpleD if you ™re—te —n —rr—y of the pl—nets in the sol—r systemD n = 9 for the nine pl—netsD so the index r—nges from 0 to 8F i—rth is the third pl—netD so it h—s —n index of 2F

Arrays

5.1.1 Creating Array Controls and Indicators
„o ™re—te —n —rr—y ™ontrol or indi™—tor —s shown in pigure SFID sele™t —n —rr—y on the gontrols ell gontrols err—y 8 gluster p—letteD pl—™e it on the front p—nelD —nd dr—g — ™ontrol or indi™—tor into the —rr—y shellF sf you —ttempt to dr—g —n inv—lid ™ontrol or indi™—tor su™h —s —n ˆ‰ gr—ph into the —rr—y shellD you —re un—˜le to drop the ™ontrol or indi™—tor in the —rr—y shellF

WI

WP

CHAPTER 5. ARRAYS

Figure 5.1:

1. Index Display, 2. Element Display

‰ou must insert —n o˜je™t in the —rr—y shell ˜efore you use the —rr—y on the ˜lo™k di—gr—mF ytherwiseD the —rr—y termin—l —ppe—rs ˜l—™k with —n empty ˜r—™ketF

5.1.1.1 Two-Dimensional Arrays
e Ph —rr—y stores elements in — gridF st requires — ™olumn index —nd — row indexD ˜oth of whi™h —re zeroE˜—sedD to lo™—te —n elementF pigure SFP shows — 6E™olumn ˜y 4Erow Ph —rr—yD whi™h ™ont—ins 6 × 4 = 24 elementsF

Figure 5.2

„o —dd dimensions to —n —rr—y one —t — timeD rightE™li™k the index displ—y —nd sele™t edd himension from the short™ut menuF ‰ou —lso ™—n use the €ositioning tool to resize the index displ—y until you h—ve —s m—ny dimensions —s you w—ntF pigure SFQ is —n ex—mple of —n uniniti—lized Ph —rr—y ™ontrolF

WQ

Figure 5.3

5.1.2 Creating Array Constants
‰ou ™—n ™re—te —n —rr—y ™onst—nt on the ˜lo™k di—gr—m ˜y sele™ting —n —rr—y ™onst—nt from the pun™tions ell pun™tions err—y p—letteD pl—™ing it on the ˜lo™k di—gr—mD —nd dr—gging — ™onst—nt into the —rr—y shellF err—y ™onst—nts —re useful for p—ssing d—t— into — su˜†sF

5.2 Auto-Indexing
sf you wire —n —rr—y to — por voop or ‡hile voop input tunnelD you ™—n re—d —nd pro™ess every element in th—t —rr—y ˜y en—˜ling —utoEindexingF ‡hen you —utoEindex —n —rr—y output tunnelD the output —rr—y re™eives — new element from every iter—tion of the loopF „he wire from the output tunnel to the —rr—y indi™—tor ˜e™omes thi™ker —s it ™h—nges to —n —rr—y —t the loop ˜orderD —nd the output tunnel ™ont—ins squ—re ˜r—™kets representing —n —rr—yD —s shown in pigure SFRF

Figure 5.4

his—˜le —utoEindexing ˜y rightE™li™king the tunnel —nd sele™ting his—˜le sndexing from the shortE ™ut menuF por ex—mpleD dis—˜le —utoEindexing if you need only the l—st v—lue p—ssed to the tunnel in the previous ex—mpleF fe™—use you ™—n use por voops to pro™ess —rr—ys —n element —t — timeD v—˜†si‡ en—˜les —utoE indexing ˜y def—ult for every —rr—y you wire to — por voop —nd for e—™h output tunnel th—t is ™re—tedF eutoEindexing for ‡hile voops is dis—˜led ˜y def—ultF „o en—˜le —utoEindexingD rightE™li™k — tunnel —nd sele™t in—˜le sndexing from the short™ut menuF

5.2.1 Creating Two-Dimensional Arrays
‰ou ™—n use two por voopsD one inside the otherD to ™re—te — PEh —rr—yF „he outer por voop ™re—tes the row elementsD —nd the inner por voop ™re—tes the ™olumn elementsD —s shown in pigure SFSF

WR

CHAPTER 5. ARRAYS

Figure 5.5

5.2.2 Using Auto-Indexing to Set the For Loop Count
sf you en—˜le —utoEindexing on —n —rr—y wired to — por voop input termin—lD v—˜†si‡ sets the ™ount termin—l to the —rr—y size so you do not need to wire the ™ount termin—lF sn pigure SFTD the por voop exe™utes — num˜er of times equ—l to the num˜er of elements in the —rr—yF xorm—llyD if the ™ount termin—l of the por voop is not wiredD the run —rrow is ˜rokenF roweverD in this ™—se the run —rrow is not ˜rokenF

Figure 5.6

sf you en—˜le —utoEindexing for more th—n one tunnel or if you wire the ™ount termin—lD the ™ount ™h—nges to the sm—ller of the twoF por ex—mpleD if you wire —n —rr—y with 10 elements to — por voop input tunnel —nd you set the ™ount termin—l to 15D the loop exe™utes only 10 timesF

5.3 Array Functions
…se the err—y fun™tions lo™—ted on the pun™tions ell pun™tions err—y p—lette to ™re—te —nd m—nipul—te —rr—ysF „he more ™ommonly used —rr—y fun™tions in™lude the followingX

WS

Array Size E ‚eturns the num˜er of elements in e—™h dimension of —n —rr—yF sf the —rr—y is nEdimension—lD the size output is —n —rr—y of n elementsF por ex—mpleD the err—y ƒize fun™tion returns — size of 3 for the following —rr—yF
U R P

Initialize Array E

gre—tes —n nEdimension—l —rr—y in whi™h every element is initi—lized to the v—lue of elementF ‚esize the fun™tion to in™re—se the num˜er of dimensions of the output —rr—yF por ex—mpleD the sniti—lize err—y fun™tion returns the following —rr—y for —n element of 4D — dimension size of 3D —nd one dimension size termin—lF R R R

Array Subset E

‚eturns — portion of —n —rr—y st—rting —t index —nd ™ont—ining length elementsF por ex—mpleD if you use the previous —rr—y —s the inputD the err—y ƒu˜set fun™tion returns the following —rr—y for —n index of 2 —nd — length of 3F P R R

Build Array E

gon™—ten—tes multiple —rr—ys or —ppends elements to —n nEdimension—l —rr—yF ‚esize the fun™tion to in™re—se the num˜er of elements in the output —rr—yF por ex—mpleD if you ™on™—ten—te the two previous —rr—ys D the fuild err—y fun™tion returns the following —rr—yF U R R R P R

„o ™on™—ten—te the inputs into — longer —rr—y of the s—me dimension —s shown in the following —rr—yD rightE™li™k the fun™tion node —nd sele™t gon™—ten—te snputs from the short™ut menu to ™re—te the following —rr—yF U R P R R R

Index Array E

‚eturns the element or su˜E—rr—y of nEdimension —rr—y —t indexF por ex—mpleD if you use the previous —rr—y —s the inputD the sndex err—y fun™tion returns 2 for —n index of 0F ‰ou —lso ™—n use the sndex err—y fun™tion to extr—™t — row or ™olumn of — Ph —rr—y to ™re—te — su˜—rr—y of the origin—lF „o do soD wire — Ph —rr—y to the input of the fun™tionF „wo index termin—ls —re —v—il—˜leF „he top index termin—l indi™—tes the rowD —nd the se™ond termin—l indi™—tes the ™olumnF ‰ou ™—n wire inputs to ˜oth index termin—ls to index — single

WT

CHAPTER 5. ARRAYS

elementD or you ™—n wire only one termin—l to extr—™t — row or ™olumn of d—t—F por ex—mpleD wire the following —rr—y to the input of the fun™tionF U R R R P R

„he sndex err—y fun™tion returns the following —rr—y for —n index @rowA of 0X U R P

5.4 Polymorphism
„he xumeri™ fun™tions lo™—ted on the pun™tions ixpress xumeri™ —nd pun™tions ell pun™tions xumeri™ p—lettes —re polymorphi™F „his me—ns th—t the inputs to these fun™tions ™—n ˜e di'erent d—t— stru™turesD su™h —s s™—l—r v—lues —nd —rr—ysF por ex—mpleD you ™—n use the edd fun™tion to —dd — s™—l—r v—lue to —n —rr—y or to —dd two —rr—ys togetherF sf you wire — s™—l—r v—lue of 2 —nd the following —rr—y to the edd fun™tionF I Q P

„he fun™tion —dds the s™—l—r v—lue to e—™h element of the —rr—y —nd returns the following —rr—yX Q S R

sf you wire the previous two —rr—ys to the edd fun™tionD the fun™tion —dds e—™h element of one —rr—y to the ™orresponding element of the other —rr—y —nd returns the following —rr—yX R V T

‡ire two —rr—ys of di'erent sizes to the edd fun™tionD su™h —s the previous —rr—y —nd the following —rr—yX Q I P Q

„he fun™tion —dds ™orresponding elements —nd returns the following —rr—yD whi™h is the size of the sm—ller input —rr—yX U W V

‰ou use the xumeri™ fun™tions with ™lusters the s—me w—y you use them with —rr—ys of numeri™ v—luesF ‚efer to glusters @ƒe™tion TFIA for more inform—tion —˜out ™lustersF

WU

5.5 Array Exercise VI
Exercise 5.1:
gomplete the following steps to ˜uild — †s th—t ™re—tes —n —rr—y of r—ndom num˜ersD s™—les the resulting —rr—yD —nd t—kes — su˜set of th—t (n—l —rr—yF

5.5.1 Front Panel
IFypen — ˜l—nk †s —nd ˜uild the front p—nel shown in pigure SFUF

Figure 5.7

@—A€l—™e —n —rr—yD lo™—ted on the gontrols ell gontrols err—y 8 gluster p—letteD on the front p—nelF @˜Av—˜el the —rr—y ‚—ndom err—yF @™A€l—™e — numeri™ indi™—torD lo™—ted on the gontrols xumeri™ sndi™—tors p—letteD in the —rr—y shellF @dA…se the €ositioning tool to resize the —rr—y ™ontrol to ™ont—in 10 numeri™ indi™—E torsF @eA€ress the <gtrl> key while you ™li™k —nd dr—g the ‚—ndom err—y ™ontrol to ™re—te two ™opies of the ™ontrolF @fAv—˜el the ™opies pin—l err—y —nd ƒu˜set err—yF @gA€l—™e three numeri™ ™ontrolsD lo™—ted on the gontrols xumeri™ gontrols p—letteD —nd l—˜el them ƒ™—ling p—™torD ƒt—rt ƒu˜setD —nd 5 of ilementsF @hA‚ightE™li™k the ƒt—rt ƒu˜set —nd 5 of ilements ™ontrols —nd sele™t ‚epresent—tion sQP from the short™ut menuF @iAho not ™h—nge the v—lues of the front p—nel ™ontrolsF

5.5.2 Block Diagram
IFfuild the ˜lo™k di—gr—m shown in pigure SFVF

WV

CHAPTER 5. ARRAYS

Figure 5.8

@—A €l—™e the ‚—ndom xum˜er @HEIA fun™tionD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress xumeri™ p—letteD on the ˜lo™k di—gr—mF „his fun™tion gener—tes — r—ndom num˜er ˜etween 0 —nd 1F @˜A €l—™e the por voopD lo™—ted on the pun™tions ell pun™tions ƒtru™tures p—letteD on the ˜lo™k di—gr—mF „he loop —™™umul—tes —n —rr—y of 10 r—ndom num˜ers —t the output tunnelF gre—te — ™onst—nt of 10 for the ™ount termin—lF @™A €l—™e the wultiply fun™tionD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress xumeri™ p—letteD on the ˜lo™k di—gr—mF sn this exer™ise this fun™tion multiplies ‚—ndom err—y ˜y ƒ™—ling p—™tor —nd returns pin—l erE r—yF

€l—™e the err—y ƒu˜set fun™tionD lo™—ted on the pun™tions ell @dA pun™tions err—y p—letteD on the ˜lo™k di—gr—mF „his fun™tion returns — porE tion of —n —rr—y st—rting —t ƒt—rt ƒu˜set —nd ™ont—ining 5 of ilements elementsF PFƒ—ve the †s —s err—y ixer™iseFvi in the gX\ixer™ises\ v—˜†si‡ f—si™s s dire™toryF

5.5.3 Run the VI
IFhispl—y the front p—nelD ™h—nge the v—lues of the ™ontrolsD —nd run the †s — few timesF „he por voop runs for 10 iter—tionsF i—™h iter—tion gener—tes — r—ndom num˜er —nd stores it —t the output tunnelF ‚—ndom err—y displ—ys —n —rr—y of 10 r—ndom num˜ersF „he †s multiplies e—™h v—lue in ‚—ndom err—y ˜y ƒ™—ling p—™tor to ™re—te pin—l err—yF „he †s t—kes — su˜set of pin—l err—y st—rting —t ƒt—rt ƒu˜set for 5 of ilements —nd displ—ys the su˜set in ƒu˜set err—yF PFglose the †sF

5.6 Summary, Tips, and Tricks on Arrays

Arrays

group d—t— elements of the s—me typeF ‰ou ™—n ˜uild —rr—ys of numeri™D foole—nD p—thD stringD w—veformD —nd ™luster d—t— typesF

WW

• „he —rr—y index is zeroE˜—sedD whi™h me—ns it is in the r—nge 0 to n − 1D where n is the num˜er of elements in the —rr—yF • ‰ou must insert —n o˜je™t in the —rr—y shell ˜efore you use the —rr—y on the ˜lo™k di—gr—mF ytherwiseD the —rr—y termin—l —ppe—rs ˜l—™k with —n empty ˜r—™ketF • „o ™re—te —n —rr—y ™ontrol or indi™—torD sele™t —n —rr—y on the gontrols err—y 8 gluster p—letteD pl—™e it on the front p—nelD —nd dr—g — ™ontrol or indi™—tor into the —rr—y shellF • sf you wire —n —rr—y to — por voop or ‡hile voop input tunnelD you ™—n re—d —nd pro™ess every element in th—t —rr—y ˜y en—˜ling —utoEindexingF • …se the err—y fun™tions lo™—ted on the pun™tions m—nipul—te —rr—ysF
ell pun™tions err—y p—lette to ™re—te —nd

• fy def—ultD v—˜†si‡ en—˜les —utoEindexing in por voops —nd dis—˜les —utoEindexing in ‡hile voopsF •

Polymorphism is the —˜ility of — fun™tion to —djust to input d—t— of di'erent d—t— stru™turesF

5.7 Additional Exercises for Arrays
Exercise 5.2:
fuild — †s th—t reverses the order of —n —rr—y th—t ™ont—ins 100 r—ndom num˜ersF por ex—mpleD —rr—y‘0“ ˜e™omes —rr—y‘99“D —rr—y‘1“ ˜e™omes —rr—y‘98“D —nd so onF
tip:

…se the ‚everse Ih err—y fun™tion lo™—ted on the pun™tions pun™tions err—y p—lette to reverse the —rr—y orderF

ell

ƒ—ve the †s —s ‚everse ‚—ndom err—yFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

Exercise 5.3:
fuild — †s th—t —™™umul—tes —n —rr—y of temper—ture v—lues using the „hermometer @ƒe™E tion QFSA †sF ƒet the —rr—y size with — ™ontrol on the front p—nelF sniti—lize —n —rr—y using the sniti—lize err—y fun™tion of the s—me size where —ll the v—lues —re equ—l to 10F edd the two —rr—ysD ™—l™ul—te the size of the (n—l —rr—yD —nd extr—™t the middle v—lue from the (n—l —rr—yF hispl—y the „emper—ture err—yD sniti—lized err—yD pin—l err—yD —nd wid †—lueF ƒ—ve the †s —s pind wid †—lueFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

Exercise 5.4:
fuild — †s th—t gener—tes — Ph —rr—y of three rows ˜y 10 ™olumns th—t ™ont—ins r—ndom num˜ersF efter gener—ting the —rr—yD index e—™h rowD —nd plot e—™h row on its own gr—phF „he front p—nel should ™ont—in three gr—phsF ƒ—ve the †s —s ixtr—™t Ph err—yFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

Exercise 5.5:
fuild — †s th—t simul—tes the roll of — die with possi˜le v—lues 1 through 6 —nd re™ords the num˜er of times th—t the die rolls e—™h v—lueF „he input is the num˜er of times to roll the dieD —nd the outputs in™lude the num˜er of times the die f—lls on e—™h possi˜le v—lueF …se only one shift registerF ƒ—ve the †s —s hie ‚ollerFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

IHH

CHAPTER 5. ARRAYS

Exercise 5.6:
fuild — †s th—t gener—tes — Ih —rr—y —nd then multiplies p—irs of elements togetherD st—rting with elements 0 —nd 1D —nd returns the resulting —rr—yF por ex—mpleD the input —rr—y with v—lues {1, 23, 10, 5, 7, 11} results in the output —rr—y {23, 50, 77}F
tip:

…se the he™im—te Ih err—y fun™tion lo™—ted on the pun™tions pun™tions err—y p—letteF

ell

ƒ—ve the †s —s err—y €—ir wultiplierFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

Chapter 6

Clusters
6.1 Clusters
Clusters group d—t— elements of mixed typesD su™h —s — ˜undle of wiresD —s in — telephone ™—˜leD
where e—™h wire in the ™—˜le represents — di'erent element of the ™lusterF e ™luster is simil—r to — re™ord or — stru™t in textE˜—sed progr—mming l—ngu—gesF fundling sever—l d—t— elements into ™lusters elimin—tes wire ™lutter on the ˜lo™k di—gr—m —nd redu™es the num˜er of ™onne™tor p—ne termin—ls th—t su˜†ss needF „he ™onne™tor p—ne h—sD —t mostD 28 termin—lsF sf — front p—nel ™ont—ins more th—n 28 ™ontrols —nd indi™—tors th—t you w—nt to use progr—mm—ti™—llyD group some of them into — ™luster —nd —ssign the ™luster to — termin—l on the ™onne™tor p—neF vike —n —rr—yD — ™luster is either — ™ontrol or —n indi™—torF e ™luster ™—nnot ™ont—in — mixture of ™ontrols —nd indi™—torsF elthough ™luster —nd —rr—y elements —re ˜oth orderedD you must un˜undle —ll ™luster elements —t on™e r—ther th—n index one element —t — timeF ‰ou —lso ™—n use the …n˜undle fy x—me fun™tion to —™™ess spe™i(™ ™luster elementsF

6.1.1 Creating Cluster Controls and Indicators
„o ™re—te — ™luster ™ontrol or indi™—torD sele™t — ™luster on the gontrols ell gontrols err—y 8 gluster p—letteD pl—™e it on the front p—nelD —nd dr—g ™ontrols or indi™—tors into the ™luster shellF ‚esize the ™luster shell ˜y dr—gging the ™ursor while you pl—™e the ™luster shellF „he ex—mple in pigure TFI is — ™luster of three ™ontrolsF

Figure 6.1

IHI

IHP

CHAPTER 6. CLUSTERS

6.1.2 Creating Cluster Constants
gre—te — ™luster ™onst—nt on the ˜lo™k di—gr—m ˜y sele™ting — ™luster ™onst—nt on the gluster p—letteD pl—™ing it on the ˜lo™k di—gr—mD —nd dr—gging — ™onst—nt into the ™luster shellF sf you h—ve — ™luster ™ontrol or indi™—tor on the front p—nel —nd you w—nt to ™re—te — ™luster ™onst—nt ™ont—ining the s—me elements on the ˜lo™k di—gr—mD you ™—n either dr—g th—t ™luster from the front p—nel to the ˜lo™k di—gr—m or rightE™li™k the ™luster on the front p—nel —nd sele™t gre—te gonst—nt from the short™ut menuF

6.1.3 Cluster Order
gluster elements h—ve — logi™—l order unrel—ted to their position in the shellF „he (rst o˜je™t you pl—™e in the ™luster is element 0D the se™ond is element 1D —nd so onF sf you delete —n elementD the order —djusts —utom—ti™—llyF „he ™luster order determines the order in whi™h the elements —ppe—r —s termin—ls on the fundle —nd …n˜undle fun™tions on the ˜lo™k di—gr—mF ‰ou ™—n view —nd modify the ™luster order ˜y rightE™li™king the ™luster ˜order —nd sele™ting ‚eorder gontrols sn gluster from the short™ut menuF „he tool˜—r —nd ™luster ™h—ngeD —s shown in pigure TFPF

Figure 6.2:

5. New Order

1. Conrm Button, 2. Cancel Button, 3. Cluster Order Cursor, 4. Current Order,

„he white ˜ox on e—™h element shows its ™urrent pl—™e in the ™luster orderF „he ˜l—™k ˜ox shows the new pl—™e in the order for —n elementF „o set the order of — ™luster elementD type the new order num˜er in the gli™k to set to text ˜ox —nd ™li™k the elementF „he ™luster order of the element ™h—ngesD —nd the ™luster order of other elements —djustsF ƒ—ve the ™h—nges ˜y ™li™king the gon(rm ˜utton on the tool˜—rF ‚evert to the origin—l order ˜y ™li™king the g—n™el ˜uttonF

IHQ

gorresponding elementsD determined ˜y the ™luster orderD must h—ve ™omp—ti˜le d—t— typesF por ex—mpleD in one ™lusterD element 0 is — numeri™ ™ontrolD —nd element 1 is — string ™ontrolF sn — se™ond ™lusterD element 0 is — numeri™ indi™—torD —nd element 1 is — string indi™—torF „he ™luster ™ontrol ™orre™tly wires to the ™luster indi™—torF roweverD if you ™h—nge the ™luster order of the indi™—tor so the string is element 0D —nd the numeri™ is element 1D the wire from the ™luster ™ontrol to the ™luster indi™—tor —ppe—rs ˜rokenD indi™—ting th—t the d—t— types do not m—t™hF

6.2 Cluster Functions
…se the gluster fun™tions lo™—ted on the pun™tions ell pun™tions gluster p—lette to ™re—te —nd m—nipul—te ™lustersF …se the fundle —nd fundle ˜y x—me fun™tions to —ssem˜le —nd m—nipul—te ™lusters —nd use the …n˜undle —nd …n˜undle ˜y x—me fun™tions to dis—ssem˜le ™lustersF ‰ou —lso ™—n ™re—te the fundleD fundle ˜y x—meD …n˜undleD —nd …n˜undle ˜y x—me fun™tions ˜y rightE™li™king — ™luster termin—l on the ˜lo™k di—gr—m —nd sele™ting gluster €—lette from the short™ut menuF „he fundle —nd …n˜undle fun™tions —utom—ti™—lly ™ont—in the ™orre™t num˜er of termin—lsF „he fundle ˜y x—me —nd …n˜undle ˜y x—me fun™tions —ppe—r with the (rst element in the ™lusterF …se the €ositioning tool to resize the fundle ˜y x—me —nd …n˜undle ˜y x—me fun™tions to show the other elements of the ™lusterF

6.2.1 Assembling Clusters
…se the fundle fun™tion to —ssem˜le — ™luster from individu—l elements or to ™h—nge the v—lues of individu—l elements in —n existing ™luster without h—ving to spe™ify new v—lues for —ll elementsF …se the €ositioning tool to resize the fun™tion or rightE™li™k —n element input —nd sele™t edd snput from the short™ut menuF sf you wire — ™luster to the ™luster inputD the num˜er of inputs must m—t™h the num˜er of elements in the input ™lusterF sf you wire the ™luster inputD you ™—n wire only the elements you w—nt to ™h—ngeF por ex—mpleD the ™luster in pigure TFQ ™ont—ins three ™ontrolsF

Figure 6.3

sf you know the ™luster orderD you ™—n use the fundle fun™tion to ™h—nge the gomm—nd v—lue ˜y wiring the elements shown in pigure TFRF

IHR

CHAPTER 6. CLUSTERS

Figure 6.4

6.2.2 Replacing or Accessing Cluster Elements
…se the fundle ˜y x—me fun™tion to repl—™e or —™™ess l—˜eled elements of —n existing ™lusterF fundle ˜y x—me works simil—rly to the fundle fun™tionD ˜ut inste—d of referen™ing ™luster elements ˜y their ™luster orderD it referen™es them ˜y their owned l—˜elsF ‰ou ™—n —™™ess only elements with owned l—˜elsF „he num˜er of inputs does not need to m—t™h the num˜er of elements in output ™lusterF …se the yper—ting tool to ™li™k —n input termin—l —nd sele™t —n element from the pullEdown menuF ‰ou —lso ™—n rightE™li™k the input —nd sele™t the element from the ƒele™t stem short™ut menuF sn pigure TFSD you ™—n use the fundle ˜y x—me fun™tion to ™h—nge gomm—nd —nd pun™tionF

Figure 6.5

…se the fundle ˜y x—me fun™tion for d—t— stru™tures th—t might ™h—nge during developmentF sf you —dd — new element to the ™luster or modify its orderD you do not need to rewire the fundle ˜y x—me fun™tion ˜e™—use the n—mes still —re v—lidF

6.2.3 Disassembling CLusters
…se the …n˜undle fun™tion to split — ™luster into its individu—l elementsF …se the …n˜undle ˜y x—me fun™tion to return the ™luster elements whose n—mes you spe™ifyF „he num˜er of output termin—ls does not depend on the num˜er of elements in the input ™lusterF …se the yper—ting tool to ™li™k —n output termin—l —nd sele™t —n element from the pullEdown menuF ‰ou —lso ™—n rightE™li™k the output termin—l —nd sele™t the element from the ƒele™t stem short™ut menuF por ex—mpleD if you use the …n˜undle fun™tion with the ™luster in pigure TFTD it h—s four output termin—ls th—t ™orrespond to the four ™ontrols in the ™lusterF ‰ou must know the ™luster order so you ™—n —sso™i—te the ™orre™t foole—n termin—l of the un˜undled ™luster with the ™orresponding swit™h in the ™lusterF sn pigure TFTD the elements —re ordered from top to ˜ottom st—rting with element 0F sf you use the …n˜undle ˜y x—me fun™tionD you ™—n h—ve —n —r˜itr—ry num˜er of output termin—ls —nd —™™ess individu—l elements ˜y n—me in —ny orderF

IHS

Figure 6.6

6.3 Cluster Exercise VI
Exercise 6.1:

6.3.1 Front Panel
IFypen — ˜l—nk †s —nd ˜uild the front p—nel in pigure TFUF

Figure 6.7

@—A€l—™e — stop ˜uttonD lo™—ted on the gontrols futtons 8 ƒwit™hes p—letteD — numeri™ indi™—torD lo™—ted on the gontrols xumeri™ sndi™—tors p—letteD —nd — round vihD lo™—ted on the gontrols vihs p—letteD on the front p—nelF

IHT

CHAPTER 6. CLUSTERS

@˜A€l—™e — ™lusterD lo™—ted on the gontrols ell gontrols err—y 8 gluster p—letteD on the front p—nelF @™A€l—™e — numeri™ ™ontrolD lo™—ted on the gontrols xumeri™ gontrols p—letteD two verti™—l toggle swit™hesD lo™—ted on the gontrols futtons 8 ƒwit™hes p—letteD —nd — horizont—l (ll slideD lo™—ted on the gontrols xumeri™ gontrols p—letteD in the ™lusterF @dAgre—te the wodi(ed gluster ˜y dupli™—ting the (rst ™luster —nd rel—˜eling itF ‚ightE™li™k the shell of wodi(ed glusterD —nd sele™t gh—nge to sndi™—tor from the short™ut menuF @eAgopy wodi(ed gluster —nd rel—˜el it to ™re—te ƒm—ll glusterF ‚emove the se™ond toggle swit™h —nd horizont—l (ll slide indi™—torsF ‚el—˜el the numeri™ indi™—tor to ƒlide v—lueF ‚esize the ™luster —s shown in pigure TFUF PF†erify the ™luster order of gluster —nd ƒm—ll glusterF wodi(ed gluster should h—ve the s—me order —s glusterF @—A‚ightE™li™k the ˜ound—ry of e—™h ™luster —nd sele™t ‚eorder gontrols in gluster from the short™ut menuF @˜Agon(rm the ™luster orders @pigure TFVAF

Figure 6.8

6.3.2 Block Diagram
IFfuild the ˜lo™k di—gr—m in pigure TFWF

IHU

Figure 6.9

@—A €l—™e the ‡hile voopD lo™—ted on pun™tions ƒtru™tures p—letteD on the ˜lo™k di—gr—mF

the

pun™tions

ell

€l—™e the …n˜undle fun™tionD lo™—ted on the pun™tions ell @˜A pun™tions gluster p—letteD on the ˜lo™k di—gr—mF „his fun™tion dis—ssemE ˜les glusterF ‡ire the input ™luster to resize the fun™tion —utom—ti™—llyF €l—™e the fundle fun™tionD lo™—ted on the pun™tions ell @™A pun™tions gluster p—letteD on the ˜lo™k di—gr—mF „his fun™tion —ssem˜les ƒm—ll glusterF @dA €l—™e the …n˜undle ˜y x—me fun™tionD lo™—ted on the pun™tions ell pun™tions gluster p—letteD on the ˜lo™k di—gr—mF „his fun™tion returns two elements from glusterF ‚esize this fun™tion to h—ve two output termin—lsF sf — l—˜el n—me is not ™orre™tD rightE™li™k the n—me —nd sele™t the ™orre™t n—me from the ƒele™t stem short™ut menuF @eA €l—™e the sn™rement fun™tionD lo™—ted on pun™tions xumeri™ p—letteD on the ˜lo™k di—gr—mF one to the v—lue of xumeri™F the pun™tions ell „his fun™tion —dds

@fA €l—™e the xot fun™tionD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress foole—n p—letteD on the ˜lo™k di—gr—mF „his fun™tion reE turns the logi™—l opposite of the v—lue of the foole—n termin—l of the …n˜undle ˜y x—me fun™tionF @gA €l—™e the fundle ˜y x—me fun™tionD lo™—ted on the pun™tions ell pun™tions gluster p—letteD on the ˜lo™k di—gr—mF „his fun™tion repl—™es the v—lues of xumeri™ —nd foole—n 1 in gluster —nd ™re—tes wodi(ed glusterF ‚esize

IHV

CHAPTER 6. CLUSTERS

this fun™tion to h—ve two input termin—lsF sf — l—˜el n—me is not ™orre™tD rightE™li™k the n—me —nd sele™t the ™orre™t n—me from the ƒele™t stem short™ut menuF @hAgomplete the ˜lo™k di—gr—m —nd wire the o˜je™ts —s shown in pigure TFWF PFƒ—ve the †s —s gluster ixer™iseFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

6.3.3 Run the VI
IFhispl—y the front p—nel —nd run the †sF PFinter di'erent v—lues in gluster —nd run the †s —g—inF xoti™e how v—lues entered in gluster —'e™t the wodi(ed gluster —nd ƒm—ll gluster indi™—torsF ss this the ˜eh—vior you expe™tedc QF„ry ™h—nging the ™luster order of wodi(ed glusterF ‚un the †sF row did the ™h—nged order —'e™t the ˜eh—viorc RFglose the †sF ho not s—ve ™h—ngesF

6.4 Cluster Scaling VI
Exercise 6.2:
gomplete the following steps to ˜uild — †s th—t s™—les v—lues stored in — ™lusterD where e—™h ™luster element h—s — di'erent s™—le f—™torF essume th—t the volt—ges were me—sured from tr—nsdu™ers th—t me—sure the pressureD )ow r—teD —nd temper—tureF „he †s then s™—les these v—lues to get the —™tu—l v—lues present in the systemF

6.4.1 Front Panel
IFypen the gluster ƒ™—ling †s lo™—ted in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF „he front p—nel is —lre—dy ˜uiltF PFgh—nge the ™ontrols —s shown in pigure TFIHF

Figure 6.10

IHW

6.4.2 Block Diagram
IFfuild the ˜lo™k di—gr—m shown in pigure TFIIF w—ke sure you —pply the ™orre™t s™—le f—™tors to e—™h element in the ‚—w h—t— ™lusterF

Figure 6.11

PFƒ—ve the †sF QFhispl—y the front p—nel —nd run the †sF RFgh—nge the front p—nel ™ontrols —nd run the †s —g—inF SFglose the †s when you —re (nishedF

6.5 Error Clusters
xo m—tter how ™on(dent you —re in the †s you ™re—teD you ™—nnot predi™t every pro˜lem — user might en™ounterF ‡ithout — me™h—nism to ™he™k for errorsD you know only th—t the †s does not work properlyF irror ™he™king tells you why —nd where errors o™™urF ‡hen you perform —ny kind of sGyD ™onsider the possi˜ility th—t errors will o™™urF elmost —ll sGy fun™tions return error inform—tionF sn™lude error ™he™king in †ssD espe™i—lly for sGy oper—tions su™h —s (leD seri—lD instrument—tionD d—t— —™quisitionD —nd ™ommuni™—tion oper—tionsD —nd provide — me™h—nism to h—ndle errors —ppropri—telyF ghe™king for errors in †ss ™—n help you identify the following pro˜lemsX

• ‰ou initi—lized ™ommuni™—tions in™orre™tly or wrote improper d—t— to —n extern—l devi™eF • en extern—l devi™e lost powerD is ˜rokenD or is not working properlyF • ‰ou upgr—ded the oper—ting system softw—reD whi™h ™h—nged the p—th to — (le or the fun™tionE —lity of — †s or li˜r—ryF ‰ou might noti™e — pro˜lem in — †s or — system progr—mF

6.5.1 Error Handling
fy def—ultD v—˜†si‡ —utom—ti™—lly h—ndles —ny error th—t o™™urs when — †s runs ˜y suspending exe™utionD highlighting the su˜†s or fun™tion where the error o™™urredD —nd displ—ying — di—log ˜oxF ‰ou ™—n ™hoose other error h—ndling methodsF por ex—mpleD if —n sGy †s on the ˜lo™k di—gr—m times outD you might not w—nt the entire —ppli™—tion to stopF ‰ou —lso might w—nt the †s to retry for — ™ert—in period of timeF sn v—˜†si‡D you ™—n m—ke these error h—ndling de™isions on the ˜lo™k di—gr—m of the †sF

IIH

CHAPTER 6. CLUSTERS

†ss —nd fun™tions return errors in one of two w—ysEwith numeri™ error ™odes or with —n error ™lusterF „ypi™—llyD fun™tions use numeri™ error ™odesD —nd †ss use —n error ™lusterD usu—lly with error inputs —nd outputsF irror h—ndling in v—˜†si‡ follows the d—t—)ow modelF tust —s d—t— )ow through — †sD so ™—n error inform—tionF ‡ire the error inform—tion from the ˜eginning of the †s to the endF sn™lude —n error h—ndler †s —t the end of the †s to determine if the †s r—n without errorsF …se the error in —nd error out ™lusters in e—™h †s you use or ˜uild to p—ss error inform—tion through the †sF es the †s runsD v—˜†si‡ tests for errors —t e—™h exe™ution nodeF sf v—˜†si‡ does not (nd —ny errorsD the node exe™utes norm—llyF sf v—˜†si‡ dete™ts —n errorD the node p—sses the error to the next node without exe™utingF „he next node does the s—me thingD —nd so onF …se the ƒimple irror r—ndler †sD shown in pigure TFIPD to h—ndle the error —t the end of the exe™ution )owF „he ƒimple irror r—ndler †s is lo™—ted on the pun™tions ell pun™tions „ime 8 hi—log p—letteF ‡ire the error ™luster to the error in inputF

Figure 6.12

6.5.2 Error Clusters
„he error ™lusters lo™—ted on the pun™tions ell pun™tions ™omponents of inform—tion shown in pigure TFIQF err—y 8 gluster p—lette in™lude the

Figure 6.13

status

is — foole—n v—lue th—t reports „rue if —n error o™™urredF wost †ssD fun™tionsD —nd stru™tures th—t —™™ept foole—n d—t— —lso re™ognize this p—r—meterF por ex—mpleD you ™—n wire —n error ™luster to the foole—n inputs of the ƒtopD uit v—˜†si‡D or ƒele™t fun™tionsF sf —n error o™™ursD the error ™luster p—sses — „rue v—lue to the fun™tionF

• •

code

is — QPE˜it signed integer th—t identi(es the error numeri™—llyF e nonEzero error ™ode ™oupled with — status of p—lse sign—ls — w—rning r—ther th—n — f—t—l errorF

source is — string th—t identi(es where the error o™™urredF

…se the error ™luster ™ontrols —nd indi™—tors to ™re—te error inputs —nd outputs in su˜†ssF

III

6.5.3 Explain Error
‡hen —n error o™™ursD rightE™li™k within the ™luster ˜order —nd sele™t ixpl—in irror from the short™ut menu to open the ixpl—in irror di—log ˜oxF „he ixpl—in irror di—log ˜ox ™ont—ins inform—tion —˜out the errorF „he short™ut menu in™ludes —n ixpl—in ‡—rning option if the †s ™ont—ins w—rnings ˜ut no errorsF ‰ou —lso ™—n —™™ess the ixpl—in irror di—log ˜ox from the relp ixpl—in irror menuF

6.5.4 Using While Loops for Error Handling
‰ou ™—n wire —n error ™luster to the ™ondition—l termin—l of — ‡hile voop to stop the iter—tion of the ‡hile voop @pigure TFIRAF ‡hen you wire the error ™luster to the ™ondition—l termin—lD only the „rue or p—lse v—lue of the st—tus p—r—meter of the error ™luster is p—ssed to the termin—lF ‡hen —n error o™™ursD the ‡hile voop stopsF

Figure 6.14

‡hen —n error ™luster is wired to the ™ondition—l termin—lD the short™ut menu items ƒtop if „rue —nd gontinue if „rue ™h—nge to ƒtop on irror —nd gontinue while irrorF

6.6 Summary, Tips, and Tricks on Clusters

Clusters group d—t— elements of mixed typesF
—nd indi™—torsF

e ™luster ™—nnot ™ont—in — mixture of ™ontrols

• sf — front p—nel ™ont—ins more th—n 28 ™ontrols —nd indi™—tors th—t you w—nt to use proE gr—mm—ti™—llyD group some of them into — ™luster —nd —ssign the ™luster to — termin—l on the ™onne™tor p—ne to elimin—te ™lutter on the ˜lo™k di—gr—mF • „o ™re—te — ™luster ™ontrol or indi™—torD sele™t — ™luster on the pun™tions ell pun™tions err—y 8 gluster p—letteD pl—™e it on the front p—nelD —nd dr—g ™ontrols or indi™—tors into the ™luster shellF • …se the gluster fun™tions lo™—ted on the pun™tions ell pun™tions —nd m—nipul—te ™lustersF • irror ™he™king tells you why —nd where errors o™™urF • „he error ™luster reports the
gluster p—lette to ™re—te

statusD codeD —nd source of the errorF

• …se the error ™luster ™ontrols —nd indi™—tors to ™re—te error inputs —nd outputs in su˜†ssF

IIP

CHAPTER 6. CLUSTERS

Chapter 7

Plotting Data
7.1 Waveform Charts
„he waveform chart is — numeri™ indi™—tor th—t displ—ys one or more plotsF „he w—veform ™h—rt is lo™—ted on the gontrols qr—ph sndi™—tors p—letteF ‡—veform ™h—rts ™—n displ—y single or multiple plotsF pigure UFI shows the elements of — multiplot w—veform ™h—rtF „wo plots —re displ—yedX ‚—w h—t— —nd ‚unning evgF

Figure 7.1

gh—rts use three di'erent modes to s™roll d—t—D —s shown in the pigure UFPF ‚ightE™li™k the ™h—rt —nd sele™t edv—n™ed …pd—te wode from the short™ut menuF ƒele™t ƒtrip gh—rtD ƒ™ope gh—rtD or ƒweep gh—rt F „he def—ult mode is ƒtrip gh—rtF

IIQ

IIR

CHAPTER 7. PLOTTING DATA

Figure 7.2

e strip ™h—rt shows running d—t— ™ontinuously s™rolling from left to right —™ross the ™h—rtF e s™ope ™h—rt shows one item of d—t—D su™h —s — pulse or w—veD s™rolling p—rtw—y —™ross the ™h—rt from left to the rightF e sweep ™h—rt is simil—r to —n iuq displ—yF e sweep ™h—rt works simil—rly to — s™ope ex™ept it shows the older d—t— on the right —nd the newer d—t— on the left sep—r—ted ˜y — verti™—l lineF „he s™ope ™h—rt —nd sweep ™h—rt h—ve retr—™ing displ—ys simil—r to —n os™illos™opeF fe™—use there is less overhe—d in retr—™ing — plotD the s™ope ™h—rt —nd the sweep ™h—rt displ—y plots signi(™—ntly f—ster th—n the strip ™h—rtF

7.1.1 Wiring Charts
‰ou ™—n wire — s™—l—r output dire™tly to — w—veform ™h—rtF „he d—t— type in the w—veform ™h—rt in pigure UFQ termin—l m—t™hes the input d—t— typeF

Figure 7.3

‡—veform ™h—rts ™—n displ—y multiple plotsF fundle multiple plots together using the fundle fun™tion lo™—ted on the gluster p—letteF sn pigure UFRD the fundle fun™tion ˜undles the outputs of the three †ss to plot on the w—veform ™h—rtF

IIS

Figure 7.4

„he w—veform ™h—rt termin—l ™h—nges to m—t™h the output of the fundle fun™tionF „o —dd more plotsD use the €ositioning tool to resize the fundle fun™tionF

7.2 Temperature Monitor VI
Exercise 7.1:
gomplete the following steps to ˜uild — †s th—t me—sures temper—ture —nd displ—ys it on — w—veform ™h—rtF

7.2.1 Front Panel
IFypen — ˜l—nk †s —nd ˜uild the front p—nel shown in pigure UFSF

Figure 7.5

@—A€l—™e the verti™—l toggle swit™hD lo™—ted on the gontrols futtons 8 ƒwit™hes p—letteD on the front p—nelF v—˜el this swit™h €owerF ‰ou use the swit™h to stop the —™quisitionF @˜A€l—™e — w—veform ™h—rtD lo™—ted on the gontrols qr—ph sndi™—tors p—letteD on the front p—nelF v—˜el the ™h—rt „emper—ture ristoryF „he w—veform ™h—rt displ—ys the temper—ture in re—l timeF

IIT

CHAPTER 7. PLOTTING DATA

@™A „he w—veform ™h—rt legend l—˜els the plot €lot HF …se the v—˜eling tool to tripleE™li™k €lot H in the ™h—rt legendD —nd ™h—nge the l—˜el to „empF @dA„he temper—ture sensor me—sures room temper—tureF …se the v—˜eling tool to dou˜leE™li™k 10.0 in the yE—xis —nd type 90 to res™—le the ™h—rtF ve—ve the xE—xis in its def—ult st—teF @eAgh—nge −10.0 in the yE—xis to 70F @fAv—˜el the yE—xis „emp @heg pA —nd the xE—xis „ime @se™AF

7.2.2 Block Diagram
IFƒele™t ‡indow ƒhow flo™k hi—gr—m to displ—y the ˜lo™k di—gr—mF PFin™lose the two termin—ls in — ‡hile voopD —s shown in the ˜lo™k di—gr—m @pigE ure UFTAF

Figure 7.6

QF‚ightE™li™k the ™ondition—l termin—l —nd sele™t gontinue if „rueF RF‡ire the o˜je™ts —s shown in pigure UFTF

€l—™e the „hermometer †s on the ˜lo™k di—gr—mF ƒele™t pun™tions ell @—A pun™tions ƒele™t — †s —nd n—vig—te to gX\ixer™ises\v—˜†si‡ f—si™s s\„hermometerFviF „his su˜†s returns one temper—ture me—surement from the temper—ture sensorF note: …se the @hemoA „hermometer †s if you do not h—ve — he devi™e —v—il—˜leF @˜A €l—™e the ‡—it …ntil xext ms wultiple fun™tionD lo™—ted on the pun™tions ell pun™tions „ime 8 hi—log p—letteD on the ˜lo™k di—gr—mF @™A ‚ightE™li™k the millise™ond multiple input of the ‡—it …ntil xext ms wulE tiple fun™tionD sele™t gre—te gonst—nt from the short™ut menuD type 500D —nd press the <inter> keyF „he numeri™ ™onst—nt spe™i(es — w—it of 500ms so the loop exe™utes on™e every h—lfEse™ondF

IIU

„o me—sure temper—ture in gelsiusD wire — foole—n „rue ™onE st—nt lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress foole—n p—lette to the „emp ƒ™—le input of the „hermometer †sF gh—nge the s™—les on ™h—rts —nd gr—phs in su˜sequent exer™ises to — r—nge of 20 to 32 inste—d of 70 to 90F
note:

SFƒ—ve the †s —s „emper—ture wonitorFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™E toryF

7.2.3 Run the VI
IFhispl—y the front p—nel ˜y ™li™king it or ˜y sele™ting ‡indow ƒhow pront €—nelF PF…se the yper—ting tool to ™li™k the verti™—l toggle swit™h —nd turn it to the yx positionF QF‚un the †sF „he su˜di—gr—m within the ‡hile voop ˜order exe™utes until the spe™i(ed ™ondition is „rueF por ex—mpleD while the swit™h is on @„rueAD the „hermometer †s t—kes —nd returns — new me—surement —nd displ—ys it on the w—veform ™h—rtF RFgli™k the verti™—l toggle swit™h to stop the —™quisitionF „he ™ondition is p—lseD —nd the loop stops exe™utingF

7.2.4 Front Panel
IFporm—t —nd ™ustomize the xE —nd yEs™—les of the w—veform ™h—rtF @—A‚ightE™li™k the ™h—rt —nd sele™t €roperties from the short™ut menu to displ—y the gh—rt €roperties di—log ˜oxF @˜Agli™k the porm—t —nd €re™ision t—˜F ƒele™t heg p @‰E—xisA in the top pullEdown menuF ƒet the higits of pre™ision to 1F @™Agli™k the €lots t—˜ —nd sele™t di'erent styles for the yE—xisD —s shown in pigE ure UFUF

IIV

CHAPTER 7. PLOTTING DATA

Figure 7.7

@dAƒele™t the ƒ™—les t—˜ —nd sele™t the „ime @se™A @ˆE—xisA in the top pullEdown menuF ƒet the s™—le options —s shown in pigure UFVF ƒet the wultiplier to 0.50 to —™™ount for the SHH ms ‡—it fun™tionF

IIW

Figure 7.8

@eAsn the ƒ™—les t—˜D sele™t the heg p @‰E—xisA in the top pullEdown menuF ƒet the s™—le options —s shown in pigure UFWF

IPH

CHAPTER 7. PLOTTING DATA

Figure 7.9

@fAgli™k the yu ˜utton to ™lose the di—log ˜ox when (nishedF PF‚ightE™li™k the w—veform ™h—rt —nd sele™t h—t— yper—tions gle—r gh—rt from the short™ut menu to ™le—r the displ—y ˜u'er —nd reset the w—veform ™h—rtF
tip:

menuF

‡hen — †s is runningD you ™—n sele™t gle—r gh—rt from the short™ut

QFi—™h time you run the †sD you (rst must turn on the verti™—l toggle swit™h —nd then ™li™k the ‚un ˜utton due to the ™urrent me™h—ni™—l —™tion of the swit™hF wodify the me™h—ni™—l —™tion of the verti™—l toggle swit™h so temper—ture is plotted on the gr—ph e—™h time you run the †sD without h—ving to (rst set the toggle swit™hF @—Aƒtop the †s if it is runningF @˜A…se the yper—ting tool to ™li™k the verti™—l toggle swit™h —nd turn it to the yx positionF @™A‚ightE™li™k the swit™h —nd sele™t h—t— yper—tions w—ke gurrent †—lue hef—ult from the short™ut menuF „his sets the yx position —s the def—ult v—lueF @dA ‚ightE™li™k the swit™h —nd sele™t we™h—ni™—l e™tion v—t™h ‡hen €ressed from the short™ut menuF „his setting ™h—nges the ™ontrol v—lue when you ™li™k it —nd ret—ins the new v—lue until the †s re—ds it on™eF et this point the ™ontrol reverts to its def—ult v—lueD even if you keep pressing the mouse ˜uttonF „his —™tion is simil—r to — ™ir™uit ˜re—ker —nd is useful for stopping ‡hile voops or for getting the †s to perform —n —™tion only on™e e—™h time you set the ™ontrolF

IPI

7.2.5 Run the VI
IF‚un the †sF PF…se the yper—ting tool to ™li™k the verti™—l swit™h to stop the —™quisitionF „he swit™h ™h—nges to the ypp position —nd ™h—nges ˜—™k to yx —fter the ™ondition—l termin—l re—ds the v—lueF QFƒ—ve the †sF ‰ou will use this †s in the „emper—ture ‚unning ever—ge @ƒe™tion UFQA †sF

7.3 Temperature Running Average VI
Exercise 7.2:
gomplete the following steps to modify the „emper—ture wonitor †s to —ver—ge the l—st three temper—ture me—surements —nd displ—y the —ver—ge on — w—veform ™h—rtF

7.3.1 Front Panel
IFypen the „emper—ture wonitor @ƒe™tion UFPA †sF PFƒele™t pile ƒ—ve es —nd ren—me the †s „emper—ture ‚unning ever—geFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

7.3.2 Block Diagram
IFhispl—y the ˜lo™k di—gr—mF PF‚ightE™li™k the right or left ˜order of the ‡hile voop —nd sele™t edd ƒhift ‚egister from the short™ut menu to ™re—te — shift registerF QF‚ightE™li™k the left termin—l of the shift register —nd sele™t edd ilement from the short™ut menu to —dd —n element to the shift registerF RFwodify the ˜lo™k di—gr—m —s in pigure UFIHF

Figure 7.10

IPP

CHAPTER 7. PLOTTING DATA

@—A €ress the <gtrl> key while you ™li™k the „hermometer †s —nd dr—g it outside the ‡hile voop to ™re—te — ™opy of the su˜†sF „he „hermometer †s returns one temper—ture me—surement from the temper—ture sensor —nd initi—lizes the left shift registers ˜efore the loop st—rtsF @˜A €l—™e the gompound erithmeti™ fun™tionD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress xumeri™ p—letteD on the ˜lo™k di—gr—mF „his fun™tion returns the sum of the ™urrent temper—ture —nd the two previous temper—ture re—dingsF …se the €ositioning tool to resize the fun™tion to h—ve three left termin—lsF @™A €l—™e the hivide fun™tionD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress xumeri™ p—letteD on the ˜lo™k di—gr—mF „his fun™tion reE turns the —ver—ge of the l—st three temper—ture re—dingsF @dA ‚ightE™li™k the y termin—l of the hivide fun™tionD sele™t gre—te type 3D —nd press the <inter> keyF gonst—ntD

7.3.3 Run the VI
IF‚un the †sF huring e—™h iter—tion of the ‡hile voopD the „hermometer †s t—kes one temper—ture me—surementF „he †s —dds this v—lue to the l—st two me—surements stored in the left termin—ls of the shift registerF „he †s divides the result ˜y three to (nd the —ver—ge of the three me—surementsD the ™urrent me—surement plus the previous twoF „he †s displ—ys the —ver—ge on the w—veform ™h—rtF xoti™e th—t the †s initi—lizes the shift register with — temper—ture me—surementF

7.3.4 Block Diagram
IFwodify the ˜lo™k di—gr—m —s shown in pigure UFIIF

Figure 7.11

IPQ

@—A €l—™e the fundle fun™tionD lo™—ted on the pun™tions ell pun™tions gluster p—letteD on the ˜lo™k di—gr—mF „his fun™tion ˜undles the —ver—ge —nd ™urrent temper—ture for plotting on the w—veform ™h—rtF PFƒ—ve the †sF ‰ou will use this †s l—ter in the ™ourseF

7.3.5 Run the VI
IF‚un the †sF „he †s displ—ys two plots on the w—veform ™h—rtF „he plots —re overl—idF „h—t isD they sh—re the s—me verti™—l s™—leF PFsf time permitsD ™omplete the option—l stepsF ytherwiseD ™lose the †sF

7.3.6 Optional
gustomize the w—veform ™h—rt —s shown in pigure UFIPF ‰ou ™—n displ—y — plot legendD — s™—le legendD — gr—ph p—letteD — digit—l displ—yD —nd — s™roll˜—rF fy def—ultD — w—veform ™h—rt displ—ys the plot legendF

Figure 7.12

IFgustomize the yE—xisF @—A …se the v—˜eling tool to dou˜leE™li™k 70.0 in the yE—xisD type 75.0D —nd press the <inter> keyF

IPR

CHAPTER 7. PLOTTING DATA
@˜Ab E …se the v—˜eling tool to dou˜leE™li™k the se™ond num˜er from the ˜ottom on the yE—xisD type 80.0D —nd press the <inter> keyF „his num˜er determines the numeri™—l sp—™ing of the yE—xis divisionsF por ex—mpleD if the num˜er —˜ove 75.0 is 77.5D it indi™—tes — yE—xis division of 2.5D ™h—nging the 77.5 to 80.0 reform—ts the yE—xis to multiples of 5.0 @75.0D 80.0D 85.0D —nd so onAF „he w—veform ™h—rt size h—s — dire™t e'e™t on the displ—y of —xis s™—lesF sn™re—se the w—veform ™h—rt size if you en™ounter pro˜lems while ™ustomizing the —xisF
note:

PF‚ightE™li™k the w—veform ™h—rt —nd sele™t †isi˜le stems ƒ™—le vegend from the shortE ™ut menu to displ—y the s™—le legendD —s shown in pigure UFIQF ‰ou ™—n pl—™e the s™—le legend —nywhere on the front p—nelF

Figure 7.13: 1. X-axis, 2. Y-axis, 3. Scale Labels, 4. Scale Lock Button, 5. Autoscale Button, 6. Scale Format Button

QF…se the s™—le legend to ™ustomize e—™h —xisF @—Aw—ke sure the vo™k eutos™—le ˜utton —ppe—rs lo™ked —nd the eutos™—le vih is green so the yE—xis —djusts the minimum —nd m—ximum v—lues to (t the d—t— in the ™h—rtF @˜Agli™k the ƒ™—le porm—t ˜utton to ™h—nge the form—tD pre™isionD m—pping modeD s™—le visi˜ilityD —nd grid options for e—™h —xisF RF…se the plot legend to ™ustomize the plotsF @—A…se the €ositioning tool to resize the plot legend to in™lude two plotsF @˜A…se the v—˜eling tool to ™h—nge „emp to ‚unning evg —nd to ™h—nge €lot I to gurrent „empF sf the text does not (tD use the €ositioning tool to resize the plot legendF @™A‚ightE™li™k the plot in the plot legend to set the line —nd point styles —nd the ™olor of the plot ˜—™kground or tr—™esF SF‚ightE™li™k the w—veform ™h—rt —nd sele™t †isi˜le stems qr—ph €—lette from the short™ut menu to displ—y the gr—ph p—letteD —s shown in pigure UFIRF ‰ou ™—n pl—™e the gr—ph p—lette —nywhere on the front p—nelF

IPS

Figure 7.14:

Menu

1. Cursor Movement Tool, 2. Zoom Button, 3. Panning Tool, 4. Zoom Pull-down

…se the oom ˜utton on the gr—ph p—lette to zoom in or out of se™tions of the ™h—rt or the whole ™h—rtF …se the €—nning tool to pi™k up the plot —nd move it —round on the displ—yF …se the gursor wovement tool to move the ™ursor on the gr—phF TF‚un the †sF ‡hile the †s runsD use the ˜uttons in the s™—le legend —nd gr—ph p—lette to modify the w—veform ™h—rtF sf you modify the —xis l—˜elsD the displ—y might ˜e™ome l—rger th—n the m—ximum size th—t the †s ™—n ™orre™tly presentF
note:

UF…se the yper—ting tool to ™li™k the €ower swit™h —nd stop the †sF VFƒ—ve —nd ™lose the †sF

7.4 Waveform and XY Graphs
†ss with gr—phs usu—lly ™olle™t the d—t— in —n —rr—y —nd then plot the d—t— to the gr—phF pigure UFIS shows the elements of — gr—phF

IPT

CHAPTER 7. PLOTTING DATA

Figure 7.15

„he gr—phs lo™—ted on the gontrols qr—ph sndi™—tors p—lette in™lude the w—veform gr—ph —nd ˆ‰ gr—phF „he w—veform gr—ph plots only singleEv—lued fun™tionsD —s in y = f (x)D with points evenly distri˜uted —long the xE—xisD su™h —s —™quired timeEv—rying w—veformsF ˆ‰ gr—phs displ—y —ny set of pointsD evenly s—mpled or notF ‚esize the plot legend to displ—y multiple plotsF …se multiple plots to s—ve sp—™e on the front p—nel —nd to m—ke ™omp—risons ˜etween plotsF ˆ‰ —nd w—veform gr—phs —utom—ti™—lly —d—pt to multiple plotsF

7.4.1 Single Plot Waveform Graphs
„he w—veform gr—ph —™™epts — single —rr—y of v—lues —nd interprets the d—t— —s points on the gr—ph —nd in™rements the x index ˜y one st—rting —t x = 0F „he gr—ph —lso —™™epts — ™luster of —n initi—l x v—lueD — ∆xD —nd —n —rr—y of y d—t—F ‚efer to the ‡—veform qr—ph †s in the xs ix—mple pinder for ex—mples of the d—t— types th—t singleEplot w—veform gr—phs —™™eptF

7.4.2 Multiplot Waveform Graphs
e multiplot w—veform gr—ph —™™epts — Ph —rr—y of v—luesD where e—™h row of the —rr—y is — single plotF „he gr—ph interprets the d—t— —s points on the gr—ph —nd in™rements the x index ˜y oneD st—rting —t x = 0F ‡ire — Ph —rr—y d—t— type to the gr—phD rightE™li™k the gr—phD —nd sele™t „r—nspose err—y from the short™ut menu to h—ndle e—™h ™olumn of the —rr—y —s — plotF ‚efer to the @‰A wulti €lot I gr—ph in the ‡—veform qr—ph †s in the xs ix—mple pinder for —n ex—mple of — gr—ph th—t —™™epts this d—t— typeF e multiplot w—veform gr—ph —lso —™™epts — ™luster of —n x v—lueD — ∆x v—lueD —nd — Ph —rr—y of y d—t—F „he gr—ph interprets the y d—t— —s points on the gr—ph —nd in™rements the x index ˜y ∆xD st—rting —t x = 0F ‚efer to the @ˆoD dˆD ‰A wulti €lot Q gr—ph in the ‡—veform qr—ph †s in the xs ix—mple pinder for —n ex—mple of — gr—ph th—t —™™epts this d—t— typeF e multiplot w—veform gr—ph —™™epts — ™luster of —n initi—l x v—lueD — ∆x v—lueD —nd —n —rr—y th—t ™ont—ins ™lustersF i—™h ™luster ™ont—ins — point —rr—y th—t ™ont—ins the y d—t—F ‰ou use the

IPU

fundle fun™tion to ˜undle the —rr—ys into ™lustersD —nd you use the fuild err—y fun™tion to ˜uild the resulting ™lusters into —n —rr—yF ‰ou —lso ™—n use the fuild gluster err—yD whi™h ™re—tes —rr—ys of ™lusters th—t ™ont—in inputs you spe™ifyF ‚efer to the @ˆoD dˆD ‰A wulti €lot P gr—ph in the ‡—veform qr—ph †s in the xs ix—mple pinder for —n ex—mple of — gr—ph th—t —™™epts this d—t— typeF

7.4.3 Single Plot XY Graphs
„he singleEplot ˆ‰ gr—ph —™™epts — ™luster th—t ™ont—ins —n x —rr—y —nd — y —rr—yF „he ˆ‰ gr—ph —lso —™™epts —n —rr—y of pointsD where — point is — ™luster th—t ™ont—ins —n x v—lue —nd — y v—lueF ‚efer to the ˆ‰ qr—ph †s in the xs ix—mple pinder for —n ex—mple of singleEplot ˆ‰ gr—ph d—t— typesF

7.4.4 Multiplot XY Graphs
„he multiplot ˆ‰ gr—ph —™™epts —n —rr—y of plotsD where — plot is — ™luster th—t ™ont—ins —n x —rr—y —nd — y —rr—yF „he multiplot ˆ‰ gr—ph —lso —™™epts —n —rr—y of ™lusters of plotsD where — plot is —n —rr—y of pointsF e point is — ™luster th—t ™ont—ins —n x v—lue —nd — y v—lueF ‚efer to the ˆ‰ qr—ph †s in the xs ix—mple pinder for —n ex—mple of multiplot ˆ‰ gr—ph d—t— typesF

7.5 Graph Waveform Array VI
Exercise 7.3:
gomplete the following steps to ˜uild — †s th—t gener—tes —nd plots —n —rr—y on — w—veform gr—ph —nd modify the †s to gr—ph multiple plotsF

7.5.1 Front Panel
IFypen — ˜l—nk †s —nd ˜uild the front p—nel shown in pigure UFITF

Figure 7.16

IPV

CHAPTER 7. PLOTTING DATA

@—A€l—™e —n —rr—yD lo™—ted on the gontrols ell gontrols err—y 8gluster p—letteD on the front p—nelF @˜Av—˜el the —rr—y ‡—veform err—yF @™A€l—™e — numeri™ indi™—torD lo™—ted on the gontrols xumeri™ sndi™—tors p—letteD in the —rr—y shellF @dA€l—™e — w—veform gr—phD lo™—ted on the gontrols qr—ph sndi™—tors p—letteD on the front p—nelF

7.5.2 Block Diagram
IFfuild the ˜lo™k di—gr—m shown in pigure UFIUF

Figure 7.17

@—A €l—™e the „hermometer †s on the ˜lo™k di—gr—mF ƒele™t pun™tions ell pun™tions ƒele™t — †s —nd n—vig—te to gX\ixer™ises\ v—˜†si‡ f—si™s s\„hermometerFviF „his su˜†s returns one temper—ture re—ding during e—™h por voop iter—tionF Note: …se the @hemoA „hermometer †s if you do not h—ve — he devi™e —v—il—˜leF @˜A €l—™e — por voopD lo™—ted on the pun™tions ell pun™tions ƒtru™tures p—letteD on the ˜lo™k di—gr—mF sn this exer™iseD e—™h por voop iter—tion gener—tes — temper—ture v—lue —nd stores it in the indexed tunnelF gre—te — ™onst—nt of IHH for the ™ount termin—lF @™A‡ire the ˜lo™k di—gr—m —s shown in pigure UFIUF Note: ‡hen you wire d—t— to ™h—rts —nd gr—phsD refer to the gontext relp window for more inform—tion —˜out wiring the o˜je™tsD in™luding whether to use — fuild err—y or fundle fun™tionD the order of the inE put termin—lsD —nd so onF sn gener—lD use — w—veform ™h—rt for single s™—l—r pointsD — w—veform gr—ph for —n —rr—y of y v—luesD —nd —n ˆ‰ gr—ph for —n —rr—y of x v—lues —nd —n —rr—y of y v—luesF por ex—mpleD if you move the ™ursor over — w—veform gr—ph termin—l on the ˜lo™k di—gr—mD the inform—tion shown in pigure UFIV —ppe—rs in the gontext relp windowF ƒele™t relp pind ix—mples to l—un™h the xs ix—mple pinderD dou˜leE™li™k pund—ment—lsD dou˜leE™li™k qr—phs —nd gh—rtsD —nd

IPW

dou˜leE™li™k the ‡—veform qr—ph †s to open the ex—mpleF ‚efer to the lesson on h—t— e™quisition —nd ‡—veforms for more inform—tion —˜out the w—veform d—t— typeF

Figure 7.18

PFƒ—ve the †s —s qr—ph ‡—veform err—yFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

7.5.3 Run the VI
IFhispl—y the front p—nel —nd run the †sF „he †s plots the —utoEindexed w—veform —rr—y on the w—veform gr—phF PFinter the index of —ny element in the ‡—veform err—y index displ—y to view the v—lue of th—t elementF sf you enter — num˜er gre—ter th—n the —rr—y size of IHHD the displ—y dimsF QF…se the €ositioning tool to resize ‡—veform err—y to view more th—n one elementF „he indi™—tor displ—ys elements in —s™ending index orderD ˜eginning with the index you enteredF

7.5.4 Block Diagram
sn this ˜lo™k di—gr—mD you use the def—ult v—lue of the initi—l x —nd ∆x v—lue for the w—veformF sn ™—ses where the initi—l x —nd ∆x v—lue —re — spe™i(™ v—lueD use the fundle fun™tion to spe™ify —n initi—l x —nd ∆x v—lue for — w—veform —rr—yF IFwodify the ˜lo™k di—gr—m —s shown in pigure UFIWF

IQH

CHAPTER 7. PLOTTING DATA

Figure 7.19

€l—™e the fundle fun™tionD lo™—ted on the pun™tions ell @—A pun™tions gluster p—letteD on the ˜lo™k di—gr—mF „his fun™tion —ssem˜les the plot elements into — single ™lusterF „he elements in™lude the initi—l x v—lue @20AD the ∆x v—lue @0.5AD —nd the y —rr—y of w—veform d—t—F @˜Agre—te two numeri™ ™onst—nts for the initi—l x v—lue —nd ∆x v—lueF @™Av—˜el the ∆x ™onst—nt ˜y typing hxF …se the v—˜eling tool to sele™t the h —nd sele™t the ƒym˜ol font from the „ext ƒettings pullEdown menu on the tool˜—rF h ™onverts to the delt— sym˜ol @∆AF @dA‡ire the ˜lo™k di—gr—m —s shown in pigure UFIWF PFƒ—ve the †sF

7.5.5 Run the VI
IFhispl—y the front p—nel —nd run the †sF „he gr—ph displ—ys the s—me 100 points of d—t— with — st—rting v—lue of 20 —nd — ∆x of 0.5 for e—™h point on the xE—xisF sn — timed testD this gr—ph would ™orrespond to 50 se™onds worth of d—t— st—rting —t 20 se™ondsF
Note:

gh—nge the initi—l x —nd ∆x v—lues in only one lo™—tionD either the fundle fun™tion or in the ‡—veform qr—ph €roperties di—log ˜oxF

PFsf time permitsD ™omplete the option—l stepsF ytherwiseD ™lose the †sF

7.5.6 Optional
IF‚ightE™li™k the w—veform gr—ph —nd sele™t †isi˜le stems qr—ph €—lette from the short™ut menu to displ—y the gr—ph p—letteF gli™k the oom ˜utton to see the d—t— on the gr—ph in more det—ilF PF‚ightE™li™k the gr—ph —nd sele™t †isi˜le stems ƒ™—le vegend from the short™ut menu to displ—y the s™—le legendF QF‚eturn to the ˜lo™k di—gr—mF gre—te — multipleEplot w—veform gr—ph ˜y ˜uilding — Ph —rr—y of the d—t— type norm—lly p—ssed to — singleEplot gr—phF wodify the ˜lo™k di—gr—m —s shown in pigure UFPHF

IQI

Figure 7.20

@—A €l—™e the ƒine fun™tionD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress xumeri™ ixpress „rigonometri™ p—letteD on the ˜lo™k diE —gr—mF …se this fun™tion to ˜uild —n —rr—y of points th—t represents one ™y™le of — sine w—veF €l—™e the fuild err—y fun™tionD lo™—ted on the pun™tions ell @˜A pun™tions err—y p—letteD on the ˜lo™k di—gr—mF „his fun™tion ™re—tes the d—t— stru™ture to plot two —rr—ys on — w—veform gr—phF @™A €l—™e the pi ™onst—ntD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress xumeri™ ixpress xumeri™ gonst—nts p—letteD on the ˜lo™k di—gr—mF @dA‡ire the ˜lo™k di—gr—m —s shown pigure UFPHF RFƒ—ve the †sF SFhispl—y the front p—nel —nd run the †sF „he two w—veforms plot on the s—me w—veform gr—phF TFhispl—y the ˜lo™k di—gr—mF UF‚ightE™li™k the wire to ‡—veform err—y D sele™t gustom €ro˜es gontrols qr—ph sndi™—tors from the short™ut menuD —nd sele™t — w—veform gr—ph to pl—™e — gr—ph pro˜e on the wireF VFhispl—y the front p—nel —nd run the †sF „he pro˜e shows only the d—t— —rr—yF „he sine w—ve is not present ˜e™—use you did not pl—™e the pro˜e on the wire to whi™h the sine w—ve is ˜undledF WFglose the €ro˜e windowF IHFoom in on — portion of the gr—phF @—A gli™k the oom ˜utton on the gr—ph p—letteD shown in pg IQID to displ—y the oom pullEdown menuF @˜Aƒele™t oom ˜y ˆ ‚e™t—ngleD —s shown in pigure UFPIF

IQP

CHAPTER 7. PLOTTING DATA

Figure 7.21

@™Agli™k —nd dr—g — sele™tion re™t—ngle on the gr—phF ‡hen you rele—se the mouse ˜uttonD the gr—ph displ—y zooms in on the sele™ted —re—F @dA‰ou —lso ™—n sele™t oom ˜y ‰ ‚e™t—ngle or oom ˜y ƒele™ted ere—F ixperiment with these optionsF @eA ƒele™t …ndo oom from the lower left ™orner of the pullEdown menu to undo — zoom or ™li™k the xE—xis single (t ˜utton —nd the yE—xis single (t ˜utton on the s™—le legendD shown in pg IQP —nd pg IQPF IIF …se the €—nning toolD shown in pg IQPD to ™li™k —nd dr—g the gr—ph displ—yF gli™k the xE—xis —nd yE—xis single (t ˜uttons —g—in to restore the displ—y to its origin—l positionF …se the gursor wovement toolD shown in pg IQPD to return the ™ursor to st—nd—rd modeF

IPF

IQFƒ—ve —nd ™lose the †sF

7.6 Temperature Analysis VI
Exercise 7.4:
gomplete the following steps to ˜uild — †s th—t me—sures temper—ture every HFPS se™onds for IH se™ondsF huring the —™quisitionD the †s displ—ys the me—surements in re—l time on — w—veform ™h—rtF efter the —™quisition is ™ompleteD the †s plots the d—t— on — gr—ph —nd ™—l™ul—tes the minimumD m—ximumD —nd —ver—ge temper—turesF „he †s displ—ys the ˜est (t of the temper—ture gr—phF

7.6.1 Front Panel
IFypen — ˜l—nk †s —nd ˜uild the front p—nel shown in pigure UFPPF

IQQ

Figure 7.22

@—Aƒet the point style of the w—veform ™h—rt plot to — sm—ll xF @˜Aride the plot legend of the w—veform ™h—rtF @™Agh—nge the l—˜el of the w—veform ™h—rt to „emper—ture gh—rtF @dAgh—nge the l—˜el of the w—veform gr—ph to „emper—ture qr—phF @eA‚ightE™li™k „emper—ture gh—rt —nd sele™t €roperties from the short™ut menuF yn the ƒ™—les t—˜D ™h—nge the xE—xis multiplier to HFPSF yn the porm—t —nd €re™ision t—˜D ™h—nge the higits of €re™ision to PF „he d—t— for „emper—ture qr—ph will ˜e form—tted on the ˜lo™k di—gr—mF @fA‚esize the plot legend of the w—veform gr—ph to show two plotsF @gAgh—nge the n—me of €lot H to „emp —nd €lot I to pittedF @hAƒet the point style of the w—veform gr—ph „emp plot to — sm—ll squ—reF @iAho not ™re—te the we—nD w—xD —ndwinindi™—tors yetF „hey will ˜e ™re—ted from the ˜lo™k di—gr—mF

7.6.2 Block Diagram
IFfuild the ˜lo™k di—gr—m pigure UFPQF

Figure 7.23

IQR

CHAPTER 7. PLOTTING DATA

@—A €l—™e the „hermometer †s on the ˜lo™k di—gr—mF ƒele™t pun™tions ell pun™tions ƒele™t — †s —nd n—vig—te to gX\ixer™ises\v—˜†si‡ f—si™s s\„hermometerFviF „his su˜†s returns one point of temper—ture d—t—F @˜A €l—™e the ‡—it …ntil xext ms wultiple fun™tionD lo™—ted on the pun™tions ell pun™tions „ime 8 hi—log p—letteD on the ˜lo™k di—gr—mF „his fun™tion ™—uses the por voop to exe™ute every 0.25seconds @ 250msAF @™A €l—™e the err—y w—x 8 win fun™tionD lo™—ted on the pun™tions ell pun™tions err—y p—letteD on the ˜lo™k di—gr—mF „his fun™tion returns the m—xE imum —nd minimum temper—tureF @dA €l—™e the we—n †sD lo™—ted on the pun™tions ell pun™tions en—lyze w—them—ti™s €ro˜—˜ility —nd ƒt—tisti™s p—letteD on the ˜lo™k di—gr—mF „his su˜†s returns the —ver—ge of the temper—ture me—surementsF @eA‚ightE™li™k the output termin—ls of the err—y w—x 8 win fun™tion —nd we—n †s —nd sele™t gre—te sndi™—tor from the short™ut menu to ™re—te the w—xD winD —nd we—n indi™—torsF @fA €l—™e the qener—l €olynomi—l pit †sD lo™—ted on the pun™tions ell pun™tions en—lyze w—them—ti™s gurve pitting p—letteD on the ˜lo™k di—gr—mF „his su˜†s returns —n —rr—y th—t is — polynomi—l (t to the temper—ture —rr—yF €l—™e the fundle fun™tionD lo™—ted on the pun™tions ell @gA pun™tions gluster p—letteD on the ˜lo™k di—gr—mF „his fun™tion —ssem˜les the plot elements into — single ™lusterF €ress the <gtrl> key while you dr—g the fun™tion to ™opy itF „he elements in™lude the initi—l x v—lue @HAD the ∆x v—lue @HFPSAD —nd the y —rr—y of temper—ture d—t—F „he ∆x v—lue of HFPS is required so th—t the †s plots the temper—ture —rr—y points every 0.25 se™onds on the w—veform gr—phF @hA €l—™e the fuild err—y fun™tionD lo™—ted on the pun™tions ell pun™tions err—y p—letteD on the ˜lo™k di—gr—mF „his fun™tion ™re—tes —n —rE r—y of ™lusters from the temper—ture ™luster —nd the ˜est (t ™lusterF @iAgomplete the ˜lo™k di—gr—m —s shownF PFƒ—ve the †s —s „emper—ture en—lysisFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™E toryF

7.6.3 Run the VI
IFhispl—y the front p—nel —nd run the †sF „he gr—ph displ—ys ˜oth the temper—ture d—t— —nd ˜est (t ™urve of the temper—ture w—veformF

IQS

PF„ry di'erent v—lues for the polynomi—l order ™onst—nt on the ˜lo™k di—gr—m —nd run the †s —g—inF QFgh—nge the —ppe—r—n™e of the plots ˜y modifying the plot styles —nd (ll stylesF @—A‚ightE™li™k the „emp plot displ—y in the plot legend —nd sele™t gommon €lots ƒ™—tter €lot from the short™ut menuD the top middle optionF @˜A‚ightE™li™k the pitted plot displ—y in the plot legendD sele™t f—r €lots from the short™ut menuD —nd sele™t the se™ond option in the middle rowF „he w—veform gr—ph should —ppe—r simil—r to the front p—nel in pigure UFPRF

Figure 7.24

RFƒ—ve —nd ™lose the †sF

7.7 Graph Circle VI
Exercise 7.5:
gomplete the following steps to ˜uild — †s th—t plots — ™ir™le using independent x —nd y —rr—ysF

7.7.1 Front Panel
IFypen — ˜l—nk †s —nd ˜uild the front p—nel shown in pigure UFPSF

IQT

CHAPTER 7. PLOTTING DATA

Figure 7.25

@—A€l—™e —n ˆ‰ qr—phD lo™—ted on the gontrols ell gontrols qr—ph p—letteD on the front p—nelF @˜Av—˜el the gr—ph ˆ‰ gir™le qr—phF @™Agh—nge €lot H to gir™le in the plot legendF @dA‚ightE™li™k the plot in the plot legendD sele™t €oint ƒtyle from the short™ut menuD —nd sele™t the sm—ll squ—reF @eAgh—nge the s™—le l—˜els —nd r—ngesD —s shown in pigure UFPSF

7.7.2 Block Diagram
IFfuild the ˜lo™k di—gr—m shown in pigure UFPTF

Figure 7.26

@—A €l—™e the ƒine 8 gosine fun™tionD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress xumeri™ ixpress „rigonometri™ p—letteD on the ˜lo™k di—gr—mF „his fun™tion ˜uilds —n —rr—y of points th—t represents one ™y™le of — sine w—ve —nd — ™osine w—veF

IQU

@˜A €l—™e the fundle fun™tionD lo™—ted on the pun™tions ell pun™tions gluster p—letteD on the ˜lo™k di—gr—mF „his fun™tion —ssem˜les the sine —rr—y —nd the ™osine —rr—y to plot the sine —rr—y —g—inst the ™osine —rr—y to produ™e — ™ir™leF @™A €l—™e the €i wultiplied ˜y P ™onst—ntD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress xumeri™ ixpress xumeri™ gonst—nts p—letteD on the ˜lo™k di—gr—mF PFƒ—ve the †s —s qr—ph gir™leFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF QFhispl—y the front p—nel —nd run the †sF RFglose the †sF

7.8 Intensity Plots
‰ou ™—n use intensity gr—phs —nd ™h—rts to displ—y p—tterned d—t—D su™h —s temper—ture p—tterns —nd topogr—phi™—l terr—inD where the m—gnitude represents —ltitudeF vike the w—veform gr—ph —nd ™h—rtD the intensity gr—ph fe—tures — (xed displ—y while the intensity ™h—rt fe—tures — s™rolling displ—yF „he intensity gr—ph —nd ™h—rt —™™ept — Ph —rr—y of num˜ersF i—™h num˜er in the —rr—y represents — spe™i(™ ™olorF „he indexes of the elements in the Ph —rr—y set the plot lo™—tions for the ™olorsF „he intensity gr—ph or ™h—rt ™—n displ—y up to PST dis™rete ™olorsF pigure UFPU shows — 4 × 3 —rr—y plotted on —n intensity gr—phF „he gr—ph tr—nsposes the —rr—y elementsF

Figure 7.27

7.8.1 Intensity Graph and Chart Options
„he intensity gr—phs —nd ™h—rts sh—re m—ny of the option—l p—rts of the w—veform gr—phs —nd ™h—rtsD whi™h you ™—n show or hide ˜y rightE™li™king the gr—ph or ™h—rt —nd sele™ting †isi˜le stems from the short™ut menuF sn —dditionD ˜e™—use the intensity gr—phs —nd ™h—rts in™lude ™olor —s — third dimensionD — s™—le simil—r to — ™olor r—mp ™ontrol de(nes the r—nge —nd m—ppings of v—lues to ™olorsF pigure UFPV shows the elements of —n intensity gr—phF

IQV

CHAPTER 7. PLOTTING DATA

Figure 7.28

…se the yper—ting or €ositioning tools to rightE™li™k the m—rker next to the ™olor r—mpD sele™t w—rker golor from the short™ut menu to ™h—nge the ™olor —sso™i—ted with — m—rkerD —nd sele™t the ™olor you w—nt from the ™olor pi™ker th—t —ppe—rsF „o —dd m—rkers to — ™olor r—mpD rightE™li™k the ™olor r—mp —nd sele™t edd w—rker from the short™ut menuF „o ™h—nge the v—lue of —n —r˜itr—ry m—rker on — ™olor r—mpD use the yper—ting tool to dr—g the m—rker to the v—lue you w—nt or use the v—˜eling tool to highlight the text of the m—rker —nd enter — new v—lueF

7.9 Intensity Graph Example VI
Exercise 7.6:
sn this exer™iseD you use — †s th—t displ—ys — w—ve interferen™e p—ttern on —n intensity gr—phF ‰ou —lso use the †s to plot — Ph —rr—y of d—t— on the gr—phF

7.9.1 Front Panel
IFypen —nd run the sntensity qr—ph ix—mple @pigure UFPWA †s lo™—ted in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF fy def—ultD the †s plots —n interferen™e w—veformF e €roperty xode on the ˜lo™k di—gr—m de(nes the ™olor r—nge used in the intensity gr—phF ‰ou ™—n ™h—nge the ™olor r—nge ˜y opening the ˜lo™k di—gr—m —nd modifying the golor err—y ™onst—ntF

IQW

Figure 7.29

PFgh—nge the €lot swit™h on the front p—nel to …ser h—t— —nd enter v—lues ˜etween 0.0 —nd 10.0 in the …ser h—t— —rr—y ™ontrolF ‚un the †sF xoti™e how the m—gnitude of e—™h element is m—pped to the intensity gr—phF

Figure 7.30

QFglose the †sF ho not s—ve ™h—ngesF

7.10 Summary, Tips, and Tricks on Plotting Data
• „he w—veform ™h—rt is — spe™i—l numeri™ indi™—tor th—t displ—ys one or more plotsF • „he w—veform ™h—rt h—s the following three upd—te modesX

IRH

CHAPTER 7. PLOTTING DATA

· e strip ™h—rt shows running d—t— ™ontinuously s™rolling from left to right —™ross the ™h—rtF · e s™ope ™h—rt shows one item of d—t—D su™h —s — pulse or w—veD s™rolling p—rtw—y —™ross the ™h—rt from left to the rightF · e sweep displ—y is simil—r to —n iuq displ—yF e sweep works simil—rly to — s™ope ex™ept it shows the old d—t— on the right —nd the new d—t— on the left sep—r—ted ˜y — verti™—l lineF • ‡—veform gr—phs —nd ˆ‰ gr—phs displ—y d—t— from —rr—ysF • ‚ightE™li™k — w—veform ™h—rt or gr—ph or its ™omponents to set —ttri˜utes of the ™h—rt —nd its plotsF • ‰ou ™—n displ—y more th—n one plot on — gr—ph using the fuild err—y fun™tion lo™—ted on the pun™tions ell pun™tions err—y p—lette —nd the fundle fun™tion lo™—ted on the pun™tions ell pun™tions gluster p—lette for ™h—rts —nd ˆ‰ gr—phsF „he gr—ph ˜e™omes — multiplot gr—ph when you wire the —rr—y of outputs to the termin—lF • ‰ou ™—n use intensity ™h—rts —nd gr—phs to plot threeEdimension—l d—t—F „he third dimension is represented ˜y di'erent ™olors ™orresponding to — ™olor m—pping th—t you de(neF sntensity ™h—rts —nd gr—phs —re ™ommonly used in ™onjun™tion with spe™trum —n—lysisD temper—ture displ—yD —nd im—ge pro™essingF • ‡hen you wire d—t— to ™h—rts —nd gr—phsD use the gontext relp window to determine how to wire themF

7.11 Additional Exercises for Plotting Data
Exercise 7.7:
fuild — †s th—t displ—ys two plotsD — r—ndom plot —nd — running —ver—ge of the l—st four pointsD on — w—veform ™h—rt in sweep upd—te modeF …se the following tipsX

• …se — por voop @n = 200A inste—d of — ‡hile voopF • …se — shift register with three left termin—ls to —ver—ge the l—st four d—t— pointsF • …se the ‚—ndom xum˜er @HEIA fun™tion lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress xumeri™ p—lette to gener—te the d—t—F • …se the fundle fun™tion lo™—ted on the pun™tions ell pun™tions group the r—ndom d—t— with the —ver—ged d—t— ˜efore plottingF
gluster p—lette to

ƒ—ve the †s —s ‚—ndom ever—geFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

Exercise 7.8:
fuild — †s th—t ™ontinuously me—sures the temper—ture on™e per se™ond —nd displ—ys the temper—ture on — s™ope ™h—rtF sf the temper—ture goes —˜ove or ˜elow limits spe™i(ed with front p—nel ™ontrolsD the †s turns on — front p—nel vihF „he ™h—rt plots the temper—ture —nd the upper —nd lower temper—ture limitsF ‰ou should ˜e —˜le to set the limit from the following front p—nelF ƒ—ve the †s —s „emper—ture vimitFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

IRI

Exercise 7.9:
wodify the †s you ™re—ted in ixer™ise UFV to displ—y the m—ximum —nd minimum v—lues of the temper—ture tr—™eF …se shift registers —nd two w—x 8 win fun™tions lo™—ted on the pun™tions ell pun™tions gomp—rison p—letteF
tip:

ƒele™t pile ƒ—ve es to s—ve the †s gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

—s

„emp

vimit

@m—xEminAFvi

in

the

IRP

CHAPTER 7. PLOTTING DATA

Chapter 8

Making Decisions in a VI
8.1 Making Decisions with the Select Function
ivery †s des™ri˜ed in this ™ourse so f—r h—s exe™uted in —n order dependent on the )ow of d—t—F „here —re ™—ses when — de™ision must ˜e m—de in — progr—mF por ex—mpleD if a h—ppensD do bY else if c h—ppensD do dF sn textE˜—sed progr—msD this ™—n ˜e —™™omplished with ifEelse st—tementsD ™—se st—tementsD swit™h st—tementsD —nd so onF v—˜†si‡ in™ludes m—ny di'erent w—ys of m—king de™isionsF „he simplest of these methods is the ƒele™t fun™tionF

8.1.1 Select Function
„he ƒele™t fun™tionD lo™—ted on the pun™tions ixpress gomp—rison p—letteD sele™ts ˜etween two v—lues dependent on — foole—n inputF sf the foole—n input s is „rueD this fun™tion returns the v—lue wired to the t inputF sf the foole—n input is p—lseD this fun™tion returns the v—lue wired to the f inputF ‰ou used the ƒele™t fun™tion in the „hermometer †s @ƒe™tion QFSA exer™ise to determine whether to output — p—hrenheit v—lue or — gelsius v—lueD —s shown in the ˜lo™k di—gr—m in pigure VFIF

Figure 8.1

sf the de™ision to ˜e m—de is more ™omplex th—n — ƒele™t fun™tion ™—n exe™uteD — g—se stru™ture m—y ˜e requiredF

IRQ

IRR

CHAPTER 8. MAKING DECISIONS IN A VI

8.2 Case Structures
e g—se stru™ture h—s two or more su˜di—gr—msD or ™—sesF ynly one su˜di—gr—m is visi˜le —t — timeD —nd the stru™ture exe™utes only one ™—se —t — timeF en input v—lue determines whi™h su˜di—gr—m exe™utesF „he g—se stru™ture is simil—r to ™—se st—tements or ifFFFthenFFFelse st—tements in textE˜—sed progr—mming l—ngu—gesF „he ™—se sele™tor identi(er —t the top of the g—se stru™ture ™ont—ins the ™—se sele™tor identi(er in the ™enter —nd de™rement —nd in™rement ˜uttons on e—™h sideF …se the de™rement —nd in™rement ˜uttons to s™roll through the —v—il—˜le ™—sesF ‡ire —n input v—lueD or sele™torD to the sele™tor termin—l to determine whi™h ™—se exe™utesF ‰ou must wire —n integerD foole—n v—lueD stringD or enumer—ted type v—lue to the sele™tor termin—lF ‰ou ™—n position the sele™tor termin—l —nywhere on the left ˜order of the g—se stru™tureF sf you wire — foole—n to the sele™tor termin—lD the stru™ture h—s — „rue ™—se —nd — p—lse ™—seF sf you wire —n integerD stringD or enumer—ted type v—lue to the sele™tor termin—lD the stru™ture ™—n h—ve up to 231 − 1 ™—sesF ‰ou ™—n spe™ify — def—ult ™—se for the g—se stru™tureF ‰ou must spe™ify — def—ult ™—se to h—ndle outEofEr—nge v—lues or expli™itly list every possi˜le input v—lueF por ex—mpleD if you spe™i(ed ™—ses for ID PD —nd Q ˜ut you get —n input of RD the g—se stru™ture exe™utes the def—ult ™—seF ‰ou ™—n spe™ify — def—ult ™—se for the g—se stru™tureF ‰ou must spe™ify — def—ult ™—se to h—ndle outEofEr—nge v—lues or expli™itly list every possi˜le input v—lueF por ex—mpleD if you spe™i(ed ™—ses for ID PD —nd Q ˜ut you get —n input of RD the g—se stru™ture exe™utes the def—ult ™—seF ‚ightE™li™k the g—se stru™ture ˜order to —ddD dupli™—teD removeD or re—rr—nge ™—ses —nd to sele™t — def—ult ™—seF

8.2.1 Selecting a Case
„he ˜lo™k di—gr—m in pigure VFP is —n ex—mple of the „hermometer †s @ƒe™tion QFSA th—t uses — g—se stru™ture inste—d of the ƒele™t fun™tionF st is shown with the „rue ™—se foremost in the g—se stru™tureF

Figure 8.2

„o sele™t — ™—seD type the v—lue in the ™—se sele™tor identi(er or use the v—˜eling tool to edit the v—luesD —s shown in the ˜lo™k di—gr—m in pigure VFQF

IRS

Figure 8.3

yn™e you h—ve sele™ted —nother ™—seD th—t ™—se —ppe—rs foremostD —s shown in the ˜lo™k di—gr—m in pigure VFRF

Figure 8.4

sf you enter — sele™tor v—lue th—t is not the s—me type —s the o˜je™t wired to the sele™tor termin—lD the v—lue —ppe—rs red to indi™—te th—t you must delete or edit the v—lue ˜efore the stru™ture ™—n exe™uteD —nd the †s will not runF elsoD ˜e™—use of the possi˜le roundEo' error inherent in )o—tingE point —rithmeti™D you ™—nnot use )o—tingEpoint numeri™ v—lues —s ™—se sele™tor v—luesF sf you wire — )o—tingEpoint v—lue to the ™—seD v—˜†si‡ rounds the v—lue to the ne—rest even integerF sf you type — )o—tingEpoint v—lue in the ™—se sele™torD the v—lue —ppe—rs red to indi™—te th—t you must delete or edit the v—lue ˜efore the stru™ture ™—n exe™uteF

8.2.2 Input and Output Tunnels
‰ou ™—n ™re—te multiple input —nd output tunnels for — g—se stru™tureF snputs —re —v—il—˜le to —ll su˜di—gr—msD ˜ut su˜di—gr—ms do not need to use e—™h inputF ‡hen you ™re—te —n output tunnel in one ™—seD ™orresponding tunnels —ppe—r —t the s—me position on the ˜order in —ll other ™—sesF sf —t le—st one output tunnel is not de(nedD —ll output tunnels on the stru™ture —ppe—r —s white squ—resF ‡ire to the output tunnel for e—™h unwired ™—seD ™li™king the tunnel e—™h timeF ‰ou ™—n de(ne — di'erent d—t— sour™e for the s—me output tunnel in e—™h ™—seD ˜ut the d—t— types must ˜e ™omp—ti˜leF ‰ou —lso ™—n wire ™onst—nts or ™ontrols to unwired ™—ses ˜y rightE™li™king the tunnel —nd sele™ting gre—te gonst—nt or gre—te gontrol from the short™ut menuF ‰ou ™—n rightE™li™k the output tunnel —nd sele™t …se hef—ult sf …nwired from the short™ut menu to use the def—ult v—lue for the tunnel d—t— type for —ll unwired tunnelsF
Note:

IRT

CHAPTER 8. MAKING DECISIONS IN A VI

8.2.3 Examples
sn the following ex—mplesD the numeri™ v—lues p—ss through tunnels to the g—se stru™ture —nd —re either —dded or su˜tr—™tedD depending on the v—lue wired to the sele™tor termin—lF

Example 8.1: Boolean Case Structure
„he ex—mple in pigure VFS is — foole—n g—se stru™tureF „he ™—ses —re shown overl—pped to simplify the illustr—tionF

Figure 8.5

sf the foole—n ™ontrol wired to the sele™tor termin—l is „rueD the †s —dds the numeri™ v—luesF ytherwiseD the †s su˜tr—™ts the numeri™ v—luesF

Example 8.2: Integer Case Structure
„he ex—mple in pigure VFT is —n integer g—se stru™tureF

Figure 8.6

snteger is — text ring ™ontrol lo™—ted on the gontrols „ext gontrols p—lette th—t —sso™i—tes numeri™ v—lues with text itemsF sf the text ring ™ontrol wired to the sele™tor termin—l is H @—ddAD the †s —dds the numeri™ v—luesF sf the v—lue is I @su˜tr—™tAD the †s su˜tr—™ts the numeri™ v—luesF sf the text ring ™ontrol is —ny other v—lue th—n H @—ddA or I @su˜tr—™tAD the †s —dds the numeri™ v—luesD ˜e™—use th—t is the def—ult ™—seF

IRU

Example 8.3: String Case Structure
„he ex—mple in pigure VFU is — string g—se stru™tureF

Figure 8.7

sf ƒtring is —ddD the †s —dds the numeri™ v—luesF sf ƒtring is su˜tr—™tD the †s su˜tr—™ts the numeri™ v—luesF

Example 8.4: Enumerated Case Structure
„he ex—mple in pigure VFV is —n enumer—ted g—se stru™tureF

Figure 8.8

en enumer—ted ™ontrol gives users — list of items from whi™h to sele™tF „he d—t— type of —n enumer—ted ™ontrol in™ludes inform—tion —˜out the numeri™ v—lues —nd string l—˜els in the ™ontrolF ‡hen you wire —n enumer—ted ™ontrol to the sele™tor termin—l of — g—se stru™tureD the ™—se sele™tor displ—ys — ™—se for e—™h item in the enumer—ted ™ontrolF „he g—se stru™ture exe™utes the —ppropri—te ™—se su˜di—gr—m ˜—sed on the ™urrent item in the enumer—ted ™ontrolF sn the ˜lo™k di—gr—m @pigure VFVAD if inum is —ddD the †s —dds the numeri™ v—luesF sf inum is su˜tr—™tD the †s su˜tr—™ts the numeri™ v—luesF

IRV

CHAPTER 8. MAKING DECISIONS IN A VI

Example 8.5: Error Case Structure
„he ex—mple in pigure VFW is —n error ™luster g—se stru™tureF

Figure 8.9

‡hen you wire —n error ™luster to the sele™tor termin—l of — g—se stru™tureD the ™—se sele™tor l—˜el displ—ys two ™—sesD irror —nd xo irrorD —nd the ˜order of the g—se stru™ture ™h—nges ™olor!red for irror —nd green for xo irrorF „he g—se stru™ture exe™utes the —ppropri—te ™—se su˜di—gr—m ˜—sed on the error st—teF ‡hen —n error ™luster is wired to the sele™tion termin—lD the g—se stru™ture re™ognizes only the st—tus foole—n of the ™lusterF

8.3 Square Root VI
Exercise 8.1:

8.3.1 Front Panel
IFypen — ˜l—nk †s —nd ˜uild the front p—nel shown in pigure VFIHF

Figure 8.10

8.3.2 Block Diagram
IFfuild the ˜lo™k di—gr—m shown in pigure VFIIF

IRW

Figure 8.11

@—A €l—™e the g—se stru™tureD lo™—ted on the pun™tions ixe™ution gontrol p—letteD on the ˜lo™k di—gr—mF gli™k the de™rement or in™rement ˜utton to sele™t the p—lse ™—seF @˜A €l—™e the qre—ter or iqu—l to Hc fun™tionD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress gomp—rison p—letteD on the ˜lo™k di—gr—mF „his fun™tion returns „rue if xum˜er is gre—ter th—n or equ—l to HF ‚ightE™li™k the numeri™ ™onst—nt —nd sele™t €roperties from the shortE @™A ™ut menuF ƒele™t the porm—t —nd €re™ision t—˜F ƒet higits of pre™ision to ID sele™t plo—ting point not—tionD —nd ™li™k the yu ˜utton to ensure there is no d—t— ™onversion ˜etween the ™onst—nt —nd the numeri™ indi™—tor outside the g—se stru™tureF @dA €l—™e the yne futton hi—log fun™tionD lo™—ted on the pun™tions ell pun™tions „ime 8 hi—log p—letteD on the ˜lo™k di—gr—mF „his fun™tion displ—ys — di—log ˜ox th—t ™ont—ins the mess—ge irrorFFFxeg—tive xum˜erF @eA ‚ightE™li™k the mess—ge termin—l of the yne futton hi—log fun™E tionD sele™t gre—te gonst—nt from the short™ut menuD type irrorFFFxeg—tive xum˜er in the ™onst—ntD —nd ™li™k the inter ˜utton on the tool˜—r or ™li™k outside the ™ontrolF ‚efer to the lesson on ƒtrings —nd pile sGy @ƒe™tion WFIA for more inform—tion —˜out stringsF @fAgomplete the di—gr—m —s shown in pigure VFIIF PFƒele™t the „rue ™—se of the g—se stru™tureF €l—™e the ƒqu—re ‚oot fun™tionD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress xumeri™ p—letteD on the ˜lo™k di—gr—mF „his fun™tion returns the squ—re root of xum˜erF ‡ire the fun™tion —s shown in pigure VFIPF

ISH

CHAPTER 8. MAKING DECISIONS IN A VI

Figure 8.12

QFƒ—ve the †s —s ƒqu—re ‚ootFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

8.3.3 Run the VI
IFhispl—y the front p—nel —nd run the †sF ho not run this †s ™ontinuouslyF …nder ™ert—in ™ir™umst—n™esD ™ontinuously running this †s ™ould result in —n endless loopF
caution:

sf xum˜er is positiveD the †s exe™utes the „rue ™—se —nd returns the squ—re root of xum˜erF sf xum˜er is neg—tiveD the †s exe™utes the p—lse ™—seD returns EWWWWWD —nd displ—ys — di—log ˜ox with the mess—ge irrorFFFxeg—tive xum˜erF PFglose the †sF

8.4 Temperature Control VI
Exercise 8.2:

8.4.1 Front Panel
IFypen the „emper—ture ‚unning ever—ge †s @ƒe™tion UFQAF PFwodify the front p—nel —s shown in pigure VFIQF

ISI

Figure 8.13

@—A€l—™e — horizont—l smooth ˜oxD lo™—ted on the gontrols ell gontrols he™or—tions p—letteD on the front p—nelF „his de™or—tion visi˜ly groups the en—lysis itemsF @˜Agre—te — dupli™—te of the €ower foole—n swit™hF v—˜el the new swit™h exev‰ƒsƒF ‚ightE™li™k the swit™h —nd sele™t we™h—ni™—l e™tion ƒwit™h ‡hen €ressed from the short™ut menuF @™A€l—™e — numeri™ ™ontrolD lo™—ted on the gontrols xumeri™ gontrols p—letteD on the front p—nelF v—˜el the ™ontrol righ vimitF @dA€l—™e — round vihD lo™—ted on the gontrols vihs p—letteD on the front p—nelF v—˜el the indi™—tor ‡—rningF @eA€l—™e — numeri™ indi™—tor from the gontrols xumeri™ sndi™—tors p—letteD on the front p—nelF v—˜el the indi™—tor righ †—lueF @fA‚ightE™li™k the ™h—rt displ—y —nd sele™t †isi˜le stems higit—l hispl—y from the short™ut menu to displ—y the digit—l v—luesF QFƒele™t pile ƒ—ve es to s—ve the †s —s „emper—ture gontrolFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

8.4.2 Block Diagram
IFwodify the ˜lo™k di—gr—m —s shown pigure VFIRF inl—rge the ‡hile voop to ™re—te sp—™e for the new itemsF

ISP

CHAPTER 8. MAKING DECISIONS IN A VI

Figure 8.14

€l—™e the g—se stru™tureD lo™—ted on the pun™tions ixe™ution gontrol @—A p—letteD on the ˜lo™k di—gr—mF ‡ire the en—lysis ™ontrol to the sele™tor termin—lF gli™k the de™rement or in™rement ˜utton to sele™t the „rue ™—seF @˜A €l—™e two qre—terc fun™tionsD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress gomp—rison p—letteD on the ˜lo™k di—gr—mF „his fun™tion returns „rue if the temper—ture ex™eeds righ vimitF ytherwiseD the fun™tion returns p—lseF €l—™e the ƒele™t fun™tionD lo™—ted on the pun™tions erithmeti™ 8 @™A gomp—rison ixpress gomp—rison p—letteD on the ˜lo™k di—gr—mF „his fun™tion returns the gre—ter of the two input v—luesF @dA‡ire the „rue ™—se —s shown in pigure VFIRF @eAgli™k the de™rement or in™rement ˜utton to sele™t the p—lse ™—seF PFgomplete the p—lse ™—se of the g—se ƒtru™tureD shown in pigure VFISF

Figure 8.15

@—A‚ightE™li™k the tunnel th—t ™onne™ts to the ‡—rning sndi™—tor —nd sele™t

ISQ

gre—te gonst—ntF …se the yper—ting tool to ™h—nge the foole—n ™onst—nt to p—lseF @˜A‚ightE™li™k the tunnel th—t ™onne™ts to the righ †—lue indi™—tor —nd sele™t gre—te gonst—ntF inter EWWWWW for the v—lue of the ™onst—ntF QFƒ—ve the †sF ‰ou will use this †s l—ter in the ™ourseF

8.4.3 Run the VI
IFhispl—y the front p—nelD type VH in righ vimitD —nd run the †sF sf exev‰ƒsƒ is o'D the †s turns o' the ‡—rning vih —nd displ—ys — v—lue of EWWWWW for righ †—lueF sf exev‰ƒsƒ is onD the †s turns on the ‡—rning vih when the temper—ture is —˜ove righ vimit —nd displ—ys the ™urrent righ †—lueF PFglose the †sF

8.5 Formula Node
…se the pormul— xode to perform m—them—ti™—l oper—tions in the v—˜†si‡ environmentF por —ddition—l fun™tion—lityD you ™—n link to the m—them—ti™s —ppli™—tion we„vef®F

8.5.1 Formula Node
„he pormul— xode is — ™onvenient textE˜—sed node you ™—n use to perform m—them—ti™—l oper—tions on the ˜lo™k di—gr—mF pormul— xodes —re useful for equ—tions th—t h—ve m—ny v—ri—˜les or —re otherwise ™ompli™—ted —nd for using existing textE˜—sed ™odeF ‰ou ™—n ™opy —nd p—ste the existing textE˜—sed ™ode into — pormul— xode r—ther th—n re™re—ting it gr—phi™—lly on the ˜lo™k di—gr—mF gre—te the input —nd output termin—ls of the pormul— xode ˜y rightE™li™king the ˜order of the node —nd sele™ting edd snput or edd yutput from the short™ut menuD then enter the v—ri—˜le for the input or outputF „ype the equ—tion in the stru™tureF i—™h equ—tion st—tement must termin—te with — semi™olon @YAF pormul— xodes —lso ™—n ˜e used for de™ision m—kingF „he ˜lo™k di—gr—m shown in pigure VFIT shows two di'erent w—ys of using —n ifEthen st—tement in — pormul— xodeF „he two stru™tures produ™e the s—me resultF

Figure 8.16

ISR

CHAPTER 8. MAKING DECISIONS IN A VI

„he pormul— xode ™—n perform m—ny di'erent oper—tionsF ‚efer to the LabVIEW Help for more inform—tion —˜out fun™tionsD oper—tionsD —nd synt—x for the pormul— xodeF „he pormul— ixpress †s lo™—ted on the pun™tions erithmeti™ 8 gomp—rison p—lette uses — ™—l™ul—tor interf—™e to ™re—te m—them—ti™—l formul—sF ‰ou ™—n use this ixpress †s to perform most m—th fun™tions th—t — ˜—si™ s™ienti(™ ™—l™ul—tor ™—n ™omputeF ‚efer to the LabVIEW Help for more inform—tion —˜out the pormul— ixpress †sF
Note:

8.6 Formula Node Exercise VI
Exercise 8.3:

8.6.1 Front Panel
IFypen — ˜l—nk †s —nd ˜uild the front p—nel shown in pigure VFIUF

Figure 8.17

8.6.2 Block Diagram
IFfuild the ˜lo™k di—gr—m shown in pigure VFIVF

Figure 8.18

ISS

@—A€l—™e the pormul— xodeD lo™—ted on the pun™tions ell pun™tions ƒtru™tures p—letteD on the ˜lo™k di—gr—mF @˜Agre—te the x input termin—l ˜y rightE™li™king the left ˜order —nd sele™ting edd snput from the short™ut menuF „ype x in the ˜ox th—t —ppe—rsF @™Agre—te the y —nd — output termin—ls ˜y rightE™li™king the right ˜order —nd sele™ting edd yutput from the short™ut menuF inter y —nd —D respe™tivelyD in the ˜oxes th—t —ppe—rF ‰ou must ™re—te output termin—ls for tempor—ry v—ri—˜les like aF Note: ‡hen you ™re—te —n input or output termin—lD you must use — v—ri—˜le n—me th—t ex—™tly m—t™hes the one in the equ—tionF †—ri—˜le n—mes —re ™—se sensitiveF @dA„ype the following equ—tions in the pormul— xodeD where BB is the exponenti—tion oper—torF ‚efer to the LabVIEW Help for more inform—tion —˜out synt—x for the pormul— xodeF

a = tanh(x) + cos(x); y = a**3 + a;
@eAgomplete the ˜lo™k di—gr—m —s shown in pigure VFIVF PFƒ—ve the †s —s pormul— xode ixer™iseFvi in the gX\ixer™ises\ v—˜†si‡ f—si™s s dire™toryF

8.6.3 Run the VI
IFhispl—y the front p—nel —nd run the †sF „he gr—ph displ—ys the plot of the equ—tion y = f 3 (x) + f (x)D where f (x) = tanh (x) + cos (x)F huring e—™h iter—tionD the †s divides the iter—tion termin—l v—lue ˜y ISFHF „he quotient is wired to the pormul— xodeD whi™h ™—l™ul—tes the fun™tion v—lueF „he †s plots the —rr—y —s — gr—phF PFglose the †sF

8.7 Summary, Tips, and Tricks on Making Decisions in a VI
• „he ƒele™t fun™tion sele™ts ˜etween two inputs dependent on — third foole—n inputF • e g—se stru™ture h—s two or more su˜di—gr—msD or ™—sesF ynly one su˜di—gr—m is visi˜le —t — timeD —nd the stru™ture exe™utes only one ™—se —t — timeF • sf the ™—se sele™tor termin—l is — foole—n v—lueD the stru™ture h—s — „rue ™—se —nd — p—lse ™—seF sf the sele™tor termin—l is —n integerD stringD or enumer—ted type v—lueD the stru™ture ™—n h—ve up to 231 − 1 ™—sesF • snputs —re —v—il—˜le to —ll su˜di—gr—ms of — g—se stru™tureD ˜ut su˜di—gr—ms do not need to use e—™h inputF sf —t le—st one output tunnel is not de(nedD —ll output tunnels on the stru™ture —ppe—r —s white squ—resF • ‡hen ™re—ting — su˜†s from — g—se stru™tureD wire the error input to the sele™tor termin—lD —nd pl—™e —ll su˜†s ™ode within the xo irror ™—se to prevent the su˜†s from exe™uting if it re™eives —n errorF • pormul— xodes —re useful for equ—tions th—t h—ve m—ny v—ri—˜les or —re otherwise ™ompliE ™—ted —nd for using existing textE˜—sed ™odeF i—™h equ—tion st—tement must termin—te with — semi™olon @YAF

IST

CHAPTER 8. MAKING DECISIONS IN A VI

8.8 Additional Exercises for Making Decisions in a VI
Exercise 8.4:
fuild — †s th—t uses the pormul— xode to ™—l™ul—te the following equ—tionsX

y1 = x3 + x2 + 5 y2 = mx + b
…se only one pormul— xode for ˜oth equ—tions —nd use — semi™olon @YA —fter e—™h equ—tion in the nodeF ƒ—ve the †s —s iqu—tionsFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

Exercise 8.5:
fuild — †s th—t fun™tions like — ™—l™ul—torF yn the front p—nelD use numeri™ ™ontrols to input two num˜ers —nd — numeri™ indi™—tor to displ—y the result of the oper—tion @eddD ƒu˜tr—™tD hivideD or wultiplyA th—t the †s performs on the two num˜ersF …se — slide ™ontrol to spe™ify the oper—tion to performF ƒ—ve the †s —s g—l™ul—torFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

Exercise 8.6:
wodify the ƒqu—re ‚oot †s @ƒe™tion VFQA so the †s performs —ll ™—l™ul—tions —nd ™ondition ™he™king using the pormul— xodeF ƒele™t pile ƒ—ve es to s—ve the †s —s ƒqu—re ‚oot PFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

Exercise 8.7:
fuild — †s th—t h—s two inputsD „hreshold —nd snput err—yD —nd one outputD yutput err—yF yutput err—y ™ont—ins v—lues from snput err—y th—t —re gre—ter th—n „hresholdF ƒ—ve the †s —s err—y yver „hresholdFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF gre—te —nother †s th—t gener—tes —n —rr—y of r—ndom num˜ers ˜etween H —nd I —nd uses the err—y yver „hreshold †s to output —n —rr—y with the v—lues gre—ter th—n HFSF ƒ—ve the †s —s …sing err—y yver „hresholdFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

Chapter 9

Strings and File I/O
9.1 Strings
e string is — sequen™e of displ—y—˜le or nonEdispl—y—˜le eƒgss ™h—r—™tersF ƒtrings provide — pl—tformE independent form—t for inform—tion —nd d—t—F ƒome of the more ™ommon —ppli™—tions of strings in™lude the followingX

• gre—ting simple text mess—gesF • €—ssing numeri™ d—t— —s ™h—r—™ter strings to instruments —nd then ™onverting the strings to numeri™ v—luesF • ƒtoring numeri™ d—t— to diskF „o store numeri™ v—lues in —n eƒgss (leD you must (rst ™onvert numeri™ v—lues to strings ˜efore writing the numeri™ v—lues to — disk (leF • snstru™ting or prompting the user with di—log ˜oxesF
yn the front p—nelD strings —ppe—r —s t—˜lesD text entry ˜oxesD —nd l—˜elsF

9.1.1 Creating String Controls and Indicators
…se the string ™ontrol —nd indi™—tor lo™—ted on the gontrols „ext gontrols —nd gontrols „ext sndi™—tors p—lettes to simul—te text entry ˜oxes —nd l—˜elsF …se the yper—ting tool or v—˜eling tool to type or edit text in — string ™ontrolF …se the €ositioning tool to resize — front p—nel string o˜je™tF „o minimize the sp—™e th—t — string o˜je™t o™™upiesD rightE™li™k the o˜je™t —nd sele™t the †isi˜le stems ƒ™roll˜—r option from the short™ut menuF ‚ightE™li™k — string ™ontrol or indi™—tor on the front p—nel to sele™t from the displ—y types shown in the following t—˜leF „he t—˜le —lso shows —n ex—mple mess—ge for e—™h displ—y typeF

ISU

ISV

CHAPTER 9. STRINGS AND FILE I/O

xorm—l hispl—y

Display Type

Description
hispl—ys print—˜le ™h—r—™ters usE ing the font of the ™ontrolF xonE print—˜le ™h—r—™ters gener—lly —pE pe—r —s ˜oxesF „here —re four disE pl—y typesF hispl—ys ˜—™ksl—sh ™odes for —ll nonEdispl—y—˜le ™h—r—™tersF hispl—ys —n —sterisk @BA for e—™h ™h—r—™ter in™luding sp—™esF hispl—ys the eƒgss v—lue of e—™h ™h—r—™ter in hex inste—d of the ™h—r—™ter itselfF

Message
„here —re four displ—y typesF \ is — ˜—™ksl—shF

9\9 godes hispl—y €—ssword hispl—y rex hispl—y

„here\s—re\sfour\sdispl—y\stypesF\n\\\sis\s—\s˜—™ksl—shF BBBBBBBBBBBBBBBBBBBBBBBBBBBBB BBBBBBBBBBBBBBBBB SRTV TSUP TSPH TIUP TSPH TTTp USUP PHTR TWUQ UHTg TIUW PHUR UWUH TSUQ PiHe SgPH TWUQ PHTI PHTP TITQ TfUQ TgTI UQTV Pi

9.1.2 Tables
…se the t—˜le ™ontrol lo™—ted on the gontrols ell gontrols vist 8 „—˜le p—lette or the ixpress „—˜le †s lo™—ted on the gontrols „ext sndi™—tors p—lette to ™re—te — t—˜le on the front p—nelF i—™h ™ell in — t—˜le is — stringD —nd e—™h ™ell resides in — ™olumn —nd — rowF „hereforeD — t—˜le is — displ—y for — Ph —rr—y of stringsF „he illustr—tion in pigure WFI shows — t—˜le —nd —ll its p—rtsF

1. Cell Indicated by Index Values, 2. Column Headings, 3. Vertical Scrollbar, 4. Horizontal Scrollbar, 5. Row Headings, 6. Horizontal Index, 7. Vertical Index
Figure 9.1:

ISW

he(ne ™ells in the t—˜le ˜y using the yper—ting tool or the v—˜eling tool to sele™t — ™ell —nd typing text in the sele™ted ™ellF „he t—˜le displ—ys — Ph —rr—y of stringsD so you must ™onvert Ph numeri™ —rr—ys to Ph string —rr—ys ˜efore you ™—n displ—y them in — t—˜le indi™—torF „he row —nd ™olumn he—ders —re not —utom—ti™—lly displ—yed —s in — spre—dsheetF ‰ou must ™re—te Ih string —rr—ys for the row —nd ™olumn he—dersF

9.2 String Functions
…se the ƒtring fun™tions lo™—ted on the pun™tions ell pun™tions ƒtring p—lette to edit —nd m—E nipul—te strings on the ˜lo™k di—gr—mF ƒtring fun™tions in™lude the followingX

String Length E ‚eturns in length the num˜er of ™h—r—™ters @˜ytesA stringD in™luding sp—™e ™h—r—™tersF por ex—mpleD the ƒtring vength fun™tion returns — length of IW for the following stringX
The quick brown fox

Concatenate Strings E gon™—ten—tes input strings —nd Ih —rr—ys of strings into — single output stringF por —rr—y inputsD this fun™tion ™on™—ten—tes e—™h element of the —rr—yF edd inputs to the fun™tion ˜y rightE™li™king —n input —nd sele™ting edd snput from the short™ut menu or ˜y resizing the fun™tionF por ex—mpleD ™on™—ten—te the previous string with the following —rr—y of stringsX
jumped over the l—zy dogF

„he gon™—ten—te ƒtrings fun™tion returns the following stringX

The quick brown fox jumped over the lazy dog.

String Subset E ‚eturns the substring of the input string ˜eginning —t oset —nd ™ont—ining

length num˜er of ™h—r—™tersF „he oset of the (rst ™h—r—™ter in string is HF por ex—mpleD if you use the previous string —s the inputD the ƒtring ƒu˜set fun™tion returns the following substring for —n oset of R —nd — length of SX
quick

Match Pattern E ƒe—r™hes for regular expression in string

˜eginning —t osetD —nd if it (nds — m—t™hD splits string into three su˜stringsF sf no m—t™h is foundD match substring is empty —nd oset past match is −1F por ex—mpleD use — regular expression of X —nd use the following string —s the inputX

VOLTS DC: +1.22863E+1;

ITH

CHAPTER 9. STRINGS AND FILE I/O

„he w—t™h €—ttern fun™tion returns — before substring of †yv„ƒ hgD — match substring of XD —n after substring of CIFPPVTQiCIYD —nd —n oset past match of WF

9.2.1 Converting Numeric Values to Strings with the Build Text Express VI
…se the fuild „ext ixpress †s to ™onvert numeri™ v—lues into stringsF „he fuild „ext ixpress †sD lo™—ted on the pun™tions yutput p—letteD ™on™—ten—tes —n input stringF sf the input is not — stringD this ixpress †s ™onverts the input into — string ˜—sed on the ™on(gur—tion of the ixpress †sF ‡hen you pl—™e the fuild „ext ixpress †s on the ˜lo™k di—gr—mD the gon(gure fuild „ext @pigure WFPA di—log ˜ox —ppe—rsF „he di—log ˜ox @pigure WFPA shows the ixpress †s ™on(gured to —™™ept one inputD volt—geD —nd ™h—nge it to — fr—™tion—l num˜er with — pre™ision of RF „he input ™on™—ten—tes on the end of the string †olt—ge isF e sp—™e h—s ˜een —dded to the end of the †olt—ge is stringF

Figure 9.2

„his ™on(gur—tion produ™es the ˜lo™k di—gr—m shown in pigure WFQF e pro˜e h—s ˜een —dded to view the v—lue of the output stringF „he fuild „ext ixpress †s ™on™—ten—tes the feginning „ext inputD in this ™—se the volt—ge v—lueD —t the end of the ™on(gured textF

ITI

Figure 9.3

9.2.2 Converting Strings to Numeric Values with the Scan From String Function
„he ƒ™—n prom ƒtring fun™tion ™onverts — string ™ont—ining v—lid numeri™ ™h—r—™tersD su™h —s HEWD CD ED eD iD —nd period @FAD to — numeri™ v—lueF „his fun™tion s™—ns the input string —nd ™onverts the string —™™ording to format stringF …se this fun™tion when you know the ex—™t form—t of the input textF „his fun™tion ™—n s™—n input string into v—rious d—t— typesD su™h —s numeri™ or foole—nD ˜—sed on the form—t stringF ‚esize the fun™tion to in™re—se the num˜er of outputsF

Example 9.1:
por ex—mpleD use — format string of 7fD —n initial search location of VD —nd †yv„ƒ hgCIFPViCP —s the input stringD to produ™e —n output of IPVD —s shown in the ˜lo™k di—gr—m shown in pigure WFRF gh—nge the pre™ision of the output ˜y ™h—nging the pre™ision of the indi™—torF

ITP

CHAPTER 9. STRINGS AND FILE I/O

Figure 9.4

sn format stringD 7 ˜egins the form—t spe™i(er —nd f indi™—tes — )o—tingEpoint numeri™ with fr—™tion—l form—tF ‚ightE™li™k the fun™tion —nd sele™t idit ƒ™—n ƒtring from the short™ut menu to ™re—te or edit — format stringF „he idit ƒ™—n ƒtring @pigure WFSA di—log ˜ox shows — ™on(gur—tion for the form—t string 7RfF

Figure 9.5

‚efer to the LabVIEW Help for more inform—tion —˜out form—t spe™i(er synt—xF

9.3 Create String VI
Exercise 9.1:

9.3.1 Front Panel
IFypen — ˜l—nk †s —nd ˜uild the front p—nel shown in pigure WFTF ho not —dd l—˜els for the ™ommentsY they —re shown for inform—tion—l purposes onlyF

ITQ

Figure 9.6

…se the following hints to ˜uild the front p—nelX

• ‚ightE™li™k ƒtring P —nd sele™t 9\9 godes hispl—y from the short™ut menuF „he text typed in ƒtring P is †olts hgX CIFPTiCIF es shown using godes displ—y in the front p—nel —˜oveD there —re two sp—™es —fter the ™olon @\s\sAD —nd the text ends with — ™—rri—ge return @\r\nAF ‰ou m—y see only — \r or — \n for the ™—rri—ge returnF • gh—nge ƒtring vength —nd y'set €—st w—t™h to QPE˜it signed integer @sQPA repE resent—tionF • efter entering text in the ™ontrolsD sele™t yper—te w—ke gurrent †—lues hef—ult to set the text —s the def—ult v—lues of these ™ontrolsF

9.3.2 Block Diagram
IFfuild the ˜lo™k di—gr—m shown in pigure WFUF

ITR

CHAPTER 9. STRINGS AND FILE I/O

Figure 9.7

@—A €l—™e the fuild „ext ixpress †sD lo™—ted on the pun™tions yutput p—letteD on the ˜lo™k di—gr—mF „his fun™tion ™onverts xum˜er to — stringF „he fuild „ext ™on(gur—tion di—log ˜ox —ppe—rsF iF„ype 7re—der7 7xum˜er7 7„r—iler7 in the „ext with †—ri—˜les in €erE ™ents text ˜ox to ™re—te three v—ri—˜lesF „he v—ri—˜les —ppe—r in the gon(gure †—ri—˜les se™tionF iiFƒele™t xum˜er in the †—ri—˜le se™tionF iiiFsn the †—ri—˜le €roperties se™tionD sele™t the xum˜er optionD set the porm—t to porm—t fr—™tion—l num˜erF €l—™e — ™he™km—rk in the …se spe™i(ed pre™ision ™he™k˜ox —nd set the €re™ision to RF ve—ve the re—der —nd „r—iler v—ri—˜les in the def—ult st—teF ivFgli™k the yu ˜utton to ™lose the di—log ˜oxF @˜A €l—™e the ƒtring vength fun™tionD lo™—ted on the pun™tions ell pun™tions ƒtring p—letteD on the ˜lo™k di—gr—mF „his fun™tion returns the numE ˜er of ™h—r—™ters in ‚esultF @™A €l—™e the w—t™h €—ttern fun™tionD lo™—ted on the pun™tions ell pun™tions ƒtring p—letteD on the ˜lo™k di—gr—mF „his fun™tion se—r™hes ƒtring P for — ™olon @XAF ‚ightE™li™k the regul—r expression inputD sele™t gre—te gonst—nt from the short™ut menuD type — ™olon @XAD —nd press the <inter> key on the nuE meri™ keyp—dF ‰ou —lso ™—n ™li™k the inter ˜utton on the tool˜—r to ™omplete the entryF ho not use the <inter> key on the m—in key˜o—rd ˜e™—use in this ™—se it —dds the return ™h—r—™ter to the se—r™h expressionF

ITS

@dA €l—™e the ƒ™—n prom ƒtring fun™tionD lo™—ted on the pun™tions ell pun™tions ƒtring p—letteD on the ˜lo™k di—gr—mF „his fun™tion ™onverts the string —fter the ™olon to — numeri™ v—lueF @eAgomplete the ˜lo™k di—gr—m —s shown in pigure WFUF

9.3.3 Icon & Connector Pane
IFhispl—y the front p—nel —nd ™re—te —n i™on —nd ™onne™tor p—ne so you ™—n use this †s —s — su˜†s l—ter in this ™ourseF ‚efer to the lesson on wodul—r €rogr—mming @ƒe™tion QFIA for more inform—tion —˜out ™re—ting i™ons —nd ™onne™tor p—nesF

Figure 9.8

PFƒ—ve the †s —s gre—te ƒtringFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF ‰ou will use this †s l—ter in the ™ourseF

9.3.4 Run the VI
IFgh—nge the v—lues of the front p—nel ™ontrols —nd run the †sF „he †s ™on™—ten—tes re—derD xum˜erD —nd „r—iler into gom˜ined ƒtring —nd displ—ys the string lengthF „he †s —lso se—r™hes ƒtring P for — ™olonD ™onverts the string following the ™olon to xum˜er yutD —nd displ—ys the index of the (rst ™h—r—™ter —fter the ™olon in y'set €—st w—t™hF PFƒ—ve —nd ™lose the †sF

9.4 File I/O VIs and Functions
pile sGy oper—tions p—ss d—t— to —nd from (lesF …se the pile sGy †ss —nd fun™tions lo™—ted on the pun™tions ell pun™tions pile sGy p—lette to h—ndle —ll —spe™ts of (le sGyD in™luding the followingX

• ypening —nd ™losing d—t— (les • ‚e—ding d—t— from —nd writing d—t— to (les • ‚e—ding from —nd writing to spre—dsheetEform—tted (les • woving —nd ren—ming (les —nd dire™tories • gh—nging (le ™h—r—™teristi™s • gre—tingD modifyingD —nd re—ding ™on(gur—tion (les

ITT

CHAPTER 9. STRINGS AND FILE I/O

9.4.1 File I/O VIs
„he pile sGy p—lette is divided into four types of oper—tionsX highElevelD lowElevelD —dv—n™edD —nd expressF

9.4.1.1 High-Level File I/O VIs
…se the highElevel pile sGy †ss lo™—ted on the top row of the pun™tions ell pun™tions pile sGy p—lette to perform ™ommon sGy oper—tionsF ‚efer to the righEvevel pile sGy †ss @ƒe™tion WFSA se™tion for more inform—tion —˜out the highElevel pile sGy †ssF ‰ou ™—n s—ve time —nd progr—mming e'ort ˜y using the highElevel †ss to write to —nd re—d from (lesF „he highElevel †ss perform re—d or write oper—tions in —ddition to opening —nd ™losing the (leF sf —n error o™™ursD the highElevel †ss displ—y — di—log ˜ox th—t des™ri˜es the errorF ‰ou ™—n ™hoose to h—lt exe™ution or to ™ontinueF roweverD ˜e™—use highElevel †ss en™—psul—te the entire (le oper—tion into one †sD they —re di0™ult to ™ustomize to —ny use other th—n the one intendedF …se lowElevel †ss for more spe™i(™ t—sksF

9.4.1.2 Low-Level and Advanced File I/O VIs and Functions
…se the lowElevel pile sGy †ss —nd fun™tions lo™—ted on the middle row of the pun™tions ell pun™tions pile sGy p—lette —nd the edv—n™ed pile sGy fun™tions lo™—ted on the pun™tions ell pun™tions pile sGy edv—n™ed pile pun™tions p—lette to ™ontrol e—™h (le sGy oper—tion individuE —llyF …se the prin™ip—l lowElevel fun™tions to ™re—te or open — (leD write d—t— to or re—d d—t— from the (leD —nd ™lose the (leF „he lowElevel †ss —nd fun™tions ™—n h—ndle most (le sGy needsF ‚efer to the LabVIEW Basics II: Development Course Manual for more inform—tion —˜out the edv—n™ed pile sGy fun™tionsF

9.4.1.3 File I/O Express VIs
„he ixpress †ss on the pile sGy p—lette in™lude the ‚e—d v—˜†si‡ we—surement pile ixpress †s —nd the ‡rite v—˜†si‡ we—surement pile ixpress †sF „he v—˜†si‡ me—surement d—t— (le @FlvmA is — t—˜Edelimited text (le you ™—n open with — spre—dsheet —ppli™—tion or — textEediting —ppli™—tionF sn —ddition to the d—t— —n ixpress †s gener—tesD the Flvm (le in™ludes inform—tion —˜out the d—t—D su™h —s the d—te —nd time the d—t— w—s gener—tedF ‚efer to the h—t— e™quisition —nd ‡—veforms @ƒe™tion IHFIA se™tionD for more inform—tion on using the pile sGy ixpress †ssF

9.4.2 LabVIEW Data Directory
…se the def—ult v—˜†si‡ h—t— dire™tory to store the d—t— (les v—˜†si‡ gener—tesD su™h —s Flvm or Ftxt (lesF v—˜†si‡ inst—lls the v—˜†si‡ h—t— dire™tory in the def—ult (le dire™tory for your oper—ting system to help you org—nize —nd lo™—te the d—t— (les v—˜†si‡ gener—tesF fy def—ultD the ‡rite v—˜†si‡ we—surement pile ixpress †s stores the Flvm (les it gener—tes in this dire™toryD —nd the ‚e—d v—˜†si‡ we—surement pile ixpress †s re—ds from this dire™toryF „he hef—ult h—t— hire™tory ™onst—ntD shown in pg ITTD —nd the hef—ult h—t— hire™tory property —lso return the v—˜†si‡ h—t— dire™tory ˜y def—ultF ƒele™t „ools yptions —nd sele™t €—ths from the top pullEdown menu to spe™ify — di'erent def—ult d—t— dire™toryF „he def—ult d—t— dire™tory di'ers from the def—ult dire™toryD whi™h is the dire™tory you spe™ify for new †ssD ™ustom ™ontrolsD †s templ—tesD or other v—˜†si‡ do™uments you ™re—teF

ITU

9.4.3 Basics of File I/O
e typi™—l (le sGy oper—tion involves the following pro™essX IF gre—te or open — (leF sndi™—te where —n existing (le resides or where you w—nt to ™re—te — new (le ˜y spe™ifying — p—th or responding to — di—log ˜ox to dire™t v—˜†si‡ to the (le lo™—tionF efter the (le opensD — refnum represents the (leF e referen™e num˜erD or refnumD is — unique identi(er for —n o˜je™tD su™h —s — (leD devi™eD or network ™onne™tionF PF ‚e—d from or write to the (leF QF glose the (leF

9.5 High-Level File I/O VIs
wost pile sGy †ss —nd fun™tions perform only one step in — (le sGy oper—tionF roweverD some highElevel pile sGy †ss designed for ™ommon (le sGy oper—tions perform —ll four stepsF elthough these †ss —re not —lw—ys —s e0™ient —s the lowElevel fun™tionsD you might (nd them e—sier to useF …se the highElevel pile sGy †ss lo™—ted on the top row of the pile sGy p—lette to perform ™ommon sGy oper—tionsD su™h —s writing to or re—ding from the following types of d—t—X

• gh—r—™ters to or from text (les • vines from text (les • Ih or Ph —rr—ys of singleEpre™ision numeri™ v—lues to or from spre—dsheet text (les • Ih or Ph —rr—ys of singleEpre™ision numeri™ v—lues or signed ITE˜it integers to or from ˜in—ry (les
righElevel pile sGy †ss in™lude the followingX

Write to Spreadsheet File E gonverts — Ph or Ih —rr—y of singleEpre™ision num˜ers to —

text string —nd writes the string to — new ˜yte stre—m (le or —ppends the string to —n existing (leF ‰ou —lso ™—n tr—nspose the d—t—F „he †s opens or ™re—tes the (le ˜efore writing to it —nd ™loses it —fterw—rdsF ‰ou ™—n use this †s to ™re—te — text (le re—d—˜le ˜y most spre—dsheet —ppli™—tionsF

Read From Spreadsheet File E ‚e—ds — spe™i(ed num˜er of lines or rows from — numeri™
text (le ˜eginning —t — spe™i(ed ™h—r—™ter o'set —nd ™onverts the d—t— to — Ph singleEpre™ision —rr—y of num˜ersF „he †s opens the (le ˜efore re—ding from it —nd ™loses it —fterw—rdsF ‰ou ™—n use this †s to re—d — spre—dsheet (le s—ved in text form—tF

Write Characters to File E ‡rites — character string

to — new ˜yte stre—m (le or —ppends the string to —n existing (leF „he †s opens or ™re—tes the (le ˜efore writing to it —nd ™loses it —fterw—rdsF

Read Characters From File E ‚e—ds — spe™i(ed num˜er of ™h—r—™ters from — ˜yte stre—m (le ˜eginning —t start of read osetF „he †s opens the (le ˜efore re—ding from it —nd ™loses it —fterw—rdsF Read Lines From File E ‚e—ds — spe™i(ed num˜er of lines from — text or ˜in—ry (le ˜eginning —t — spe™i(ed ™h—r—™ter o'setF „he †s opens the (le ˜efore re—ding from it —nd ™loses it —fterw—rdsF Binary File VIs E „hese †ss re—d from —nd write to ˜in—ry (lesF
singleEpre™ision num˜ersF h—t— ™—n ˜e integers or

ITV

CHAPTER 9. STRINGS AND FILE I/O

9.6 Spreadsheet Example VI
Exercise 9.2:

9.6.1 Front Panel
IFypen the ƒpre—dsheet ix—mple †s lo™—ted in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF „he front p—nel in pigure WFW is —lre—dy ˜uiltF

Figure 9.9

9.6.2 Run the VI
IF‚un the †sF „he †s gener—tes — Ph —rr—y of 128rows × 3columnsF „he (rst ™olumn ™ont—ins d—t— for — sine w—veformD the se™ond ™olumn ™ont—ins d—t— for — noise w—veE formD —nd the third ™olumn ™ont—ins d—t— for — ™osine w—veformF „he †s plots e—™h ™olumn in — gr—ph —nd displ—ys the d—t— in — t—˜leF PF‡hen the ghoose (le to write di—log ˜ox —ppe—rsD s—ve the (le —s w—veFtxt in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™tory —nd ™li™k the yu ˜uttonF v—terD you will ex—mine this (leF

9.6.3 Block Diagram
IFhispl—y —nd ex—mine the ˜lo™k di—gr—m @pigure WFIHA for this †sF

ITW

Figure 9.10

„he ƒine €—ttern †s lo™—ted on the pun™tions ell pun™tions en—lyze ƒign—l €ro™essing ƒign—l qener—tion p—lette returns — numeri™ —rr—y of IPV elements ™ont—ining — sine p—tternF „he ™onst—nt WHFHD in the se™ond inst—n™e of the ƒine €—ttern †sD spe™i(es the ph—se of the sine p—ttern or ™osine p—tternF „he …niform ‡hite xoise †s lo™—ted on the pun™tions ell pun™tions en—lyze ƒign—l €ro™essing ƒign—l qener—tion p—lette returns — nuE meri™ —rr—y of IPV elements ™ont—ining — noise p—tternF „he fuild err—y fun™tion lo™—ted on the pun™tions ell pun™tions err—y p—lette ˜uilds the Ph —rr—y from the sine —rr—yD noise —rr—yD —nd ™osine —rr—yD —s shown in pigure WFIIF

Figure 9.11

„he „r—nspose Ph err—y fun™tion lo™—ted on the pun™tions ell pun™tions err—y p—lette re—rr—nges the elements of the Ph —rr—y so element {i, j} ˜e™omes element {j, i}D —s in pigure WFIPF

IUH

CHAPTER 9. STRINGS AND FILE I/O

Figure 9.12

„he ‡rite „o ƒpre—dsheet pile †s lo™—ted on the pun™tions ell pun™tions pile sGy p—lette form—ts the Ph —rr—y into — spre—dsheet string —nd writes the string to — (leF „he string h—s the form—t shown in pigure WFIQD where —n —rrow indi™—tes — t—˜D —nd — p—r—gr—ph sym˜ol @¶A indi™—tes —n end of line ™h—r—™terF

Figure 9.13

„he xum˜er „o pr—™tion—l ƒtring fun™tion lo™—ted on the pun™tions ell pun™tions ƒtring ƒtringGxum˜er gonversion p—lette ™onverts —n —rr—y of nuE

IUI

meri™ v—lues to —n —rr—y of strings th—t the t—˜le displ—ysF PFglose the †sF ho not s—ve ™h—ngesF „his ex—mple stores only three —rr—ys in the (leF „o in™lude more —rr—ysD in™re—se the num˜er of inputs to the fuild err—y fun™tionF
Note:

9.6.4 Optional
ypen the w—veFtxt (le using — word pro™essor or spre—dsheet —ppli™—tion —nd view its ™ontentsF IFypen — word pro™essor or spre—dsheet —ppli™—tionD su™h —s @Windows A xotep—d or ‡ord€—dD @Mac OS A ƒimple„extD or @UNIX A „ext iditorF PFypen w—veFtxtF „he sine w—veform d—t— —ppe—r in the (rst ™olumnD the r—ndom w—veform d—t— —ppe—r in the se™ond ™olumnD —nd the ™osine w—veform d—t— —ppe—r in the third ™olumnF QFixit the word pro™essor or spre—dsheet —ppli™—tion —nd return to v—˜†si‡F

9.7 Low-Level File I/O VI and Functions
…se the following lowElevel pile sGy †s —nd fun™tions to perform ˜—si™ (le sGy oper—tionsX

Open/Create/Replace File E ypens —n existing (leD ™re—tes — new (leD or repl—™es —n existing (leD progr—mm—ti™—lly or inter—™tively using — (le di—log ˜oxF ‰ou ™—n option—lly spe™ify — di—log promptD def—ult (le n—meD st—rt p—thD or (lter p—tternF sf (le p—th is emptyD the †s displ—ys — di—log ˜ox from whi™h you ™—n sele™t — (leF Read File E ‚e—ds d—t— from —n open (le spe™i(ed ˜y refnum —nd returns it in d—t—F ‚e—ding ˜egins —t the ™urrent (le m—rk or — lo™—tion spe™i(ed ˜y pos mode —nd pos o'setF row the d—t— is re—d depends on the form—t of the spe™i(ed (leF Write File
E ‡rites d—t— to —n open (le spe™i(ed ˜y refnumF ‡riting ˜egins —t — lo™—tion spe™i(ed ˜y pos mode —nd pos o'set for ˜yte stre—m (les —nd —t the end of the (le for d—t—log (lesF d—t—D he—derD —nd the form—t of the spe™i(ed (le determine the —mount of d—t— writtenF

Close File E

gloses —n open (le spe™i(ed ˜y refnum —nd returns the p—th to the (le —sso™i—ted with the refnumF irror sGy oper—tes uniquely in this fun™tionD whi™h ™loses reg—rdE less of whether —n error o™™urred in — pre™eding oper—tionF „his ensures th—t (les —re ™losed ™orre™tlyF

IUP

CHAPTER 9. STRINGS AND FILE I/O

9.7.1 Error Handling
„he lowElevel pile sGy †ss —nd fun™tions return error inform—tionF ‡ire the error inform—tion from the ˜eginning of the †s to the endF sn™lude —n error h—ndler †sD su™h —s the ƒimple irror r—ndler @pg IUPA †s lo™—ted on the „ime 8 hi—log p—letteD —t the end of the †s to determine if the †s r—n without errorsF …se the error in —nd error out ™lusters in e—™h †s you use or ˜uild to p—ss the error inform—tion through the †sF

9.7.2 Saving Data in a New or Existing File
‰ou ™—n write —ny d—t— type to — (le you open or ™re—te with the pile sGy †ss —nd fun™tionsF sf other users or —ppli™—tions need to —™™ess the (leD write string d—t— in eƒgss form—t to the (leF ‚efer to the LabVIEW Basics II: Development Course Manual for more inform—tion —˜out writing v—˜†si‡ d—t—log or ˜in—ry (lesF ‰ou ™—n —™™ess (les either progr—mm—ti™—lly or inter—™tively through — (le di—log ˜oxF „o —™™ess — (le through — di—log ˜oxD do not wire (le p—th in the ypenGgre—teG‚epl—™e pile †sF roweverD you ™—n s—ve time ˜y progr—mm—ti™—lly wiring the def—ult (len—me —nd p—th to the †sF pg IUP des™ri˜es how p—thn—mes —re org—nizedF ‡indows …xsˆ

Platform

w—™ yƒ

gonsists of the drive n—meD — ™olonD ˜—™ksl—shEsep—r—ted dire™tory n—mesD —nd the (len—meF por ex—mpleD ™X\testd—t—\testIFd—t is the p—thn—me to — (le n—med testIFd—t in the testd—t— dire™toryF …xsˆ gonsists of forw—rd sl—shEsep—r—ted dire™tory n—mes —nd the (leE n—meF por ex—mpleD GhomeGtestd—t—GtestIFd—t is the p—thn—me to — (le n—med testIFd—t in the testd—t— dire™tory in the Ghome dire™toryF pileE n—mes —nd p—thn—mes —re ™—se sensitiveF gonsists of the volume n—me @the n—me of the diskAD — ™olonD ™olonEsep—r—ted folder n—mesD —nd the (len—meF por ex—mpleD r—rd hiskXtestd—t—XtestIFd—t is the p—thn—me to — (le n—med testIFd—t in — folder n—med testd—t— on — disk n—med r—rd hiskF

Pathname

„he ˜lo™k di—gr—m shown in pigure WFIR shows how to write string d—t— to — (le while progr—mE m—ti™—lly wiring the (len—me —nd p—thn—meF sf the (le —lre—dy existsD it is repl—™edY otherwise — new (le is ™re—tedF

IUQ

Figure 9.14

„he ypenGgre—teG‚epl—™e pile †s opens the (le testIFd—tF „he †s —lso gener—tes — refnum —nd —n error ™lusterF ‡hen you open — (leD devi™eD or network ™onne™tionD v—˜†si‡ ™re—tes — refnum —sso™i—ted with th—t (leD devi™eD or network ™onne™tionF ell oper—tions you perform on open (lesD devi™esD or network ™onne™tions use refnums to identify e—™h o˜je™tF „he error ™luster —nd refnum p—ss in sequen™e from one node to the nextF fe™—use — node ™—nnot exe™ute until it re™eives —ll its inputsD p—ssing these two p—r—meters for™es the nodes to run in order —nd ™re—tes — d—t— dependen™yF „he ypenGgre—teG‚epl—™e pile †s p—sses the refnum —nd error ™luster to the ‡rite pile fun™tionD whi™h writes the d—t— to diskF ‡hen the ‡rite pile fun™tion (nishes exe™utionD it p—sses the refnum —nd error ™luster to the glose pile fun™tionD whi™h ™loses the (leF „he ƒimple irror r—ndler †s ex—mines the error ™luster —nd displ—ys — di—log ˜ox if —n error o™™urredF sf —n error o™™urs in one nodeD su˜sequent nodes do not exe™uteD —nd the †s p—sses the error ™luster to the ƒimple irror r—ndler †sF

9.8 File Writer VI
Exercise 9.3:

9.8.1 Front Panel
IFypen — ˜l—nk †s —nd ˜uild the front p—nel shown in pigure WFISF

IUR

CHAPTER 9. STRINGS AND FILE I/O

Figure 9.15

@—A€l—™e — p—th indi™—tor lo™—ted on the gontrols „ext sndi™—tors p—lette on the front p—nelF „his indi™—tor displ—ys the p—th for the d—t— (le you ™re—teF @˜A‚ightE™li™k the ƒtring to ‡rite ™ontrol —nd sele™t †isi˜le stems ƒ™roll˜—r from the short™ut menu to displ—y — s™roll˜—rF

9.8.2 Block Diagram
IFfuild the ˜lo™k di—gr—m shown in pigure WFITF

Figure 9.16

@—A €l—™e the gre—te ƒtring †s from the previous exer™ise1 on the ˜lo™k di—gr—mF ƒele™t pun™tions ell pun™tions ƒele™t — †s —nd n—vig—te to gX\ixer™ises\v—˜†si‡ f—si™s s\gre—te ƒtringFviF „his su˜†s ™on™—ten—tes the three input strings to one ™om˜ined stringF @˜A €l—™e the ypenGgre—teG‚epl—™e pile †sD lo™—ted on the pun™tions ell pun™tions pile sGy p—letteD on the ˜lo™k di—gr—mF „his †s displ—ys — di—log ˜ox
1 "" <http://cnx.org/content/mex81/latest/>

IUS

to open or ™re—te — (leF ‚ightE™li™k the prompt inputD sele™t gre—te gonst—nt from the short™ut menuD —nd type inter pilen—me in the ™onst—ntF ‡hen the †s runsD — (le n—vig—tion di—log ˜ox —ppe—rs with inter pilen—me —s the title of the windowF ‚ightE™li™k the fun™tion inputD sele™t gre—te gonst—nt from the short™ut menuD —nd ™li™k the ™onst—nt with the yper—ting tool to sele™t ™re—te or repl—™eF @™A €l—™e the ‡rite pile fun™tionD lo™—ted on the pun™tions ell pun™tions pile sGy p—letteD on the ˜lo™k di—gr—mF „his fun™tion writes the ™on™—ten—ted strings to the (leF @dA €l—™e the glose pile fun™tionD lo™—ted on the pun™tions ell pun™tions sGy p—letteD on the ˜lo™k di—gr—mF „his fun™tion ™loses the (leF pile

@eA €l—™e the ƒimple irror r—ndler †sD lo™—ted on the pun™tions ell pun™tions „ime 8 hi—log p—letteD on the ˜lo™k di—gr—mF „his fun™tion ™he™ks the error ™luster —nd displ—ys — di—log ˜ox if —n error o™™ursF @fAgomplete the ˜lo™k di—gr—m —s shown in pigure WFITF PFƒ—ve the †s —s pile ‡riterFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

9.8.3 Run the VI
IFinter v—lues in the front p—nel ™ontrols —nd run the †sF en inter pilen—me di—log ˜ox —ppe—rsF PF„ype demo(leFtxt —nd ™li™k the ƒ—ve or yu ˜utton to s—ve the (leF „he †s writes the ƒtring to ‡riteD xumeri™ to ‡riteD —nd …nit to ‡rite v—lues to the (leF QFglose the †sF

9.9 File Reader VI
Exercise 9.4:

9.9.1 Front Panel
IFypen — ˜l—nk †s —nd ˜uild the front p—nel shown in pigure WFIU using the (le p—th ™ontrol lo™—ted on the gontrols „ext gontrols p—lette —nd — string indi™—tor lo™—ted on the gontrols „ext sndi™—tors p—letteF

IUT

CHAPTER 9. STRINGS AND FILE I/O

Figure 9.17

9.9.2 Block Diagram
IFfuild the ˜lo™k di—gr—m shown in pigure WFIVF

Figure 9.18

€l—™e the ypenGgre—teG‚epl—™e pile †sD lo™—ted on the pun™tions ell @—A pun™tions pile sGy p—letteD on the ˜lo™k di—gr—mF „his †s displ—ys — di—log ˜ox th—t you use to open or ™re—te — (leF ‚ightE™li™k the prompt inputD sele™t gre—te gonst—nt from the short™ut menuD —nd type ƒele™t pilen—me in the ™onE st—ntF ‚ightE™li™k the fun™tion inputD sele™t gre—te gonst—nt from the short™ut menuD —nd ™li™k the ™onst—nt with the yper—ting tool to sele™t openF @˜A €l—™e the ‚e—d pile fun™tionD lo™—ted on the pun™tions ell pun™tions pile sGy p—letteD on the ˜lo™k di—gr—mF „his fun™tion re—ds ™ount ˜ytes of d—t— from the (le st—rting —t the ˜eginning of the (leF @™A €l—™e the glose pile fun™tionD lo™—ted on the pun™tions ell pun™tions sGy p—letteD on the ˜lo™k di—gr—mF „his fun™tion ™loses the (leF pile

@dA €l—™e the ƒimple irror r—ndler †sD lo™—ted on the pun™tions ell pun™tions „ime 8 hi—log p—letteD on the ˜lo™k di—gr—mF „his †s ™he™ks the error ™luster —nd displ—ys — di—log ˜ox if —n error o™™ursF @eAgomplete the ˜lo™k di—gr—m —s shown in pigure WFIVF PFƒ—ve the †s —s pile ‚e—derFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

IUU

9.9.3 Run the VI
IFhispl—y the front p—nel —nd use the yper—ting tool to ™li™k the frowse ˜utton in the p—th ™ontrolF PFx—vig—te to demo(leFtxt —nd ™li™k the ypen or yu ˜uttonF QF‚un the †sF ƒtring ‚e—d from pile displ—ys the ™ontents of the (leF RFsf time permitsD ™omplete the ™h—llenge step @ƒe™tion WFWFRAF ytherwiseD s—ve —nd ™lose the †sF

9.9.4 Challenge
IFwodify the †s so it p—rses the numeri™ v—lue —nd displ—ys the numeri™ v—lue in — numeri™ indi™—torF efter you (nishD s—ve —nd ™lose the †sF
tip:

—™terF

…se the w—t™h €—ttern fun™tion to se—r™h for the (rst numeri™ ™h—rE

9.10 Formatting Spreadsheet Strings
„o write d—t— to — spre—dsheet (leD you must form—t the string —s — spre—dsheet stringD whi™h is — string th—t in™ludes delimitersD su™h —s t—˜sF sn m—ny spre—dsheet —ppli™—tionsD the t—˜ ™h—r—™ter sep—r—tes ™olumnsD —nd the end of line ™h—r—™ter sep—r—tes rowsF
Note:

…se the end of line ™onst—nt lo™—ted on the pun™tions ell pun™tions ƒtring p—lette to ensure port—˜ility of †ss —mong pl—tformsF @Windows A „he ™onst—nt inserts — ™—rri—ge return —nd — linefeedF @Mac OS A „he ™onst—nt inserts — ™—rri—ge returnF @UNIX A „he ™onst—nt inserts — linefeedF

…se the ‡rite „o ƒpre—dsheet pile †s or the err—y „o ƒpre—dsheet ƒtring fun™tion to ™onvert — set of num˜ers from — gr—phD — ™h—rtD or —n —™quisition into — spre—dsheet stringF sf you w—nt to write num˜ers —nd text to — spre—dsheet or word pro™essing —ppli™—tionD use the ƒtring fun™tions —nd the err—y fun™tions to form—t the d—t— —nd to ™om˜ine the stringsF „hen write the d—t— to — (leF

9.10.1 Format Into File
…se the porm—t snto pile fun™tion to form—t stringD numeri™D p—thD —nd foole—n d—t— —s text —nd write the text to — (leF yften you ™—n use this fun™tion inste—d of sep—r—tely form—tting the string with the porm—t snto ƒtring fun™tion or fuild „ext ixpress †s —nd writing the resulting string with the ‡rite gh—r—™ters „o pile †s or ‡rite pile fun™tionF …se the porm—t snto pile fun™tion to determine the order in whi™h the d—t— —ppe—rs in the text (leF roweverD you ™—nnot use this fun™tion to —ppend d—t— to — (le or overwrite existing d—t— in — (leF por these oper—tionsD use the porm—t snto ƒtring fun™tion with the ‡rite pile fun™tionF ‰ou ™—n wire — refnum or p—th to the input (le termin—l of the porm—t snto pile fun™tionD or you ™—n le—ve this input unwired for — di—log ˜ox to prompt you for the (len—meF sn the ˜lo™k di—gr—m shown in pigure WFIWD the ypenGgre—teG‚epl—™e pile †s opens — (leD —nd the por voop exe™utes (ve timesF „he porm—t snto pile fun™tion ™onverts the iter—tion ™ount —nd the r—ndom num˜er to strings —nd pl—™es the t—˜ —nd end of line ™h—r—™ters in the ™orre™t positions to ™re—te two ™olumns —nd one row in spre—dsheet form—tF efter the loop ™ompletes (ve iter—tionsD the (le ™losesD —nd the †s ™he™ks the error ™onditionF

IUV

CHAPTER 9. STRINGS AND FILE I/O

Figure 9.19

„his †s ™re—tes this text (leD where —n —rrow @→A indi™—tes — t—˜D —nd — p—r—gr—ph sym˜ol @¶A indi™—tes —n end of line ™h—r—™terF

0→ 1→ 2→ 3→ 4→

0.798141¶ 0.659364¶ 0.581409¶ 0.526433¶ 0.171062¶

‰ou ™—n open the previous text (le in — spre—dsheet —ppli™—tion to displ—y the spre—dsheet shown in pigure WFPHF

Figure 9.20

9.10.2 Write LabVIEW Measurement File
sn the ˜lo™k di—gr—m shown in pigure WFPID the ‡rite v—˜†si‡ we—surement pile ixpress †s in™ludes the openD writeD ™loseD —nd error h—ndling fun™tionsF st —lso h—ndles form—tting the string with either — t—˜ or ™omm— delimiterF „he werge ƒign—ls fun™tion ™om˜ines the iter—tion ™ount —nd the r—ndom num˜er into the dyn—mi™ d—t— typeF

IUW

Figure 9.21

„he di—log ˜ox in pigure WFPP shows the ™on(gur—tion for the ‡rite v—˜†si‡ we—surement pile ixpress †sF

Figure 9.22

IVH

CHAPTER 9. STRINGS AND FILE I/O

„his †s ™re—tes — Flvm (le whi™h you ™—n open in — spre—dsheet —ppli™—tionF pigure WFPQ shows —n ex—mple of the spre—dsheet ™re—ted ˜y the previous ™on(gur—tion of the ‡rite v—˜†si‡ we—E surement pile ixpress †sF

Figure 9.23

‚efer to the lesson on h—t— e™quisition —nd ‡—veforms @ƒe™tion WFUAD for more inform—tion —˜out the ‡rite v—˜†si‡ we—surement pile —nd ‚e—d v—˜†si‡ we—surement pile ixpress †ssF

9.11 Temperature Logger VI
Exercise 9.5:

9.11.1 Block Diagram
IFypen the „emper—ture gontrol †s @ƒe™tion VFRA —nd s—ve it —s „emper—ture voggerFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF ‰ou do not need to modify the front p—nelF PFypen —nd modify the ˜lo™k di—gr—m —s shown in pigure WFPRF ‚esize the ‡hile voop to —dd sp—™e —t the top for the (le sGy oper—tionsF

IVI

Figure 9.24

€l—™e the ypenGgre—teG‚epl—™e pile †sD lo™—ted on the pun™tions ell @—A pun™tions pile sGy p—letteD on the ˜lo™k di—gr—mF ‚ightE™li™k the prompt inputD sele™t gre—te gonst—nt from the short™ut menu —nd type inter pile x—me in the ™onst—ntF ‚ightE™li™k the fun™tion inputD sele™t gre—te gonst—nt from the short™ut menuD —nd ™li™k the ™onst—nt with the yper—ting tool to sele™t ™re—te or repl—™eF @˜A €l—™e the qet h—teG„ime ƒtring fun™tionD lo™—ted on the pun™tions ell pun™tions „ime 8 hi—log p—letteD on the ˜lo™k di—gr—mF „his fun™tion returns the timeD in string form—tD when the temper—ture me—surement w—s t—kenF ‚ightE ™li™k the w—nt se™ondsc inputD sele™t gre—te gonst—nt from the short™ut menuD —nd ™li™k the ™onst—nt with the yper—ting tool to ™h—nge the ™onst—nt from p—lse to „rueF „he „rue foole—n ™onst—nt sets the fun™tion to in™lude se™onds in the stringF @™A €l—™e the fuild „ext ixpress †sD lo™—ted on the pun™tions yutput p—letteD on the ˜lo™k di—gr—mF „his ixpress †s ™onverts the inputs to one stringF „he gon(gure fuild „ext di—log ˜ox —ppe—rsF iF„ype 7t—˜77temp77end7 in the „ext with †—ri—˜les in €er™ents text ˜ox to set up three v—ri—˜lesY one for the t—˜ ™onst—ntD one for the temper—ture —nd one for the end of line ™onst—ntF fe™—use time uses the feginning „ext input of the fuild „ext ixpress †sD it does not need — v—ri—˜leF iiFƒele™t temp in the gon(gure †—ri—˜les se™tionF ƒele™t the xum˜er optionD —nd — form—t of porm—t fr—™tion—l num˜erF „he t—˜ —nd end v—ri—˜les do not

IVP

CHAPTER 9. STRINGS AND FILE I/O

need to ˜e form—ttedF ‰ou ™—n le—ve them in the def—ult st—teF iiiFgli™k the yu ˜utton to ™lose the ™on(gur—tion di—log ˜oxF ivF‚ightE™li™k the fuild „ext ixpress †s —nd sele™t †iew es s™on to ™onserve ˜lo™k di—gr—m sp—™eF @dA €l—™e — „—˜ ™onst—nt —nd —n ind of vine ™onst—ntD lo™—ted on the pun™tions ell pun™tions ƒtring p—letteD on the ˜lo™k di—gr—mF @eA €l—™e the ‡rite pile fun™tionD lo™—ted on the pun™tions ell pun™tions pile sGy p—letteD on the ˜lo™k di—gr—mF „his fun™tion writes to the (le spe™i(ed ˜y refnumF @fA €l—™e the glose pile fun™tionD lo™—ted on the pun™tions ell pun™tions sGy p—letteD on the ˜lo™k di—gr—mF „his fun™tion ™loses the (leF pile

@gA €l—™e the ƒimple irror r—ndler †sD lo™—ted on the pun™tions ell pun™tions „ime 8 hi—log p—letteD on the ˜lo™k di—gr—mF „his †s ™he™ks the error ™luster —nd displ—ys — di—log ˜ox if —n error o™™ursF @hAgomplete the ˜lo™k di—gr—m —s shown in pigure WFPRF QFƒ—ve the †sF ‰ou will use this †s l—ter in the ™ourseF

9.11.2 Run the VI
IFhispl—y the front p—nel —nd run the †sF „he inter pile x—me di—log ˜ox —ppe—rsF PF„ype tempFtxt —nd ™li™k the ƒ—ve or yu ˜uttonF „he †s ™re—tes — (le ™—lled tempFtxtF „he †s t—kes re—dings every h—lfEse™ond —nd s—ves the time —nd temper—ture d—t— to — (le until you ™li™k the €ower swit™hF ‡hen the †s (nishesD it ™loses the (leF QFypen — word pro™essor or spre—dsheet —ppli™—tionD su™h —s @Windows A xotep—d or ‡ord€—dD @Mac OS A ƒimple„extD or @UNIX A „ext iditorF RFypen the tempFtxt (le in the word pro™essing or spre—dsheet —ppli™—tionF „he time —ppe—rs in the (rst ™olumnD —nd the temper—ture d—t— —ppe—rs in the se™ond ™olumnF SFixit the word pro™essor or spre—dsheet —ppli™—tion —nd return to v—˜†si‡F TFsf time permitsD ™omplete the option—l stepsF ytherwiseD ™lose the †sF

9.11.3 Optional
‡hen using error h—ndling in — †sD the ‡hile voop should stop exe™uting when —n error o™™ursF gomplete the following steps to modify the †s so it stops when the user ™li™ks the €ower swit™h or —n error o™™ursF IFidit the ˜lo™k di—gr—m —s shown in pigure WFPSF

IVQ

Figure 9.25

€l—™e the …n˜undle ˜y x—me fun™tionD lo™—ted on the pun™tions ell @—A pun™tions gluster p—letteD on the ˜lo™k di—gr—mF „his fun™tion re—ds the st—tus output from the error ™lusterF €l—™e the xot fun™tion —nd the end fun™tionD lo™—ted on the @˜A pun™tions erithmeti™ 8 gomp—rison ixpress foole—n p—letteD on the ˜lo™k di—gr—mF „hese fun™tions set the ™ondition—l termin—l to ™ontinue while €ower is „rue —nd no error o™™ursF PFƒ—ve —nd run the †sF QF„est the error h—ndling ˜y deleting the refnum wire ˜etween the ‡rite pile fun™tion —nd the left ˜order of the ‡hile voopF ‚ightE™li™k the refnum input of ‡rite pile —nd sele™t gre—te gonst—ntF RF‚un the †s —g—inF „he †s should w—it for — p—thD then stop immedi—tely with —n errorF sf error h—ndling w—s not in™luded in this †sD the †s would not report the error until the user stopped the †sF SFsf time permitsD ™omplete the ™h—llenge stepsF ytherwiseD ™lose the †sF ho not s—ve ™h—ngesF

9.11.4 Challenge
IF‚epl—™e the fuild „ext ixpress †s —nd the ‡rite pile fun™tion with the porm—t snto pile fun™tionF PF‚un the †sF QFglose the †sF ho not s—ve ™h—ngesF

IVR

CHAPTER 9. STRINGS AND FILE I/O

9.12 Temperature Application VI
Exercise 9.6:
IFfuild — †s th—t performs the following t—sksF @—A„—kes — temper—ture me—surement on™e every se™ond until you stop the †s or —n error o™™ursF @˜Ahispl—ys ˜oth the ™urrent temper—ture —nd the —ver—ge of the l—st three me—sureE ments on — w—veform ™h—rtF @™Asf the temper—ture ex™eeds — limitD turns on —n vihF @dAefter e—™h me—surementD logs the d—teD time in™luding se™ondsD temper—tureD —vE er—ge of the l—st three me—surementsD —nd — oneEword mess—ge des™ri˜ing whether the temper—ture is norm—l or over the limitF vogs d—t— so e—™h item —ppe—rs in one ™olumn of — spre—dsheetD —s shown in pigure WFPTF

Figure 9.26

@eAefter you stop the —™quisitionD plots ˜oth the r—w temper—ture d—t— —nd — ˜estE (t ™urve in —n ˆ‰ gr—ph —nd displ—ys the —ver—geD m—ximumD —nd minimum temper—turesF tip: ƒt—rt with the „emper—ture vogger †s @ƒe™tion WFIIAF „o ™omE plete this step @pg IVRAD use portions of the „emper—ture en—lysis †s @ƒe™tion UFTAF
tip: „he fuild „ext ixpress †s is limited to eight inputsF …se multiple fuild „ext ixpress †ss or use the porm—t into ƒtring fun™tionF ‰ou ™—n ˜uild the delimiters into the form—t string to require fewer inputsF

„he front p—nel should ˜e simil—r to pigure WFPUF

IVS

Figure 9.27

PFƒ—ve the †s —s „emper—ture eppli™—tionFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

9.13 Summary, Tips, and Tricks on Strings and File I/O
• ƒtrings group sequen™es of eƒgss ™h—r—™tersF …se the string ™ontrol —nd indi™—tor to simul—te text entry ˜oxes —nd l—˜elsF • „o minimize the sp—™e th—t — string o˜je™t o™™upiesD rightE™li™k the o˜je™t —nd sele™t ƒhow ƒ™roll˜—r from the short™ut menuF • …se the ƒtring fun™tions lo™—ted on the pun™tions ell pun™tions m—nipul—te strings on the ˜lo™k di—gr—mF
ƒtring p—lette to edit —nd

• …se the fuild „ext ixpress †s to ™onvert — numeri™ v—lue to — stringF • …se the ƒ™—n prom ƒtring fun™tion to ™onvert — string to — numeri™ v—lueF • ‚ightE™li™k the ƒ™—n prom ƒtring fun™tion —nd sele™t idit ƒ™—n ƒtring from the short™ut menu to ™re—te or edit — form—t stringF • …se the pile sGy †ss —nd fun™tions to h—ndle —ll —spe™ts of (le sGyF • …se the highElevel pile sGy †ss to perform ™ommon sGy oper—tionsF • …se the lowElevel pile sGy †s —nd fun™tions —nd the edv—n™ed pile sGy fun™tions lo™—ted to ™ontrol e—™h (le sGy oper—tion individu—llyF • …se the ixpress pile sGy †ss for simple d—t—logging oper—tionsF

IVT

CHAPTER 9. STRINGS AND FILE I/O

• ‡hen writing to — (leD you openD ™re—teD or repl—™e — (leD write the d—t—D —nd ™lose the (leF ƒimil—rlyD when you re—d from — (leD you open —n existing (leD re—d the d—t—D —nd ™lose the (leF • „o —™™ess — (le through — di—log ˜oxD le—ve (le p—th unwired in the ypenGgre—teG‚epl—™e pile †sF • „o write d—t— to — spre—dsheet (leD the string must ˜e form—tted —s — spre—dsheet stringD whi™h is — string th—t in™ludes delimitersD su™h —s t—˜sF …se the porm—t snto pile fun™tion to form—t stringD numeri™D p—thD —nd foole—n d—t— —s text —nd write the text to — (leF

9.14 Additional Exercises for Strings and FileI/O
Exercise 9.7:
fuild — †s th—t gener—tes — Ph —rr—y of 3rows × 100columns of r—ndom num˜ers —nd writes the d—t— tr—nsposed to — spre—dsheet (leF edd — he—der to e—™h ™olumnF …se the highElevel pile sGy †ss lo™—ted on the pile sGy p—letteF …se the ‡rite gh—r—™ters „o pile †s to write the he—der —nd the ‡rite „o ƒpre—dsheet pile †s to write the numeri™ d—t— to the s—me (leF
tip:

ƒ—ve the †s —s wore ƒpre—dsheetsFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

Exercise 9.8:
fuild — †s th—t ™onverts t—˜Edelimited spre—dsheet strings to ™omm—Edelimited spre—dsheet stringsD th—t isD spre—dsheet strings with ™olumns sep—r—ted ˜y ™omm—s —nd rows sep—r—ted ˜y end of line ™h—r—™tersF hispl—y ˜oth the t—˜Edelimited —nd ™omm—Edelimited spre—dsheet strings on the front p—nelF
tip:

…se the ƒe—r™h —nd ‚epl—™e ƒtring fun™tionF

ƒ—ve the †s —s ƒpre—dsheet gonverterFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

Exercise 9.9:
wodify the „emper—ture vogger †s @ƒe™tion WFIIA so the †s does not ™re—te — new (le e—™h time you run the †sF eppend the d—t— to the end of the existing tempFd—t (le th—t the „emper—ture vogger †s ™re—tedF ‚un the †s sever—l times —nd use — word pro™essor —ppli™—tion to ™on(rm th—t the †s —ppended new temper—ture re—dingsF helete the porm—t snto pile fun™tion —nd repl—™e it with the porm—t snto ƒtring —nd ‡rite pile fun™tionsF …se the pos mode —nd pos o'set p—r—meters of the ‡rite pile fun™tion to move the ™urrent (le m—rkF
tip:

ƒele™t pile ƒ—ve es to s—ve the †s gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

—s

„emper—ture

vogger

PFvi

in

the

Chapter 10

Data Acquisition and Waveforms
10.1 Overview and Conguration of DAQ Devices
v—˜†si‡ in™ludes — set of †ss th—t let you ™on(gureD —™quire d—t— fromD —nd send d—t— to he devi™esF yftenD one devi™e ™—n perform — v—riety of fun™tions!—n—logEtoEdigit—l @eGhA ™onversionD digit—lEtoE—n—log @hGeA ™onversionD digit—l sGyD —nd ™ounterGtimer oper—tionsF i—™h devi™e supports di'erent he —nd sign—l gener—tion speedsF elsoD e—™h he devi™e is designed for spe™i(™ h—rdw—re pl—tforms —nd oper—ting systemsF ‚efer to niF™omGd—q1 for more inform—tion —˜out he devi™esF

10.1.1 DAQ System Components
fefore — ™omputerE˜—sed me—surement system ™—n me—sure — physi™—l sign—lD su™h —s temper—tureD — sensor or tr—nsdu™er must ™onvert the physi™—l sign—l into —n ele™tri™—l oneD su™h —s volt—ge or ™urrentF ‰ou might ™onsider the plugEin he devi™e to ˜e the entire me—surement systemD ˜ut it is —™tu—lly only one system ™omponentF ‰ou ™—nnot —lw—ys dire™tly ™onne™t sign—ls to — plugEin he devi™eF sn these ™—sesD you must use sign—l ™onditioning —™™essories to ™ondition the sign—ls ˜efore the plugEin he devi™e ™onverts them to digit—l inform—tionF „he softw—re ™ontrols the he system ˜y —™quiring the r—w d—t—D —n—lyzingD —nd presenting the resultsF gonsider the following options for — he systemX

• „he plugEin he devi™e resides in the ™omputerF ‰ou ™—n plug the devi™e into the €gs slot of — desktop ™omputer or the €gwgse slot of — l—ptop ™omputer for — port—˜le he me—surement systemF • „he he devi™e is extern—l —nd ™onne™ts to the ™omputer through —n existing portD su™h —s the seri—l port or ithernet portD whi™h me—ns you ™—n qui™kly —nd e—sily pl—™e me—surement nodes ne—r sensorsF
„he ™omputer re™eives r—w d—t— through the he devi™eF „he —ppli™—tion you write presents —nd m—nipul—tes the r—w d—t— in — form you ™—n underst—ndF „he softw—re —lso ™ontrols the he system ˜y ™omm—nding the he devi™e when —nd from whi™h ™h—nnels to —™quire d—t—F „ypi™—llyD he softw—re in™ludes drivers —nd —ppli™—tion softw—reF hrivers —re unique to the devi™e or type of devi™e —nd in™lude the set of ™omm—nds the devi™e —™™eptsF eppli™—tion softw—reD su™h —s v—˜†si‡D sends the drivers ™omm—ndsD su™h —s —™quire —nd return — thermo™ouple re—dingF „he —ppli™—tion softw—re —lso displ—ys —nd —n—lyzes the —™quired d—t—F xs me—surement devi™es in™lude xsEhe driver softw—reD — ™olle™tion of †ss you use to ™on(gureD —™quire d—t— fromD —nd send d—t— to the me—surement devi™esF
1 http://ni.com/daq

IVU

IVV

CHAPTER 10. DATA ACQUISITION AND WAVEFORMS

10.1.1.1 NI-DAQ
xsEhe UFH ™ont—ins two xsEhe drivers!„r—dition—l xsEhe —nd xsEhemx!e—™h with its own —ppli™—tion progr—mming interf—™e @e€sAD h—rdw—re ™on(gur—tionD —nd softw—re ™on(gur—tionF

• „r—dition—l xsEhe is —n upgr—de to xsEhe TFWFxD the e—rlier version of xsEheF „r—dition—l xsEhe h—s the s—me †ss —nd fun™tions —nd works the s—me w—y —s xsEhe TFWFxF ‰ou ™—n use „r—dition—l xsEhe on the s—me ™omputer —s xsEhemxD whi™h you ™—nnot do with xsEhe TFWFxF • xsEhemx is the l—test xsEhe driver with new †ssD fun™tionsD —nd development tools for ™ontrolling me—surement devi™esF „he —dv—nt—ges of xsEhemx over previous versions of xsE he in™lude the he essist—nt for ™on(guring ™h—nnels —nd me—surement t—sks for — devi™eY in™re—sed perform—n™eD in™luding f—ster singleEpoint —n—log sGy —nd multithre—dingY —nd — simpler e€s for ™re—ting he —ppli™—tions using fewer fun™tions —nd †ss th—n e—rlier versions of xsEheF
„r—dition—l xsEhe —nd xsEhemx support di'erent sets of devi™esF ‚efer to the x—tion—l snstruments ‡e˜ site2 for the list of supported devi™esF „his lesson des™ri˜es the xsEhemx e€sF pigure IHFI shows the me—surement softw—re fr—meworkF

Figure 10.1

‡hen progr—mming —n xs me—surement devi™eD you ™—n use xs —ppli™—tion softw—re su™h —s v—˜†si‡D v—˜‡indows—Gg†s—D —nd we—surement ƒtudioD or open ehis th—t support ™—lling dyn—mi™ link li˜r—ries @hvvsA through exƒs g interf—™esF …sing xs —ppli™—tion softw—re gre—tly redu™es development time for d—t— —™quisition —nd ™ontrol —ppli™—tions reg—rdless of whi™h progr—mE ming environment you useX
2 http://ni.com/daq

IVW

• v—˜†si‡ supports d—t— —™quisition with the v—˜†si‡ he †ssD — series of †ss for proE gr—mming with xs me—surement devi™esF • por g developersD v—˜‡indowsGg†s is — fully integr—ted exƒs g environment th—t provides the v—˜‡indowsGg†s h—t— e™quisition li˜r—ry for progr—mming xs me—surement devi™esF • we—surement ƒtudio development tools —re for designing your test —nd me—surement softw—re in wi™rosoft †isu—l ƒtudio Fxi„F we—surement ƒtudio in™ludes tools for †isu—l g5D †isu—l f—si™ Fxi„D —nd †isu—l gCC Fxi„F

10.1.2 DAQ Hardware Conguration
‰ou must ™omplete sever—l steps ˜efore you ™—n use the h—t— e™quisition †ssF „he devi™es —re ™on(gured for the ™omputers in this ™l—ssF

10.1.2.1 Windows
„he ‡indows gon(gur—tion w—n—ger keeps tr—™k of —ll the h—rdw—re inst—lled in the ™omputerD in™luding x—tion—l snstruments he devi™esF sf you h—ve — €lug 8 €l—y @€n€A devi™eD su™h —s —n i ƒeries wsy devi™eD the ‡indows gon(gur—tion w—n—ger —utom—ti™—lly dete™ts —nd ™on(gures the devi™eF sf you h—ve — nonE€n€ devi™eD or leg—™y devi™eD you must ™on(gure the devi™e m—nu—lly using the edd xew r—rdw—re option in the gontrol €—nelF ‰ou ™—n verify the ‡indows gon(gur—tion ˜y —™™essing the hevi™e w—n—gerF ‰ou ™—n see h—t— e™quisition hevi™esD whi™h lists —ll he devi™es inst—lled in the ™omputerF hou˜leE™li™k — he devi™e to displ—y — di—log ˜ox with t—˜˜ed p—gesF „he qener—l t—˜ displ—ys over—ll inform—tion reg—rding the devi™eF „he ‚esour™es t—˜ spe™i(es the system resour™es to the devi™e su™h —s interrupt levelsD hweD —nd ˜—se —ddress for softw—reE™on(gur—˜le devi™esF „he xsEhe snform—tion t—˜ spe™i(es the ˜us type of the he devi™eF „he hriver t—˜ spe™i(es the driver version —nd lo™—tion for the he devi™eF v—˜†si‡ inst—lls we—surement 8 eutom—tion ixplorer @weˆAD whi™h est—˜lishes —ll devi™e —nd ™h—nnel ™on(gur—tion p—r—metersF efter inst—lling — he devi™e in the ™omputerD you must run this ™on(gur—tion utilityF weˆ re—ds the inform—tion the hevi™e w—n—ger re™ords in the ‡indows ‚egistry —nd —ssigns — logi™—l devi™e num˜er to e—™h he devi™eF …se the devi™e num˜er to refer to the devi™e in v—˜†si‡F e™™ess weˆ either ˜y dou˜leE™li™king the i™on on the desktop or sele™ting „ools we—surement 8 eutom—tion ixplorer in v—˜†si‡F „he window in pigure IHFP is the prim—ry weˆ windowF weˆ is —lso the me—ns for ƒgˆs —nd ƒgg ™on(gur—tionF

IWH

CHAPTER 10. DATA ACQUISITION AND WAVEFORMS

Figure 10.2

weˆ dete™ts —ll the x—tion—l snstruments h—rdw—re in™luding the q€sf interf—™eF ‚efer to snstrument gontrol @ƒe™tion IIFPAD for more inform—tion —˜out q€sfF „he devi™e p—r—meters th—t you ™—n set using the ™on(gur—tion utility depend on the devi™eF weˆ s—ves the logi™—l devi™e num˜er —nd the ™on(gur—tion p—r—meters in the ‡indows ‚egistryF „he plug —nd pl—y ™—p—˜ility of ‡indows —utom—ti™—lly dete™ts —nd ™on(gures swit™hless he devi™esD su™h —s the €gsETHPRiF ‡hen you inst—ll — devi™e in the ™omputerD the devi™e is —utom—tiE ™—lly dete™tedF

10.1.3 Channel and Task Conguration
sn „r—dition—l xsEhe you ™—n ™on(gure — set of virtual channelsD or — ™olle™tion of property settings th—t in™lude — physi™—l ™h—nnelD the type of me—surement or gener—tion spe™i(ed in the ™h—nnel n—meD —nd s™—ling inform—tionF sn „r—dition—l xsEhe —nd e—rlier versionsD virtu—l ™h—nnels —re — simple method to remem˜er whi™h ™h—nnels —re used for di'erent me—surementsF xsEhemx channels —re simil—r to the virtu—l ™h—nnels of „r—dition—l xsEheF xsEhemx —lso in™ludes tasks th—t —re integr—l to the e€sF e task is — ™olle™tion of one or more ™h—nnels —nd the timingD triggeringD —nd other properties th—t —pply to the t—sk itselfF e t—sk represents — me—surement or gener—tion you w—nt to performF gh—nnels ™re—ted only inside — t—sk —re lo™—lF gh—nnels de(ned outside — t—sk —re glo˜—l —nd ™—n ˜e used sep—r—telyF gon(guring virtu—l ™h—nnels is option—l in „r—dition—l xsEhe —nd e—rlier versions ˜ut is integr—l to every me—surement you t—ke in xsEhemxF sn „r—dition—l xsEheD you ™on(gure virtu—l ™h—nnels in weˆF sn xsEhemxD you ™—n ™on(gure virtu—l ™h—nnels either in weˆ or in — progr—mD —nd you ™—n ™on(gure ™h—nnels —s p—rt of — t—sk or sep—r—telyF

IWI

10.2 Measurement &amp; Automation Explorer (Windows Only)
Exercise 10.1:

10.2.1 Examining the DAQ Device Settings
IFv—un™h weˆ ˜y dou˜leE™li™king the i™on on the desktop or ˜y sele™ting „ools we—surement 8 eutom—tion ixplorer in v—˜†si‡F „he utility se—r™hes the ™omputer for inst—lled x—tion—l snstruments h—rdw—re —nd displ—ys the inform—tionF PFixp—nd the hevi™es —nd snterf—™es se™tion to view the inst—lled x—tion—l snstruments devi™esF pigure IHFQ shows the €gsETHPRi —nd — €gsEq€sf devi™eF

Figure 10.3

weˆ displ—ys the x—tion—l snstruments h—rdw—re —nd softw—re in the ™omputerF „he devi™e num˜er —ppe—rs in quotes following the devi™e n—meF „he h—t— e™quisition †ss use this devi™e num˜er to determine whi™h devi™e performs he oper—tionsF weˆ —lso displ—ys the —ttri˜utes of the devi™e su™h —s the system resour™es th—t —re ˜eing used ˜y the devi™eF
Note:

‰ou might h—ve — di'erent devi™e inst—lledD —nd some of the options shown might ˜e di'erentF gli™k the ƒhow relpGride relp ˜utton in the top right ™orner of weˆ to hide the online help —nd show the he devi™e inform—tionF

QF„he hevi™e ‚outes @pigure IHFRA t—˜ provides det—iled inform—tion —˜out the intern—l sign—ls th—t ™—n ˜e routed to other destin—tions on the devi™eF „his is — powerful resour™e th—t gives you — visu—l represent—tion of the sign—ls th—t —re —v—il—˜le to

IWP

CHAPTER 10. DATA ACQUISITION AND WAVEFORMS

provide timing —nd syn™hroniz—tion with ™omponents th—t —re on the devi™e —nd other extern—l devi™esF

Figure 10.4

RF„he g—li˜r—tion @pigure IHFSA t—˜ provides inform—tion —˜out the l—st time the devi™e w—s ™—li˜r—ted ˜oth intern—lly —nd extern—llyF

IWQ

Figure 10.5

SF‚ightE™li™k the xsEhemx devi™e in the ™on(gur—tion tree —nd sele™t ƒelf g—li˜r—te to ™—li˜r—te the he devi™e using — pre™ision volt—ge referen™e sour™e —nd upd—te the ˜uiltEin ™—li˜r—tion ™onst—ntsF ‡hen the devi™e h—s ˜een ™—li˜r—tedD the ƒelf g—li˜r—tion inform—tion upd—tes in the g—li˜r—tion t—˜F

10.2.2 Testing the DAQ Device Components
IFgli™k the ƒelfE„est ˜utton to test the devi™eF „his tests the system resour™es —ssigned to the devi™eF „he devi™e should p—ss the test ˜e™—use it is —lre—dy ™on(guredF PFgli™k the „est €—nels ˜utton to test the individu—l fun™tions of the he devi™eD su™h —s —n—log input —nd outputF „he „est €—nels di—log ˜ox —ppe—rsF @—A…se the en—log snput t—˜ to test the v—rious —n—log input ™h—nnels on the he devi™eF gh—nnel hevIG—iH is ™onne™ted to the temper—ture sensor on the he ƒign—l e™™essoryF gli™k the ƒt—rt ˜utton to —™quire d—t— from —n—log input ™h—nnel HF €l—™e your (nger on the sensor to see the volt—ge riseF ‰ou —lso ™—n move the xoise swit™h to yn on the he ƒign—l e™™essory to see the sign—l ™h—nge in this t—˜F ‡hen you —re (nishedD ™li™k the ƒtop ˜uttonF @˜Agli™k the en—log yutput t—˜ to set up — single volt—ge or sine w—ve on one of the he devi™e —n—log output ™h—nnelsF gh—nge the yutput wode to ƒinew—ve qener—tion —nd ™li™k the ƒt—rt ˜uttonF v—˜†si‡ gener—tes — ™ontinuous sine w—ve on —n—log output ™h—nnel HF @™Ayn the extern—l he ƒign—l e™™essory ˜oxD wire en—log yut ghH to en—log sn ghIF

IWR

CHAPTER 10. DATA ACQUISITION AND WAVEFORMS

@dAgli™k the en—log snput t—˜ —nd ™h—nge the ™h—nnel to hevIG—iIF gli™k the ƒt—rt ˜utton to —™quire d—t— from —n—log input ™h—nnel IF v—˜†si‡ displ—ys the sine w—ve from —n—log output ™h—nnel HF @eAgli™k the higit—l sGy t—˜ to test the digit—l lines on the he devi™eF ƒet lines H through Q —s output —nd toggle the vogi™ vevel ™he™k˜oxesF es you toggle the ˜oxesD the vihs on the he sign—l —™™essory turn on or o'F „he vihs use neg—tive logi™F @fAgli™k the gounter sGy t—˜ to determine if the he devi™e ™ounterGtimers —re fun™E tioning properlyF „o verify ™ounterGtimer oper—tionD ™h—nge the gounter wode t—˜ to idge gounting —nd ™li™k the ƒt—rt ˜uttonF „he gounter †—lue in™rements r—pidlyF gli™k ƒtop to stop the ™ounter testF @gAgli™k the glose ˜utton to ™lose the „est €—nel —nd return to weˆF QFglose weˆ ˜y sele™ting pile ixitF

10.3 Data Acquisition in LabVIEW
„he v—˜†si‡ h—t— e™quisition †ss —re lo™—ted on the h—t— e™quisition p—lette —nd the hemx E h—t— e™qusition p—letteF „he h—t— e™quisition p—lette ™ont—ins the tr—dition—l xsEhe †ssF „he hemx E h—t— e™quisition p—lette ™ont—ins the †ss for xsEhemxF „he hemx E h—t— e™quisition p—lette ™ont—ins —ll of the †ss ne™ess—ry to perform —n—log sGyD digit—l sGyD —nd ™ounterGtimer oper—tionsF „he †ss —re org—nized so th—t the most ™ommon oper—tions ™—n ˜e performed using the †ssF ‰ou ™—n ™on(gure — t—sk to perform — very spe™i(™ fun™tion ˜y using the €roperty xodes in the p—letteF w—ny —ppli™—tions th—t do not require —dv—n™ed timing —nd syn™hroniz—tion ™—n ˜e performed ˜y using the he essist—nt ixpress †sF „his ™ourse des™ri˜es the use of the he essist—nt ixpress †s to perform d—t— —™quisitionF por more inform—tion on using —ll the fe—tures of xsEhemxD refer to the NI-DAQmx Help or —ttend the LabVIEW Data Acquisition and Signal Conditioning ™ourseF „he he essist—nt ixpress †s —llows you to e—sily ™on(gure the d—t— —™quisition devi™eF ‡hen you pl—™e the he essist—nt ixpress †s on the ˜lo™k di—gr—mD — di—log ˜ox @pigure IHFTA —ppe—rs where you ™on(gure — lo™—l t—sk to perform — spe™i(™ me—surement fun™tionF gre—ting — lo™—l t—sk —llows you to spe™ify the ex—™t type of me—surement to t—keF

IWS

Figure 10.6

†sF

efter you ™re—te — t—skD the inform—tion for the lo™—l t—sk is stored in the he essist—nt ixpress

‰ou ™—n re™on(gure the he essist—nt ixpress †s ˜y dou˜leE™li™king the †s —nd ™re—ting — new t—skF

10.4 Analog Input
…se —n—log input to perform —n—logEtoEdigit—l @eGhA ™onversionsF „he —v—il—˜le —n—log input me—surement types @pigure IHFUA for — t—sk —re volt—geD temper—tureD str—inD ™urrentD resist—n™eD or frequen™yF

IWT

CHAPTER 10. DATA ACQUISITION AND WAVEFORMS

Figure 10.7

i—™h me—surement type h—s its own ™h—r—™teristi™sD su™h —s resistor v—lues for ™urrent me—sureE ments or str—in g—uge p—r—meters for str—in me—surementsF

10.4.1 Task Timing
‡hen performing —n—log inputD the t—sk ™—n ˜e timed to e™quire I ƒ—mple @ƒe™tion IHFRFIFIAD e™quire n ƒ—mples @ƒe™tion IHFRFIFPAD or e™quire gontinuously @ƒe™tion IHFRFIFQAF

10.4.1.1 Acquire 1 Sample
e™quiring — single s—mple is —n onEdem—nd oper—tionF sn other wordsD xsEhemx —™quires one v—lue from —n input ™h—nnel —nd immedi—tely returns the v—lueF „his oper—tion does not require —ny ˜u'ering or h—rdw—re timingF por ex—mpleD if you periodi™—lly monitor the )uid level in — t—nkD you would —™quire single d—t— pointsF ‰ou ™—n ™onne™t the tr—nsdu™er th—t produ™es — volt—ge representing the )uid level to — single ™h—nnel on the me—surement devi™e —nd initi—te — singleE ™h—nnelD singleEpoint —™quisition when you w—nt to know the )uid levelF

10.4.1.2 Acquire n Samples
yne w—y to —™quire multiple s—mples for one or more ™h—nnels is to —™quire single s—mples in — repetitive m—nnerF roweverD —™quiring — single d—t— s—mple on one or more ™h—nnels over —nd over is ine0™ient —nd time ™onsumingF woreoverD you do not h—ve —™™ur—te ™ontrol over the time ˜etween e—™h s—mple or ™h—nnelF snste—d you ™—n use h—rdw—re timingD whi™h uses — ˜u'er in

IWU

™omputer memoryD to —™quire d—t— more e0™ientlyF €rogr—mm—ti™—llyD you need to in™lude the timing fun™tion —nd spe™ify the s—mple r—te —nd the s—mple mode @(niteAF es with other fun™tionsD you ™—n —™quire multiple s—mples for — single ™h—nnel or multiple ™h—nnelsF ‡ith xsEhemxD you —lso ™—n g—ther d—t— from multiple ™h—nnelsF por inst—n™eD you might w—nt to monitor ˜oth the )uid level in the t—nk —nd the temper—tureF sn su™h — ™—seD you need two tr—nsdu™ers ™onne™ted to two ™h—nnels on the devi™eF

10.4.1.3 Acquire Continuously
sf you w—nt to viewD pro™essD or log — su˜set of the s—mples —s they —re —™quiredD you need to ™ontinu—lly —™quire s—mplesF por these types of —ppli™—tionsD set the s—mple mode to ™ontinuousF

10.4.2 Task Triggering
‡hen — devi™e ™ontrolled ˜y xsEhemx does somethingD it performs —n —™tionF „wo very ™ommon —™tions —re produ™ing — s—mple —nd st—rting — w—veform —™quisitionF ivery xsEhemx —™tion needs — stimulus or ™—useF ‡hen the stimulus o™™ursD the —™tion is performedF g—uses for —™tions —re ™—lled triggersF „he st—rt trigger st—rts the —™quisitionF „he referen™e trigger est—˜lishes the referen™e point in — set of input s—mplesF h—t— —™quired up to the referen™e point is pretrigger d—t—F h—t— —™quired —fter the referen™e point is posttrigger d—t—F

10.5 Voltmeter VI
Exercise 10.2:

10.5.1 Front Panel
IFypen — ˜l—nk †s —nd ˜uild the front p—nel shown in pigure IHFVF

Figure 10.8

@—A€l—™e the weterD lo™—ted on the gontrols xumeri™ sndi™—tors p—letteD on the front p—nelF gon(gure the meter s™—le for HFH to HFRF …se the v—˜eling tool to dou˜leE™li™k IHFH —nd type HFRF ‰ou might need to enl—rge the meter to displ—y the s™—le —s shown in the ex—mple @pigure IHFVAF @˜A€l—™e — †erti™—l „oggle ƒwit™hD lo™—ted on the gontrols futtons 8 ƒwit™hes p—letteD on the front p—nelF gon(gure the toggle swit™h to — def—ult v—lue of p—lse —nd — me™h—ni™—l —™tion of v—t™h ‡hen €ressedF @™Agre—te two free l—˜elsD y' —nd ynD using the v—˜eling toolF

IWV

CHAPTER 10. DATA ACQUISITION AND WAVEFORMS

10.5.2 Block Diagram
IFfuild the ˜lo™k di—gr—m shown in pigure IHFWF

Figure 10.9

€l—™e the he essist—nt ixpress †s lo™—ted on the pun™tions snput @—A p—letteD on the ˜lo™k di—gr—mF gon(gure this †s to re—d —n —n—log input ™h—nnel —nd return the volt—geF • ƒele™t en—log snput †olt—ge for the me—surement to m—keF • ƒele™t hevI —iH for the physi™—l ™h—nnelF • gli™k the pinish ˜uttonF • „he en—log snput †olt—ge „—sk di—log ˜ox —ppe—rsF gon(gure the „—sk „imE ing to e™quire I ƒ—mpleF • gli™k the yu ˜utton to ™lose the en—log snput †olt—ge „—sk gon(gur—tion di—log ˜oxF „his s—ves the settings spe™i(ed for the t—sk in the he essist—nt ixpress †sF €l—™e the ‡—it …ntil xext ms wultiple fun™tionD lo™—ted on the @˜A pun™tions ell pun™tions „ime 8 hi—log p—letteD on the ˜lo™k di—gr—mF ‚ightE ™li™k the input —nd sele™t gre—te gonst—nt from the short™ut menuF „ype IHH in the ™onst—nt to ™—use the loop to exe™ute every IHH msF €l—™e the …n˜undle ˜y x—me fun™tionD lo™—ted on the pun™tions ell @™A pun™tions gluster p—letteD on the ˜lo™k di—gr—mF …se this fun™tion to —™™ess the st—tus from the error ™lusterF @dA €l—™e the yr fun™tionD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress foole—n p—letteD on the ˜lo™k di—gr—mF „his fun™tion stops the loop if —n error o™™urs or the user ™li™ks the power swit™h on the front p—nelF PFƒ—ve the †s —s †oltmeterFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF ‰ou will use this †s l—ter in the ™ourseF QFhispl—y the front p—nel —nd run the †sF „he meter displ—ys the volt—ge the temper—ture sensor outputsF €l—™e your (nger on the temper—ture sensor —nd noti™e th—t the volt—ge in™re—sesF

IWW

10.5.3 Scales
„he temper—ture sensor on the he ƒign—l e™™essory outputs the volt—ge in degrees gelE siusD s™—led ˜y IHHF sn order to ™onvert the volt—ge into degrees gelsiusD it is ne™ess—ry to multiply the volt—ge ˜y IHHF ‰ou ™ould multiply the output of the he essist—nt ixpress †s ˜y IHHD or ™on(gure the he essist—nt ixpress †s to —utom—ti™—lly s™—le the volt—geF …sing the ™—p—˜ilities th—t exist within the †s redu™es ˜lo™k di—gr—m ™lutterF IFhou˜leE™li™k the he essist—nt to displ—y the en—log snput †olt—ge „—sk gon(gur—E tion di—log ˜oxF PFƒele™t gre—te xew in the gustom ƒ™—ling pullEdown menuF QFƒele™t vine—r —nd n—me the s™—le temper—tureF gli™k the pinish ˜uttonF RFe di—log ˜ox —ppe—rs where you ™—n s™—le the d—t— ˜y — multiplier —nd —n o'setF @—Aƒet the slope to IHH —nd the ƒ™—led …nits to gelsiusF @˜Agli™k the yu ˜utton to ™lose the di—log ˜oxF SFsn the en—log snput †olt—ge „—sk gon(gur—tion di—log ˜oxD set the minimum input r—nge to HD set the m—ximum input r—nge to IHHD —nd ™li™k the yu ˜utton to return to the ˜lo™k di—gr—mF TF‚un the †sF „he temper—ture displ—ys in the meterF „he temper—ture v—lues —re IHH times gre—ter th—n the volt—ge v—luesF gh—nge the meter s™—le to see the ™orre™t v—luesF UFƒtop the †sF ƒ—ve the †s ˜ut do not ™lose itF ‰ou will use the †s in the we—surement ever—ging †s @ƒe™tion IHFTA exer™iseF

10.6 Measurement Averaging VI
Exercise 10.3:
IF‚un the †oltmeter †s @ƒe™tion IHFSAF PFsntrodu™e noise into the temper—ture me—surement ˜y ™h—nging the „emp ƒensor xoise swit™h on the he ƒign—l e™™essory to the yx positionF „he me—surements ˜egin to )u™tu—te with noise spikesF

10.6.1 Block Diagram
IFƒtop the †s —nd displ—y the ˜lo™k di—gr—m @pigure IHFIHAF wodify the ˜lo™k di—gr—m to ™—l™ul—te the —ver—ge of IHH me—surementsF

PHH

CHAPTER 10. DATA ACQUISITION AND WAVEFORMS

Figure 10.10

PF

€l—™e the golle™tor ixpress †s lo™—ted on the pun™tions ƒign—l w—nipul—tion p—letteD on the ˜lo™k di—gr—mF „his ixpress †s ™re—tes —n intern—l ˜u'er to store the individu—l pointsF ‡hen the m—ximum num˜er of input points is ™olle™tedD the ixpress †s dis™—rds the oldest points —nd —dds the newest pointsF sn the gon(gure golle™tor di—log ˜ox th—t —ppe—rsD set the w—ximum num˜er of s—mples to IHHF gli™k the yu ˜utton to ™lose the di—log ˜oxF

QF

€l—™e the ƒt—tisti™s ixpress †sD lo™—ted on the pun™tions en—lysis p—letteD on the ˜lo™k di—gr—mF sn the gon(gure ƒt—tisti™s di—log ˜ox th—t —ppe—rsD pl—™e — ™he™km—rk in the erithmeti™ we—n ™he™k˜ox to perform —ver—ging on the ™olle™ted d—t—F gli™k the yu ˜utton to ™lose the di—log ˜oxF

RFƒele™t pile ƒ—ve es to s—ve the †s —s we—surement ever—gingFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF SFhispl—y the front p—nel —nd run the †sF xoti™e th—t the noise spikes —re redu™ed when the „emp ƒensor xoise swit™h is turned onF TFƒtop —nd ™lose the †sF

10.7 Data Logging
st is often ne™ess—ry to perm—nently store d—t— —™quired from the he devi™eF ‚emem˜er the following import—nt ™onsider—tions when pl—nning to store d—t— to — (leF

• xot —ll d—t— logging —ppli™—tions use v—˜†si‡ to pro™ess —nd —n—lyze the stored d—t—F gonE sider whi™h —ppli™—tions will need to re—d the d—t—F • „he d—t— stor—ge form—t de(nes whi™h —ppli™—tions ™—n re—d the (leF ƒin™e v—˜†si‡ ™ont—ins st—nd—rd (le oper—tion fun™tions th—t exist in other l—ngu—gesD the progr—mmer h—s ™omplete ™ontrol over the d—t— logging pro™essF

PHI

v—˜†si‡ in™ludes the —˜ility to ™re—te — v—˜†si‡ me—surement (leD —n eƒgss text (le th—t ™—n ˜e re—d ˜y — spre—dsheetD or — text editorF „he v—˜†si‡ me—surement (le is e—sy to ™re—te in v—˜†si‡D —nd e—sy to re—d in v—˜†si‡ or other —ppli™—tionsF „he ‡rite v—˜†si‡ we—surement pile ixpress †s lo™—ted on the pun™tions yutput p—lette writes sign—ls to — v—˜†si‡ me—surement (leF ‡hen you pl—™e this ixpress †s on the ˜lo™k di—gr—mD — ™on(gur—tion di—log ˜ox —ppe—rs where you ™—n spe™ify how to store the (leF „he ‚e—d v—˜†si‡ we—surement pile ixpress †s lo™—ted on the pun™tions snput p—lette re—ds sign—ls in — v—˜†si‡ me—surement (leF „his ixpress †s re—ds d—t— one point —t — timeD so it is ne™ess—ry to pl—™e this ixpress †s in — loopF

10.8 Simple Data Logger VI
Exercise 10.4:

10.8.1 Simple Data Logger Block Diagram
IFypen the we—surement ever—ging †s lo™—ted in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF PFwodify the ˜lo™k di—gr—m to log the —™quired d—t— —s shown in pigure IHFIIF

Figure 10.11

€l—™e the ‡rite v—˜†si‡ we—surement pile ixpress †sD lo™—ted on the pun™tions yutput p—letteD on the ˜lo™k di—gr—mF „his ixpress †s stores the d—t— —™quired from the he devi™eF sn the gon(gure ‡rite v—˜†si‡ we—surement pile di—log ˜ox th—t —ppe—rsD set the following optionsX @—Aƒet the e™tion to esk user to ™hoose (le for the (len—meF @˜Aƒet the ƒegment re—ders to yne he—der only to provide — he—der for —ll of the d—t—F „he he—der ™ont—ins inform—tion —˜out the s—mpling r—te —nd the time when the s—mple w—s t—kenF @™Aƒet ˆ †—lue golumns to yne ™olumn per ™h—nnel to provide — t—˜le of d—t— th—t ™—n ˜e re—d ˜y —ny spre—dsheet editor or —n eƒgss text (le editorF

PHP

CHAPTER 10. DATA ACQUISITION AND WAVEFORMS

@dAƒet the helimiter to „—˜ to m—ke it e—sy for — spre—dsheet editor to determine where — ™olumn of d—t— st—rts in the (leF @eAgli™k the yu ˜utton to ™lose the di—log ˜oxF

€l—™e the werge irrors †sD lo™—ted on the pun™tions ell pun™tions „ime 8 hi—log p—letteD on the ˜lo™k di—gr—mF st is import—nt to ™—t™h errors with ˜oth he —nd (le sGyD —nd ˜e™—use the ™ode h—s — p—r—llel stru™ture it is ne™ess—ry to merge the errors from —ll of the p—r—llel oper—tions to determine if the ™ode is fun™tioning properlyF QFƒele™t pile ƒ—ve es to s—ve the †s —s ƒimple h—t— voggerFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF RF‚un the †sF e (len—me prompt —ppe—rsF gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF SFƒtop —nd ™lose the †sF x—me the (le loggerFlvm in the

10.8.2 Simple Data Reader Front Panel
IFypen — ˜l—nk †s —nd ˜uild the front p—nel shown in pigure IHFIP ˜y pl—™ing — w—veform ™h—rtD lo™—ted on the gontrols qr—ph sndi™—tors p—letteD on the front p—nelF

Figure 10.12

10.8.3 Block Diagram
IFfuild the ˜lo™k di—gr—m shown in pigure IHFIQF

PHQ

Figure 10.13

@—A €l—™e the ‚e—d v—˜†si‡ we—surement pile ixpress †sD lo™—ted on the pun™tions snput p—letteD on the ˜lo™k di—gr—mF fe™—use this ixpress †s re—ds d—t— lo™—ted in — v—˜†si‡ me—surement (le one d—t— point —t — timeD it must ˜e pl—™ed in — loopF sn the gon(gure ‚e—d v—˜†si‡ we—surement pile di—log ˜ox th—t —ppe—rsD set the following optionsX • sn the e™tion se™tionD pl—™e — ™he™km—rk in the esk user to ™hoose (le ™he™kE ˜oxF • ƒet the ƒegment ƒize to ‚etrieve segments of origin—l size so th—t —ll the d—t— stored in the (le is retrievedF • ƒet „ime ƒt—mps to ‚el—tive to st—rt of me—surementF fe™—use the dyn—mi™ d—t— type stores inform—tion —˜out the sign—l timingD this setting —ligns the d—t— with the time of the me—surementF • sn the qeneri™ „ext pile se™tionD remove the ™he™km—rk from the ‚e—d generi™ text (les ™he™k˜ox ˜e™—use the d—t— is stored in — v—˜†si‡ me—surement (leF • gli™k the yu ˜utton to ™lose the di—log ˜oxF €l—™e the …n˜undle ˜y x—me fun™tionD lo™—ted on the pun™tions ell @˜A pun™tions gluster p—letteD on the ˜lo™k di—gr—mF @™A €l—™e the yr fun™tionD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress foole—n p—letteD on the ˜lo™k di—gr—mF @dA‡ire the iypc output of the ‚e—d v—˜†si‡ we—surement pile fun™tion to the yr fun™tionF ‡ire the st—tus output of the error ™luster to the se™ond input of the yr fun™tionF „his stops the ‡hile voop when the entire v—˜†si‡ we—surement pile h—s ˜een re—d or when —n error o™™ursF PFƒ—ve the †s —s ƒimple h—t— ‚e—derFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™E toryF QFhispl—y the front p—nelD —nd run the †sF sn the (len—me prompt th—t —ppe—rsD sele™t the loggerFlvm (le th—t you ™re—ted e—rlier @pg PHPAF RF„he d—t— th—t w—s stored in the v—˜†si‡ we—surement pile —ppe—rs in the w—veform ™h—rtF Note: ‰ou might need to res™—le or —utos™—le the yE—xis of the w—veform ™h—rt to displ—y the d—t—F SFglose the ƒimple h—t— ‚e—der †sF

PHR

CHAPTER 10. DATA ACQUISITION AND WAVEFORMS

10.9 Analog Output
…se —n—log output to perform digit—lEtoE—n—log @hGeA ™onversionsF „he —v—il—˜le —n—log output types @pigure IHFIRA for — t—sk —re volt—ge —nd ™urrentF

Figure 10.14

„o perform — volt—ge or ™urrent t—skD — ™omp—ti˜le devi™e must ˜e inst—lled th—t ™—n gener—te th—t form of sign—lF

10.9.1 Task Timing
‡hen performing —n—log outputD the t—sk ™—n ˜e timed to qener—te I ƒ—mple @ƒe™tion IHFWFIFIAD qener—te n ƒ—mples @ƒe™tion IHFWFIFPAD or qener—te gontinuously @ƒe™tion IHFWFIFQAF

10.9.1.1 Generate 1 Sample
…se single upd—tes if the sign—l level is more import—nt th—n the gener—tion r—teF por ex—mpleD gener—te one s—mple —t — time if you need to gener—te — ™onst—ntD or hgD sign—lF ‰ou ™—n use softw—re timing to ™ontrol when the devi™e gener—tes — sign—lF „his oper—tion does not require —ny ˜u'ering or h—rdw—re timingF por ex—mpleD if you need to gener—te — known volt—ge to stimul—te — devi™eD — single upd—te would ˜e —n —ppropri—te t—skF

PHS

10.9.1.2 Generate n Samples
yne w—y to gener—te multiple s—mples for one or more ™h—nnels is to gener—te single s—mples in — repetitive m—nnerF roweverD gener—ting — single d—t— s—mple on one or more ™h—nnels over —nd over is ine0™ient —nd time ™onsumingF woreoverD you do not h—ve —™™ur—te ™ontrol over the time ˜etween e—™h s—mple or ™h—nnelF snste—dD you ™—n use h—rdw—re timingD whi™h uses — ˜u'er in ™omputer memory to gener—te s—mples more e0™ientlyF ‰ou ™—n use softw—re timing or h—rdw—re timing to ™ontrol when — sign—l is gener—tedF ‡ith softw—re timingD the r—te —t whi™h the s—mples —re gener—ted is determined ˜y the softw—re —nd oper—ting system inste—d of ˜y the me—surement devi™eF ‡ith h—rdw—re timingD — „„v sign—lD su™h —s — ™lo™k on the devi™eD ™ontrols the r—te of gener—tionF e h—rdw—re ™lo™k ™—n run mu™h f—ster th—n — softw—re loopF e h—rdw—re ™lo™k is —lso more —™™ur—te th—n — softw—re loopF ƒome devi™es do not support h—rdw—re timingF gonsult the devi™e do™ument—tion if you —re unsure if the devi™e supports h—rdw—re timingF
Note:

€rogr—mm—ti™—llyD you need to in™lude the timing fun™tionD spe™ifying the s—mple r—te —nd the s—mple mode @(niteAF es with other fun™tionsD you ™—n gener—te multiple s—mples for — single ™h—nnel or multiple ™h—nnelsF …se qener—te n ƒ—mples if you w—nt to gener—te — (nite timeEv—rying sign—lD su™h —s —n eg sine w—veF

10.9.1.3 Generate Continuously
gontinuous gener—tion is simil—r to qener—te n ƒ—mplesD ex™ept th—t —n event must o™™ur to stop the gener—tionF sf you w—nt to ™ontinuously gener—te sign—lsD su™h —s gener—ting — nonE(nite eg sine w—veD set the timing mode to ™ontinuousF

10.9.2 Task Triggering
‡hen — devi™e ™ontrolled ˜y xsEhemx does somethingD it performs —n —™tionF „wo very ™ommon —™tions —re produ™ing — s—mple —nd st—rting — gener—tionF ivery xsEhemx —™tion needs — stimulus or ™—useF ‡hen the stimulus o™™ursD the —™tion is performedF g—uses for —™tions —re ™—lled triggersF „he st—rt trigger st—rts the gener—tionF „he referen™e trigger is not supported for —n—log output t—sksF

10.10 Voltage Output VI
Exercise 10.5:
IFgonne™t en—log yut grH to en—log sn grI on the he ƒign—l e™™essoryF

10.10.1 Front Panel
IFypen the †olt—ge yutput †s lo™—ted in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF „he front p—nel @pigure IHFISA is —lre—dy ˜uiltF

Figure 10.15

PHT

CHAPTER 10. DATA ACQUISITION AND WAVEFORMS

†olt—ge yutput displ—ys the ™urrent volt—ge outputF

10.10.2 Block Diagram
IFhispl—y —nd ex—mine the ˜lo™k di—gr—m @pigure IHFITAF

Figure 10.16

„he ‡—it …ntil xext ms wultiple fun™tion lo™—ted on the pun™tions ell pun™tions „ime 8 hi—log p—lette ™—uses the por voop to exe™ute every SHH msF „he ƒele™t †s lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress gomp—rison p—lette ™he™ks if the loop is in its l—st iter—tionF sf the loop is in its l—st iter—tionD then the he devi™e outputs H voltsF „his is — good te™hnique to reset the output volt—ge to — known levelF st is —lw—ys — good ide— to reset the output volt—ge to something th—t will not d—m—ge — devi™e th—t is ™onne™ted to the he devi™eF

PFwodify the ˜lo™k di—gr—m —s shown in pigure IHFIUF

PHU

Figure 10.17

€l—™e the he essist—nt ixpress †sD lo™—ted on the pun™tions yutput p—letteD in the por voopF gomplete the following steps to ™on(gure this ixpress †s to gener—te —n —n—log output volt—geF @—Aƒele™t en—log yutput †olt—ge for the me—surement to m—keF @˜Aƒele™t hevI —oH for the physi™—l ™h—nnel —nd ™li™k the pinish ˜uttonF @™Asn the en—log yutput †olt—ge „—sk gon(gur—tion di—log ˜ox th—t —ppe—rsD ™onE (gure the „—sk „iming to qener—te I ƒ—mpleF gh—nge the output r—nge minimum to H —nd m—ximum to IHF @dAgli™k the yu ˜utton to ™lose the en—log yutput †olt—ge „—sk gon(gur—tion di—log ˜oxF „his s—ves the settings spe™i(ed for the t—sk in the he essist—nt ixpress †sF QFƒ—ve the †sF RFglose the ˜lo™k di—gr—m ˜ut le—ve the front p—nel openF

10.10.3 Front Panel
IFypen the †oltmeter @ƒe™tion IHFSA †sF PFgon(gure the meter s™—le minimum to HFH —nd m—ximum to IHFHF

10.10.4 Block Diagram
IFhispl—y the ˜lo™k di—gr—m for the †oltmeter †s —nd dou˜leE™li™k the he essist—nt ixpress †s to open the en—log snput †olt—ge „—sk gon(gur—tion di—log ˜oxF PF‚ightE™li™k †olt—ge in the gh—nnel vist se™tion —nd sele™t gh—nge €hysi™—l gh—nnelF ƒele™t —iI for the ™h—nnel ˜e™—use you wired the he sign—l —™™essory to output — volt—ge on en—log yut grH —nd —™quire the volt—ge from en—log sn grIF QFƒele™t xo ƒ™—le from the gustom ƒ™—ling pullEdown menuF

PHV

CHAPTER 10. DATA ACQUISITION AND WAVEFORMS

RFgh—nge the volt—ge r—nge to H to IHF SFgli™k the yu ˜utton to ™lose the di—log ˜oxF TFhispl—y the front p—nel —nd run the †oltmeter †sF UF„o —™quire —nd displ—y the volt—ge outputD run the †olt—ge yutput †sF „he †olt—ge yutput @pigure IHFIVA †s outputs the volt—ge in HFS † in™rements from H to WFS †F ‡hen the por voop exe™utes its l—st iter—tionD the †s outputs H † to reset the —n—log output ™h—nnelF

Figure 10.18

VFglose ˜oth †ssF

10.11 Counters
e ™ounter is — digit—l timing devi™eF ‰ou typi™—lly use ™ounters for event ™ountingD frequen™y me—surementD period me—surementD position me—surementD —nd pulse gener—tionF e ™ounter ™ont—ins the following four m—in ™omponentsX

• •

with softw—reF

Count Register E ƒtores the ™urrent ™ount of the ™ounterF

‰ou ™—n query the ™ount register

Source E en input sign—l th—t ™—n ™h—nge the ™urrent ™ount stored in the ™ount registerF „he ™ounter looks for rising or f—lling edges on the sour™e sign—lF ‡hether — rising or f—lling edge ™h—nges the ™ount is softw—re sele™t—˜leF „he type of edge sele™ted is referred to —s the —™tive edge of the sign—lF ‡hen —n —™tive edge is re™eived on the sour™e sign—lD the ™ount ™h—ngesF ‡hether —n —™tive edge in™rements or de™rements the ™urrent ™ount is —lso softw—re sele™t—˜leF Gate E en input sign—l th—t determines if —n —™tive edge on the sour™e will ™h—nge the ™ountF
gounting ™—n o™™ur when the g—te is highD lowD or ˜etween v—rious ™om˜in—tions of rising —nd f—lling edgesF q—te settings —re m—de in softw—reF

Output E en output sign—l th—t gener—tes pulses or — series of pulsesD otherwise known —s —
pulse tr—inF

‡hen you ™on(gure — ™ounter for simple event ™ountingD the ™ounter in™rements when —n —™tive edge is re™eived on the sour™eF sn order for the ™ounter to in™rement on —n —™tive edgeD the ™ounter must ˜e —rmed or st—rtedF e ™ounter h—s — (xed num˜er it ™—n ™ount to —s determined ˜y the resolution of the ™ounterF por ex—mpleD — PRE˜it ™ounter ™—n ™ount toX

2Counter Resolution − 1 = 242 − 1 = 16, 777, 215

PHW

‡hen — PRE˜it ™ounter re—™hes the v—lue of 16, 777, 215D it h—s re—™hed the termin—l ™ountF „he next —™tive edge will for™e the ™ounter to roll over —nd st—rt —t HF

10.12 Simple Event Counting VI
Exercise 10.6:

10.12.1 Front Panel
IFypen — ˜l—nk †s —nd ˜uild the front p—nel shown in pigure IHFIWF

Figure 10.19

10.12.2 Block Diagram
IFfuild the ˜lo™k di—gr—m shown in pigure IHFPHF

Figure 10.20

€l—™e the he essist—nt ixpress †sD lo™—ted on the pun™tions snput p—letteD in — ‡hile voopF gomplete the following steps to ™on(gure the ™ounter to perform event ™ountingF @—Aƒele™t gounter snput idge gount for the me—surement to m—keF @˜Aƒele™t hevI ™trH for the physi™—l ™h—nnelF @™Asn the gounter snput idge gount „—sk gon(gur—tion di—log ˜ox th—t —ppe—rsD le—ve the settings —s they —reF „he def—ult settings de(ne the sour™e of the ™ounter —s ˜eing €rogr—mm—˜le pun™tion snput @€psA VD whi™h is the def—ult sour™e for ™ounter HF „he he ƒign—l e™™essory ™onne™ts ™ounter H sour™e input to €ps VF

PIH

CHAPTER 10. DATA ACQUISITION AND WAVEFORMS

@dAgli™k the yu ˜utton to ™lose the gounter snput idge gount „—sk gon(gur—tion di—log ˜oxF „his s—ves —ll the settings spe™i(ed for the t—sk in the he essist—nt ixpress †sF PFƒ—ve the †s —s ƒimple ivent gountingFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF QFyn the he ƒign—l e™™essoryD wire the e output of the qu—dr—ture en™oder to the ƒy…‚gi input of ™ounter HF RF‚un the †sF ‚ot—te the qu—dr—ture en™oder kno˜ on the he ƒign—l e™™essoryF xoE ti™e th—t the xum˜er of ivents indi™—tor in™rements —s you rot—te the kno˜F „he qu—dr—ture en™oder kno˜ produ™es pulses —s you rot—te the kno˜F „he ™ounter ™ounts these pulsesF SFƒtop the †sF TFhou˜leE™li™k the he essist—nt ixpress †sD —nd ™h—nge the gount hire™tion pullE down menu to ixtern—lly gontrolledF gli™k the yu ˜utton to ™lose the ™on(gur—tion di—log ˜oxF „he he ƒign—l e™™essory intern—lly ™onne™ts ph—se f of the qu—dr—ture en™oder to the …pGhown line for ™ounter HF „his ™—n ˜e used to determine the dire™tion the kno˜ h—s turnedF UF‚un the †sF ‚ot—te the qu—dr—ture en™oder kno˜ on the he ƒign—l e™™essoryF xoti™e th—t the xum˜er of ivents indi™—tor de™rements when you rot—te the kno˜ ™lo™kwiseD —nd in™rements when you rot—te the kno˜ ™ounter™lo™kwiseF VFƒ—ve —nd ™lose the †sF

10.13 Digital I/O
we—suring —nd gener—ting digit—l v—lues is used in — v—riety of —ppli™—tionsD in™luding ™ontrolling rel—ys —nd monitoring —l—rm st—tesF qener—llyD me—suring —nd gener—ting digit—l v—lues is used in l—˜or—tory testingD produ™tion testingD —nd industri—l pro™ess monitoring —nd ™ontrolF higit—l sGy ™—n re—d from or write to — line or —n entire digit—l portD whi™h is — ™olle™tion of linesF ‰ou ™—n use the digit—l lines in — he devi™e to —™quire — digit—l v—lueF „his —™quisition is ˜—sed on softw—re timingF yn some devi™esD you ™—n ™on(gure the lines individu—lly to either me—sure or gener—te digit—l s—mplesF i—™h line ™orresponds to — ™h—nnel in the t—skF ‰ou ™—n use the digit—l port@sA in — he devi™e to —™quire — digit—l v—lue from — ™olle™tion of digit—l linesF „his —™quisition is ˜—sed on softw—re timingF ‰ou ™—n ™on(gure the ports individu—lly to either me—sure or gener—te digit—l s—mplesF i—™h port ™orresponds to — ™h—nnel in the t—skF

10.14 Digital Example VI
Exercise 10.7:
Note: „he vihs use neg—tive logi™F „h—t isD writing — I to the vih digit—l line turns o' the vihF ‡riting — H to the vih digit—l line turns on the vihF

IFypen the higit—l ix—mple †sD lo™—ted in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™E toryD —nd modify the ˜lo™k di—gr—m —s shown in pigure IHFPIF

PII

Figure 10.21

€l—™e the he essist—nt ixpress †sD lo™—ted on the pun™tions snput p—letteD in the ‡hile voopF gomplete the following steps to ™on(gure the ™ounter to perform event ™ountingF @—Aƒele™t higit—l sGy €ort yutput for the me—surement to m—keF @˜Aƒele™t hevI portH for the physi™—l ™h—nnel —nd ™li™k the pinish ˜uttonF @™Asn the higit—l yutput €ort „—sk gon(gur—tion di—log ˜ox th—t —ppe—rsD sele™t snvert ell vines sn €ort ˜e™—use the vihs use neg—tive logi™F @dAgli™k the yu ˜utton to ™lose the ™on(gur—tion di—log ˜oxF ell of the settings spe™i(ed for the t—sk —re s—ved intern—lly in the he essist—nt †sF €l—™e the fuild err—y fun™tionD lo™—ted on the pun™tions ell pun™tions err—y p—letteD on the ˜lo™k di—gr—mF ‡ire the fuild err—y fun™tion to the he essist—ntF gomplete the wiring of the ˜lo™k di—gr—mF „he foole—n ˜uttons on the front p—nel —re stored in —n —rr—y to simplify the ™odeF „he err—y ƒu˜set fun™tion extr—™ts only the (rst four elements in the —rr—yF „he output of the —rr—y su˜set needs to ˜e reversed ˜e™—use element H of the —rr—y is the most signi(™—nt ˜itF „he —rr—y is then ™onverted to — num˜er with the foole—n err—y to xum˜er fun™tionD —nd ™onverted into —n —rr—y of one elementF „his v—lue is p—ssed to the he essist—nt ixpress †s to write th—t v—lue to the portF PFƒ—ve the †sF QFhispl—y the front p—nel —nd run the †sF „urn the foole—n vihs on —nd o' —nd o˜serve the ™h—nges on the he ƒign—l e™™essoryF RFƒtop —nd ™lose the †sF

10.15 Summary, Tips, and Tricks on Data Acquisition and Waveforms
• weˆ is the prim—ry ™on(gur—tion —nd testing utility th—t is —v—il—˜le for the he devi™eF • „he he essist—nt is used to ™on(gure the he devi™e —nd perform d—t— —™quisitionF • wost progr—ms ™—n use the he essist—ntF por progr—ms th—t require —dv—n™ed timing —nd syn™hroniz—tionD use the †ss th—t ™ome with xsEhemxF

PIP

CHAPTER 10. DATA ACQUISITION AND WAVEFORMS

• „he he essist—nt ™—n perform —n—log inputD —n—log outputD ™ounterD —nd digit—l sGy —nd oper—tionsF

10.16 Additional Exercises for Data Acquisition and Waveforms
Exercise 10.8:
fuild — †s th—t ™ontinuously me—sures temper—ture twi™e per se™ond —nd displ—ys the temper—ture on — w—veform ™h—rtF sf the temper—ture goes over — preset limitD the †s should turn on — front p—nel vih —nd vih H on the he ƒign—l e™™essoryF „he vihs on the ˜ox —re l—˜eledF „he ™h—rt should plot ˜oth the temper—ture —nd limitF ƒ—ve the †s —s „emp wonitor with vihFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

Chapter 11

Instrument Control
11.1 Instrument Control Overview
‰ou —re not limited to the type of instrument th—t you ™ontrol if you ™hoose industryEst—nd—rd ™ontrol te™hnologiesF ‰ou ™—n use instruments from m—ny di'erent ™—tegoriesD in™luding seri—lD q€sfD †ˆsD €ˆsD ™omputerE˜—sed instrumentsD ithernetD ƒgƒsD gewegD —nd p—r—llel port devi™esF „his lesson des™ri˜es the two most ™ommon instrument ™ommuni™—tion methodsD q€sf —nd seri—l port ™ommuni™—tionF ‰ou must ™onsider the following issues with €g ™ontrol of instrument—tionX

• „ype of ™onne™tor @pinoutsA on the instrument • • •

Cables needed E nullEmodemD num˜er of pinsD m—leGfem—le Electrical properties involved E sign—l levelsD groundingD ™—˜le length restri™tions Communication protocols used E eƒgss ™omm—ndsD ˜in—ry ™omm—ndsD d—t— form—t

• ƒoftw—re drivers —v—il—˜le

11.2 GPIB Communication and Conguration
„he ANSI/IEEE Standard 488.1-1987D —lso known —s General Purpose Interface Bus @GPIBAD des™ri˜es — st—nd—rd interf—™e for ™ommuni™—tion ˜etween instruments —nd ™ontrollers from v—rious vendorsD su™h —s s™—nners —nd (lm re™ordersF st ™ont—ins inform—tion —˜out ele™tri™—lD me™h—ni™—lD —nd fun™tion—l spe™i(™—tionsF q€sf is — digit—lD VE˜it p—r—llel ™ommuni™—tion interf—™e with d—t— tr—nsfer r—tes of I w˜yteGs —nd higherD using — threeEwire h—ndsh—keF „he ˜us supports one ƒystem gontrollerD usu—lly — ™omputerD —nd up to IR —ddition—l instrumentsF „he exƒsGsiii ƒt—nd—rd RVVFPEIWWP extends siii RVVFI ˜y de(ning — ˜us ™ommuni™—tion proto™olD — ™ommon set of d—t— ™odes —nd form—tsD —nd — generi™ set of ™ommon devi™e ™omm—ndsF q€sf instruments o'er test —nd m—nuf—™turing engineers the widest sele™tion of vendors —nd instruments for gener—lEpurpose to spe™i—lized verti™—l m—rket test —ppli™—tionsF q€sf instruments h—ve tr—dition—lly ˜een used —s st—ndE—lone ˜en™htop instruments where me—surements —re t—ken ˜y h—ndF „he q€sf is — PRE™ondu™tor p—r—llel ˜us th—t ™onsists of eight d—t— linesD (ve ˜us m—n—gement lines @e„xD iysD spgD ‚ixD —nd ƒ‚AD three h—ndsh—ke linesD —nd eight ground linesF „he q€sf uses — ˜yteEseri—lD —syn™hronous d—t— tr—nsfer s™hemeF „his me—ns th—t whole ˜ytes —re sequenti—lly h—ndsh—ked —™ross the ˜us —t — speed th—t the slowest p—rti™ip—nt in the tr—nsfer determinesF fe™—use

PIQ

PIR

CHAPTER 11. INSTRUMENT CONTROL

the unit of d—t— on the q€sf is — ˜yteD the mess—ges tr—nsferred —re frequently en™oded —s eƒgss ™h—r—™ter stringsF

11.2.1 GPIB Addressing
ell q€sf devi™es —nd interf—™es must h—ve — unique q€sf —ddress ˜etween H —nd QHF eddress H is norm—lly —ssigned to the q€sf interf—™eF „he instruments on the q€sf ™—n use —ddresses I through QHF q€sf devi™es ™—n ˜e t—lkersD listenersD or ™ontrollersF e t—lker sends out d—t— mess—gesF visteners re™eive d—t— mess—gesF „he ™ontrollerD usu—lly — ™omputerD m—n—ges the )ow of inform—tion on the ˜usF st de(nes the ™ommuni™—tion links —nd sends q€sf ™omm—nds to devi™esF „he q€sf †ss —utom—ti™—lly h—ndle the —ddressing —nd most other ˜us m—n—gement fun™tionsF

11.2.2 Data Transfer Termination
‰ou ™—n termin—te — q€sf d—t— tr—nsfer in the following three w—ysX

• „he q€sf in™ludes — h—rdw—re line @iysA th—t ™—n ˜e —sserted with the l—st d—t— ˜yteF „his is the preferred methodF • €l—™e — spe™i(™ endEofEstring @iyƒA ™h—r—™ter —t the end of the d—t— string itselfF ƒome instruments use this method inste—d of or in —ddition to the iys line —ssertionF • „he listener ™ounts the ˜ytes h—ndsh—ked —nd stops re—ding when the listener re—™hes — ˜yte ™ount limitF „his method is often used —s — def—ult termin—tion method ˜e™—use the tr—nsfer stops on the logi™—l y‚ of iysD iyƒ @if usedA in ™onjun™tion with the ˜yte ™ountF „husD you typi™—lly set the ˜yte ™ount to equ—l or ex™eed the expe™ted num˜er of ˜ytes to ˜e re—dF

11.2.3 Restrictions
„o —™hieve the high d—t— tr—nsfer r—te th—t the q€sf w—s designed forD you must limit the num˜er of devi™es on the ˜us —nd the physi™—l dist—n™e ˜etween devi™esF „he following restri™tions —re typi™—lX

• e m—ximum sep—r—tion of R m ˜etween —ny two devi™es —nd —n —ver—ge sep—r—tion of P m over the entire ˜us • e m—ximum tot—l ™—˜le length of PH m • e m—ximum of IS devi™es ™onne™ted to e—™h ˜usD with —t le—st twoEthirds powered on
por highEspeed oper—tionD the following restri™tions —pplyX

• ell devi™es in the system must ˜e powered on • g—˜le lengths must ˜e —s short —s possi˜le with up to — m—ximum of IS m of ™—˜le for e—™h system • „here must ˜e —t le—st one equiv—lent devi™e lo—d per meter of ™—˜le
sf you w—nt to ex™eed these limit—tionsD you ™—n use — ˜us extender to in™re—se the ™—˜le length or — ˜us exp—nder to in™re—se the num˜er of devi™e lo—dsF ‰ou ™—n order ˜us extenders —nd exp—nders from x—tion—l snstrumentsF ‚efer to the x—tion—l snstruments q€sf support ‡e˜ site1 for more inform—tion —˜out q€sfF
Note:

1 http://www.ni.com/support/gpibsupp.htm

PIS

11.2.4 Software Architecture
„he softw—re —r™hite™ture for q€sf instrument ™ontrol using v—˜†si‡ is simil—r to the —rE ™hite™ture for heF „he q€sf interf—™e in™ludes — set of driversF „hese drivers —lso —re —v—il—˜le on the v—˜†si‡ gh —nd the m—jority of the drivers —re —v—il—˜le for downlo—d —t httpXGGniF™omGsupportGgpi˜GversionsFhtm2 F elw—ys inst—ll the newest version of these drivers unless otherwise instru™ted in the rele—se notes for either the q€sf interf—™e or v—˜†si‡F

(Windows)
…se weˆ to ™on(gure —nd test the q€sf interf—™eF weˆ inter—™ts with the v—rious di—gnosti™ —nd ™on(gur—tion tools inst—lled with the driver —nd —lso with the ‡indows ‚egistry —nd hevi™e w—n—gerF „he driverElevel softw—re is in the form of — hvv —nd ™ont—ins —ll the fun™tions th—t dire™tly ™ommuni™—te with the q€sf interf—™eF „he snstrument sGy †ss —nd fun™tions dire™tly ™—ll the driver softw—reF

11.2.4.1 Conguration Software (Windows)
(MAC OS and UNIX) ‚efer to the q€sf interf—™e do™ument—tion for inform—tion —˜out ™on(guring —nd testing the interf—™eF
Note:

weˆ is the ™on(gur—tion utility for x—tion—l snstruments softw—re —nd h—rdw—reF st —lso ™—n exe™ute system di—gnosti™sD —dd new ™h—nnelsD interf—™esD —nd virtu—l ™h—nnelsD —nd view devi™es —nd instruments ™onne™ted to the systemF ypen weˆ ˜y dou˜leE™li™king the i™on on the desktop or ˜y sele™ting „ools we—surement 8 eutom—tion ixplorer in v—˜†si‡F „he gon(gur—tion p—ne of weˆ in™ludes the following se™tions under wy ƒystemX

• •

Data Neighborhood E …se this se™tion to ™re—te —nd test virtu—l ™h—nnelsD —li—sesD —nd t—gs
to ™h—nnels or me—surements ™on(gured in hevi™es —nd snterf—™esF

Devices and Interfaces E …se this se™tion to ™on(gure resour™es —nd other physi™—l properties
of devi™es —nd interf—™es —nd to view —ttri˜utes of one or multiple devi™esD su™h —s seri—l num˜ersF

• • • • •

IVI Instruments E …se this se™tion to n—me —n s†s virtu—l instrumentD modify its propertiesD
—nd sw—p s†s instrumentsF

Scales E …se this se™tion to set up simple oper—tions to perform on d—t—D su™h —s s™—ling the temper—ture re—ding from the he ƒign—l e™™essory from volts to degrees gelsiusF Historical Data E …se this se™tion to —™™ess d—t—˜—ses —nd logged d—t—F Software E …se this se™tion to determine whi™h x—tion—l snstruments drivers —nd —ppli™—tion
softw—re —re inst—lled —nd their version num˜ersF

VI Logger Tasks E …se this se™tion to ™re—teD modifyD runD —nd view †s vogger t—sksF

„he ex—mple @pigure IIFIA shows — q€sf interf—™e in weˆ —fter ™li™king the ƒ™—n por snstruE ments ˜utton on the tool˜—rF
2 http://ni.com/support/gpib/versions.htm

PIT

CHAPTER 11. INSTRUMENT CONTROL

Figure 11.1

„he ‚emote ƒystems se™tion in the gon(gur—tion p—ne —llows you to view —nd ™on(gure remote systemsD su™h —s ‚„ ƒeries €ˆs gontrollersF gon(gure the o˜je™ts listed in weˆ ˜y rightE™li™king e—™h item —nd sele™ting —n option from the short™ut menuF

11.3 GPIB Conguration with MAX (Windows Only)
IF €ower o' the xs snstrument ƒimul—tor —nd ™on(gure it to ™ommuni™—te through q€sf ˜y setting the following left ˜—nk of swit™hes @pigure IIFPA on the side of the ˜oxF

Figure 11.2

PF €ower on the xs snstrument ƒimul—tor —nd verify th—t ˜oth the €ower —nd ‚e—dy vihs —re litF QF v—un™h weˆ ˜y either dou˜leE™li™king the i™on on the desktop or ˜y sele™ting „ools we—surement 8 eutom—tion ixplorer in v—˜†si‡F

PIU

RF ixp—nd the hevi™es —nd snterf—™es se™tion to displ—y the inst—lled interf—™esF sf — q€sf interf—™e is listedD the xsERVVFP softw—re is ™orre™tly lo—ded on the ™omputerF SF ƒele™t the q€sf interf—™e —nd ™li™k the €roperties ˜utton on the tool˜—r to displ—y the €ropE erties di—log ˜oxF TF ix—mine ˜ut do not ™h—nge the settings for the q€sf interf—™eD —nd ™li™k the yu ˜uttonF UF w—ke sure the q€sf interf—™e is still sele™ted in the hevi™es —nd snterf—™es se™tion —nd ™li™k the ƒ™—n for snstruments ˜utton on the tool˜—rF VF ixp—nd the q€sf ˜o—rd se™tionF yne instrument n—med snstrumentH —ppe—rsF WF gli™k snstrumentH to displ—y inform—tion —˜out it in the right p—ne of weˆF „he xs snstrument ƒimul—tor h—s — q€sf primary address @PADA of PF IHF gli™k the gommuni™—te with snstrument ˜utton on the tool˜—rF en inter—™tive window —pE pe—rsF ‰ou ™—n use it to queryD write toD —nd re—d from th—t instrumentF IIF „ype Bshxc in ƒend ƒtring —nd ™li™k the uery ˜uttonF „he instrument returns its m—ke —nd model num˜er in ƒtring ‚e™eivedF ‰ou ™—n use this window @pigure IIFQA to de˜ug instrument pro˜lems or to verify th—t spe™i(™ ™omm—nds work —s des™ri˜ed in the instrument do™ument—tionF

Figure 11.3

IPF „ype wieƒXhgc in ƒend ƒtring —nd ™li™k the uery ˜uttonF „he xs snstrument ƒimul—tor returns — simul—ted volt—ge me—surementF IQF gli™k the uery ˜utton —g—in to return — di'erent v—lueF IRF gli™k the ixit ˜uttonF ISF ƒet — †sƒe —li—s for the xs snstrument ƒimul—tor so you ™—n use the —li—s inste—d of h—ving to remem˜er the prim—ry —ddressF @—A ‡hile snstrumentH is sele™ted in weˆD ™li™k the †sƒe €roperties ˜utton to displ—y the €roperties di—log ˜oxF

PIV

CHAPTER 11. INSTRUMENT CONTROL

@˜A „ype devsim in the †sƒe eli—s (eld —nd ™li™k the yu ˜uttonF ‰ou will use this —li—s throughout this lessonF ITF ƒele™t pile ixit to exit weˆF

11.4 Using the Instrument I/O Assistant
„he snstrument sGy essist—nt lo™—ted on the pun™tions snput —nd pun™tions ell pun™tions snstrument sGy p—lettes is — v—˜†si‡ ixpress †s whi™h you ™—n use to ™omE muni™—te with mess—geE˜—sed instruments —nd gr—phi™—lly p—rse the responseF por ex—mpleD you ™—n ™ommuni™—te with —n instrument th—t uses — seri—lD ithernetD or q€sf interf—™eF …se the snstrument sGy essist—nt when —n instrument driver is not —v—il—˜leF „he snstrument sGy essist—nt org—nizes instrument ™ommuni™—tion into ordered stepsF „o use snstrument sGy essist—ntD you pl—™e steps into — sequen™eF es you —dd steps to the sequen™eD they —ppe—r in the ƒtep ƒequen™e windowF …se the view —sso™i—ted with — step to ™on(gure instrument sGyF „o l—un™h the snstrument sGy essist—ntD pl—™e the snstrument sGy essist—nt ixpress †s on the ˜lo™k di—gr—mF „he snstrument sGy essist—nt ™on(gur—tion di—log ˜ox —ppe—rsF sf it does not —ppe—rD dou˜leE™li™k the snstrument sGy essist—nt i™onF gomplete the following steps @pg PIVA to ™on(gure the snstrument sGy essist—ntF IF ƒele™t —n instrumentF snstruments th—t h—ve ˜een ™on(gured in weˆ —ppe—r in the ƒele™t —n instrument pullEdown menuF PF ghoose — gode gener—tion typeF †sƒe ™ode gener—tion —llows for more )exi˜ility —nd moduE l—rity th—n q€sf ™ode gener—tionF QF ƒele™t from the following ™ommuni™—tion steps using the edd ƒtep ˜uttonX

• • •

Query and Parse E ƒends — query to the instrumentD su™h —s Bshxc —nd p—rses the returned stringF „his step ™om˜ines the ‡rite ™omm—nd —nd ‚e—d —nd €—rse ™omm—ndF Write E ƒends — ™omm—nd to the instrumentF Read and Parse E ‚e—ds —nd p—rses d—t— from the instrumentF

RF efter —dding the desired num˜er of stepsD ™li™k the ‚un ˜utton to test the sequen™e of ™omE muni™—tion th—t you h—ve ™on(gured for the ixpress †sF SF gli™k the yu ˜utton to exit the snstrument sGy essist—nt ™on(gur—tion di—log ˜oxF v—˜†si‡ —dds input —nd output termin—ls to the snstrument sGy essist—nt ixpress †s on the ˜lo™k di—gr—m th—t ™orrespond to the d—t— you will re™eive from the instrumentF „o view the ™ode gener—ted ˜y the snstrument sGy essist—ntD rightE™li™k the snstrument sGy essist—nt i™on —nd sele™t ypen pront €—nel from the short™ut menuF „his ™onverts the ixpress †s to — su˜†sF ƒwit™h to the ˜lo™k di—gr—m to see the ™ode gener—tedF
Note:

yn™e —n ixpress †s h—s ˜een ™onverted to — su˜†sD it ™—nnot ˜e ™onverted ˜—™kF

PIW

11.5 Using the Instrument I/O Assistant Exercise
Exercise 11.1:

11.5.1 Front Panel
IFypen — ˜l—nk †sF PF„he front p—nel in pigure IIFR will result from ˜uilding the ˜lo™k di—gr—mF

Figure 11.4

11.5.2 Block Diagram
IFhispl—y —nd ˜uild the ˜lo™k di—gr—m shown in pigure IIFSF

Figure 11.5

@—A €l—™e the snstrument sGy essist—nt ixpress †sD lo™—ted on the pun™tions snput p—letteD on the ˜lo™k di—gr—mF gomplete the following steps to ™on(gure the ixpress †s in the snstrument sGy essist—nt di—log ˜oxF iFƒele™t devsim from the ƒele™t —n instrument pullEdown menu —nd sele™t †sƒe gode qener—tion from the gode gener—tion type pullEdown menuF iiFgli™k the edd ƒtep ˜uttonF gli™k uery —nd €—rse to write —nd re—d from the snstrument ƒimul—torF iiiF„ype Bshxc —s the ™omm—ndD sele™t \n —s the „ermin—tion ™h—r—™terD —nd ™li™k the ‚un this step ˜uttonF sf no error w—rning —ppe—rs in the lower h—lf of the di—log ˜oxD this step h—s su™™essfully ™ompletedF

PPH

CHAPTER 11. INSTRUMENT CONTROL

ivF„o p—rse the d—t— re™eivedD ™li™k the euto p—rse ˜uttonF xoti™e th—t „oken now —ppe—rs in the yutputs p—ne on the left side of the di—log ˜oxF „his v—lue represents the string returned from the identi(™—tion queryF ‚en—me „oken ˜y typing sh ƒtring in the „oken n—me text ˜oxF vFgli™k the edd ƒtep ˜uttonF gli™k uery —nd €—rseF „ype wieƒXhgc —s the ™omm—nd —nd ™li™k the ‚un this step ˜uttonF viF„o p—rse the d—t— re™eivedD ™li™k the euto p—rse ˜uttonF „he d—t— returned is — r—ndom numeri™ v—lueF ‚en—me „oken ˜y typing †olt—ge in the „oken n—me text ˜oxF viiFgli™k the yu ˜utton to exit the sGy essist—nt —nd return to the ˜lo™k di—gr—mF @˜A‚ightE™li™k the sh ƒtring output —nd sele™t gre—te sndi™—tor from the short™ut menuF @™A‚ightE™li™k the †olt—ge output —nd sele™t gre—te sndi™—tor from the short™ut menuF @dA‡ire the irror yut output to the ƒimple irror r—ndler †sF PFhispl—y the front p—nel —nd run the †sF ‚esize the string indi™—tor if ne™ess—ryF QFƒ—ve the †s —s ‚e—d snstrument h—t—Fvi in the gX\ixer™ises\v—˜†si‡ f—si™s s diE re™toryF RF‚ightE™li™k the sGy essist—nt —nd sele™t ypen pront €—nelF gli™k the gonvert ˜utton when —sked if you w—nt to ™onvert to — su˜†sF SF†iew the ™ode gener—ted ˜y the sGy essist—ntF ‡here is the ™omm—nd Bshxc written to the snstrument ƒimul—torc ‡here is the volt—ge ˜eing re—dc TFƒele™t pile ixit to exit the su˜†sF ho not s—ve ™h—ngesF

11.6 VISA
11.6.1 Overview
sn IWWQD x—tion—l snstruments joined with qen‚—dD ‚—™—l snstrumentsD „ektronixD —nd ‡—vetek to form the †ˆsplug8pl—y ƒystems elli—n™eF „he go—ls of the —lli—n™e —re to ensure multivendor interoper—˜ility for †ˆs systems —nd to redu™e the development time for —n oper—tion—l systemF e key p—rt of these go—ls w—s to develop — new st—nd—rd for instrument driversD soft front p—nelsD —nd sGy interf—™e softw—reF „he term †ˆsplug8pl—y h—s ™ome to indi™—te the ™onformity of h—rdw—re —nd softw—re to these st—nd—rdsF sn dire™ting their e'orts tow—rd softw—re st—nd—rdiz—tionD †ˆsplug8pl—y mem˜ers identi(ed the following set of guiding prin™iplesX

• w—ximize e—se of use —nd perform—n™e • w—int—in longEterm ™omp—ti˜ility with the inst—lled ˜—se • w—int—in multivendor open —r™hite™tures • w—ximize multipl—tform ™—p—˜ility • w—ximize exp—nd—˜ility —nd modul—rity in fr—meworks • w—ximize softw—re reuse • ƒt—nd—rdize the use of system softw—re elements

PPI

• „re—t instrument drivers —s p—rt of the instrument • e™™ommod—te est—˜lished st—nd—rds • w—ximize ™ooper—tive support of users

VISA is the †ˆsplug8pl—y sGy softw—re l—ngu—ge th—t is the ˜—sis for the softw—re st—nd—rdiz—E tion e'orts of the †ˆsplug8pl—y ƒystems elli—n™eF †sƒe ˜y itself does not provide instrument—tion progr—mming ™—p—˜ilityF st is — highElevel e€s th—t ™—lls in lowElevel driversF †sƒe ™—n ™ontrol †ˆsD q€sfD seri—lD or ™omputerE˜—sed instruments —nd m—kes the —ppropri—te driver ™—lls dependE ing on the type of instrument usedF ‡hen de˜ugging †sƒe pro˜lemsD remem˜er this hier—r™hyF en —pp—rent †sƒe pro˜lem ™ould ˜e —n inst—ll—tion pro˜lem with one of the drivers th—t †sƒe ™—llsF sn v—˜†si‡D †sƒe is — single li˜r—ry of fun™tions you use to ™ommuni™—te with q€sfD seri—lD †ˆsD —nd ™omputerE˜—sed instrumentsF ‰ou do not need to use sep—r—te sGy p—lettes to progr—m —n instrumentF por ex—mpleD some instruments give you — ™hoi™e for the type of interf—™eF sf the v—˜E †si‡ instrument driver were written with fun™tions on the pun™tions ell pun™tions snstrument sGy q€sf p—letteD those instrument driver †ss would not work for the instrument with the seri—l port interf—™eF †sƒe solves this pro˜lem ˜y providing — single set of fun™tions th—t work for —ny type of interf—™eF „hereforeD —ll v—˜†si‡ instrument drivers use †sƒe —s the sGy l—ngu—geF

11.6.2 VISA Programming Terminology
„he fun™tions you ™—n use with — resour™e —re oper—tionsF „he resour™e —lso h—s v—ri—˜lesD or —ttri˜utesD th—t ™ont—in inform—tion rel—ted to the resour™eF „he following terminology is simil—r to th—t used for instrument driver †ssX

• •

™ommuni™—tion ™h—nnelF ‡hen you open — session to — resour™eD v—˜†si‡ returns — †sƒe session num˜erD whi™h is — unique refnum to th—t instrumentF ‰ou must use the session num˜er in —ll su˜sequent †sƒe fun™tionsF

Resource E eny instrument in the systemD in™luding seri—l —nd p—r—llel portsF Session E ‰ou must open — †sƒe session to — resour™e to ™ommuni™—te with itD simil—r to —

Instrument Descriptor E ix—™t n—me of — resour™eF „he des™riptor spe™i(es the interf—™e type @q€sfD †ˆsD eƒ‚vAD the —ddress of the devi™e @logi™—l —ddress or prim—ry —ddressAD —nd the †sƒe session type @sxƒ„‚ or iventAF

„he instrument des™riptor is simil—r to — telephone num˜erD the resour™e is simil—r to the person with whom you w—nt to spe—kD —nd the session is simil—r to the telephone lineF i—™h ™—ll uses its own lineD —nd ™rossing these lines results in —n errorF „he t—˜le @pg PPIA shows the proper synt—x for the instrument des™riptorF

Interface

esyn™hronous seri—l q€sf †ˆs instrument through em˜edded or wˆs˜us ™ontroller q€sfE†ˆs ™ontroller

Syntax

eƒ‚v‘˜o—rd“‘XXsxƒ„‚“ q€sf‘˜o—rd“XXprim—ry —ddress‘XXse™ond—ry —ddress“‘XXsxƒ„‚“ †ˆs‘˜o—rd“XX†ˆs logi™—l —ddress‘XXsxƒ„‚“ q€sfE†ˆs‘˜o—rd“‘XXq€sfE†ˆs prim—ry —ddress“XX†ˆs logi™—l —dE dress‘XXsxƒ„‚“

‰ou ™—n use —n —li—s you —ssign in weˆ inste—d of the instrument des™riptorF @Mac OS A idit the vis—™onfFini (le to —ssign — †sƒe —li—sF @UNIX A …se the vis—™onf utilityF

PPP

CHAPTER 11. INSTRUMENT CONTROL

sf you ™hoose not to use the snstrument sGy essist—nt to —utom—ti™—lly gener—te ™ode for youD you ™—n still write — †s to ™ommuni™—te with the instrumentF „he most ™ommonly used †sƒe ™ommuni™—tion fun™tions —re the †sƒe ‡rite —nd †sƒe ‚e—d fun™tionsF wost instruments require you to send inform—tion in the form of — ™omm—nd or query ˜efore you ™—n re—d inform—tion ˜—™k from the instrumentF „hereforeD the †sƒe ‡rite fun™tion is usu—lly followed ˜y — †sƒe ‚e—d fun™tionF

11.7 Programming with VISA
IF w—ke sure the snstrument ƒimul—tor is powered on —nd ™onne™ted to the q€sf snterf—™eF

11.7.1 Front Panel
IF ypen — ˜l—nk †sF „he front p—nel shown in pigure IIFT will result from ˜uilding the ˜lo™k di—gr—mF

Figure 11.6

11.7.2 Block Diagram
IF fuild the ˜lo™k di—gr—m shown in pigure IIFUF

PPQ

Figure 11.7

@—A

€l—™e the †sƒe ypen fun™tionD lo™—ted on the pun™tions ell pun™tions snstrument sGy †sƒe †sƒe edv—n™ed p—letteD on the ˜lo™k di—E gr—mF „his fun™tion opens — †sƒe session with —n instrumentF ‚ightE™li™k the †sƒe resour™e n—me input —nd sele™t gre—te gontrol from the short™ut menuF €l—™e the †sƒe ‡rite fun™tionD lo™—ted on the pun™tions ell pun™tions snstrument sGy †sƒe p—letteD on the ˜lo™k di—gr—mF „his fun™tion writes — string to the instrumentF ‚ightE™li™k the write ˜u'er input —nd sele™t gre—te gontrol from the short™ut menuF €l—™e the †sƒe ‚e—d fun™tionD lo™—ted on the pun™tions ell pun™tions snstrument sGy †sƒe p—letteD on the ˜lo™k di—gr—mF „his fun™tion re—ds d—t— from the instrumentF ‚ightE™li™k the ˜yte ™ount input —nd sele™t gre—te gontrol from the short™ut menuF ‚ightE™li™k the re—d ˜u'er output —nd sele™t gre—te sndi™—tor from the short™ut menuF €l—™e the †sƒe glose fun™tionD lo™—ted on the pun™tions ell pun™tions snstrument sGy †sƒe †sƒe edv—n™ed p—letteD on the ˜lo™k di—E gr—mF „his fun™tion ™loses the session with the instrument —nd rele—ses —ny system resour™es th—t were usedF €l—™e the ƒimple irror r—ndler †sD lo™—ted on the pun™tions ell pun™tions „ime 8 hi—log p—letteD on the ˜lo™k di—gr—mF „his †s ™he™ks error ™onditions —nd opens — di—log ˜ox with error inform—tion if —n error o™™ursF

@˜A

@™A

@dA

@eA

PF ƒ—ve the †s —s wy †sƒe ‡rite 8 ‚e—dFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF QF hispl—y the front p—nelF inter devsim in the †sƒe resour™e n—me input —nd set ˜yte ™ount to PHH to m—ke sure you re—d —ll the inform—tionF „ype Bshxc in the write ˜u'er —nd run the †sF RF „he top of the instrument simul—tor lists other ™omm—nds th—t —re re™ognized ˜y this instruE mentF „ry other ™omm—nds in this †sF SF glose the †s when (nishedF

PPR

CHAPTER 11. INSTRUMENT CONTROL

11.8 About Instrument Drivers
en instrument driver is — set of modul—r softw—re fun™tions th—t use the instrument ™omm—nds or proto™ol to perform ™ommon oper—tions with the instrumentF „he instrument driver —lso ™—lls the —ppropri—te †ss —nd fun™tions for the instrumentF v—˜†si‡ instrument drivers elimin—te the need to le—rn the ™omplexD lowElevel progr—mming ™omm—nds for e—™h instrument „he v—˜†si‡ instrument driver li˜r—ry ™ont—ins instrument drivers for — v—riety of proE gr—mm—˜le instruments th—t use the q€sfD †ˆsD €ˆsD or seri—l interf—™esF snstrument drivers re™eiveD p—rseD —nd s™—le the response strings from instruments into s™—led d—t— th—t you ™—n use in test —ppli™—tionsF snstrument drivers help m—ke test —ppli™—tions e—sier to m—int—in ˜e™—use the drivers ™ont—in —ll the sGy for —n instrument in one li˜r—ryD sep—r—te from other ™odeF ‡hen you upgr—de h—rdw—reD it is e—sier to upgr—de the —ppli™—tion ˜e™—use —ll the ™ode spe™i(™ to th—t instrument is ™ont—ined in the instrument driverF „he v—˜†si‡ instrument driver li˜r—ry is lo™—ted on the v—˜†si‡ ghF ‰ou —lso ™—n downlo—d drivers from the x—tion—l snstruments ‡e˜ site —t niF™omGidnet3 F „o inst—ll the v—˜†si‡ instruE ment driversD de™ompress the instrument driver (le to get — dire™tory of instrument driver (lesF €l—™e this dire™tory in the \l—˜view\instrFli˜F „he next time you open v—˜†si‡D you ™—n —™™ess the instrument driver †ss on the pun™tions ell pun™tions snstrument sGy snstrument hrivers p—letteF

11.8.1 Getting Started Example
ell instrument drivers in™lude —n ex—mple th—t ™—n ˜e used to test ™ommuni™—tion with the inE strumentF „his ex—mple is usu—lly ™—lled the qetting ƒt—rted ix—mpleF ƒpe™ify the ™orre™t q€sf —ddress @or †sƒe ‚esour™e x—meA for the instrument —s ™on(gured in weˆF

11.9 Using Instrument Driver VIs
snstrument drivers —re developed with — spe™i(™ instrument in mind —nd elimin—te the need for the user to know the ex—™t siii RVVFP ™omm—nds th—t the instrument is expe™tingF

11.9.1 Components of an Instrument Driver
ell instrument drivers in the li˜r—ry h—ve the s—me ˜—si™ †s hier—r™hyF „he hier—r™hyD sequen™e of †ssD —nd error h—ndling —re the s—me —s those used in other —re—s of sGy in v—˜†si‡D su™h —s (le sGyD heD „g€Gs€D —nd so onF ‚efer to the pile sGy †ss —nd pun™tions @ƒe™tion WFRA se™tion of the ƒtrings —nd pile sGy lessonD for more inform—tion —˜out error h—ndlingF pigure IIFV shows the hier—r™hy of —n instrument driverF
3 http://www.ni.com/devzone/idnet/

PPS

Figure 11.8

„he highElevel fun™tions —re ˜uilt from the lowElevel fun™tionsF por the most ™ontrol over the instrumentD use the lowElevel fun™tionsF „he highElevel fun™tions —re e—sy to use —nd h—ve soft front p—nels th—t resem˜le the instrumentF snstrument drivers h—ve †ss in the following ™—tegoriesX

Initialize E sniti—lizes the ™ommuni™—tion ™h—nnel to the instrumentF Conguration
trigger r—teF

„his †s —lso ™—n perform —n identi(™—tion query —nd reset oper—tionD —nd it ™—n perform —ny ne™ess—ry —™tions to pl—™e the instrument in its def—ult powerEon st—te or other spe™i(ed st—teF E gon(gures the instrument to perform oper—tionsD su™h —s setting up the

• •

Action/Status

E gont—ins two types of †ssF e™tion †ss ™—use the instrument to initi—te or termin—te test —nd me—surement oper—tionsF ƒt—tus †ss o˜t—in the ™urrent st—tus of the instrument or the st—tus of pending oper—tionsF en ex—mple of —n —™tion †s is e™quire ƒingle ƒhotF en ex—mple of — st—tus †s is uery „r—nsfer €endingF

• • •

Data E „r—nsfers d—t— to or from the instrumentD su™h —s re—ding — me—sured w—veform from the instrument or downlo—ding — w—veform to the instrumentF Utility E €erforms — wide v—riety of fun™tionsD su™h —s resetD selfEtestD error queryD —nd revision
queryF

Close E „ermin—tes the ™ommuni™—tion ™h—nnel to the instrument —nd de—llo™—tes the resour™es for th—t instrumentF

ell x—tion—l snstruments instrument drivers —re required to implement the following fun™tionsX initi—lizeD ™loseD resetD selfEtestD revision queryD error queryD —nd error mess—geF

PPT

CHAPTER 11. INSTRUMENT CONTROL

11.9.1.1 Application Examples
v—˜†si‡ —lso in™ludes —ppli™—tion ex—mple †ss th—t show how to use the ™omponent †ss to perform ™ommon t—sksF „ypi™—llyD this in™ludes ™on(guringD triggeringD —nd returning me—surements from —n instrumentF en —ppli™—tion ex—mple †s does not initi—lize or ™lose the instrument driverF „hese †ss —re not intended to ˜e — soft front p—nel for the instrument ˜ut r—ther to demonstr—te some instrument driver ™—p—˜ilities —nd guide you in developing your own †sF

11.9.2 Inputs and Outputs of Instrument Driver VIs
tust —s —ll instrument drivers sh—re — ™ommon †s hier—r™hyD they —lso sh—re ™ommon inputs —nd outputsF

11.9.2.1 Resource Name or Instrument Descriptor
‡hen you initi—lize the ™ommuni™—tion ™h—nnel to —n instrumentD you must know the resour™e n—me or instrument des™riptorF e resour™e is —n instrument or interf—™eD —nd the instrument des™riptor is the ex—™t n—me —nd lo™—tion of — resour™e in the following form—tX

Interface Type[board index]::Address::INSTR
yption—l p—r—meters —re shown in squ—re ˜r—™kets ‘ “F por ex—mpleD q€sfXXPXXsxƒ„‚ is the instruE ment des™riptor for — q€sf instrument —t —ddress PF „he †sƒe resour™e n—me ™ontrol lo™—ted on the gontrols ell gontrols sGy p—lette is simil—r to the he ™h—nnel n—me ™ontrolD ˜ut it is spe™i(™—lly used for instrument ™ontrolF ‚efer to the †sƒe @ƒe™tion IIFTA se™tion for more inform—tion —˜out †sƒeF ‰ou ™—n use weˆ to determine wh—t resour™es —nd instrument —ddresses —re —v—il—˜leD —s you did in q€sf gon(gur—tion with weˆ @ƒe™tion IIFQA when you —ssigned — †sƒe —li—s of devsim to the xs snstrument ƒimul—torF „he —li—s m—kes it e—sier to ™ommuni™—te with instruments ˜e™—use you no longer need to memorize whi™h interf—™e —nd —ddress e—™h instrument usesF ‰ou ™—n use the —li—s in the †sƒe resour™e n—me ™ontrol inste—d of the instrument des™riptorF por ex—mpleD you ™—n type devsim inste—d of q€sfXXPXXsxƒ„‚F

11.9.2.2 VISA Sessions
efter you initi—lize —n instrumentD the sniti—lize †s returns — †sƒe session num˜erF „he †sƒe session is — ™onne™tion or link to — resour™eD su™h —s the instrumentF ‰ou do not need to displ—y this v—lueF roweverD e—™h time you ™ommuni™—te with th—t devi™eD you must wire the †sƒe session input on the instrument driver †ssF efter you (nish ™ommuni™—ting with the instrumentD you use the glose †s to ™lose —ll referen™es or resour™es for the instrumentF

Example 11.1: Example Instrument Driver Application
„he ˜lo™k di—gr—m in pigure IIFW initi—lizes the instrument with the devsim —li—sD uses — ™on(gur—tion †s to sele™t — w—veformD uses two d—t— †ss to re—d the w—veform —nd the w—veform s™—ling inform—tionD ™loses the instrumentD —nd ™he™ks the error st—tusF ivery —ppli™—tion th—t uses —n instrument driver h—s — simil—r sequen™e of eventsF

PPU

Figure 11.9

11.10 Voltage Monitor VI
11.10.1 Front Panel
IF ƒele™t pile xewD then sele™t „empl—te pr—meworks ƒingle voop eppli™—tion templ—te †sF PF fuild the front p—nel shown in pigure IIFIHF ƒingle voop eppli™—tion to open the

Figure 11.10

…se the following guidelines to help you ™onstru™t the front p—nelF

• €l—™e — †sƒe resour™e n—me ™ontrolD lo™—ted on the gontrols ell gontrols on the front p—nelF • ƒet the xE—xis s™—le of the w—veform ™h—rt to show in™rement—l v—luesF

sGy p—letteD

PPV

CHAPTER 11. INSTRUMENT CONTROL

11.10.2 Block Diagram
IF fuild the ˜lo™k di—gr—m shown in pigure IIFIIF

Figure 11.11

@—A gre—te two shift registers ˜y rightE™li™king the right or left ˜order of the loop —nd sele™ting edd ƒhift ‚egister from the short™ut menuF @˜A €l—™e the xs hi†ƒsw sniti—lize †sD lo™—ted on the pun™tions snput snstrument hrivers xs hevi™e ƒimul—tor p—letteD on the ˜lo™k di—gr—mF „his †s opens ™ommuni™—E tion ˜etween v—˜†si‡ —nd the xs snstrument ƒimul—torF

• ‚ightE™li™k the sh uery input —nd sele™t gre—te gonst—nt from the short™ut menuF …se the yper—ting tool to ™h—nge the ™onst—nt to — p—lse v—lueF • ‡ire the foole—n ™onst—nt to the ‚eset inputF
@™A €l—™e the xs hi†ƒsw wultimeter gon(gur—tion †sD lo™—ted on the pun™tions snput snstrument hrivers xs hevi™e ƒimul—tor gon(gur—tion p—letteD on the ˜lo™k di—gr—mF „his †s ™on(gures the r—nge of volt—ge me—surements th—t the xs snstrument ƒimul—tor gener—tesF „he def—ult is HFH to IHFH † hgF €l—™e the xs hi†ƒsw we—sure hg †olt—ge †sD lo™—ted on the pun™tions snput snstrument hrivers xs hevi™e ƒimul—tor h—t— p—letteD on the ˜lo™k di—gr—mF „his †s returns — simul—ted volt—ge me—surement from the xs snstrument ƒimul—torF

@dA

PPW

@eA

€l—™e the xs hi†ƒsw glose †sD lo™—ted on the pun™tions snput snstrument hrivers xs hevi™e ƒimul—tor p—letteD on the ˜lo™k di—gr—mF „his †s ends ™ommuni™—tion ˜etween v—˜†si‡ —nd the xs snstrument ƒimul—torF €l—™e the w—x 8 win fun™tionD lo™—ted on the pun™tions ell pun™tions gomp—rison p—letteD on the ˜lo™k di—gr—mF …se two of these fun™tions to ™he™k the ™urrent volt—ge —g—inst the minimum —nd m—ximum v—lues stored in the shift registersF €l—™e the ƒimple irror r—ndler †sD lo™—ted on the pun™tions ell pun™tions „ime 8 hi—log p—letteD on the ˜lo™k di—gr—mF „his †s displ—ys — di—log ˜ox if —n error o™™urs —nd displ—ys the error inform—tionF €l—™e the …n˜undle ˜y x—me fun™tionD lo™—ted on the pun™tions ell pun™tions gluster p—letteD on the ˜lo™k di—gr—mF „his fun™tion —™™epts st—tus from the error ™lusterF €l—™e the yr fun™tionD lo™—ted on the pun™tions erithmeti™ 8 gomp—rison ixpress foole—n p—letteD on the ˜lo™k di—gr—mF „his fun™tion ™onE trols when the ‡hile voop endsF sf there is —n error or you ™li™k the ƒtop ˜uttonD the ‡hile voop stopsF ƒet the w—it for the „ime hel—y ixpress †s to I se™ondF ‰ou do not need to wire every termin—l for e—™h nodeF ‡ire only the ne™ess—ry inputs for e—™h nodeD su™h —s instrument des™riptorD †sƒe sessionD —nd error sGyF
Note:

@fA

@gA

@hA

@iA

@jA

@kA ‡ire the ˜lo™k di—gr—m —s shown in pigure IIFIIF

PF ƒ—ve the †s —s †olt—ge wonitorFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF QF w—ke sure the xs snstrument ƒimul—tor is powered onF RF hispl—y the front p—nel —nd run the †sF „he vihs —ltern—te ˜etween visten —nd „—lk —s v—˜†si‡ ™ommuni™—tes with the q€sf instrument on™e — se™ond to get — simul—ted volt—ge re—dingF „his volt—ge displ—ys on the ™h—rtD —nd the minimum —nd m—ximum v—lues upd—te —™™ordinglyF SF ƒtop —nd ™lose the †sF

11.11 Serial Port Communication
ƒeri—l ™ommuni™—tion @pigure IIFIPA is — popul—r me—ns of tr—nsmitting d—t— ˜etween — ™omputer —nd — peripher—l devi™e su™h —s — progr—mm—˜le instrument or even —nother ™omputerF ƒeri—l ™ommuni™—tion uses — tr—nsmitter to send d—t—D one ˜it —t — timeD over — single ™ommuni™—tion line to — re™eiverF ‰ou ™—n use this method when d—t— tr—nsfer r—tes —re low or you must tr—nsfer d—t— over long dist—n™esF ƒeri—l ™ommuni™—tion is popul—r ˜e™—use most ™omputers h—ve one or more seri—l portsD so no extr— h—rdw—re is needed other th—n — ™—˜le to ™onne™t the instrument to the ™omputer or two ™omputers togetherF

PQH

CHAPTER 11. INSTRUMENT CONTROL

Figure 11.12:

1: RS-232 Instrument,2: RS-232 Cable, 3: Serial Port

ƒeri—l ™ommuni™—tion requires th—t you spe™ify the following four p—r—metersX

• „he ˜—ud r—te of the tr—nsmission • „he num˜er of d—t— ˜its en™oding — ™h—r—™ter • „he sense of the option—l p—rity ˜it • „he num˜er of stop ˜its
i—™h tr—nsmitted ™h—r—™ter is p—™k—ged in — ™h—r—™ter fr—me th—t ™onsists of — single st—rt ˜it followed ˜y the d—t— ˜itsD the option—l p—rity ˜itD —nd the stop ˜it or ˜itsF pigure IIFIQ shows — typi™—l ™h—r—™ter fr—me en™oding the letter mF

Figure 11.13

f—ud r—te is — me—sure of how f—st d—t— —re moving ˜etween instruments th—t use seri—l ™omE muni™—tionF ‚ƒEPQP uses only two volt—ge st—tesD ™—lled we‚u —nd ƒ€egiF sn su™h — twoEst—te

PQI

™oding s™hemeD the ˜—ud r—te is identi™—l to the m—ximum num˜er of ˜its of inform—tionD in™luding ™ontrol ˜itsD th—t —re tr—nsmitted per se™ondF we‚u is — neg—tive volt—geD —nd ƒ€egi is positiveF pigure IIFIQ shows how the ide—lized sign—l looks on —n os™illos™opeF „he following is the truth t—˜le for ‚ƒEPQPX

Signal > 3V = 0 Signal > −3V = 1
„he output sign—l level usu—lly swings ˜etween CIP † —nd EIP †F „he de—d —re— ˜etween CQ † —nd EQ † is designed to —˜sor˜ line noiseF e st—rt ˜it sign—ls the ˜eginning of e—™h ™h—r—™ter fr—meF st is — tr—nsition from neg—tive @we‚uA to positive @ƒ€egiA volt—geF sts dur—tion in se™onds is the re™ipro™—l of the ˜—ud r—teF sf the instrument is tr—nsmitting —t WDTHH ˜—udD the dur—tion of the st—rt ˜it —nd e—™h su˜sequent ˜it is —˜out HFIHR msF „he entire ™h—r—™ter fr—me of eleven ˜its would ˜e tr—nsmitted in —˜out IFIRT msF h—t— ˜its —re tr—nsmitted upside down —nd ˜—™kw—rdsF „h—t isD inverted logi™ is usedD —nd the order of tr—nsmission is from le—st signi(™—nt ˜it @vƒfA to most signi(™—nt ˜it @wƒfAF „o interpret the d—t— ˜its in — ™h—r—™ter fr—meD you must re—d from right to left —nd re—d I for neg—tive volt—ge —nd H for positive volt—geF „his yields IIHIIHI @˜in—ryA or Th @hexAF en eƒgss ™onversion t—˜le shows th—t this is the letter mF en option—l p—rity ˜it follows the d—t— ˜its in the ™h—r—™ter fr—meF „he p—rity ˜itD if presentD —lso follows inverted logi™D I for neg—tive volt—ge —nd H for positive volt—geF „his ˜it is in™luded —s — simple me—ns of error h—ndlingF ‰ou spe™ify —he—d of time whether the p—rity of the tr—nsmission is to ˜e even or oddF sf the p—rity is ™hosen to ˜e oddD the tr—nsmitter then sets the p—rity ˜it in su™h — w—y —s to m—ke —n odd num˜er of ones —mong the d—t— ˜its —nd the p—rity ˜itF „his tr—nsmission uses odd p—rityF „here —re (ve ones —mong the d—t— ˜itsD —lre—dy —n odd num˜erD so the p—rity ˜it is set to HF „he l—st p—rt of — ™h—r—™ter fr—me ™onsists of ID IFSD or P stop ˜itsF „hese ˜its —re —lw—ys represented ˜y — neg—tive volt—geF sf no further ™h—r—™ters —re tr—nsmittedD the line st—ys in the neg—tive @we‚uA ™onditionF „he tr—nsmission of the next ™h—r—™ter fr—meD if —nyD is her—lded ˜y — st—rt ˜it of positive @ƒ€egiA volt—geF

11.11.1 How Fast Can I Transmit?
unowing the stru™ture of — ™h—r—™ter fr—me —nd the me—ning of ˜—ud r—te —s it —pplies to seri—l ™ommuni™—tionD you ™—n ™—l™ul—te the m—ximum tr—nsmission r—teD in ™h—r—™ters per se™ondD for — given ™ommuni™—tion settingF „his r—te is just the ˜—ud r—te divided ˜y the ˜its per fr—meF sn the previous ex—mpleD there —re — tot—l of eleven ˜its per ™h—r—™ter fr—meF sf the tr—nsmission r—te is set —t WDTHH ˜—udD you get 9,600 = 872 ™h—r—™ters per se™ondF xoti™e th—t this is the m—ximum 11 ™h—r—™ter tr—nsmission r—teF „he h—rdw—re on one end or the other of the seri—l link might not ˜e —˜le to re—™h these r—tesD for v—rious re—sonsF

11.11.2 Hardware Overview
„here —re m—ny di'erent re™ommended st—nd—rds of seri—l port ™ommuni™—tionD in™luding the folE lowing most ™ommon typesF

—™teristi™s @volt—ge levelsAD interf—™e me™h—ni™—l ™h—r—™teristi™s @™onne™torsAD fun™tion—l des™ription

11.11.2.1 RS-232 „he RS-232 is — st—nd—rd developed ˜y the Electronic Industries Association @EIAA —nd other interested p—rtiesD spe™ifying the seri—l interf—™e ˜etween Data Terminal Equipment @DTEA —nd Data Communications Equipment @DCEAF „he ‚ƒEPQP st—nd—rd in™ludes ele™tri™—l sign—l ™h—rE

PQP

CHAPTER 11. INSTRUMENT CONTROL

of inter™h—nge ™ir™uits @the fun™tion of e—™h ele™tri™—l sign—lAD —nd some re™ipes for ™ommon kinds of termin—lEtoEmodem ™onne™tionsF „he most frequently en™ountered revision of this st—nd—rd is ™—lled ‚ƒEPQPgF €—rts of this st—nd—rd h—ve ˜een —dopted @with v—rious degrees of (delityA for use in seri—l ™ommuni™—tions ˜etween ™omputers —nd printersD modemsD —nd other equipmentF „he seri—l ports on st—nd—rd sfwE™omp—ti˜le person—l ™omputers follow ‚ƒEPQPF

11.11.2.2 RS-449, RS-422, RS-423
„he ‚ƒERRWD ‚ƒERPPD —nd ‚ƒERPQ —re —ddition—l ise seri—l ™ommuni™—tion st—nd—rds rel—ted to ‚ƒE PQPF ‚ƒERRW w—s issued in IWUS —nd w—s supposed to supersede ‚ƒEPQPD ˜ut few m—nuf—™turers h—ve em˜r—™ed the newer st—nd—rdF ‚ƒERRW ™ont—ins two su˜spe™i(™—tions ™—lled ‚ƒERPP —nd ‚ƒERPQF ‡hile ‚ƒEPQP modul—tes — sign—l with respe™t to — ™ommon groundD or singleEended tr—nsmissionD ‚ƒERPP modul—tes two sign—ls —g—inst e—™h otherD or di'erenti—l tr—nsmissionF „he ‚ƒEPQPg re™eiver senses whether the re™eived sign—l is su0™iently neg—tive with respe™t to ground to ˜e — logi™—l ID where—s the ‚ƒERPP re™eiver senses whi™h line is more neg—tive th—n the otherF „his m—kes ‚ƒERPP more immune to noise —nd interferen™e —nd more vers—tile over longer dist—n™esF „he w—™intosh seri—l ports follow ‚ƒERPPD whi™h ™—n ˜e ™onverted to ‚ƒERPQ ˜y proper wiring of —n extern—l ™—˜leF ‚ƒERPQ ™—n then ™ommuni™—te with most ‚ƒEPQP devi™es over dist—n™es of IS m or soF

11.11.2.3 RS-232 Cabling
hevi™es th—t use seri—l ™—˜les for their ™ommuni™—tion —re split into two ™—tegoriesF „hese —re hgi —nd h„iF hgi —re devi™es su™h —s — modemD „e —d—pterD plotterD —nd so onD while h„i is — ™omputer or termin—lF ‚ƒEPQP seri—l ports ™ome in two sizesD the hE„ype PSEpin ™onne™tor —nd the hE„ype WEpin ™onne™torF foth of these ™onne™tors —re m—le on the ˜—™k of the €gF „husD you require — fem—le ™onne™tor @pigure IIFIRA on the devi™eF pg PQP shows the pin ™onne™tions for the WEpin —nd PSEpin hE„ype ™onne™torsF

Figure 11.14

h—t—

Function

r—ndsh—ke

gommon yther

„xh ‚xh ‚„ƒ g„ƒ hƒ‚ hgh ƒ„‚ gom ‚s

Signal

Q P U V T I R S W

PIN

yutput snput yutput snput snput snput yutput ! yutput

DTE

snput yutput snput yutput yutput yutput snput ! snput

DCE

PQQ

„he hfEW ™onne™tor is o™™—sion—lly found on sm—ller ‚ƒEPQP l—˜ equipmentF st is ™omp—™tD yet h—s enough pins for the ™ore set of seri—l pins @with one pin extr—AF „he hfEW pin num˜ers for tr—nsmit —nd re™eive @Q —nd PA —re opposite of those on the hfEPS ™onne™tor @P —nd QAF fe ™—reful of this di'eren™e when you —re determining if — devi™e is h„i or hgiF
Note:

„he hfEPS ™onne™tor @pigure IIFISA is the st—nd—rd ‚ƒEPQP ™onne™torD with enough pins to ™over —ll the sign—ls spe™i(ed in the st—nd—rdF pg PQQ shows only the ™ore set of pins th—t —re used for most ‚ƒEPQP interf—™esF

Figure 11.15

h—t—

Function

r—ndsh—ke

gommon

„xh ‚xh ‚„ƒ g„ƒ hƒ‚ hgh ƒ„‚ gom

Signal

P Q R S T V PH U

PIN

yutput snput yutput snput snput snput yutput !

DTE

snput yutput snput yutput yutput yutput snput !

DCE

11.11.3 Software Overview
…se the †ss —nd fun™tions lo™—ted on the pun™tions ell pun™tions snstrument sGy ƒeri—l p—lette for seri—l port ™ommuni™—tionF ‰ou used some of the †sƒe fun™tions on this p—lette for q€sf ™ommuni™—tionF „he †sƒe ‡rite —nd †sƒe ‚e—d fun™tions work with —ny type of instrument ™ommuni™—tion —nd —re the s—me whether you —re doing q€sf or seri—l ™ommuni™—tionF roweverD ˜e™—use seri—l ™ommuni™—tion requires you to ™on(gure extr— p—r—metersD you must st—rt the seri—l port ™ommuni™—tion with the †sƒe gon(gure ƒeri—l €ort †sF „he †sƒe gon(gure ƒeri—l €ort †s initi—lizes the port identi(ed ˜y †sƒe resour™e n—me to the spe™i(ed settingsF timeout sets the timeout v—lue for the seri—l ™ommuni™—tionF ˜—ud r—teD d—t— ˜itsD p—rityD —nd )ow ™ontrol spe™ify those spe™i(™ seri—l port p—r—metersF „he error in —nd error out ™lusters m—int—in the error ™onditions for this †sF

PQR

CHAPTER 11. INSTRUMENT CONTROL

Example 11.2:
pigure IIFIT shows how to send the identi(™—tion query ™omm—nd Bshxc to the instrument ™onne™ted to the gywP seri—l portF „he †sƒe gon(gure ƒeri—l €ort †s opens ™ommuniE ™—tion with gywP —nd sets it to WDTHH ˜—udD eight d—t— ˜itsD odd p—rityD one stop ˜itD —nd ˆyxGˆypp softw—re h—ndsh—kingF „hen the †sƒe ‡rite fun™tion sends the ™omm—ndF „he †sƒe ‚e—d fun™tion re—ds ˜—™k up to PHH ˜ytes into the re—d ˜u'erD —nd the ƒimple irror r—ndler †s ™he™ks the error ™onditionF

Figure 11.16

Note:

„he †ss —nd fun™tions lo™—ted on the pun™tions ell pun™tions snstrument sGy ƒeri—l p—lette —re —lso used for p—r—llel port ™ommuni™—tionF ‰ou spe™ify the †sƒe resour™e n—me —s ˜eing one of the v€„ portsF por ex—mpleD you ™—n use weˆ to determine th—t v€„I h—s — †sƒe resour™e n—me of eƒ‚vIHXXsxƒ„‚F

11.12 Serial Write &amp; Read VI
11.12.1 NI Instrument Simulator
IF €ower o' the xs snstrument ƒimul—tor —nd ™on(gure it to ™ommuni™—te through the seri—l port ˜y setting the following swit™hes on the side of the ˜oxF

Figure 11.17

„hese swit™h settings ™on(gure the instrument —s — seri—l devi™e with the following settingsX

• f—ud r—te = 9, 600 • h—t— ˜its = 8

PQS

• Parity = no p—rity • ƒtop ˜its = 1 • plow ™ontrol p—r—meters = h—rdw—re h—ndsh—king
r—ndsh—king is — me—ns of d—t— )ow ™ontrolF ƒoftw—re h—ndsh—king involves em˜edding ™ontrol ™h—r—™ters in tr—nsmitted d—t—F por ex—mpleD ˆyxGˆypp )ow ™ontrol works ˜y en™losing — tr—nsmitted mess—ge ˜etween the two ™ontrol ™h—r—™ters ˆyx —nd ˆyppF r—rdw—re h—ndsh—kE ing uses volt—ges on physi™—l wires to ™ontrol d—t— )owF „he ‚„ƒ —nd g„ƒ lines of the ‚ƒEPQP devi™e —re frequently used for this purposeF wost l—˜ equipment uses h—rdw—re h—ndsh—kingF PF w—ke sure the xs snstrument ƒimul—tor is ™onne™ted to — seri—l port on the ™omputer with — seri—l ™—˜leF w—ke — note of the port num˜erF QF €ower on the xs snstrument ƒimul—torF „he €owerD ‚e—dyD —nd visten vihs —re lit to indi™—te th—t the devi™e is in seri—l ™ommuni™—tion modeF

11.12.2 Block Diagram
IF ypen — ˜l—nk †s —nd ˜uild the ˜lo™k di—gr—m shown in pigure IIFIVF

Figure 11.18

@—A

€l—™e the snstrument sGy ixpress †sD lo™—ted on the pun™tions snput p—letteD on the ˜lo™k di—gr—mF gomplete the following steps in the snstrument sGy essist—nt di—log ˜ox th—t —ppe—rs to ™on(gure the ixpress †sF iF ghoose gywI @or gywP depending on the ™onne™tion port of the xs snstrument ƒimul—torA from the ƒele™t —n instrument pullEdown menuF iiF gli™k the edd ƒtep ˜utton —nd ™li™k ‡riteF sn the ™omm—nd (eldD type Bshxc —nd sele™t \n —s the „ermin—tion ™h—r—™terF iiiF gli™k the edd ƒtep ˜utton —nd ™li™k ‚e—d —nd €—rseF ivF gli™k the edd ƒtep ˜utton —nd ™li™k ‚e—d —nd €—rse —g—inF Note: „he snstrument ƒimul—tor returns the ˜yte size of the responseD the termin—tion ™h—r—™terD the responseD then —nother termin—tion ™h—r—™terF „hereforeD —fter Bshxc is sent to the instrumentD the response must ˜e re—d twi™eF vF gli™k the ‚un ˜utton @not the ‚un this step ˜uttonAF „he ‚un ˜utton runs the entire sequen™eF

PQT

CHAPTER 11. INSTRUMENT CONTROL

viF ‚eturn to the (rst ‚e—d —nd €—rse stepF viiF gli™k the euto p—rse ˜uttonF „he v—lue returned is the size in ˜ytes of the query responseF viiiF ‚en—me „oken to ƒtring vength in the „oken n—me text ˜oxF ixF ƒele™t the se™ond ‚e—d —nd €—rse stepF xF gli™k the euto p—rse ˜uttonF „he v—lue returned is the identi(™—tion string of the xs snstrument ƒimul—torF xiF ‚en—me „oken to ƒtring in the „oken n—me text ˜oxF „he ™on(gur—tion window should ˜e simil—r to the pigure IIFIWF

Figure 11.19

xiiF ƒele™t yu to return to the ˜lo™k di—gr—mF @˜A ‚ightE™li™k the ƒtring output —nd sele™t gre—te sndi™—tor from the short™ut menuF @™A ‚ightE™li™k the ƒtring vength output —nd sele™t gre—te sndi™—tor from the short™ut menuF ƒin™e v—˜†si‡ is set to h—ndle errors —utom—ti™—llyD there is no need to ™onne™t — ƒimple irror r—ndler †s to error outF
tip:

PF hispl—y the front p—nel —nd run the †sF QF ƒ—ve the †s —s ƒeri—l gommuni™—tionFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF RF glose the †s when (nishedF

PQU

11.13 Waveform Transfers
w—ny instruments return — w—veform —s —n eƒgss string or — ˜in—ry stringF essuming the s—me w—veformD — ˜in—ry string tr—nsfer is f—ster —nd requires less memory th—n —n eƒgss string tr—nsferF fin—ry en™oding requires fewer ˜ytes th—n eƒgss en™odingF

11.13.1 ASCII Waveforms
es —n ex—mpleD ™onsider — w—veform ™omposed of IDHPR pointsD e—™h point h—ving — v—lue ˜etween H —nd PSSF …sing eƒgss en™odingD you would need — m—ximum of R ˜ytes to represent e—™h point @— m—ximum of Q ˜ytes for the v—lue of the point —nd I ˜yte for the sep—r—torD su™h —s — ™omm—AF ‰ou would need — m—ximum of RDHWT @ 4 × 1, 024A ˜ytes plus —ny he—der —nd tr—iler ˜ytes to represent the w—veform —s —n eƒgss stringF pigure IIFPH is —n eƒgss w—veform stringF

Figure 11.20

‰ou ™—n use the ixtr—™t xum˜ers †s lo™—ted in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™tory to ™onvert —n eƒgss w—veform into — numeri™ —rr—yD —s followsF „his †s outputs the w—veform —s — dou˜le pre™ision —rr—y @pigure IIFPIAF

Figure 11.21

11.13.2 Binary Waveforms Encoded as 1-Byte Integers
„he s—me w—veform using ˜in—ry en™oding requires only IDHPR ˜ytes @ 1 × 1, 024A plus —ny he—der —nd tr—iler ˜ytes to ˜e represented —s — ˜in—ry stringF …sing ˜in—ry en™odingD you need only I ˜yte to represent the pointD —ssuming e—™h point is —n unsigned VE˜it integerF pigure IIFPP is — ˜in—ry w—veform stringF

PQV

CHAPTER 11. INSTRUMENT CONTROL

Figure 11.22

gonverting the ˜in—ry string to — numeri™ —rr—y is — little more ™omplexF ‰ou must ™onvert the string to —n integer —rr—yF ‰ou ™—n do this ˜y using the ƒtring „o fyte err—y @pigure IIFPQA fun™tion lo™—ted on the pun™tions ell pun™tions ƒtring ƒtringGerr—yG€—th gonversion p—letteF ‰ou must remove —ll he—der —nd tr—iler inform—tion from the string ˜efore you ™—n ™onvert it to —n —rr—yF ytherwiseD this inform—tion —lso is ™onvertedF

Figure 11.23

11.13.3 Binary Waveforms Encoded as 2-Byte Integers
sf e—™h point in the ˜in—ry w—veform string is en™oded —s — PE˜yte integerD it is e—sier —nd mu™h f—ster to use the „ype g—st fun™tion lo™—ted on the pun™tions ell pun™tions edv—n™ed h—t— w—nipul—tion p—letteF ‚efer to the LabVIEW Basics II: Development Course Manual for more inform—tion —˜out type ™—stingF por ex—mpleD ™onsider — q€sf os™illos™ope th—t tr—nsfers w—veform d—t— in ˜in—ry not—tionF „he w—veform is ™omposed of IDHPR d—t— pointsF i—™h d—t— point is — PE˜yte signed integerF „hereforeD the entire w—veform is ™omposed of PDHRV ˜ytesF sn pigure IIFPRD the w—veform h—s — RE˜yte he—der he„e —nd — PE˜yte tr—iler!— ™—rri—ge return followed ˜y — linefeedF

PQW

Figure 11.24

„he ˜lo™k di—gr—m in pigure IIFPS shows how you ™—n use the „ype g—st fun™tion to ™—st the ˜in—ry w—veform string into —n —rr—y of ITE˜it integersF

Figure 11.25

‰ou might need to use the ƒw—p fytes @pigure IIFPTA fun™tion lo™—ted on the pun™tions ell pun™tions edv—n™ed h—t— w—nipul—tion p—lette to sw—p the most signi(™—nt V ˜its —nd the le—st signi(™—nt V ˜its for every elementF ‚emem˜erD the q€sf is —n VE˜it ˜usF st ™—n tr—nsfer only one ˜yte —t — timeF sf the instrument (rst sends the low ˜yte —nd then the high ˜yteD you do not need to use the ƒw—p fytes fun™tionF sn the ex—mple @pigure IIFPSAD you needed to use the ƒw—p fytes @pigure IIFPTA fun™tion ˜e™—use the instrument sent the most signi(™—nt ˜yte (rstF fe™—use the most signi(™—nt ˜yte is re™eived (rstD it is pl—™ed in — lower memory lo™—tion th—n the le—st signi(™—nt ˜yte sent —fter the most signi(™—nt ˜yteF

PRH

CHAPTER 11. INSTRUMENT CONTROL

Figure 11.26

11.14 Waveform Example VI
Exercise 11.2:
por the eƒgss w—veform stringD the w—veform ™onsists of IPV pointsF …p to four eƒgss ™h—r—™ters sep—r—ted ˜y ™omm—s represent e—™h pointF „he following he—der pre™edes the d—t— pointsX

CURVE {12,28,63,...128 points in total...,}CR LF
por the ˜in—ry w—veform stringD the w—veform ™onsists of IPV pointsF i—™h point is repreE sented —s — IE˜yte unsigned integerF „he following he—der pre™edes the d—t— pointsX

CURVE % {Bin Count MSB}{Bin Count LSB}{åå¤...128 bytes in total...} {Checksum} CR LF
gomplete the following steps to ex—mine — †s th—t ™onverts the w—veform to —n —rr—y of num˜ersF „he †s gr—phs the —rr—y —nd re—ds the w—veform string from the xs snstrument ƒimul—tor or from — previously stored —rr—yF

11.14.1 NI Instrument Simulator
IF€ower o' the xs snstrument ƒimul—tor —nd ™on(gure it to ™ommuni™—te through the q€sf ˜y setting the swit™hes @pigure IIFPUA on the side of the ˜oxF

Figure 11.27

PRI

„hese swit™h settings ™on(gure the instrument —s — q€sf devi™e with —n —ddress of PF PF€ower on the xs snstrument ƒimul—torF ynly the €ower —nd ‚e—dy vihs —re lit to indi™—te th—t the xs snstrument ƒimul—tor is in q€sf ™ommuni™—tion modeF

11.14.2 Front Panel
IFypen the ‡—veform ix—mple †s lo™—ted in the gX\ixer™ises\v—˜†si‡ f—si™s s diE re™toryF „he front p—nel shown in pigure IIFPV is —lre—dy ˜uiltF

Figure 11.28

Data Format

spe™i(es —n eƒgss w—veform or — ˜in—ry w—veformF Data Source spe™i(es whether the d—t— is simul—ted or re—d from the xs snstrument ƒimul—tor through the q€sfF

11.14.3 Block Diagram
IFhispl—y —nd ex—mine the ˜lo™k di—gr—m shown in pigure IIFPWF

PRP

CHAPTER 11. INSTRUMENT CONTROL

Figure 11.29

„he ƒtring ƒu˜set fun™tion lo™—ted on the pun™tions ell pun™tions ƒtring p—lette returns — su˜string of IPV elements st—rting from the (fth ˜yte of the ˜in—ry w—veform stringD ex™luding the he—der —nd tr—iler ˜ytesF • „he ƒtring to fyte err—y fun™tionD lo™—ted on the pun™tions ell pun™tions ƒtring ƒtringGerr—yG€—th gonversion p—letteD ™onverts the ˜in—ry string to —n —rr—y of unsigned integersF

„he ƒtring vength fun™tionD lo™—ted on the pun™tions ell pun™tions ƒtring p—letteD returns the num˜er of ™h—r—™ters in the w—veE form stringF

„he ixtr—™t xum˜ers †sD lo™—ted in the ixer™ises dire™toryD extr—™ts numE ˜ers from the eƒgss w—veform string —nd pl—™es them in —n —rr—yF xonEnumeri™ ™h—r—™tersD su™h —s ™omm—sD sep—r—te num˜ers in the stringF • „he †sƒe ‡rite —nd †sƒe ‚e—d fun™tionsD lo™—ted on the pun™tions ell pun™tions snstrument sGy †sƒe p—letteD query the xs snstrument ƒimul—tor for — squ—re w—ve in either eƒgss or IE˜yte ˜in—ry form—tF

„he ƒimple irror r—ndler †sD lo™—ted on the pun™tions pun™tions „ime 8 hi—log p—letteD reports —ny errorsF

ell

PFhispl—y the front p—nel —nd run the †sF „he „rue ™—se —™quires —nd ™onverts the ˜in—ry w—veform string to —n —rr—y of numeri™ v—luesF „he p—lse ™—se —™quires —nd ™onverts the eƒgss w—veform string to —n —rr—y of numeri™ v—luesF

PRQ

QFƒet h—t— porm—t to eƒgss —nd run the †sF „he eƒgss w—veform string displ—ysD the †s ™onverts the v—lues to — numeri™ —rr—yD —nd displ—ys the string length —nd numeri™ —rr—yF RFƒet h—t— porm—t to fin—ry —nd run the †s —g—inF „he ˜in—ry w—veform string —nd string length displ—yD the †s ™onverts the string to — numeri™ —rr—yD —nd displ—ys it in the gr—phF „he ˜in—ry w—veform is simil—r to the eƒgss w—veformF roweverD the num˜er of ˜ytes in the string is signi(™—ntly lowerF st is more e0™ient to tr—nsfer w—veforms —s ˜in—ry strings th—n —s eƒgss strings ˜e™—use ˜in—ry en™oding requires fewer ˜ytes to tr—nsfer the s—me inform—tionF
Note:

SFglose the †sF ho not s—ve ™h—ngesF

11.15 Summary, Tips, and Tricks on Instrument Control
• v—˜†si‡ ™—n ™ommuni™—te with —n instrument th—t ™onne™ts to the ™omputer —s long —s you know wh—t kind of interf—™e it is —nd wh—t ™—˜ling is requiredF • …se weˆ to ™on(gure —nd test q€sf interf—™e ™—rdsD ™onne™ted instrumentsD seri—l portsD —nd p—r—llel portsF • v—˜†si‡ instrument drivers elimin—te the need to le—rn the ™omplexD lowElevel progr—mming ™omm—nds for e—™h instrumentF • „he v—˜†si‡ instrument driver li˜r—ry is lo™—ted on the v—˜†si‡ ghF ‰ou —lso ™—n downE lo—d drivers from the xs ‡e˜ site —t niF™om4 F • ell instrument drivers in the li˜r—ry h—ve the s—me ˜—si™ †s hier—r™hyF • …se the snstrument sGy essist—nt to r—pidly —nd e—sily ˜uild — †s to ™ommuni™—te with —n instrumentF ‰ou ™—n ™ontrol †ˆsD q€sfD ‚ƒEPQPD —nd other types of instrumentsF • ƒeri—l ™ommuni™—tion is — popul—r me—ns of tr—nsmitting d—t— ˜etween — ™omputer —nd — peripher—l devi™e su™h —s — progr—mm—˜le instrument or even —nother ™omputerF

11.16 Additional Exercises for Instrument Control
Exercise 11.3:
ypen the †olt—ge wonitor @ƒe™tion IIFIHA †sF wodify the ˜lo™k di—gr—m so th—t the d—t— —re written to — spre—dsheet (le n—med volt—geFtxt in the form—t shown in pigure IIFQHF
4 http://ni.com

PRR

CHAPTER 11. INSTRUMENT CONTROL

Figure 11.30

ƒele™t pile ƒ—ve es to s—ve the †s —s †olt—ge h—t— to pileFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF

Chapter 12

Customizing VIs
12.1 Conguring the Appearance of Front Panels
efter you ˜uild — †sD you ™—n ™on(gure the —ppe—r—n™e of the front p—nel so users ™—n more e—sily oper—te the †sF por ex—mpleD you ™—n hide the menu ˜—r —nd s™roll˜—rs to ™re—te †ss th—t look —nd ˜eh—ve like st—nd—rd di—log ˜oxes for e—™h pl—tformF ƒele™t pile †s €roperties to ™on(gure the —ppe—r—n™e —nd ˜eh—vior of — †sF ‰ou —lso ™—n rightE ™li™k the †s i™on on the front p—nel or ˜lo™k di—gr—m —nd sele™t †s €roperties from the short™ut menuF ‰ou ™—nnot —™™ess the †s €roperties di—log ˜ox while — †s is runningF ‚efer to the LabVIEW Basics II: Development Course Manual for more inform—tion —˜out ™on(guring the ˜eh—vior of †ssF …se the g—tegory pullEdown menu —t the top of the †s €roperties di—log ˜ox to sele™t from sever—l di'erent option ™—tegoriesD in™luding the followingX

General E hispl—ys the ™urrent p—th where — †s is s—vedD its revision num˜erD revision historyD Documentation E …se this p—ge to —dd — des™ription of the †s —nd link to — help (le topi™F

—nd —ny ™h—nges m—de sin™e the †s w—s l—st s—vedF ‰ou —lso ™—n use this p—ge to edit the i™on or the size of the —lignment grid for the †sF

‚efer to the origin—l „hermometer †s @ƒe™tion QFSA for more inform—tion —˜out do™umenting †ssF

• • • • •

Security E …se this p—ge to lo™k or p—sswordEprote™t — †sF Window Appearance E …se this p—ge to ™on(gure v—rious window settingsF Window Size E …se this p—ge to set the size of the windowF Execution E …se this p—ge to ™on(gure how — †s runsF por ex—mpleD you ™—n ™on(gure — †s
to run immedi—tely when it opens or to p—use when ™—lled —s — su˜†sF

Editor Options E …se this p—ge to set the size of the —lignment grid for the ™urrent †s —nd to ™h—nge the style of ™ontrol or indi™—tor v—˜†si‡ ™re—tes when you rightE™li™k — termin—l —nd sele™t gre—te gontrol or gre—te sndi™—tor from the short™ut menuF

12.1.1 Window Appearance
sn the †s €roperties di—log ˜oxD sele™t ‡indow eppe—r—n™e from the g—tegory pullEdown menu to ™ustomize the window —ppe—r—n™e for †ssF

PRS

PRT

CHAPTER 12. CUSTOMIZING VIS

„hese options —pply to the †s when it is runningF …se these options to ™h—nge how the user inter—™ts with the —ppli™—tion ˜y restri™ting —™™ess to v—˜†si‡ fe—tures —nd ˜y ™h—nging the w—y the window looks —nd ˜eh—vesF ‰ou ™—n m—ke the †s look —nd —™t like — di—log ˜ox so the user ™—nnot inter—™t with other windows while the †s window is openF ‰ou —lso ™—n remove the s™roll˜—rs —nd tool˜—rD —nd you ™—n set — window to ˜e ™entered or —utom—ti™—lly sized to (t the s™reenF fy def—ultD the †s window title is the s—me —s the †s n—meF ‰ou ™—n ™ustomize the †s window title to m—ke it more des™riptive th—n the †s (len—meF „his is useful for lo™—lized †ss so the †s window title ™—n ˜e tr—nsl—ted to the lo™—l l—ngu—geF ‚emove the ™he™km—rk from the ƒ—me —s †s x—me ™he™k˜ox to edit ‡indow titleF „o ™on(gure the window —ppe—r—n™eD sele™t one of the following window stylesF e gr—phi™—l represent—tion of e—™h style displ—ys on the right when you sele™t the styleF

Top-level Application Window

E ƒhows the title ˜—r —nd menu ˜—rD hides the s™roll˜—rs —nd tool˜—rD —llows the user to ™lose the windowD —llows runEtime short™ut menusD does not —llow resizingD —nd shows the front p—nel when ™—lledF with other v—˜†si‡ windows while this †s window is openF „his option does not prevent you from ˜ringing windows of other —ppli™—tions to the frontF @UNIXA ‰ou ™—nnot m—ke — window st—y in front of —ll other windowsF hi—log style windows st—y on topD h—ve no menu ˜—rD s™roll˜—rsD or tool˜—rD —llow the user to ™lose the window ˜ut not resize itD —llow runE time short™ut menusD —nd show the front p—nel when ™—lledF elsoD if — foole—n p—r—meter on the front p—nel is —sso™i—ted with the <inter> or <‚eturn> keyD v—˜†si‡ highlights the p—r—meter with — d—rk ˜orderF

Dialog E „he †s fun™tions —s — di—log ˜ox in the oper—ting systemD so the user ™—nnot inter—™t

• • •

Default E ƒ—me window style used in the v—˜†si‡ development environmentF Custom E gustom window styleF Customize E hispl—ys the gustomize ‡indow eppe—r—n™e di—log ˜oxF

12.1.2 Window Size
sn the †s €roperties di—log ˜oxD sele™t ‡indow ƒize from the g—tegory pullEdown menu to ™ustomize the window size for †ssF „his p—ge in™ludes the following ™omponentsX

Minimum Panel Size E ƒets the minimum size of the front p—nelF sf you —llow the user to resize the window on the ‡indow eppe—r—n™e p—geD the user ™—nnot resize the front p—nel sm—ller th—n the width —nd height you set on this p—geF Size the front panel to the width and height of the entire screen E eutom—ti™—lly resizes the front p—nel window to (t the s™reen when you run the †sF „he †s does not ret—in — re™ord of its origin—l size —nd lo™—tionD so it st—ys in the new lo™—tion if you swit™h ˜—™k to edit modeF
so it t—kes up —pproxim—tely the s—me —mount of s™reen sp—™e when opened on — ™omputer with — di'erent monitor resolutionF por ex—mpleD if you develop — †s on — ™omputer with — monitor resolution of 1, 024 × 768D you might w—nt to run the †s on — ™omputer with — monitor resolution of 800 × 600F …se this ™ontrol in ™onjun™tion with s™—ling one or —ll the o˜je™ts on the front p—nelF

Maintain proportions of window for dierent monitor resolutions E ‚esizes the †s

PRU

Scale all objects on front panel as the window resizes E eutom—ti™—lly resizes —ll front p—nel o˜je™ts with respe™t to —nd in proportion to the size of the front p—nel windowF „ext does not resize ˜e™—use the font sizes —re (xedF …se this option when you —llow the user to resize the front p—nel windowF

12.2 Opening SubVI Front Panels when a VI Runs
e single front p—nel sometimes is too restri™tive to present numerous options or displ—ysF „o solve this pro˜lemD org—nize †ss so the topEmost †s presents highElevel optionsD —nd su˜†ss present rel—ted optionsF
tip:

‰ou —lso ™—n use t—˜ ™ontrols to m—ke the front p—nel more us—˜leF

‡hen v—˜†si‡ ™—lls — su˜†sD ordin—rily the su˜†s runs without opening its front p—nelF sf you w—nt — single inst—n™e of the su˜†s to open its front p—nel when ™—lledD use the ƒu˜†s xode ƒetup di—log ˜oxF sf you w—nt every inst—n™e of the su˜†s to open its front p—nel when ™—lledD use the †s €roperties di—log ˜oxF

12.2.1 Single Instance
sf you w—nt — single inst—n™e of the su˜†s to open its front p—nel when ™—lledD rightE™li™k the su˜†s —nd sele™t ƒu˜†s xode ƒetup from the short™ut menu to displ—y the ƒu˜†s xode ƒetup di—log ˜oxF €l—™e ™he™km—rks in the ƒhow pront €—nel when ™—lled —nd glose —fterw—rds if origin—lly ™losed ™he™k˜oxes to open the su˜†s front p—nel when ™—lledF „his di—log ˜ox —lso in™ludes the following ™omponentsX

• • • •

Open Front Panel when loaded E hispl—ys the front p—nel when the su˜†s lo—ds or when
the †s th—t ™—lls it lo—dsF

Show Front Panel when called E hispl—ys the front p—nel when the su˜†s is ™—lledF Close afterwards if originally closed E sf ƒhow pront €—nel when ™—lled —lso ™ont—ins —
™he™km—rk —nd if the su˜†s w—s previously ™losedD the front p—nel ™loses —fter the su˜†s runsF

Suspend when called E ƒuspends — su˜†s when ™—lled —nd w—its for user inter—™tionF
option is the s—me —s sele™ting yper—te ƒuspend when ™—lledF

„his

12.2.2 Every Instance
sf you w—nt every inst—n™e of the su˜†s to open its front p—nel when ™—lledD open the su˜†s —nd sele™t pile †s €ropertiesF ƒele™t ‡indow eppe—r—n™e from the g—tegory pullEdown menuD ™li™k the gustomize ˜uttonD —nd pl—™e ™he™km—rks in the ƒhow pront €—nel ‡hen g—lled —nd glose efterw—rds if yrigin—lly glosed ™he™k˜oxesF

12.3 Pop-up Graph VI and Use Pop-up Graph VI
Exercise 12.1:
gomplete the following steps to ˜uild — †s th—t —™quires temper—ture on™e every HFS se™onds for IH se™ondsD displ—ys — su˜†s front p—nel th—t shows the —™quired d—t— in — gr—phD —nd keeps the front p—nel open until you ™li™k — ˜uttonF

PRV

CHAPTER 12. CUSTOMIZING VIS

12.3.1 Front Panel
ypen — ˜l—nk †s —nd ˜uild the following front p—nelF

Figure 12.1

…se the following guidelines to —ssist you in ˜uilding the front p—nelF

• „he indi™—tor to the right of the thermometer is — digit—l displ—y ˜elonging to the thermometerF ‚ightE™li™k the thermometer —nd sele™t †isi˜le stems higit—l hispl—y from the short™ut menu to displ—y the digit—l v—lueF • gh—nge 5 of d—t— v—lues to signed QPE˜it integer @sQPA represent—tionF

12.3.2 Block Diagram
IFfuild the following ˜lo™k di—gr—mF

Figure 12.2

@—A €l—™e the „hermometer †s from — previous exer™ise @ƒe™tion QFSA on the ˜lo™k di—gr—mF „his †s —™quires the ™urrent temper—ture v—lueF

PRW

@˜A €l—™e the ‡—it …ntil xext ms wultiple fun™tionD lo™—ted on the pun™tions ell pun™tions „ime 8 hi—log p—letteD on the ˜lo™k di—gr—mF ‚ightE ™li™k the inputD sele™t gre—te gonst—ntD —nd type SHH in the ™onst—nt to ™—use the por voop to exe™ute every SHH msF €l—™e the wultiply fun™tionD lo™—ted on the pun™tions erithmeti™ 8 @™A gomp—rison ixpress xumeri™ p—letteD on the ˜lo™k di—gr—mF „his fun™tion mulE tiplies e—™h element of the output —rr—y ˜y HFSH to s™—le the x v—lues to represent the time interv—l —t whi™h the †s t—kes the me—surementsF @dA €l—™e the €opEup qr—ph †sD lo™—ted in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryD on the ˜lo™k di—gr—mF „his †s plots the temper—ture d—t— on —n ˆ‰ gr—phF @eAgomplete the ˜lo™k di—gr—m —s shown in the previous (gureF PFƒ—ve the †s —s …se €opEup qr—phFvi in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF QFgon(gure the su˜†s to displ—y its front p—nel when ™—lledF @—Ahou˜leE™li™k the €opEup qr—ph su˜†s to open its front p—nelF @˜Aƒele™t pile †s €ropertiesF @™Aƒele™t ‡indow eppe—r—n™e from the g—tegory pullEdown menuF @dAgli™k the gustomize ˜uttonF gon(gure the window —ppe—r—n™e —s shown in the di—log ˜ox @pigure IPFQAF

Figure 12.3

@eAgli™k the yu ˜utton twi™e —nd s—ve —nd ™lose the su˜†sF sf the front p—nel is not ™losedD it will not ™lose —fter the su˜†s runsF RF‚un the …se €opEup qr—ph †sF efter the †s —™quires IH se™onds of temper—ture d—t—D the front p—nel of the €opEup qr—ph †s displ—ys —nd plots the temper—ture d—t—F gli™k the hyxi ˜utton to return to the ™—lling †sF SFgh—nge the window —ppe—r—n™e settings for the €opEup qr—ph su˜†s to the hi—log window styleF

PSH

CHAPTER 12. CUSTOMIZING VIS

TFƒ—ve —nd ™lose the su˜†sF UF‚un the …se €opEup qr—ph †s —g—inF „he €opEup qr—ph su˜†s front p—nel window ˜eh—ves —s — di—log ˜oxF por ex—mpleD the window st—ys on top of —ll other windows —nd uses the system ™olorsF VFglose —ll open †ssF

12.4 Keyboard Shortcuts for Controls
‡hile — †s runsD you ™—n press the <„—˜> key to ™h—nge the key fo™us from one ™ontrol to the nextF „he key fo™us is the s—me —s if you h—d ™li™ked the ™ontrolF ‡hile — ™ontrol h—s the key fo™usD you ™—n use the key˜o—rd to enter the ™ontrol v—lueF sf the ™ontrol is — text or numeri™ ™ontrolD v—˜†si‡ highlights the text so you ™—n edit itF sf the ™ontrol is foole—nD press the sp—™e˜—r or the <inter> key to ™h—nge its v—lueF ‰ou —lso ™—n —ssign key˜o—rd short™uts to ™ontrols so users ™—n n—vig—te the front p—nel ˜y pressing other keysF ‚ightE™li™k the ™ontrol —nd sele™t edv—n™ed uey x—vig—tion from the short™ut menu to displ—y the uey x—vig—tion di—log ˜oxF „he edv—n™ed uey x—vig—tion short™ut menu item is dimmed for indi™—tors ˜e™—use you ™—nnot enter d—t— in —n indi™—torF
Note:

ƒele™t the short™ut key you w—nt to —ssign to the ™ontrol in the uey essignment se™tionF „he front p—nel ™ontrol n—mes th—t —ppe—r in the gurrent essignments list˜ox ™orrespond to the owned l—˜els of those ™ontrolsF „o prevent users from —™™essing — ™ontrol ˜y pressing the <„—˜> key while the †s runsD pl—™e — ™he™km—rk in the ƒkip this ™ontrol when t—˜˜ing ™he™k˜oxF

12.5 Temperature System VI
Exercise 12.2:

12.5.1 Front Panel
IFypen the „emper—ture ƒystem †s lo™—ted in the gX\ixer™ises\ v—˜†si‡ f—si™s s dire™toryF „he following front p—nel is —lre—dy ˜uiltF

Figure 12.4

„he front p—nel ™ont—ins four foole—n ˜uttons @pigure IPFRAF „he me™h—ni™—l —™tion of the (rst three ˜uttons is v—t™h ‡hen €ressedF „his setting ™h—nges the ™ontrol v—lue when you ™li™k it —nd ret—ins the new v—lue until the †s re—ds it on™eF et this point the ™ontrol reverts to its def—ult v—lueD even if you keep pressing the mouse ˜uttonF „his —™tion is simil—r to — ™ir™uit ˜re—ker —nd is useful for stopping ‡hile

PSI

voops or for getting the †s to perform —n —™tion only on™e e—™h time you set the ™ontrolF „he me™h—ni™—l —™tion of the ƒtop ˜utton is v—t™h ‡hen ‚ele—sedF „his setting ™h—nges the ™ontrol v—lue only —fter you rele—se the mouse ˜utton within the gr—phi™—l ˜ound—ry of the ™ontrolF ‡hen the †s re—ds it on™eD the ™ontrol reverts to the old v—lueF „his —™tion gu—r—ntees —t le—st one new v—lueF „his —™tion is simil—r to di—log ˜ox ˜uttons —nd system ˜uttonsF PF‚ightE™li™k — ™ontrol —nd sele™t edv—n™ed to displ—y the uey x—vig—tion di—log ˜oxF RF‚epe—t pg PSI —nd pg PSI for e—™h ™ontrolF uey x—vig—tion from the short™ut menu

QFsn the uey essignment se™tionD —ssign the short™ut key shown in the pigure IPFRF

12.5.2 Block Diagram
IFix—mine the ˜lo™k di—gr—m @pigure IPFSA whi™h is —lre—dy ˜uiltF

Figure 12.5

„he hispl—y „emp †s simul—tes — temper—ture me—surement every SHH ms —nd plots it on — strip ™h—rtF „he hispl—y —nd vog „emp †s simul—tes — temper—ture me—surement every SHH msD plots it on — strip ™h—rtD —nd logs it to — (leF „he hispl—y vogged „emp †s opens — (le th—t you sele™tD re—ds the logged d—t—D —nd displ—ys them on — gr—phF

PFgon(gure e—™h su˜†s to displ—y its front p—nel when ™—lledF @—A‚ightE™li™k the su˜†s —nd sele™t ƒu˜†s xode ƒetup from the short™ut menuF

PSP

CHAPTER 12. CUSTOMIZING VIS

@˜A€l—™e ™he™km—rks in the ƒhow pront €—nel when ™—lled —nd glose —fterw—rds if origin—lly ™losed ™he™k˜oxesF @™Agli™k yu to ™lose the ƒu˜†s xode ƒetup di—log ˜oxF @dA‚epe—t pg PSI through pg PSP for the rem—ining two su˜†ssF QFƒ—ve the †sF hispl—y the front p—nel —nd run the †sF RFgli™k e—™h ˜utton —nd press the ™orresponding key˜o—rd short™utsF „he three su˜†ss return to the „emper—ture ƒystem †s front p—nel when you press the <inter> keyF „ry pressing the <inter> key to do soF SFƒtop the †sF TFgon(gure the „emper—ture ƒystem †s to run —utom—ti™—lly when you open the †sF @—Aƒele™t pile †s €ropertiesF @˜Aƒele™t ixe™ution from the g—tegory pullEdown menuF @™A€l—™e — ™he™km—rk in the ‚un ‡hen ypened ™he™k˜oxF UFgon(gure the †s so the menu ˜—r —nd tool˜—r —re not visi˜le while the †s runsF @—Aƒele™t ‡indow eppe—r—n™e from the g—tegory pullEdown menuF @˜Agli™k the gustomize ˜uttonF @™A‚emove the ™he™km—rks from the ƒhow wenu f—r —nd ƒhow „ool˜—r ‡hen ‚unE ning ™he™k˜oxesF @dAgli™k the yu ˜utton twi™eF VFƒ—ve —nd ™lose —ll †ssF WFypen the „emper—ture ƒystem †s —g—inF „he †s runs —utom—ti™—lly when you open itF gli™k the ˜uttons on the front p—nel or use the key˜o—rd short™utsF IHFƒtop —nd ™lose —ll †ssF

12.6 Editing VI Properties
ƒometimes you ™—n sele™t †s properties th—t m—ke it di0™ult to edit — †sF por ex—mpleD you might sele™t the ‚un ‡hen ypened option —nd dis—˜le the menu ˜—r —nd tool˜—rF sf you set the †s to ™lose —nd exit v—˜†si‡ —fter it runsD you ™—nnot stop the †s —nd edit it without it ™losing —nd exiting v—˜†si‡F „his †s would ˜e very di0™ult to editF
Note:

„o exit v—˜†si‡D you ™—n use the uit v—˜†si‡ fun™tion lo™—ted on the pun™tions ell pun™tions eppli™—tion gontrol p—letteF „his fun™tion —˜orts —ll running †ss —nd ends the ™urrent session of v—˜†si‡F „he fun™tion h—s one inputF sf it is wiredD the end of the v—˜†si‡ session o™™urs only if th—t input is „rueF sf the input is not wiredD the end of the session o™™urs when the node exe™utesF

fefore you ™h—nge †s propertiesD s—ve — ˜—™kup of the †s to — new lo™—tion ˜y sele™ting pile ƒ—ve with yptions to —void situ—tions like the previous ex—mplesF ƒele™t the hevelopment histri˜ution option to s—ve the †s to — new lo™—tion —long with its entire hier—r™hyF ‰ou —lso ™—n in™lude the viFli˜ (les in the s—veF efter you s—ve the ˜—™kup †sD ™h—nge the †s properties of the origin—l †sF sf you en™ounter — pro˜lemD you ™—n return to the ˜—™kup †sF
caution: sf you sele™t the ‚emove di—gr—ms optionD you remove the sour™e ™ode of the †sF ƒele™t this option only if you never need to edit the †s —g—inF fefore you s—ve — †s without the ˜lo™k di—gr—msD s—ve — ˜—™kup of the †s with the ˜lo™k di—gr—msF

sf you —lre—dy s—ved — development †s with properties th—t m—ke the †s di0™ult to editD refer to the idit we †s @ƒe™tion IPFUA exer™ise for more inform—tion —˜out editing the †sF

PSQ

12.7 Edit Me VI
Exercise 12.3:

12.7.1 Front Panel
IFglose —ny open †ss —nd open the idit we †sD lo™—ted in the gX\ixer™ises\v—˜†si‡ f—si™s s dire™toryF „he following front p—nel is —lre—dy ˜uiltF

Figure 12.6

„he †s is —lre—dy running when it opensF ‡hile the †s runsD you ™—nnot use the menu ˜—rD tool˜—rD or key˜o—rd short™uts to edit or —˜ort the †sF PFgli™k the ƒt—rt ˜uttonF efter IH se™ondsD the †s stops running —nd quits v—˜†si‡F QF‚el—un™h v—˜†si‡ —nd open — ˜l—nk †sF RFsf the †s you w—nt to edit either does not h—ve su˜†ss or you do not know wh—t it ™ont—insD ™omplete pg PSQ through pg PSQF roweverD if the †s you w—nt to edit h—s su˜†ssD open one of the su˜†ss —nd modify the ˜lo™k di—gr—m to ˜re—k the su˜†sF por ex—mpleD pl—™e —n edd fun™tion on the ˜lo™k di—gr—m —nd do not wire the inputsF ypen the †s you w—nt to editF fe™—use its su˜†s is nonexe™ut—˜leD the †s th—t ™—lls it is —lso nonexe™ut—˜leF st opens in edit mode —nd the ‚un ˜utton —ppe—rs ˜rokenF w—ke sure to (x the su˜†s —fter you edit the ™—lling †sF SFhispl—y the ˜lo™k di—gr—m of the new †sF TF€l—™e the idit we †sD whi™h is —lre—dy ˜uiltD on the ˜lo™k di—gr—mF „he front p—nel for the idit we †s displ—ysF elthough you ™—n displ—y the ˜lo™k di—gr—m of the idit we †sD you ™—nnot edit itF UFƒele™t yper—te lo™kedF gh—nge to idit wodeF e di—log ˜ox informs you th—t the †s is

VFgli™k the …nlo™k ˜uttonF ‰ou now ™—n edit the †sF ‰ou —lso ™—n unlo™k — †s ˜y seE le™ting pile †s €roperties —nd sele™ting ƒe™urity from the g—tegory pullEdown menuF WFƒele™t —nd delete the uit v—˜†si‡ fun™tion from the ˜lo™k di—gr—mF IHFƒ—ve —nd ™lose the idit we †sF glose the new †s —nd do not s—ve ™h—ngesF IIFypen the idit we †s —g—inF IPFefter the †s runsD try to edit itF IQFglose the idit we †sF

PSR

CHAPTER 12. CUSTOMIZING VIS

12.8 Customizing the Controls and Functions Palettes
‰ou ™—n ™ustomize the gontrols —nd pun™tions p—lettes to —dd †ss —nd ™ontrols to the p—lettesD hide †ss —nd fun™tionsD or re—rr—nge the ˜uiltEin p—lettes to m—ke the †ss —nd fun™tions you use frequently more —™™essi˜leF

12.8.1 Adding VIs and Controls to the User Library and the Instrument Library
„he simplest method for —dding †ss —nd ™ontrols to the gontrols —nd pun™tions p—lettes is to s—ve them in the l—˜view\userFli˜ dire™toryF ‡hen you rest—rt v—˜†si‡D the pun™tions ixpress …ser vi˜r—ries —nd gontrols ixpress …ser gontrols p—lettes ™ont—in su˜p—lettes for e—™h dire™toryD †s li˜r—ry @Fll˜AD or menu @FmnuA (le in the l—˜view\userFli˜ dire™toryD —nd i™ons for e—™h (le in the l—˜view\userFli˜ dire™toryF efter you —dd (les to or remove (les from spe™i(™ dire™toriesD v—˜†si‡ —utom—ti™—lly upd—tes the p—lettes when you rest—rt v—˜†si‡F „he pun™tions ell pun™tions snstrument sGy p—lette ™orresponds to the l—˜view\instrFli˜ diE re™toryF ƒ—ve instrument drivers in this dire™tory to —dd them to the pun™tions p—letteF ‡hen you —dd †ss or ™ontrols to the gontrols —nd pun™tions p—lettes using this methodD you ™—nnot set the n—me of e—™h su˜p—lette or the ex—™t lo™—tion of the †ss or ™ontrols on the p—lettesF

12.8.2 Creating and Editing Custom Palette Views
„o ™ontrol the n—me of e—™h su˜p—lette —nd the ex—™t lo™—tion of the †ss —nd ™ontrols you —dd to the gontrols —nd pun™tions p—lettesD you must ™re—te — ™ustom p—lette viewF v—˜†si‡ in™ludes two ˜uiltEin p—lette views!ixpress —nd edv—n™edF ƒele™t „ools edv—n™ed idit €—lette †iews to ™re—te or edit ™ustom p—lette viewsF
Note:

‰ou ™—nnot edit — ˜uiltEin p—lette viewF

‚efer to the LabVIEW User Manual —nd the LabVIEW Help for more inform—tion —˜out p—lette viewsF

12.9 Summary, Tips, and Tricks on Customizing VIs
• ƒele™t pile †s €roperties to ™on(gure the —ppe—r—n™e —nd ˜eh—vior of — †sF ‰ou —lso ™—n rightE™li™k the †s i™on on the front p—nel or ˜lo™k di—gr—m —nd sele™t †s €roperties from the short™ut menuF • sf you w—nt — single inst—n™e of the su˜†s to open its front p—nel when ™—lledD rightE™li™k the su˜†s —nd sele™t ƒu˜†s xode ƒetup from the short™ut menuF €l—™e ™he™km—rks in the ƒhow pront €—nel when ™—lled —nd glose —fterw—rds if origin—lly ™losed ™he™k˜oxesF • sf you w—nt every inst—n™e of the su˜†s to open its front p—nel when ™—lledD sele™t pile †s €roperties —nd sele™t ‡indow eppe—r—n™e from the g—tegory pullEdown menuF gli™k the gustomize ˜utton —nd pl—™e ™he™km—rks in the ƒhow pront €—nel ‡hen g—lled —nd glose efterw—rds if yrigin—lly glosed ™he™k˜oxesF • essign key˜o—rd short™uts to ™ontrols ˜y rightE™li™king the ™ontrol —nd sele™ting edv—n™ed uey x—vig—tion from the short™ut menuF • fefore you ™h—nge †s propertiesD s—ve — ˜—™kup of the †s to — new lo™—tion ˜y sele™ting pile ƒ—ve with yptions to —void m—king the †s di0™ult to editF

PSS

• „o edit — †s with properties th—t m—ke the †s di0™ult to editX · fre—k one of its su˜†ssF „he †s opens in edit mode ˜e™—use it ™—nnot run with — ˜roken su˜†sF · sf the †s h—s no su˜†ssD pl—™e it on the ˜lo™k di—gr—m of — new †sF • „he simplest method for —dding †ss —nd ™ontrols to the gontrols —nd pun™tions p—lettes is to s—ve them in the userFli˜ dire™toryF • „o ™re—te or edit — ™ustom p—lette viewD sele™t „ools edv—n™ed idit €—lette †iewsF • gh—nge to —n i™onE or textEonly p—lette view ˜y sele™ting from the porm—t pullEdown menuF

PST

CHAPTER 12. CUSTOMIZING VIS

Chapter 13

Appendix
13.1 Appendix
13.1.1 Additional Information
„his se™tion des™ri˜es how you ™—n re™eive more inform—tion reg—rding v—˜†si‡D instrument driversD —nd other topi™s rel—ted to this ™ourseF

13.1.1.1 National Instruments Technical Support Options
„he ˜est w—y to get te™hni™—l support —nd other inform—tion —˜out v—˜†si‡D test —nd me—surementD instrument—tionD —nd other x—tion—l snstruments produ™ts —nd servi™es is the xs ‡e˜ site —t niF™om1 F „he support p—ge for the x—tion—l snstruments ‡e˜ site ™ont—ins links to —ppli™—tion notesD the support unowledgef—seD hundreds of ex—mplesD —nd trou˜leshooting wiz—rds for —ll topi™s dis™ussed in this ™ourse —nd moreF enother ex™ellent pl—™e to o˜t—in support while developing v—rious —ppli™—tions with x—tion—l snstruments produ™ts is the xs heveloper one —t niF™omGzone2 F „he xs heveloper one —lso in™ludes dire™t links to the instrument driver network —nd to elli—n™e €rogr—m mem˜er ‡e˜ p—gesF

13.1.1.1.1 The Alliance Program
„he x—tion—l snstruments elli—n™e €rogr—m joins system integr—torsD ™onsult—ntsD —nd h—rdw—re vendors to provide ™omprehensive servi™e —nd expertise to ™ustomersF „he progr—m ensures qu—li(edD spe™i—lized —ssist—n™e for —ppli™—tion —nd system developmentF snform—tion —˜out —nd links to m—ny of the elli—n™e €rogr—m mem˜ers —re —v—il—˜le from the x—tion—l snstruments ‡e˜ siteF

13.1.1.1.2 Other National Instruments Training Courses
x—tion—l snstruments o'ers sever—l tr—ining ™ourses for v—˜†si‡ usersF „he ™ourses —re listed in the x—tion—l snstruments ™—t—log —nd online —t niF™omGtr—ining3 F „hese ™ourses ™ontinue the tr—ining you re™eived here —nd exp—nd it to other —re—sF ‰ou ™—n either pur™h—se the ™ourse m—teri—ls or sign up for —n instru™torEled h—ndsEon ™ourse ˜y ™ont—™ting x—tion—l snstrumentsF
1 http://ni.com 2 http://ni.com/zone 3 http://www.ni.com/training/

PSU

PSV

CHAPTER 13. APPENDIX

13.1.1.2 LabVIEW Publications 13.1.1.2.1 LabVIEW Technical Resource (LTR) Newsletter
ƒu˜s™ri˜e to LabVIEW Technical Resource to dis™over power tips —nd te™hniques for developing v—˜†si‡ —ppli™—tionsF „his qu—rterly pu˜li™—tion o'ers det—iled te™hni™—l inform—tion for novi™e users —s well —s —dv—n™ed usersF sn —dditionD every issue ™ont—ins — disk of v—˜†si‡ †ss —nd utilities th—t implement methods ™overed in th—t issueF „o order LabVIEW Technical ResourceD ™ont—™t v„‚ pu˜lishing —t @PIRA UHTEHSVU or visit wwwFltrpu˜F™om4 F

13.1.1.2.2 LabVIEW Books
w—ny ˜ooks h—ve ˜een written —˜out v—˜†si‡ progr—mming —nd —ppli™—tionsF „he x—tion—l snstruments ‡e˜ site ™ont—ins — list of —ll the v—˜†si‡ ˜ooks —nd links to pl—™es to pur™h—se these ˜ooksF €u˜lisher inform—tion is —lso in™luded so you ™—n dire™tly ™ont—™t the pu˜lisher for more inform—tion on the ™ontents —nd ordering inform—tion for v—˜†si‡ —nd rel—ted ™omputerE˜—sed me—surement —nd —utom—tion ˜ooksF

13.1.1.3 The info-labview Listserve Info-labview is —n em—il group of users from —round the world who dis™uss v—˜†si‡ issuesF

„he list mem˜ers ™—n —nswer questions —˜out ˜uilding v—˜†si‡ systems for p—rti™ul—r —ppli™—tionsD where to get instrument drivers or help with — devi™eD —nd pro˜lems th—t —ppe—rF ƒend su˜s™ription mess—ges to the infoEl—˜view list pro™essor —tX listm—n—gerdpi™—F—rmyFmil ƒend other —dministr—tive mess—ges to the infoEl—˜view list m—int—iner —tX infoEl—˜viewE ‚i…iƒ„dpi™—F—rmyFmil €ost — mess—ge to su˜s™ri˜ers —tX infoEl—˜viewdpi™—F—rmyFmil ‰ou m—y —lso w—nt to se—r™h the ftp —r™hives —tX ftpXGGftpFpi™—F—rmyFmilGpu˜Gl—˜viewG5 „he —r™hives ™ont—in — l—rge set of don—ted †ss for doing — wide v—riety of t—sksF

13.1.2 ASCII Character Code Equivalents Table
„he t—˜le @pg PSWA ™ont—ins the hex—de™im—lD o™t—lD —nd de™im—l ™ode equiv—lents for eƒgss ™h—r—™ter ™odesF
4 http://www.ltrpub.com 5 http://cnx.org/content/m12308/latest/ftp://ftp.pica.army.mil/pub/labview/

PSW

HH HI HP HQ HR HS HT HU HV HW He Hf Hg Hh Hi Hp IH II IP IQ IR IS IT IU IV IW Ie If Ig Ih Ii Ip RH RI RP RQ RR RS RT RU RV RW Re Rf Rg Rh Ri Rp

Hex

HHH HHI HHP HHQ HHR HHS HHT HHU HIH HII HIP HIQ HIR HIS HIT HIU HPH HPI HPP HPQ HPR HPS HPT HPU HQH HQI HQP HQQ HQR HQS HQT HQU IHH IHI IHP IHQ IHR IHS IHT IHU IIH III IIP IIQ IIR IIS IIT IIU

Octal

H I P Q R S T U V W IH II IP IQ IR IS IT IU IV IW PH PI PP PQ PR PS PT PU PV PW QH QI TR TS TT TU TV TW UH UI UP UQ UR US UT UU UV UW

Decimal

x…v ƒyr ƒ„ˆ i„ˆ iy„ ix egu fiv fƒ r„ vp †„ pp g‚ ƒy ƒs hvi hgI hgP hgQ hgR xeu ƒ‰x i„f gex iw ƒ…f iƒg pƒ qƒ ‚ƒ …ƒ d e f g h i p q r s t u v w x y

ASCII

PH PI PP PQ PR PS PT PU PV PW Pe Pf Pg Ph Pi Pp QH QI QP QQ QR QS QT QU QV QW Qe Qf Qg Qh Qi Qp TH TI TP TQ TR TS TT TU TV TW Te Tf Tg Th Ti Tp

Hex

HRH HRI HRP HRQ HRR HRS HRT HRU HSH HSI HSP HSQ HSR HSS HST HSU HTH HTI HTP HTQ HTR HTS HTT HTU HUH HUI HUP HUQ HUR HUS HUT HUU IRH IRI IRP IRQ IRR IRS IRT IRU ISH ISI ISP ISQ ISR ISS IST ISU

Octal

QP QQ QR QS QT QU QV QW RH RI RP RQ RR RS RT RU RV RW SH SI SP SQ SR SS ST SU SV SW TH TI TP TQ WQ WU WV WW IHH IHI IHP IHQ IHR IHS IHT IHU IHV IHW IIH III

Decimal

ƒ€ 3 4 5 6 7 8 9 @ A B C D E F G H I P Q R S T U V W X Y < a > c – — ˜ ™ d e f g h i j k l m n o

ASCII

PTH

CHAPTER 13. APPENDIX

SH SI SP SQ SR SS ST SU SV SW Se Sf Sg Sh Si Sp

Hex

IPH IPI IPP IPQ IPR IPS IPT IPU IQH IQI IQP IQQ IQR IQS IQT IQU

Octal

VH VI VP VQ VR VS VT VU VV VW WH WI WP WQ WR WS

Decimal

€  ‚ ƒ „ … † ‡ ˆ ‰  ‘ \ “ ¢ •

ASCII

UH UI UP UQ UR US UT UU UV UW Ue Uf Ug Uh Ui Up

Hex

ITH ITI ITP ITQ ITR ITS ITT ITU IUH IUI IUP IUQ IUR IUS IUT IUU

Octal

IIP IIQ IIR IIS IIT IIU IIV IIW IPH IPI IPP IPQ IPR IPS IPT IPU

Decimal

p q r s t u v w x y z { | }

ASCII

hiv

13.1.3 Instructor Notes
IF w—ke sure e—™h st—tion h—s the following ™omponentsX

• LabVIEW Basics I: Introduction Course Manual • v—˜†si‡ €rofession—l hevelopment ƒystem UFH or l—ter • wultifun™tion he devi™e ™on(gured —s fo—rd sh I • he ƒign—l e™™essory —nd ™—˜le to ™onne™t the he devi™e to the he ƒign—l e™™essory • q€sf interf—™e • xs snstrument ƒimul—torD power supplyD q€sf ™—˜le to ™onne™t the q€sf interf—™e to the xs snstrument ƒimul—torD —nd seri—l ™—˜le to ™onne™t the ™omputer to the xs snstrument ƒimul—tor • ‡ires @two per st—tionA
PF gopy the (les from the gh —™™omp—nying this m—nu—l —s des™ri˜ed in the Installing the Course Software se™tion of the Student Guide —nd the re—dmeFtxt (le on the disksF QF „est the st—tion ˜y st—rting v—˜†si‡ ˜y sele™ting ƒt—rt €rogr—ms ƒt—tion „ests v† ƒt—E tion „est to run the v† ƒt—tion „est †sF ‚efer to the ™ustomer edu™—tion resour™es ™oordin—tor for this †sF RF ypen weˆ to verify th—t ˜oth the he devi™e —nd q€sf interf—™e —re working properlyF SF †erify th—t the xs hi†ƒsw instrument driver is inst—lled —nd th—t the xs snstrument ƒimul—tor works in ˜oth the q€sf —nd seri—l modesF

GLOSSARY

PTI

Glossary
T task
e ™olle™tion of one or more ™h—nnels —nd the timingD triggeringD —nd other properties th—t —pply to the t—sk itselfF e t—sk represents — me—surement or gener—tion you w—nt to performF of me—surement or gener—tion spe™i(ed in the ™h—nnel n—meD —nd s™—ling inform—tion

VISA
†irtu—l snstrument ƒoftw—re er™hite™ture @†sƒeA is the lower l—yer of fun™tions in the v—˜†si‡ instrument driver †ss th—t ™ommuni™—tes with the driver softw—reF

V virtual channels
e ™olle™tion of property settings th—t in™lude — physi™—l ™h—nnelD the type

PTP

INDEX

Index of Keywords and Terms
Keywords
—re listed ˜y the se™tion with th—t keyword @p—ge num˜ers —re in p—renthesesAF ueywords do not ne™ess—rily —ppe—r in the text of the p—geF „hey —re merely —sso™i—ted with th—t se™tionF Ex. —pplesD Ÿ IFI @IA Terms —re referen™ed ˜y the p—ge they —ppe—r onF Ex. —pplesD I

A

e™quiring — ƒign—l †sD Ÿ PFS@PUA —n—logD Ÿ IHFR@IWSA —n—log inputD Ÿ IHFR@IWSA —n—log outputD Ÿ IHFW@PHRA exƒsGsiii ƒt—nd—rd RVVFIEIWVUD PIQ —ppe—r—n™eD Ÿ IPFI@PRSA —rr—yD Ÿ SFQ@WRA err—y ixer™ise †sD Ÿ SFS@WUA err—y pun™tionsD Ÿ SFQ@WRA err—ysD Ÿ SFI@WIAD Ÿ SFI@WIAD WID Ÿ SFT@WVAD Ÿ SFT@WVAD WVD Ÿ SFU@WWA eƒgssD Ÿ IQFI@PSUA —utoD Ÿ SFP@WQA eutoEsndexingD Ÿ SFP@WQAD Ÿ SFP@WQA ˜lo™k di—gr—mD SD Ÿ PFR@PPAD Ÿ PFR@PPA g—seD Ÿ VFU@ISSAD Ÿ VFV@ISTA ™—se stru™tureD Ÿ VFP@IRRA ™h—nnelsD IWH gluster ixer™ise †sD Ÿ TFQ@IHSA gluster pun™tionsD Ÿ TFP@IHQAD Ÿ TFP@IHQA gluster ƒ™—ling †sD Ÿ TFR@IHVA ™lustersD WID Ÿ TFI@IHIAD Ÿ TFI@IHIAD IHID Ÿ TFT@IIIAD III ™odeD IIHD III ™onne™tor p—neD SD TI gontrolsD Ÿ IPFR@PSHA ™ounterD Ÿ IHFII@PHVAD Ÿ IHFIP@PHWA gustomizingD Ÿ IPFV@PSRAD Ÿ IPFW@PSRA heD Ÿ IHFI@IVUAD Ÿ IHFQ@IWRAD Ÿ IHFIS@PIIAD Ÿ IHFIT@PIPA d—t—D Ÿ IHFU@PHHA h—t— e™quisitionD Ÿ IHFQ@IWRA h—t— gommuni™—tions iquipmentD PQI h—t— porm—tD PRI h—t— ƒour™eD PRI h—t— „ermin—l iquipmentD PQI h—t—)ow €rogr—mmingD Ÿ PFT@QUA hgiD PQI

he˜ugD Ÿ PFII@RWA he˜ugging „e™hniquesD Ÿ PFIH@RVAD Ÿ PFIH@RVA de™isionD Ÿ VFI@IRQA higit—lD Ÿ IHFIQ@PIHAD Ÿ IHFIR@PIHA ho™ument—tion ‚esour™esD Ÿ PFV@QWAD Ÿ PFV@QWA driverD Ÿ IIFV@PPRA h„iD PQI

E

B C

D

iseD PQI ile™troni™ sndustries esso™i—tionD PQI environmentD Ÿ PFP@SA irror glustersD Ÿ TFS@IHWAD Ÿ TFS@IHWA exer™iseD Ÿ PFS@PUAD Ÿ PFU@QVAD Ÿ PFW@RPAD Ÿ PFII@RWAD Ÿ SFS@WUAD Ÿ SFU@WWAD Ÿ TFQ@IHSAD Ÿ TFR@IHVAD Ÿ UFP@IISAD Ÿ UFQ@IPIAD Ÿ UFU@IQSAD Ÿ UFW@IQVAD Ÿ UFII@IRHAD Ÿ VFQ@IRVAD Ÿ VFR@ISHAD Ÿ VFT@ISRAD Ÿ VFV@ISTAD Ÿ WFQ@ITPAD Ÿ WFV@IUQAD Ÿ WFW@IUSAD Ÿ WFII@IVHAD Ÿ WFIP@IVRAD Ÿ WFIR@IVTAD Ÿ IHFS@IWUAD Ÿ IHFT@IWWAD Ÿ IHFIH@PHSAD Ÿ IHFIP@PHWAD Ÿ IHFIR@PIHAD Ÿ IHFIT@PIPAD Ÿ IIFQ@PITAD Ÿ IIFS@PIWAD Ÿ IIFU@PPPAD Ÿ IIFIH@PPUAD Ÿ IIFIP@PQRAD Ÿ IIFIR@PRHAD Ÿ IIFIT@PRQAD Ÿ IPFQ@PRUAD Ÿ IPFS@PSHAD Ÿ IPFU@PSQA exer™ise †sD Ÿ IHFV@PHIA ixer™isesD Ÿ IFI@IA ixpress pilter †sD Ÿ PFU@QVA peed˜—™k xodeD VQ formul— nodeD Ÿ VFT@ISRAD Ÿ VFU@ISSAD Ÿ VFV@ISTA front p—nelD SD Ÿ PFQ@IWAD Ÿ PFQ@IWAD Ÿ IPFP@PRUA fun™tionsD Ÿ SFQ@WRA qener—l €urpose snterf—™e fusD PIQ q€sfD Ÿ IIFP@PIQAD PIQD Ÿ IIFQ@PITA qr—ph gir™le †sD Ÿ UFU@IQSA

F

G

INDEX

PTQ

qr—phi™—lD Ÿ IFI@IA

N

I

sGyD Ÿ WFR@ITSAD Ÿ WFS@ITUAD Ÿ WFIQ@IVSA i™onD S indexingD Ÿ SFP@WQA snfoEl—˜viewD PSV snstrument gontrolD Ÿ IIFI@PIQAD Ÿ IIFIS@PRQA snstrument hriverD Ÿ IIFW@PPRA snstrument hriversD Ÿ IIFV@PPRA snstrument sGyD Ÿ IIFR@PIVAD Ÿ IIFS@PIWA snstrument sGy essist—ntD Ÿ IIFR@PIVAD Ÿ IIFS@PIWA sntensity qr—ph ix—mple †sD Ÿ UFW@IQVA syD Ÿ WFU@IUIA v—˜†si‡D Ÿ IFI@IAD Ÿ PFI@SAD Ÿ PFP@SAD Ÿ PFQ@IWAD Ÿ PFR@PPAD Ÿ PFS@PUAD Ÿ PFT@QUAD Ÿ PFU@QVAD Ÿ PFV@QWAD Ÿ PFW@RPAD Ÿ PFIH@RVAD Ÿ PFII@RWAD Ÿ PFIP@SPAD Ÿ SFI@WIAD Ÿ SFP@WQAD Ÿ SFQ@WRAD Ÿ SFR@WTAD Ÿ SFS@WUAD Ÿ SFT@WVAD Ÿ SFU@WWAD Ÿ TFI@IHIAD Ÿ TFP@IHQAD Ÿ TFQ@IHSAD Ÿ TFR@IHVAD Ÿ TFS@IHWAD Ÿ TFT@IIIAD Ÿ UFP@IISAD Ÿ UFQ@IPIAD Ÿ UFU@IQSAD Ÿ UFW@IQVAD Ÿ UFII@IRHAD Ÿ VFI@IRQAD Ÿ VFP@IRRAD Ÿ VFQ@IRVAD Ÿ VFR@ISHAD Ÿ VFS@ISQAD Ÿ VFT@ISRAD Ÿ VFU@ISSAD Ÿ VFV@ISTAD Ÿ WFI@ISUAD Ÿ WFP@ISWAD Ÿ WFQ@ITPAD Ÿ WFR@ITSAD Ÿ WFS@ITUAD Ÿ WFT@ITVAD Ÿ WFU@IUIAD Ÿ WFV@IUQAD Ÿ WFW@IUSAD Ÿ WFIH@IUUAD Ÿ WFII@IVHAD Ÿ WFIP@IVRAD Ÿ WFIQ@IVSAD Ÿ WFIR@IVTAD Ÿ IHFI@IVUAD Ÿ IHFP@IWIAD Ÿ IHFQ@IWRAD Ÿ IHFR@IWSAD Ÿ IHFS@IWUAD Ÿ IHFT@IWWAD Ÿ IHFU@PHHAD Ÿ IHFV@PHIAD Ÿ IHFW@PHRAD Ÿ IHFIH@PHSAD Ÿ IHFII@PHVAD Ÿ IHFIP@PHWAD Ÿ IHFIQ@PIHAD Ÿ IHFIR@PIHAD Ÿ IHFIS@PIIAD Ÿ IHFIT@PIPAD Ÿ IIFI@PIQAD Ÿ IIFP@PIQAD Ÿ IIFQ@PITAD Ÿ IIFR@PIVAD Ÿ IIFS@PIWAD Ÿ IIFT@PPHAD Ÿ IIFU@PPPAD Ÿ IIFV@PPRAD Ÿ IIFW@PPRAD Ÿ IIFIH@PPUAD Ÿ IIFII@PPWAD Ÿ IIFIP@PQRAD Ÿ IIFIQ@PQUAD Ÿ IIFIR@PRHAD Ÿ IIFIS@PRQAD Ÿ IIFIT@PRQAD Ÿ IPFI@PRSAD Ÿ IPFP@PRUAD Ÿ IPFQ@PRUAD Ÿ IPFR@PSHAD Ÿ IPFS@PSHAD Ÿ IPFT@PSPAD Ÿ IPFU@PSQAD Ÿ IPFV@PSRAD Ÿ IPFW@PSRAD Ÿ IQFI@PSUA v—˜†si‡ invironmentD Ÿ PFP@SA lesson oneD Ÿ PFIP@SPA we—surement ever—gingD Ÿ IHFT@IWWA

L

x—tion—l snstrumentD Ÿ WFP@ISWAD Ÿ IHFIR@PIHA x—tion—l snstrumentsD Ÿ PFI@SAD Ÿ PFP@SAD Ÿ PFQ@IWAD Ÿ PFR@PPAD Ÿ PFS@PUAD Ÿ PFT@QUAD Ÿ PFU@QVAD Ÿ PFV@QWAD Ÿ PFW@RPAD Ÿ PFIH@RVAD Ÿ PFII@RWAD Ÿ PFIP@SPAD Ÿ SFI@WIAD Ÿ SFP@WQAD Ÿ SFQ@WRAD Ÿ SFR@WTAD Ÿ SFS@WUAD Ÿ SFT@WVAD Ÿ SFU@WWAD Ÿ TFI@IHIAD Ÿ TFP@IHQAD Ÿ TFQ@IHSAD Ÿ TFR@IHVAD Ÿ TFS@IHWAD Ÿ TFT@IIIAD Ÿ UFP@IISAD Ÿ UFQ@IPIAD Ÿ UFU@IQSAD Ÿ UFW@IQVAD Ÿ UFII@IRHAD Ÿ VFI@IRQAD Ÿ VFP@IRRAD Ÿ VFQ@IRVAD Ÿ VFR@ISHAD Ÿ VFS@ISQAD Ÿ VFT@ISRAD Ÿ VFU@ISSAD Ÿ VFV@ISTAD Ÿ WFI@ISUAD Ÿ WFQ@ITPAD Ÿ WFR@ITSAD Ÿ WFS@ITUAD Ÿ WFT@ITVAD Ÿ WFU@IUIAD Ÿ WFV@IUQAD Ÿ WFW@IUSAD Ÿ WFIH@IUUAD Ÿ WFII@IVHAD Ÿ WFIP@IVRAD Ÿ WFIQ@IVSAD Ÿ WFIR@IVTAD Ÿ IHFI@IVUAD Ÿ IHFP@IWIAD Ÿ IHFQ@IWRAD Ÿ IHFR@IWSAD Ÿ IHFS@IWUAD Ÿ IHFT@IWWAD Ÿ IHFU@PHHAD Ÿ IHFV@PHIAD Ÿ IHFW@PHRAD Ÿ IHFIH@PHSAD Ÿ IHFII@PHVAD Ÿ IHFIP@PHWAD Ÿ IHFIQ@PIHAD Ÿ IHFIS@PIIAD Ÿ IHFIT@PIPAD Ÿ IIFI@PIQAD Ÿ IIFP@PIQAD Ÿ IIFQ@PITAD Ÿ IIFR@PIVAD Ÿ IIFS@PIWAD Ÿ IIFT@PPHAD Ÿ IIFU@PPPAD Ÿ IIFV@PPRAD Ÿ IIFW@PPRAD Ÿ IIFIH@PPUAD Ÿ IIFII@PPWAD Ÿ IIFIP@PQRAD Ÿ IIFIQ@PQUAD Ÿ IIFIR@PRHAD Ÿ IIFIS@PRQAD Ÿ IIFIT@PRQAD Ÿ IPFI@PRSAD Ÿ IPFP@PRUAD Ÿ IPFQ@PRUAD Ÿ IPFR@PSHAD Ÿ IPFS@PSHAD Ÿ IPFT@PSPAD Ÿ IPFU@PSQAD Ÿ IPFV@PSRAD Ÿ IPFW@PSRAD Ÿ IQFI@PSUA nodeD Ÿ VFS@ISQA €ehD PIU p—lettesD Ÿ IPFV@PSRA plotting d—t—D Ÿ UFII@IRHA €olymorphismD Ÿ SFR@WTAD Ÿ SFR@WTAD WW popEup gr—phD Ÿ IPFQ@PRUA prim—ry —ddressD PIU €rogr—mmingD Ÿ IFI@IA ‚edu™e ƒ—mples †sD Ÿ PFW@RPA ‚ƒEPQPD PQI sele™tD Ÿ VFI@IRQAD Ÿ VFU@ISSAD Ÿ VFV@ISTA ƒeri—l €ortD Ÿ IIFII@PPWA ƒeri—l ‚e—dD Ÿ IIFIP@PQRA ƒeri—l ‡riteD Ÿ IIFIP@PQRA shift registerD VQ ƒhort™utsD Ÿ IPFR@PSHA ƒolutionsD Ÿ IFI@IA

P

R S

M weˆD Ÿ IHFP@IWIAD Ÿ IIFQ@PITA

PTR

INDEX

sour™eD IIHD III spre—dsheetD Ÿ WFT@ITVAD Ÿ WFIH@IUUA st—tusD IIHD IIHD III stringD Ÿ WFI@ISUAD Ÿ WFP@ISWAD Ÿ WFQ@ITPAD Ÿ WFIH@IUUAD Ÿ WFIQ@IVSA string fun™tionD Ÿ WFP@ISWA ƒu˜†sD Ÿ IPFP@PRUA su˜†ssD Ÿ QFR@TTA summ—ryD Ÿ PFIP@SPAD Ÿ SFT@WVAD Ÿ TFT@IIIAD Ÿ IPFW@PSRA

U V

…xsˆD PRT †sD Ÿ VFQ@IRVAD Ÿ VFR@ISHAD Ÿ WFV@IUQAD Ÿ WFW@IUSAD Ÿ WFII@IVHAD Ÿ WFIP@IVRAD Ÿ WFIR@IVTAD Ÿ IHFS@IWUAD Ÿ IHFT@IWWAD Ÿ IHFIP@PHWAD Ÿ IHFIR@PIHAD Ÿ IIFW@PPRAD Ÿ IIFIH@PPUAD Ÿ IIFIR@PRHAD Ÿ IIFIT@PRQAD Ÿ IPFQ@PRUAD Ÿ IPFS@PSHAD Ÿ IPFT@PSPAD Ÿ IPFU@PSQAD Ÿ IPFW@PSRA †s propertiesD Ÿ IPFT@PSPA virtu—l ™h—nnelsD IWH †irtu—l snstrument ƒoftw—re er™hite™tureD Ÿ IIFT@PPHA virtu—l instrumentsD S †ssD S †sƒeD Ÿ IIFT@PPHAD PPID Ÿ IIFU@PPPA volt—ge outputD Ÿ IHFIH@PHSA †oltmeterD Ÿ IHFS@IWUA w—veform tr—nsferD Ÿ IIFIQ@PQUA w—veformsD Ÿ IIFIR@PRHA

T

t—skD IWH t—sksD IWH „emper—ture wonitorD Ÿ UFP@IISA „emper—ture ‚unning ever—ge †sD Ÿ UFQ@IPIA „emper—ture ƒystemD Ÿ IPFS@PSHA „he elli—n™e €rogr—mD Ÿ IQFI@PSUA tipsD Ÿ PFIP@SPAD Ÿ SFT@WVAD Ÿ TFT@IIIAD Ÿ IIFIS@PRQA tr—iningD Ÿ IQFI@PSUA tri™ksD Ÿ PFIP@SPAD Ÿ SFT@WVAD Ÿ TFT@IIIA triggersD IWU

W w—veform ™h—rtD IIQ

ATTRIBUTIONS

PTS

Attributions
golle™tionX v—˜†si‡ qr—phi™—l €rogr—mming gourse idited ˜yX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentG™olIHPRIGIFRG vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX v—˜†si‡ gourse ixer™ise gode fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIRTQRGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGPFHG woduleX v—˜†si‡ fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPIWPGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX v—˜†si‡ invironment fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPIWQGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX pront €—nel fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPIWRGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX flo™k hi—gr—m fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPIWSGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX e™quiring — ƒign—l †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPIWTGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX h—t—)ow €rogr—mming fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPIWUGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ixpress pilter †s

PTT

ATTRIBUTIONS

fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPIWVGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX v—˜†si‡ ho™ument—tion ‚esour™es fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPIWWGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ‚edu™e ƒ—mples †s fyX w—l—n ƒhir—lk—r …‚vX httpXGG™nxForgG™ontentGmIPPHHGl—testG gopyrightX w—l—n ƒhir—lk—r vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX he˜ugging „e™hniques fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPHIGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX he˜ug ixer™ise @w—inA †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPHPGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ƒumm—ryD „ipsD —nd „ri™ks on sntrodu™tion to v—˜†si‡ fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPHQGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX wodul—r €rogr—mming fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPHRGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX s™ons —nd gonne™tor €—nes fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPHSGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX gonvert g to p †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPHUGl—testG gopyrightX x—tion—l snstruments

ATTRIBUTIONS

PTU

vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX …sing ƒu˜†ss fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPHVGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX „hermometer †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPHWGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX gre—ting — ƒu˜†s from ƒe™tions of — †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPIHGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ƒumm—ryD „ipsD —nd „ri™ks on wodul—r €rogr—mming fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPIIGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ‡hile voops fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPIPGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX euto w—t™h †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPIQGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX por voops fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPIRGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX „imed „emper—ture †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPITGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX e™™essing €revious voop h—t—

PTV

ATTRIBUTIONS

fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPIUGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX e™™essing €revious h—t— †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPIVGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ƒumm—ryD „ipsD —nd „ri™ks on ‚epetition —nd voops fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPIWGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX err—ys fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPPHGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX eutoEsndexing fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPPIGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX err—y pun™tions fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPPPGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX €olymorphism fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPPQGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX err—y ixer™ise †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPPRGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ƒumm—ryD „ipsD —nd „ri™ks on err—ys fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPPSGl—testG gopyrightX x—tion—l snstruments

ATTRIBUTIONS

PTW

vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX eddition—l ixer™ises for err—ys fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPPTGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX glusters fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPPUGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX gluster pun™tions fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPPVGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX gluster ixer™ise †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPPWGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX gluster ƒ™—ling †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPQHGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX irror glusters fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPQIGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ƒumm—ryD „ipsD —nd „ri™ks on glusters fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPQPGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ‡—veform gh—rts fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPQQGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX „emper—ture wonitor †s

PUH

ATTRIBUTIONS

fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPQRGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX „emper—ture ‚unning ever—ge †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPQSGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ‡—veform —nd ˆ‰ qr—phs fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPQTGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX qr—ph ‡—veform err—y †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPQUGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX „emper—ture en—lysis †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPQVGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX qr—ph gir™le †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPQWGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX sntensity €lots fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPRHGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX sntensity qr—ph ix—mple †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPRIGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ƒumm—ryD „ipsD —nd „ri™ks on €lotting h—t— fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPRPGl—testG gopyrightX x—tion—l snstruments

ATTRIBUTIONS

PUI

vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX eddition—l ixer™ises for €lotting h—t— fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPRQGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX w—king he™isions with the ƒele™t pun™tion fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPRRGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX g—se ƒtru™tures fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPRSGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ƒqu—re ‚oot †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPRTGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX „emper—ture gontrol †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPRUGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX pormul— xode fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPRVGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX pormul— xode ixer™ise †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPRWGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ƒumm—ryD „ipsD —nd „ri™ks on w—king he™isions in — †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPSHGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX eddition—l ixer™ises for w—king he™isions in — †s

PUP

ATTRIBUTIONS

fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPSIGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ƒtrings fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPSPGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ƒtring pun™tions fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPSQGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX gre—te ƒtring †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPSRGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX pile sGy †ss —nd pun™tions fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPSSGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX righEvevel pile sGy †ss fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPSTGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ƒpre—dsheet ix—mple †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPSUGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX vowEvevel pile sGy †s —nd pun™tions fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPSVGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX pile ‡riter †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPSWGl—testG gopyrightX x—tion—l snstruments

ATTRIBUTIONS

PUQ

vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX pile ‚e—der †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPTHGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX porm—tting ƒpre—dsheet ƒtrings fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPTIGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX „emper—ture vogger †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPTPGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX „emper—ture eppli™—tion †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPTQGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ƒumm—ryD „ipsD —nd „ri™ks on ƒtrings —nd pile sGy fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPTRGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX eddition—l ixer™ises for ƒtrings —nd pilesGy fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPTSGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX yverview —nd gon(gur—tion of he hevi™es fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPTTGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX we—surement 8—mpY eutom—tion ixplorer @‡indows ynlyA fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPTUGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX h—t— e™quisition in v—˜†si‡

PUR

ATTRIBUTIONS

fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPTVGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX en—log snput fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPTWGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX †oltmeter †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPUHGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX we—surement ever—ging †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPUIGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX h—t— vogging fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPUPGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ƒimple h—t— vogger †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPUQGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX en—log yutput fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPURGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX †olt—ge yutput †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPUSGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX gounters fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPUTGl—testG gopyrightX x—tion—l snstruments

ATTRIBUTIONS

PUS

vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ƒimple ivent gounting †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPUUGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX higit—l sGy fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPUVGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX higit—l ix—mple †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPUWGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ƒumm—ryD „ipsD —nd „ri™ks on h—t— e™quisition —nd ‡—veforms fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPVHGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX eddition—l ixer™ises for h—t— e™quisition —nd ‡—veforms fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPVIGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX snstrument gontrol yverview fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPVPGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX q€sf gommuni™—tion —nd gon(gur—tion fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPVQGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX q€sf gon(gur—tion with weˆ @‡indows ynlyA fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPVSGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX …sing the snstrument sGy essist—nt

PUT

ATTRIBUTIONS

fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPVTGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX …sing the snstrument sGy essist—nt ixer™ise fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPVUGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX †sƒe fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPVVGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX €rogr—mming with †sƒe fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPVWGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX e˜out snstrument hrivers fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPWHGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX …sing snstrument hriver †ss fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPWIGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX †olt—ge wonitor †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPWPGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ƒeri—l €ort gommuni™—tion fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPWQGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ƒeri—l ‡rite 8—mpY ‚e—d †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPWRGl—testG gopyrightX x—tion—l snstruments

ATTRIBUTIONS

PUU

vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ‡—veform „r—nsfers fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPWSGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ‡—veform ix—mple †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPWTGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ƒumm—ryD „ipsD —nd „ri™ks on snstrument gontrol fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPWUGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX eddition—l ixer™ises for snstrument gontrol fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPWVGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX gon(guring the eppe—r—n™e of pront €—nels fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPPWWGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ypening ƒu˜†s pront €—nels when — †s ‚uns fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPQHHGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX €opEup qr—ph †s —nd …se €opEup qr—ph †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPQHIGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX uey˜o—rd ƒhort™uts for gontrols fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPQHPGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX „emper—ture ƒystem †s

PUV

ATTRIBUTIONS

fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPQHQGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX iditing †s €roperties fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPQHRGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX idit we †s fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPQHSGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX gustomizing the gontrols —nd pun™tions €—lettes fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPQHTGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX ƒumm—ryD „ipsD —nd „ri™ks on gustomizing †ss fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPQHUGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH woduleX eppendix fyX x—tion—l snstruments …‚vX httpXGG™nxForgG™ontentGmIPQHVGl—testG gopyrightX x—tion—l snstruments vi™enseX httpXGG™re—tive™ommonsForgGli™ensesG˜yGIFH

LabVIEW Graphical Programming Course
sntrodu™tion to v—˜†si‡

About Connexions

ƒin™e IWWWD gonnexions h—s ˜een pioneering — glo˜—l system where —nyone ™—n ™re—te ™ourse m—teriE —ls —nd m—ke them fully —™™essi˜le —nd e—sily reus—˜le free of ™h—rgeF ‡e —re — we˜E˜—sed —uthoringD te—™hing —nd le—rning environment open to —nyone interested in edu™—tionD in™luding studentsD te—™hE ersD professors —nd lifelong le—rnersF ‡e ™onne™t ide—s —nd f—™ilit—te edu™—tion—l ™ommunitiesF gonnexions modul—rD inter—™tive ™ourses —re in use worldwide ˜y universitiesD ™ommunity ™ollegesD uEIP s™hoolsD dist—n™e le—rnersD —nd lifelong le—rnersF gonnexions m—teri—ls —re in m—ny l—ngu—gesD in™luding inglishD ƒp—nishD ghineseD t—p—neseD st—li—nD †ietn—meseD pren™hD €ortugueseD —nd „h—iF gonnexions is p—rt of —n ex™iting new inform—tion distri˜ution system th—t —llows for Print on Demand BooksF gonnexions h—s p—rtnered with innov—tive onEdem—nd pu˜lisher yy€ to —™E ™eler—te the delivery of printed ™ourse m—teri—ls —nd text˜ooks into ™l—ssrooms worldwide —t lower pri™es th—n tr—dition—l —™—demi™ pu˜lishersF

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.