61
TOPICS Lesson 2 Navigating LabVIEW A. Virtual Instruments (VIs) G. Searching for Controls, VIs ni.com/training A. Virtual Instruments (VIs) B. Parts of a VI C. Starting a VI D. Project Explorer E. Front Panel F. Block Diagram G. Searching for Controls, VIs and Functions H. Selecting a Tool I. Dataflow J. Building a Simple VI 1

Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

Embed Size (px)

Citation preview

Page 1: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

TOPICS

Lesson 2Navigating LabVIEW

A. Virtual Instruments (VIs)B. Parts of a VIC. Starting a VID. Project ExplorerE. Front PanelF. Block Diagram

G. Searching for Controls, VIsand Functions

H. Selecting a ToolI. DataflowJ. Building a Simple VI

ni.com/training

A. Virtual Instruments (VIs)B. Parts of a VIC. Starting a VID. Project ExplorerE. Front PanelF. Block Diagram

G. Searching for Controls, VIsand Functions

H. Selecting a ToolI. DataflowJ. Building a Simple VI

1

Page 2: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

A. Virtual Instruments (VIs)

The appearance and operation of VIs imitate physical instruments,such as oscilloscopes and digital multimeters.

Virtual Instrument (VI) – A LabVIEWprogram

ni.com/training

The appearance and operation of VIs imitate physical instruments,such as oscilloscopes and digital multimeters.

2

Page 3: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

B. Parts of a VI

LabVIEW VIs contain three main components:1. Front Panel 2. Block Diagram 3. Icon/Connector Pane

ni.com/training3

Page 4: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

B. Parts of a VI – Front Panel

Front Panel – User interface for the VI

ni.com/training

You build the front panelwith controls (inputs) andindicators (outputs)

4

Page 5: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

B. Parts of a VI – Block Diagram

Block Diagram – Contains thegraphical source code

ni.com/training

Front panel objectsappear as terminals onthe block diagram

5

Page 6: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

B. Parts of a VI – Icon/Connector Pane

• Icon: graphical representation of a VI• Connector Pane: map of the inputs and outputs of a VI• Icons and connector panes are necessary to use a VI as

a subVI− A subVI is a VI that is inside of another VI− Similar to a function in a text-based programming

languageIcon Connector Pane

ni.com/training

• Icon: graphical representation of a VI• Connector Pane: map of the inputs and outputs of a VI• Icons and connector panes are necessary to use a VI as

a subVI− A subVI is a VI that is inside of another VI− Similar to a function in a text-based programming

languageIcon Connector Pane

6

Page 7: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

C. Starting a VI

DEMONSTRATION

Demonstrate using the Getting Started dialog box and theNew dialog box to start a VI.

Page 8: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

D. Project ExplorerUse LabVIEW Projects to:• Group LabVIEW files and non-LabVIEW files• Create build specifications• Deploy or download files to targets

ni.com/training8

Page 9: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

Using the Project Explorer

DEMONSTRATION

Demonstrate creating a project, adding files, and removingfiles.

Page 10: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

E. Front Panel – Controls Palette

• Contains the controls and indicators you use tocreate the front panel• Access from the front panel by selecting

View»Controls Palette

ni.com/training10

Page 11: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

E. Front Panel – Front Panel Toolbar

ni.com/training11

Page 12: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

E. Front Panel – Controls & Indicators

• Controls− Knobs, push buttons, dials, and other input devices− Simulate instrument input devices and supply data to the block

diagram of the VI• Indicators

− Graphs, LEDs, and other displays− Simulate instrument output devices and display data the block

diagram acquires or generates

ni.com/training

• Controls− Knobs, push buttons, dials, and other input devices− Simulate instrument input devices and supply data to the block

diagram of the VI• Indicators

− Graphs, LEDs, and other displays− Simulate instrument output devices and display data the block

diagram acquires or generates

12

Page 13: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

E. Front Panel – Numeric Controls/Indicators

The numeric data type can represent numbers of varioustypes, such as integer or real

Numeric Control

ni.com/training13

Numeric Indicator

Numeric ControlIncrement/Decrement Buttons

Page 14: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

E. Front Panel – Boolean Controls/Indicators

• The Boolean data type represents data that only has twoparts, such as True and False or On and Off• Use Boolean controls and indicators to enter and display

Boolean (True or False) values• Boolean objects simulate switches, push buttons, and LEDs

ni.com/training

• The Boolean data type represents data that only has twoparts, such as True and False or On and Off• Use Boolean controls and indicators to enter and display

Boolean (True or False) values• Boolean objects simulate switches, push buttons, and LEDs

14

BooleanControl

BooleanIndicator

Page 15: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

E. Front Panel – Strings

• The string data type is a sequence of ASCII characters• Use string controls to receive text from the user such as a

password or user name• Use string indicators to display text to the user

ni.com/training

• The string data type is a sequence of ASCII characters• Use string controls to receive text from the user such as a

password or user name• Use string indicators to display text to the user

15

Page 16: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

E. Front Panel – Shortcut Menus

• All LabVIEW objects haveassociated shortcut menus• As you create a VI, use the

shortcut menu items to changethe look or behavior of frontpanel and block diagramobjects• To access the shortcut menu,

right-click the object

ni.com/training

• All LabVIEW objects haveassociated shortcut menus• As you create a VI, use the

shortcut menu items to changethe look or behavior of frontpanel and block diagramobjects• To access the shortcut menu,

right-click the object

16

Page 17: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

E. Front Panel – Property Dialog Box

• Right-click a front panelobject and selectProperties to display• The options available on

the property dialog boxare similar to the optionsavailable on the shortcutmenu for that object

ni.com/training

• Right-click a front panelobject and selectProperties to display• The options available on

the property dialog boxare similar to the optionsavailable on the shortcutmenu for that object

17

Page 18: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

E. Front Panel – Configure Multiple Objects

• Select multiple objects to simultaneously configure sharedproperties

ni.com/training18

Page 19: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

F. Block Diagram

Block diagram objects include thefollowing:

• Terminals• SubVIs• Functions• Constants• Structures• Wires

ni.com/training

Block diagram objects include thefollowing:

• Terminals• SubVIs• Functions• Constants• Structures• Wires

19

Page 20: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

F. Block Diagram – Functions Palette

Contains the VIs, functions, and constantsyou use to create the block diagram

ni.com/training20

Page 21: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

F. Block Diagram – Block Diagram Toolbar

ni.com/training21

Page 22: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

F. Block Diagram – Terminals

• Terminals are:− Block diagram appearance of front panel objects− Entry and exit ports that exchange information between the

front panel and block diagram− Analogous to parameters and constants in text-based

programming languages• Change the view type of a terminal by toggling the View as

Icon selection from the context menu

ni.com/training

• Terminals are:− Block diagram appearance of front panel objects− Entry and exit ports that exchange information between the

front panel and block diagram− Analogous to parameters and constants in text-based

programming languages• Change the view type of a terminal by toggling the View as

Icon selection from the context menu

22

Page 23: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

F. Block Diagram Terminals

ni.com/training23

Page 24: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

F. Block Diagram – Nodes

• Objects on the block diagram that have inputs and/oroutputs and perform operations when a VI runs• Analogous to statements, operators, functions, and

subroutines in text-based programming languages• Nodes can be functions, subVIs, or structures

ni.com/training

• Objects on the block diagram that have inputs and/oroutputs and perform operations when a VI runs• Analogous to statements, operators, functions, and

subroutines in text-based programming languages• Nodes can be functions, subVIs, or structures

24

Nodes

Page 25: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

F. Block Diagram – Function Nodes

• Fundamental operating elements of LabVIEW• Do not have front panels or block diagrams, but do have

connector panes• Double-clicking a function only selects the function – does

not open it like a VI• Has a pale yellow background on its icon

ni.com/training

• Fundamental operating elements of LabVIEW• Do not have front panels or block diagrams, but do have

connector panes• Double-clicking a function only selects the function – does

not open it like a VI• Has a pale yellow background on its icon

25

Page 26: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

F. Block Diagram – SubVI Nodes

• SubVI: VIs that you build to use inside of another VI• Any VI has the potential to be used as a subVI• When you double-click a subVI on the block diagram, you

can view the front panel and block diagram of the subVI− The upper right corner of the front panel and block diagram

displays the icon for the current VI− This is the icon that appears when you place the VI on a block

diagram as a subVI

ni.com/training

• SubVI: VIs that you build to use inside of another VI• Any VI has the potential to be used as a subVI• When you double-click a subVI on the block diagram, you

can view the front panel and block diagram of the subVI− The upper right corner of the front panel and block diagram

displays the icon for the current VI− This is the icon that appears when you place the VI on a block

diagram as a subVI

26

Page 27: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

F. Block Diagram – SubVI Nodes

• Express VIs are a special type of subVI− Require minimal wiring because you configure them

with dialog boxes− Save the configuration of an Express VI as a subVI• Icons for Express VIs appear on the block diagram

as icons surrounded by a blue field

ni.com/training

• Express VIs are a special type of subVI− Require minimal wiring because you configure them

with dialog boxes− Save the configuration of an Express VI as a subVI• Icons for Express VIs appear on the block diagram

as icons surrounded by a blue field

27

Page 28: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

F. Block Diagram – Icons/Expandable Nodes

ni.com/training28

Page 29: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

F. Block Diagram – Wires

• Transfer data between block diagram objects through wires• Wires are different colors, styles, and thicknesses,

depending on their data types• A broken wire appears as a dashed

black line with a red X in the middle

ni.com/training

• Transfer data between block diagram objects through wires• Wires are different colors, styles, and thicknesses,

depending on their data types• A broken wire appears as a dashed

black line with a red X in the middle

29

Scalar1D Array2D Array

DBL Numeric Integer Numeric String

Page 30: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

F. Block Diagram – Wiring Tips

• Press <Ctrl>-B to delete all broken wires• Right-click and select Clean Up Wire to reroute the wire

ni.com/training30

Page 31: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

F. Block Diagram – Wiring Tips

Use the Clean Up Diagram tool to reroute multiple wires andobjects to improve readability

1. Select a section of your block diagram2. Click the Clean Up Diagram button on the block diagram

toolbar

ni.com/training

Use the Clean Up Diagram tool to reroute multiple wires andobjects to improve readability

1. Select a section of your block diagram2. Click the Clean Up Diagram button on the block diagram

toolbar

31

Page 32: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

Exercise 2-1Concept: Exploring a VI

GOAL

Identify the parts of an existing VI.

Page 33: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

Exercise 2-1Concept: Exploring a VI

DISCUSSION

• What are constants and when should you use them?• What are free labels and when should you use them?

Page 34: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

G. Searching for Controls, VIs & Functions

Find controls, functions, and VIs using the Search button onthe Controls and Functions palette.

ni.com/training34

Page 35: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

Exercise 2-2Concept: Navigating Palettes

GOAL

Learn to use the palettes and search for controls, functionsand VIs.

Page 36: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

Exercise 2-2Concept: Navigating Palettes

DISCUSSION

• Why would you want to add a function to the Favoritescategory in the Functions palette?

Page 37: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

H. Selecting A Tool

• Create, modify, and debug VIsusing the tools provided by LabVIEW• A tool is a special operating mode of the

mouse cursor• The operating mode of the cursor corresponds to the icon of

the tool selected• When using the Automatic Tool Selection, LabVIEW

chooses which tool to select based on the current location ofthe mouse

ni.com/training

• Create, modify, and debug VIsusing the tools provided by LabVIEW• A tool is a special operating mode of the

mouse cursor• The operating mode of the cursor corresponds to the icon of

the tool selected• When using the Automatic Tool Selection, LabVIEW

chooses which tool to select based on the current location ofthe mouse

37

Page 38: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

Exercise 2-3Concept: Selecting A Tool

GOAL

Gain experience using the Automatic Tool Selection to selectwhich tool to use.

Page 39: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

Exercise 2-3Concept: Selecting A Tool

DISCUSSION

• How do you enable automatic tool selection?

Page 40: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

I. Dataflow

LabVIEW follows a dataflow model for running VIs• A node executes only when data are available at all of its

input terminals• A node supplies data to the output terminals only when the

node finishes execution

ni.com/training

LabVIEW follows a dataflow model for running VIs• A node executes only when data are available at all of its

input terminals• A node supplies data to the output terminals only when the

node finishes execution

40

Page 41: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

I. Dataflow – Quiz

Which node executes first?a) Addb) Subtractc) Random Numberd) Dividee) Sine

ni.com/training

Which node executes first?a) Addb) Subtractc) Random Numberd) Dividee) Sine

41

Page 42: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

I. Dataflow – Quiz Answers

NO CORRECT ANSWER

Which node executes first?a) Add – possiblyb) Subtract – definitely notc) Random Number – possiblyd) Divide – possiblye) Sine – definitely not

ni.com/training

NO CORRECT ANSWER

Which node executes first?a) Add – possiblyb) Subtract – definitely notc) Random Number – possiblyd) Divide – possiblye) Sine – definitely not

42

Page 43: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

Exercise 2-4Concept: Dataflow

GOAL

Understand how dataflow determines the execution order in aVI.

Page 44: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

Exercise 2-4Concept: Dataflow

DISCUSSION

• Should a well-designed block diagram flow in a particulardirection?

Page 45: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

J. Building a Simple VI

ni.com/training45

Page 46: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

J. Building a Simple VI – Acquire

Acquire Express VIs:

• DAQ Assistant Express VI

• Instrument I/O Assistant Express VI

• Simulate Signal Express VI

• Read from Measurement File Express VI

ni.com/training

Acquire Express VIs:

• DAQ Assistant Express VI

• Instrument I/O Assistant Express VI

• Simulate Signal Express VI

• Read from Measurement File Express VI

46

Page 47: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

J. Building a Simple VI – Analyze

Analyze Express VIs:

• Amplitude and Level Measurements Express VI

• Statistics Express VI

• Spectral Measurements Express VI

• Tone Measurements Express VI

• Filter Express VI

ni.com/training

Analyze Express VIs:

• Amplitude and Level Measurements Express VI

• Statistics Express VI

• Spectral Measurements Express VI

• Tone Measurements Express VI

• Filter Express VI

47

Page 48: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

J. Building a Simple VI – Present

• Present tasks are Express VIs that perform a function orindicators that present data on the front panel of the VI• Indicators include the Waveform Chart, the Waveform

Graph, and the XY Graph• Express VIs include the Write to Measurement File Express

VI, Build Text Express VI, DAQ Assistant Express VI, andthe Instrument I/O Assistant Express VI

ni.com/training

• Present tasks are Express VIs that perform a function orindicators that present data on the front panel of the VI• Indicators include the Waveform Chart, the Waveform

Graph, and the XY Graph• Express VIs include the Write to Measurement File Express

VI, Build Text Express VI, DAQ Assistant Express VI, andthe Instrument I/O Assistant Express VI

48

Page 49: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

J. Building A Simple VI – Running

1. Place Express VI on the block diagram2. Configure the dialog box that opens3. Wire Express VIs together4. Save and run the VI

The Run button appears broken when the VI youare creating or editing contains errors

ni.com/training

1. Place Express VI on the block diagram2. Configure the dialog box that opens3. Wire Express VIs together4. Save and run the VI

The Run button appears broken when the VI youare creating or editing contains errors

49

Page 50: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

Exercise 2-5Simple Acquire, Analyze, and Present VI

GOAL

Create a simple VI that acquires data, analyzes data, andpresents the results.

Page 51: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

Exercise 2-5Simple Acquire, Analyze, and Present VI

DISCUSSION

• How do you determine the file path of the generated textfile?

Page 52: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

Summary—Quiz

1. Which function executes first:Add or Subtract?a) Addb) Subtractc) Unknown

ni.com/training

1. Which function executes first:Add or Subtract?a) Addb) Subtractc) Unknown

52

Page 53: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

Summary—Quiz Answer

1. Which function executes first:Add or Subtract?a) Addb) Subtractc) Unknown

ni.com/training

1. Which function executes first:Add or Subtract?a) Addb) Subtractc) Unknown

53

Page 54: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

Summary—Quiz

2. Which function executes first:Sine or Divide?a) Sineb) Dividec) Unknown

ni.com/training

2. Which function executes first:Sine or Divide?a) Sineb) Dividec) Unknown

54

Page 55: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

Summary—Quiz Answer

2. Which function executes first:Sine or Divide?a) Sineb) Dividec) Unknown

ni.com/training

2. Which function executes first:Sine or Divide?a) Sineb) Dividec) Unknown

55

Page 56: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

Summary—Quiz

3. Which of the followingfunctions executes first:Random Number, Add orDivide?a) Random Numberb) Dividec) Addd) Unknown

ni.com/training

3. Which of the followingfunctions executes first:Random Number, Add orDivide?a) Random Numberb) Dividec) Addd) Unknown

56

Page 57: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

Summary—Quiz Answer

3. Which of the followingfunctions executes first:Random Number, Add orDivide?a) Random Numberb) Dividec) Addd) Unknown

ni.com/training

3. Which of the followingfunctions executes first:Random Number, Add orDivide?a) Random Numberb) Dividec) Addd) Unknown

57

Page 58: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

Summary—Quiz

4. Which of the followingfunctions execute last:Random Number, Subtract orAdd?a) Random Numberb) Subtractc) Addd) Unknown

ni.com/training

4. Which of the followingfunctions execute last:Random Number, Subtract orAdd?a) Random Numberb) Subtractc) Addd) Unknown

58

Page 59: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

Summary—Quiz Answer

4. Which of the followingfunctions execute last:Random Number, Subtract orAdd?a) Random Numberb) Subtractc) Addd) Unknown

ni.com/training

4. Which of the followingfunctions execute last:Random Number, Subtract orAdd?a) Random Numberb) Subtractc) Addd) Unknown

59

Page 60: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

Summary—Quiz

5. What are the three parts of a VI?a) Front Panelb) Block Diagramc) Projectd) Icon/Connector Pane

ni.com/training

5. What are the three parts of a VI?a) Front Panelb) Block Diagramc) Projectd) Icon/Connector Pane

60

Page 61: Lesson 2 Navigating LabVIEW - UniMAP Portalportal.unimap.edu.my/portal/page/portal30/Lecturer Notes... · Lesson 2 Navigating LabVIEW A ... •Transfer data between block diagram

Summary—Quiz Answer

5. What are the three parts of a VI?a) Front Panelb) Block Diagramc) Projectd) Icon/Connector Pane

ni.com/training

5. What are the three parts of a VI?a) Front Panelb) Block Diagramc) Projectd) Icon/Connector Pane

61