Вы находитесь на странице: 1из 520

LabVIEW

:
.LabVIEW
:
( Instruments Virtual .
( .Panel Front
( .Block Diagram
( . Tools Palette
( .Controls Palette
( .Function Palette
( .
( .

Instruments Virtual
LabVIEW ).Virtual Instruments (VIs
.vi
VIs :
The Front Panel The Block Diagram The Icon and
.Connectors Pane

: The Front Panel (


.

. Indicators Controls Front Panel The

: Controls
VI knobs push buttons dials .
.

:Indicators
VI graphs leds .
.

Controls Block Diagram


Block Diagram . Indicators

: The Block Diagram (


.

terminal Front Panel Indicator Control


. The Block Diagram
Control Diagram Block terminal
.Front Panel Indicator
terminal Front Panel Indicator Control
.
. Indicator Control terminal

The Block Diagram terminals SubVIs


) (Functions ) (Structures ) (Wires
.

: The Icon and Connector Pan(


VI Icon .
Icon .

Icon VI VI VI
.SubVI

: Connectors Pane
SubVI .Diagram Block

. SubVI

LabVIEW . VI SubVI
VI.
SubVI .VI

Front Panel
. VI


.
.
.
: LabVIEW Block
.Diagram
:
.
.
.

.

Diagram Block

: Highlight
.

: Step Into . subVI
) (loops .
: Step Over SubVI
Loop .

: Step Out loop SubVI .

Tools Palette

:
Show Tools Palette<< Window

Palette Tools

LabVIEW . VI

: Operating Tool Controls .


.
: Positional Tool ).(Objects
: Labeling Tool .
: Wiring Tool .Block Diagram
: Object Shortcut Menu .
: Scrolling Tool .
: Breakpoint .
.
: Probe Tool ) (Probe
.
: Color Copy Tool
.Coloring Tool
: Coloring Tool .

Controls palette

: Front Panel
Controls palette Show <<Window

!Error

CONTROLS ALL

Front
. Panel
Controls All
!Error

Functions Palette

: Block Diagram
Functions palette Show <<Window

!Error

Palette Functions


.Block Diagram
Functions All

!Error

!Error

!Error

!Error


Manual LabVIEW Basics Course


VI

VI
) Tools Pallette ( :
Tools Palette Show <<Window
.Tools Palette
:
: Automatic LabVIEW .
:Manual .Tools Palette
Automatic Manual Automatic Tool
Selection .Tools Palette

:
VI :

The Icon and Connector Diagram The Block The Front Panel
. Pane

: The Front Panel :


. Indicators Controls Front Panel The
.Front Panel Indicators Controls Controls
. Indicators Controls

:) Numeric Controls And Indicators


.
Numeric Control

( Label ) Numeric Control


.
Numeric Control
.

Indicator Numeric

Numeric Indicator ) ( Label .


Numeric Indicator
.Block Diagram

Numeric Control

Operating Tool

Control Labeling Tool


. > <ENTER
Operating Tool
ToolBar

.Control

:Boolean Controls and Indicators (


True False )( Switches
) (Push Buttons .LEDs

Vertical Toggle Switch .Round LEDs

:
Indicators Controls
Indicator Control .

: Block Diagram The :


The Block Diagram
.( ) Wires Terminals Nodes

:Nodes
) (Object Diagram Block
.
Nodes : SubVI ). (Structures
:
.LaBVIEW
.Functions Palette

: SubVI

VI Block Diagram VI
Subroutine .
):(Structures

:Terminals
or Control Terminal Indicator: Terminals Node
: Indicator or Control Terminal
Control Indicator Front Panel
Terminal . Block Diagram The
Terminal Data Type Control .Indicator
Data Type
.
Data Type .

: Node Terminals
Node Connector Pane
.Node
Node Terminals
Connector pane Node
Node
Terminals << Visible items

) Wires ( :
) .Object) The Block Diagram
) Wire (
.SubVI

) ( Data Type .

(
)
(floating
)point
)
)
Integer

(Scalar

)

)(Numeric

)(Boolean
)(String

( : Dataflow Programming
.
LabVIEW .Dataflow
Node . Node
Node .
Control Flow
.
: .

) X (Y .

) (
. Z

.

: .


. .
. .

CtoF.vi :
:
VI
.
The Front Panel

The Block Diagram

:
-
- LabVIEW
- .New VI

- .Blank VI VI.

- : Front Panel
The Front Panel
- . Numeric Control
.

Control .
Numeric.
.Numeric

deg C Enter Button


Control .Enter

ToolBar

deg C .Numeric
deg C ) Label (Numeric
.deg C

- . Numeric Indicator
.

!Error

deg F Enter Button


Indicator .Enter

ToolBar

- Control .Indicator
- .Label

Control
Indicator
Label<<Visible Items

The Front Panel .

- :The Block Diagram


Ctrl+E .Diagram Show<<Window

Block Diagram .

:
- Control Front Panel Control Terminal
Block Diagram .deg C
- Indicator Front Panel Indicator Terminal
Diagram Block deg F
- Control Terminal Indicator
. Terminal
- DBL Terminals Data type Terminal
.Double-Precision Floating Point Number
:
Data type .


Deg F=1.8*Deg C+32


Deg C*1.8+32=Deg F
Multiply Add
.
- .Multiply
!Error

- .Add
!Error

- . Numeric Constants

Numeric Constant
.

Numeric Constant .
.

Numeric Constant ).(

Enter Button
.Enter

ToolBar

.
.DBL Data Type

) ( Terminal

.Palette Tools

Control Terminal

The Block Diagram

-

-
.

- :
vi
.llb
- :
Save << File

-
Save<< File .
Save As <<File
.


Deg C Control Operating Tool
Control .

.Deg F Indicator

Tool bar


VI


iii .......................................................................................................
1 ............................................................................................................ VI
) (Objects1......................................................................... :
)1............................................................................... : (Objects
2................................................................................................ :
3..................................................................................................:
)4..................................................................................... : (Label
)4..................................................... . (Owned Labels
)4........................................................................ : (Free Labels
)5.......................................................................... : (Wires
)7.................................................................. : (Broken wires
8.......................................................................................... :
)9.................................................................... : (Align Objects
10.............................................................................. :
VIs 10......................................................... :
10................................................................................................... :
11.............................................................................. :VI
12........................................................................... LabVIEW Help
- 12............................................................................. : Context Help
17............................................................................... : LabVIEW Help -
18......................................................................... : NI Example Finder -
21.......................................................................................... VI
-1 23............................................ . Highlight Execution
-2 )23....................................................... :(Single-Stepping

25........................................................................................ . Probe -3
26................................................................................... :Generic Probe-1
27................................................................. :Probe Indicator -2
29............................................................................... : Supplied Probes-3
31.................................................................................. :Custom Probe -4
33............................................................ :() Breakpoints -4

ii


. VI
Help .LabVIEW
VI .
. VI

iii

VI
) (Objects:
) (Controls Palette Controls
Indicators .Front Panel
Controls Indicators ) (Constants
Node Terminal Block Diagram Create

): (Objects

Positioning Front Panel Block

. Diagram

Shift

.
2


.
Shift .

Delete Edit>>Clear

): (Undo/Redo
Undo Edit
Redo .
:
.

Edit>>Copy .Edit>>Past
Ctrl

.
3

): (Label
.

) (Labels
). (Owned Labels .
.

): (Free Labels
.
Front Panel Block
.Diagram

Labeling


. Enter

Toolbar

): (Wires
. Wire Segment

Wire Segment . Bend

Wire Segment . Junction

Wire Branch Wire Segment Junction Junction


Junction Terminal Terminal Terminal Junction
.
5

Wire Segment

Branch

.Delete
): (Broken wires
.
) Data
. (Type


. Delete
Remove Edit Wires Edit Ctrl+B
.
:
.

:
Font Style
.Text Setting

Controls Indicators .
Graph display indicator X-Axis .Y-Axis

.Text Setting

): (Align Objects
Align
.Objects

:
Distribute
Objects

VIs :
VI Edit>>Copy .Edit>>Past
Front Panel .Block Diagram
:
. Terminals
Block Diagram .Data Type
Coloring

10

T ) (
:VI
Editing Exercise

11

LabVIEW Help
LabVIEW Help VI
. LabVIEW Help
.VI
- : Context Help
) (Objects Front Panel
.Block Diagram
Context
.Help


Help>>Show Context Help
Ctrl+H

) (Show Context Help . Toolbar

12

Front Panel SubVi ) Block Diagram


Function Constant Control ( Indicator Context
Help ) (icon Terminals.

:Terminals
: Required Terminals -1

Run

Terminals Context Help ).(Bold

13

: Recommended Terminals -2
) Terminals
( Default Terminals ). (Plain text
VI Terminals .

14

: Optional Terminals -3
. Terminals .

: Context Help
-1

: Hide Optional Terminals and Full Path


Terminals
SubVI .

15

-2

:Lock Context Help

Context Help
.

-3

: Detailed help
LabVIEW Help Context
Help
Detailed Help .

16

: LabVIEW Help -
LabVIEW Help .LaBVIEW
LabVIEW .Context Help
LabVIEW Help
Help >>Search the LabVIEW Help

Help

Help

17

: NI Example Finder -
LabVIEW

.LabVIEW
NI Example Finder
LabVIEW .NI
NI Example Finder Find Examples
.(Getting Started) LabVIEW

18


Help>>Find Example

NI Example Finder
LabVIEW .

19

20

VI
VI

VI .
VI

View>>Error List

)(Error list

21

Help LabVIEW
Help .
Data Type

) (Wires

VI .

22

VI
VI VI
.VI LabVIEW
:
-1 . Highlight Execution

Toolbar ) Block Diagram

-2 ):(Single-Stepping
Block Diagram
Node Single-Steping .
Step Into

Step Over

Step Out

Block Diagram .
23

Toolbar

.
Step Into

Step Over

Node

Node .
Step Over

Node

Node SubVI
Node .SubVI
Step Into

SubVI SubVI

.
Step Out

Block Diagram Structure VI

.

.
Pause

24

Highlight SubVI
.

-3 . Probe
Probe .
Probe

Probe
.
25

Probe . Probe
Front Panel .Block Diagram
Probe Highlight
) Breakpoints ( .
. Probe
VI Probes .
:Probe
:Generic Probe-1
.

Generic Probe
.Probe ) Custom Probe
( ) (Data Type .

26

-2 Indicator :Probe
Indicator Probe .
Indicator .
Chart Probe .
Indicator Probe
Custom Probe>>Controls
Control

27

Probe

28

: Supplied Probes-3
VI .
) VI Refnum Probe Refnum (
VI Hex .Ref
Probe .

Supplied Probe .Custom Probe
.

29

30

:Custom Probe -4
Custom Probe Probe Probe
. Probe
Custom Probe>>New
Probe .

31

: Probe )(Data Type


Probe Probe
.Probe

32

)Breakpoints-4 (:

Breakpoint Block Diagram VI

33

Break Point VI Node ) (Wire Block diagram

VI ) ( Breakpoint Block Diagram


Node .

34

Breakpoint

Breakpoint Breakpoint
.

VI Breakpoint
Toolbar

Pause

:
-1

. Toolbar

-2 Probe .
-3 Controls .Front Panel
-4

Pause

.
:
Debug Exercise .

35

SubVI


SubVI

LabVIEW

SubVI

ii ....................................................................................................
1 ................................................................................................ SubVI
1 ................................................................ The Icon and Connector Pane
2 ........................................................................................... The Icon-1
3 .......................................................................................... Icon Editor
5 ............................................................................... Connector Pane -2
6 ............................................ (Terminals Patterns) Terminals
7 ............................................... Indicators Controls Terminals
11 ....................................................................................The Help Window
11 ........................................................................... Terminal -1
12 ..................................................... VI ( Documentation) -2
13 ...................................................... Indicator Control -3
15 ......................................................................................... SubVI
15 .................................................................. SubVI VI :
16 ......................................................................... SubVI :
20 ................................................................................ Relink to SubVI
22 ...................................................................... The VI Hierarchy Window

LabVIEW

SubVI


-1 .SubVI
-2 . VI
-3 . Icon Editor
-4 . Connector Pane
-5 )( Documentation .VI

ii

LabVIEW

SubVI

SubVI
VI Block Diagram VI.
Sub Routine .C

LabVIEW VI VI
.
VI . SubVIs
SubVI .SubVIs
) (Hierarchical Nature . LabVIEW SubVI
.SubVIs

The Icon and Connector Pane


Front Panel Block Diagram VI
The Icon and Connector Pane .SubVI

LabVIEW

SubVI

The Icon-1
VI . Icon
Front panel .Block diagram

VI .

VI

. LabVIEW VI
.

. Edit Icon
.

LabVIEW

SubVI


File >>VI Properties
General Edit Icon

.Icon Editor .
Icon Editor
Icon .

LabVIEW

SubVI

Icon Editor :
Pencil .
Line . Shift
.
Color Copy Icon .
Fill .
Rectangle .
.
Filled Rectangle .

.
Select .
Delete
.
Text .
.
)
( .

LabVIEW

SubVI

Connector Pane -2
VI SubVI Connector Pane
Connector Pane .Terminals
Terminals Controls Indicators .VI
Connector Pane VI . SubVI
Connector Pane VI Icon
.Show Connector

LabVIEW

SubVI

Connector Pane Terminal Terminal


Control Indicator .

Terminals Control .Indicator


Control Indicatror Terminal .Connector Pane
(Terminals Patterns) Terminals
Terminals Terminals
Connector pane Patterns Pattern .

LabVIEW

SubVI

Pattern Terminals Control Indicator


Control Indicator .
Terminals 28 .16
Terminals Connector Pane Flip
) Horizontal ( ) Flip Vertical ( Rotate
) 90 Degree 90(
Terminal .Terminal

Terminals Controls : Indicators


Connector Pane VI Terminals Connector Pane
Controls Indicators .Front Panel
Inputs Connector pane
Output .

LabVIEW

SubVI

:
Front Panel
-1 Wiring Terminal .
-2 Control Indicator Control
Indicator .Terminal
-3 .Terminals
-4 .

LabVIEW

SubVI

:
Wiring Terminals
Controls .Indicators
Control Indicator .Terminal
Terminals Controls
Indicator .Disconnect all Terminals
Terminal
.Disconnect This Terminal

LabVIEW

SubVI

Connector Pane .Show Icon

10

LabVIEW

SubVI

The Help Window


Context Help SubVI .SubVI
SubVI Terminals Required Terminals
Recommended . Optional .Terminal
.
VI .SubVI
-1 . Terminal
Terminal Terminal Connector
Pane This connection is .Terminal
:
Terminal .Recommended
Terminal VI .Required

11

LabVIEW

SubVI

-2 ) (Documentation VI
VI VI Properties

12

LabVIEW

SubVI

-3 Control . Indicator
VI Control Indicator .
Control Indicator Description and Tip

13

LabVIEW

SubVI

14

LabVIEW

SubVI

SubVI
: SubVI
: VI . SubVI
: Block Diagram .SubVI
: VI . SubVI
VI Connector Pane VI
.SubVI
Function Palette>> Select a VI .Block Diagram

15

LabVIEW

SubVI

: SubVI .
Positioning Block Diagram SubVI

Edit>>Create SubVI

16

LabVIEW

SubVI

17

LabVIEW

SubVI

SubVI
VI .

18

LabVIEW

SubVI

SubVI Expandable Icon


SubVI . View as Icon

19

LabVIEW

SubVI

Relink to SubVI
Conector Pane ) SubVI Terminals ( SubVI
VI SubVI .VI

20

LabVIEW

SubVI

21

LabVIEW

SubVI

The VI Hierarchy Window



.SubVIs SubVIs
.
LabIVEW VI Hierarchy Window SubVI
. VI Hierarchy


: SubVIs VI .
: SubVIs VI .
: VI SubVI VI
.

22

LabVIEW

SubVI

23

LabVIEW

SubVI

SubVI . VI Hierarchy

:
Edit Icon Thermometer .

24

LabVIEW

SubVI

25

LabVIEW

LabVIEW


Structures


iii ...................................................................................................
iv ...........................................................................................................
) Loops ( 1 .....................................................................................
2 ................................................................................................ For Loop
3 ............................................................................. For Loop
5 ................................................................................Auto Grow
6 ..................................................................................... For Loop
7 ........................................................................ Numeric Conversion
10 .......................................................................................... While Loop
12 ....................................................................... While Loop
Terminals 14 ........................................ Loops
Shift Registers17 .......................................................... Fedback Node
18 ...................................................................................... Shift Register
18 .................................................................. Shift Register
20 ..................................................................... Shift Register
22 .............................................................. Shift Register
24 ............................................................. Shift Register
24 .............................................. Shift Register
Shift Register 24 .........................
27 ................................................................................... Feedback Nodes
28 ...................................................................... Feedback Node
Feedback Node 29 .....................
30 ....................................................................................... Case Structure
33 ......Selector Terminal
Default Case 34 ............................................................
38 ....................................................................................

39 ..............................................Case Structure
41 .................................................................................................... Dialogs
41 ............................................................................Standard Dialogs-1
42 .......................................................................... One Button Dialog
43 .......................................................................... Two Button Dialog
44 .......................................................................... Two Button Dialog
44 ............................................................................. Express Dialogs-2
44 ....................................................... Display Message Express VI
46 ............................................................... Prompt User Express VI
49 ...................................................................... The Sequence Structure
49 ................................................................... Flat Sequence Structure
49 ........................................................... Stacked Sequence Structure
50 .................................................................. Sequence Structure
51 ............................................................................... Sequence Local
52 ........................................................................ Sequence Local
55 ......................................................................................... Timing
55 .........................................................................................
55 ................................................................................ Wait (ms) .1
56 ....................................................................... Wait Until Next .2
57 ..................................................................... Tick Count (ms) .3
58 ................................................................ Express Timing Functions
58 .............................................................. Time Delay Express VI .1
58 .......................................................... Elapsed Time Express VI .2
60 ........................................................................................ Formula Node
60 ..................................................................... Formula Node
61 ...........................................................
62 ......................................................... Forumla Node
65 ................................................................................... Expression Node

ii


While Loop.For Loop
Shift Registers .Feedback node
.Case Structure
Dialogs .
.Flat and Stacked Sequence Structure
.
Formula Node Expression Node
.

iii


.Block Diagram Nodes Structures
: LabVIEW Structures
For Loop
While loop
Case Structure
Sequences Structure
Formula Node

iv

) Loops (
Loops . LabVIEW
Loops For Loop .While Loop
For Loop .
:
While Loop
True False .
While Loop For Loop
Function Palette>>Programming>>Structures

For Loop
For Loop .
For Loop .SubDiagram

:Terminals 2 For loop


Count Terminal For loop
.For Loop
Iteration Terminal .

.N-1
Terminal . N-1 N
) Count Termianl ( .

:
Data Type

Long Integer

.232-1 .

For Loop
For Loop
Function Palettes>>Programming>>Structures
. For Loop

For Loop
.

:
For Loop Positioning
Loop
.

SubVI Structure For Loop

For Loop .Positioning Tool


For Loop .
For Loop SubVI
.For Loop

: Auto Grow
Structure For Loop Auto Grow For Loop
.
Loop
.Auto Grow

: For Loop
For Loop For Loop .Delete
For Loop
For Loop Remove For Loop

: Numeric Conversion
Data Type Count Terminal

Long Integer

.232-1
Data Type Control Indicator
Double-Precision . Single-Precision
Terminals 2 Data Type
LabVIEW . LabIVEW
Terminal .Coercion dot

Terminal Data type Count Terminal


LabVIEW .


-1 Data Type Terminal Count Terminal
Representation .I32

-2 Constant Control Count Terminal


. Data type Count Terminal
Create>>Constant .Create>>Control

While Loop
. Structure

Iteration Terminal Terminals 2 While Loop


Conditional Terminal
:

Iteration Terminal-1

For Loop Iteration Terminal


10

.While Loop
.
:Conditional Terminal-2
Terminal True ) Boolean . ( False
While Loop Terminal True False
.Conditional Terminal
:Terminal
Stop If True-

While Loop Terminal


.True
While Loop Terminal
True While Loop False While
.Loop

Continue if True-2

While Loop Terminal .True

11

While Loop Terminal


True While Loop False
.While Loop

:
While Loop .
Terminals 2 Terminal
.

: While Loop
While Loop
Function Palettes>>Programming>>Structures

12


Function Palettes>>Express>>Execution Control

Function Palette While Loop For Loop


.While Loop

13

While Loop For Loop :


-1 Loop
-2 Loop
-3 Auto Grow
Terminals : Loops
Loops Tunnel

14

Dataflow Loop Loop


Loop . Loop Loop
.Loop

:
Terminal Loop Conditional Terminal

Terminal Loop Conditional Terminal

Indicator Terminal Loop

15

Loop Loop Indicator Terminal

:
Conditional Terminal:Stop If True False

Conditional Terminal:Stop If True True

16

Shift RegistersFedback Node


Loops For Loop While Loop
Loop
Loop.
Loop
Loop 1
2 3 ... 4.

1 2.
Shift Register
.Feedback Node

17

Shift Register
Shift Register For loop While Loop
.
Shift Register

. Loop

.Loop

: Shift Register
Shift Register Loop Add
.Shift Register

18

Shift Register .

Shift Register ) ( Data type


Boolean
.

19

: Shift Register
Execution Highlighting

For Loops .
Indicator1 For Loop 3 Shift
Registers .

20

Inidcator2 For Loop 6 Shift


Register .

21

Shift Register .
Shift Register .
Shift Register Terminals Loop

Shift Register Terminals Shift Register


Add Element Terminal .

:Shift Register
While Loop Shift Register ) Stop
(Control Indicator ) X(i) X(i-1) X(i-2)X(i-3

22

) X(i i ) X(i-1) X(i-2)X(i-3


i .

Highlight Execution
-1 ) X(i) X(i-1) X(i-2) X(i-3 .
-2 ) X(i-2 ) X(i-3 ) X(i-1
) X(i-2 ) X(i ) X(i-1 .

23

: Shift Register
Shift Register .Loop
: (Initialize Shift Register) Shift Register
Shift Register Constant Control
Terminals .

Shift Register
Shift Register Shift
Register ) (Numeric
) (Boolean .False

24

Shift Register
Shift Register
.
.

Result1 Result2

25

Shift Register
10
10 20 .

26

Feedback Nodes
Feedback Node While Loop For Loop
SubVI SubVIs SubVI
SubVIs.
Dataflow SubVI

.

Feedback Node
SubVI SubVI
.SubVI

Shift Register .

27

.
Terminal

Feedback Node Terminal

.Feedback Node
Feedback Node
.Loop
Terminal .Feedback Node

Feedback Node .
: Feedback Node
Feedback Node
Function Palette>>Programming>>Structures

28

Feedback Node
Feedback Node
Feedback Node Loop
.
Feedback Node Feedback
Node Loop
Feedback Node Loop
Feedback Node Loop.
.Shift Registers

29

Case Structure
If.thenelse
.
Case Structure
Function Palette>>Programming>>Structures

Function Palette>>Express >>Execution Control

30

Case Structure

. Selector Terminal

.Subdiagram Case Structure


.

.
Selector Label .Labeling Tool

Case Structure

Case Show Case


31

32

:Selector Terminal
Boolean True False

) Numeric( .
Case Structure
.

33

..
2..20 2 .20
3.. .3

Default Case :
.
34

12 3
100.
)(Default Case
. Default

).(Default Case

35

) String(
LabVIEW .

Default .
.

Case Sensitive .Case Insensitive


Case Sensitive o
ALI .ali
Case Insensitive o
ALI Ali .ali

36

:
Floating-Point LabVEW
I32 .

) (Case Selector Case


.Structure

37

:

.Case Structure

38

: Case Structure
) ( Selector Terminal .

. Tunnels

.
.
.
Tunnel .

39

40

Dialogs

.
Ok .Cancel
LabVIEW .

Function Palette>>Programming>>Dialog & User Interface

LabVIEW :
: Standard Dialogs-1

41


.
:
.
Cancel .Ok

.

:
One Button Dialog
.

42

Two Button Dialog


OK .Cancel
:

True True
.
. OK
False False
.
.Cancel

43

Two Button Dialog


Yes No .Cancel
:



. Yes

. NO

. Cancel
.
:
0 .
1 .
2 .
3 .
: Express Dialogs-2
Express VI
.
Display Message Express VI .Prompt User Express VI
Display Message Express VI
Express VI .

44

Express VI .One and Two Button Dialogs

Express VI Block Diagram


Express VI
ExpressVI .Properties

45

Express VI Enabled
:
True .Express VI
False .Express VI
.

Express VI
.
True.
:
True .
False .
One Button Dialog Two Button Dialog

Prompt User Express VI



.

46

Express VI .

47

Express VI

48

The Sequence Structure


Sequence Structure SubDiagram
.Sequence Structure .
.
Sequence Structure Flat Sequence Structure
.Stacked Sequence Structure
). (SubDiagrams

Flat Sequence Structure



.

Stacked Sequence Structure


Case Structure ) (.

49

: Sequence Structure
Sequence Structure
Function Palette>>Programming>>Structures

Add Frame Structure


Add Frame Before After

50

: Sequence Local
Flat Sequence Structure
) Tunnels (.

51

Stacked Sequence Structure Sequence Local


.
: Sequence Local
Add Sequence Local

52

Sequence Local
.

:
Flat and Stacked Sequence
.Structures

53

54

Timing
LabVIEW
Loops Loops
.
: Express Timing VIs

Function Palette >> Programming>> Timing

:
.1 ): Wait (ms
VI .VI
. .1000

55

.2 : Wait Until Next


VI ) (
) (millisecond multiple .VI
.

) Wait(ms Wait Until Next ms Multiple


.
:

Wait until Next ms Multiple

.10

.112

8 120

) 10 (.
130 .10
.
)Wait (ms

.10

.112

56

10 .122

10 . 10
.

Loops .

.
Loop
.
Loops Loop .
Front Panel
.

.3 ): Tick Count (ms


)( .

.
57

: Express Timing Functions


LabVIEW Express Timing VIs
Time Delay .Elapsed Time
: Time Delay Express VI .1
) Wait(ms Express VI
.
Express VI .

Express VI
.

: Elapsed Time Express VI .2


Express VI ) ( .
Express VI
.

58

Time Has Elapsed


True
False .

59

Formula Node
Formula Node .
Y=X2+X+1 LabVIEW

Formula Node

: Formula Node
Formula Node
Factions Palette >>Programming >>Structures

60

Add Input
Add Output

.
.
.

61

: Forumla Node
Fromula Node .C
.
;
.Formula Node

.Formula Node

:
Node
.

62

:
.Formula Node
Fromula Node Positioning
Tool

Node .

if thenelse Formula Node



If (x>=0) then
)y=sqrt(x
else
y=-99
endif

63

: x 0 y
. x
x ) 0 (0
y ) -99 x ( .
Formula Node

y=(x>=0) ?sqrt(x) : -99


X>=0
Then ? y )).(Sqrt(x
else : y ).(-99
Formula Node Context Help
.Formula Node

64

Expression Node
.Formula Node
.

.
;
.
.

Expression Node
Function Palette>>Programming>>Numeric

65

66

LabVIEW


Arrays and Clusters


i.........................................................................................................
iii ..................................................................................................
iv ..........................................................................................................
)1 ..................................................................................... (Arrays
) (Array 1 .............................................................................
Controls 3 ...................................................... Indicators
Constants 9 ........................................... Block Diagram
10 .........................................................................
11 .................................................................
) Scrollbar ( 13 .......................................................
14 .................................................................. Auto-Indexing
Auto Indexing 17 .............. For Loop
19 .................................................................................
20 ....................................................................
22 ......................................... For Loop
24 ............................................................................
25 ............................................................................ Initialize Array
27 ................................................................................ Array Size
28 ................................................................................. Build Array
31 .............................................................................. Array Subset
32 ................................................................................ Index Array
34 ....................................................................... Delete from Array
35 ....................................................................................... Polymorphism

37 ............................................................. Compound Arithmetic Function


43 ................................................................................................. Clusters
44 .................................... Cluster Indicators Cluster Controls
46 ....................................................Block Diagram Cluster
47 ...................................................................... Cluster
49 ........................................... SubVI Cluster
49 ..................................................................... Clusters
50 ........................................................................................Bundle
53 ................................................................................... Unbundle
54 ........................................................................ Bundle By Name
55 .................................................................... Unbundle by Name
56 ................................................................ Clusters
57 .......................................................................... Cluster to Array
58 .......................................................................... Array to Cluster
60 .................................................Clusters
64 ........................................................ Error-Handling Error Clusters
66 ......................................................... SubVIs
66 .......................................................................... Error Case Structure
68 ............................................................................... Error Clusters
69 .................................................................. SubVI Error
72 .....................................................................
73 ................................................................................ Explain Error
74 ....................................................................... Loops

ii


.
Clusters .
.Polymorphism
.Compound Arithmetic Function
.

iii


) ( Data Type
) (Arrays.Clusters
.
.LabVIEW

.

iv

)(Arrays
) (Array
).(Data Type
) (Scalar Value Indicators . Controls
Indicator .35
Indicator Control
) ( Array .
) Control
Indicator ( ... Constant Array Chart . Graph
.
231-1 .
:
.
.
.

.
.

.
.

) Index( .

Index N-1 N .
: 10
2


Loop
Loop .
Controls : Indicators
Controls Indicators Front Panel :
-1

Controls Palette>>Modern>>Array, Matrix & Cluster

-2 Control Indicator .

Controls Indicators .

Control Indicator Terminal


Block Diagram Terminal Data
type Control Indicator .

Control Indicator Terminal Data


Type . Terminal . Data Type

Terminal
View as icon .
5

Positioning
.

Positioning

.
6


Numeric Control
Boolean .

) (.

) Index( .
.Index

Constants : Block Diagram


Constants Block Diagram :
-1 ) (Array Constant
Function Palette>>Programming >>Array

-2 ) (Constant
Numeric String .Boolean

:

) Index( -
Data Operation >>Empty Array

10

:


Data Operation >>Insert Element Before

Data Operation >>Delete Element


11

12

) Scrollbar ( :
Index .
Scrollbar Scrollbar
) (Horizontal ) (Vertical Index
Visible Items>>Vertical Scrollbar

Visible Items>> Horizontal Scrollbar

13

: Auto-Indexing
Auto-Indexing While Loop For Loop
Loop Loop
Loop.
Loop .
For Loop .
While Loop .
:
For Loop 5

14

Auto Indexing Tunnel . Disable Indexing


) ( Scalar .

15

) (
Numeric Indicator .

Auto Indexing For Loop While


.Loop
For Loop .Auto Indexing
Loop .
Loop .
Auto Indexing
. Loop .

16

Auto Indexing
.Loop

Auto Indexing : For Loop


For Loop Auto Indexing
For Loop ) ( .

.Terminal

17

Terminal For Loop

Auto Indexing For Loop )


(.

For Loop

For Loop

18

:
.
) Index 2( .
Index Index .
Index Index .

19

:
Index Add Dimension

20

Positioning

.
.
Index .Remove Dimension

21

: For Loop
For Loop . - For Loop 2
- Auto Indexing .
For Loop For Loop
.

22

23

:
LabVIEW .

Function Palette>>Programming>>Array

24

: (Index=0) 0
(Index=1) 1.
:Initialize Array
.
:


.

.
.

25

26

: Array Size

) ( .
.
.
.

27

: Build Array
.

.
.

Add Input


Concatenate :
: .

.

28

: .

.

29


.
.
:
Concatenate .
Concatenate Concatenate
.

Concatenate
.

30

: Array Subset
.
:
.
Index .
Length .

31

: Index Array
.

32

.
.

33

: Delete from Array


.

:
.
.
.
:
.
.

34

Polymorphism

.

.
. Polymorphism
: .

35

:
) (
.

36

Compound Arithmetic Function



.

) (Compound Arithmetic Function ) (Add


) ( Multiply And Or .Xor

Function Palette>>Numeric

Function Palette>>Boolean

37

38

.Positioning

) (Add AND
) Multiply And Or .(Xor
Change Mode .

Operating Change Mode

39

.
.
. Invert

x .x
x .1/x
And Or Xor Not x
.Not x

40

41

42

Clusters
Cluster
) (Data Type Numeric Control
Boolean Control .

.
Cluster
.
Cluster Block Diagram
.
.
SubVI .
Block Diagram Cluster
.Bundle
Cluster .UnBundle

43

Cluster .
Clusters 2 . Cluster
Cluster Controls: Cluster Indicators
Cluster :
-1 Cluster Cluster
Controls Palette>>Modern>>Array, Matrix, & Cluster

-2 Controls Indicators . Cluster

44

Cluster Controls Indicators .


Cluster Front Panel Terminal Block Diagram

Cluster

. Positioning

Cluster Cluster
Cluster
45

Autosize>>Size to Fit

: Block Diagram Cluster


: Block Diagram Cluster
Cluster Constant :
Function Palette>>Arrays and Clusters >>Cluster Constant

46

: Cluster ) Numeric Constant Boolean Constant


.(String Constant

: Cluster
Cluster .Cluster
Cluster .
0 1.
Clusters 2 .
Cluster Cluster
.Reorder Controls in Cluster

.
.
47

.
Toolbar :
Ok .
Revert .
.

48

Cluster : SubVI
Terminals Connector Pane VI .28
Terminals .
Cluster SubVI Cluster
Controls Indicators SubVI
Terminal .

: Clusters

Function Palette>>Programming>>Cluster & Variant

49

: Bundle
Cluster
Cluster.

. Positioning

Cluster .
Cluster .
Cluster .
. Cluster Cluster
Cluster .
:
.

50

Cluster Cluster Cluster


Cluster
.
.

51

:
.

52

Cluster .

: Unbundle
Cluster .

Cluster
Cluster Cluster
.
.Cluster

53


VI .

: Bundle By Name
Bundle .Cluster .
Cluster.
Cluster Cluster
.

54

.Positioning

Cluster ) (Cluster

Operating Cluster .

: Unbundle by Name
Cluster .
Cluster Cluster .

.

55

Operating

.Positioning

: Clusters
Cluster.
Clusters
Function Palette>>Programming>>Cluster & Variant

Function Palette>>Programming>>Arrey

56

: Cluster to Array
Cluster
.

.Cluster

57

Cluster .
Cluster
LabVIEW .
: Array to Cluster
Cluster
.

Cluster LabVIEW
Cluster .
Cluster Size
Cluster

58

Cluster
Cluster . 9
9 Cluster
) 0
False Numeric ( Boolean Cluster
9.

59

9 Cluster 9
.
Cluster : Array
Cluster
Cluster Cluster Array Reverse 1D Array
.Cluster

: Clusters
Clusters 2

60

Clusters Compare Elements Compare


.Aggregates
Comparison Mode
.

61

Compare Aggregates
True True
True .False True
.False

Compare Elements
Cluster .

62

63

Error Clusters Error-Handling


Error Cluster Cluster
.
Cluster Error-In Cluster Error-Out Cluster:
Controls Palette>>Modern>>Array , Matrix & Cluster

Error Cluster :
: Status -1 Boolean True . False
.
: Code -2 - signed integer) I32
( .

64

:
: .
: .
: .
:Source -3 .SubVI

SubVI
.
Cluster SubVI .

65

SubVIs :
SubVI error out cluster
SubVI .
SubVI error in
. VI error in error out
SubVIs .

:
Error Clusters SubVI
Error Cluster
SubVI .

: Error Case Structure


Error Cluster Case Selector Case Structure
Case Structure :

66

) Error (
Error In Cluster ).(Status=True
) No Error (
Error In Cluster ).(Status=False
SubVI SubVI . No Error
SubVIs .

Error Error Cluster


SubVIs .
67

: Error Clusters
. Error Cluster
.Error Clusters Merge Errors.vi


Function Palette >>Dialog & User Interface

68

VI :
: Error In1 Error Cluster .
: Error In 2 Error Cluster Error In1
: Error In3 Error Cluster .Error In2
: Error Array in Error Clusters .
Error Cluster VI . )( Status=True
Error Cluster .
Error Cluster .
: Error In2 Error In 3 ) Status =True (
Error In 2 .

.
Error Cluster )(No Error
Error : SubVI
SubVI .
SubVI :
SubVI
.Error Cluster
Error Cluster from Error Code

69

VI . Error Cluster
:VI
: Error Code .
: Error Message Simple Error Handler
) ( LabVIEW
.Error Code
: Error in Error Cluster . VI
:VI
Error Cluster : Error Out Error
Code Error In Error In
Error Out .Error In

70

71

:
.
Simple Error Handler .vi .
VI
Function Palette>>Programming>>Dialog & User Interface

Error Cluster VI
.
type of dialog .
72

: Explain Error
Error Cluster Control Error Cluster Indicator
Explain Error
.

73

: Loops
Status Error Cluster .
.Unbundle by Name

74

Status Loops .

75

photonlv@gmail.com

LabVIEW


Charts and Graphs


iv ......................................................................................................
1...............................................................................................................
2......................................................................................... Waveform Charts
3.......................................................................... Chart
4............................................................................................. Strip Mode
5.......................................................................................... Scope Node
6......................................................................................... Sweep Mode
8.....................................................................Waveform Chart
8...................................................... (Single-Plot) Chart
9................................................. (Multiple-Plot) Chart
15........................................................................................... Chart
15..................................................................................... Digital Display
16..................................................... ( The X Scrollbar) X
17.......................................................... (Clear Chart) Chart
19............................................. Block Diagram Chart
22........................................................................ Stack and Overly Plots
24........................................................... Y ( Scale)
28.................................................................................. Chart History
30........................................................................................................Graphs
31...................................................................................... Waveform Graphs
31............................................................................ Waveform Graph
32.................................................................................. Graph
32...................................................... Waveform Graph
35................................................... Waveform Graph

37.................................................................................................. XY Graphs
38............................................................................ XY Graph
38................................................................. XY Graph
40.............................................................. XY Graph
40............................................... XY Graph Planes
43................................................................................. Graphs Charts
43............................................................................. (Scales)
45................................................................................... AutoScale
46..................................................................................... Loose Fit
47.......................................................................................... Formatting
54................................................................................... The Scale Legend
56...................................................................................... The Plot Legend
69......................................................................................... Graph Cursors
69................................................................................. The Cursor Legend
70........................................ Cursor Legend Graph Cursor
71.................................................................................... Cursor
71.......................................................................................... Cursor
73....................................................................................... Cursor
77.................................................................................. Graph Annotations
78....................................................................Graph Annotation
80..................................................................................... Annotation
81....................................................................... Intensity Charts and Graphs
82....................................................... Intensity Graph and Charts
82.......................................... Intensity Graph Intensity Chart
84.............................................................................................. Color Scale
84........................................................................................
88.................................................................................................. 3D Graphs
ii

90................................................................................... 3D Surface Graph


91............................................................. 3D Surface Graph
95.............................................................................. 3D Parametric Graph
97...................................................................................... 3D Curve Graph
99..................................................................................... 3D Graph
102.............................................. Dynamic Data Waveforms Time Stamps
103......................................................................................... Time Stamps
103........................ Constant Indicator Time Stamp Control
105............................................................................. Time Stamp
108........................................................................ Time Stamp
111.......................................................... Numeric Time Stamp
113............................................................................................ Waveforms
116............................................................... Waveform
117....................................................................... Waveform
127............................................................................................ Digital Data
131........................................................................ Digital Waveform Graph
133........................................................................................ Dynamic Data
136.................................................................................. Mixed Signal Graph
140....................................................................................Multi-Plot Cursor
142..........................................................Graphs Charts

iii


Charts .
Waveform Graph .
XY Graph .
Charts Graphs.
Intensity Charts Intensity Graphs .
3D Surface)3D Graphs 3D Parametric(3D Curve
Time Stamp
WaveformsDigital Waveform Digital Data . Dynamic Data
Digital Waveform Graph .
Mixed Signal Graph .
Chart.Graphs

iv


.
LabVIEW
.
.

Waveform Charts
Charts Numeric Indicator .
Y . X Y
.X

Chart
Controls Palette>>Modern>>Graph

Charts Loops . Charts


.
Chart .

: Chart
Chart Strip mode Scope Mode .Sweep Mode
Chart
Advanced>>Update Mode

: Strip Mode

Chart
Chart .

: Scope Node


) ( .

: Sweep Mode

Scope Mode
) (
) (
.


Strip
.
:
Chart Y X
Chart LabVIEW X.
X Graph . Chart

:Waveform Chart
(Single Plot) Chart )(Multiple-Plot
Chart ): (Single-Plot
: Chart
-1 Chart ) (Scalar Value
.Chart

Loops .

-2 Chart Chart
) ( Array .

Loops
:

Chart ):(Multiple-Plot
: Chart

-1 Chart ) (Scalar Values


Bundle
Function Palette>>Programming>> Cluster & Variant
Chart .

: Chart Loop

10

Clusters
Cluster .

Cluster Bundle Clusters


.Loops
:

11

--2 Chart
.Chart

12

: Chart
Transpose Array .Chart
Chart Transpose Array
.

13

Transpose Array Chart Transpose 2D


Array .

: Chart
Chart ... .

.

14

: Chart
Chart .
: Digital Display
Indicator Digital Display - Chart . Chart

Digital Display Chart


Visible Items>>Digital Display

15

: ( The X Scrollbar) X
Chart X Chart
.

Chart

Visible Items>>X Scrollbar

16

: (Clear Chart) Chart


Chart .Chart
) Chart (.
Chart
Data Operation >> Clear Chart

:

Run Mode Edit Mode
Edit Mode Controls
.
Run Mode VI
Run Mode VI .
Edit Mode Run Mode Ctrl+M

Operate>> Change to Run Mode
17

Edit Mode

Operate>> Change to Edit Mode


Run Mode

18

Chart Run Mode


Clear Chart

Chart : Block Diagram


Chart .
Chart .
Chart Block Diagram .
.Property Node
Property Node Node Controls Indicators
.
Chart History Data .Chart
Chart History Property Node
.

19


-1 History Property Node Chart Terminal
Chart Block Diagram
Crate>>Property Node>>History Data

20

-2 Property Node
Change to Write

-3 History Data Property


Node
Create>>Constant

21

: Chart

: Stack and Overly Plots


Chart Y
.Overly Plots Y
.Stack Plots

.(Overlay Plots) Y
Chart Stack plots
Overlay Plots . Stack Plots
22

.Overlay Plots Stack Plots Overlay Plots

23

) (Scale : Y
Chart
.Y

Y Chart Y
.Duplicate Scale

24

Chart Chart
.Swap Scale

25

Chart
) Properties (Chart .Plots

26

:
Y
.Delete

Chart Chart
Advanced>>Reset Scale Layout

27

X .X
: Chart History
Chart 1024
).Chart
( .
Chart 10 2,147,483,647 Chart
Chart History Length .Chart

28

: Chart Chart Chart


Chart .

29

Graphs
Graphs
.Charts
Graphs Waveform Graphs XY Graphs Intensity
Graphs 3D Graphs Digital Waveform Graphs .
Waveform Graph XY Graphs
Intensity Graphs 3D Graphs Mixed Signal Graphs .

30

Waveform Graphs
Waveform Graphs Y X
X ) 4,3,2,1,0 (20,15,10,5,0
X .
Graph X .Y

: Waveform Graph
Waveform Graph Front Panel
Controls Palette>>Modern>>Graphs

31

Indicator Front Panel Terminal .Block Diagram

: Graph
Waveform Graph :
-1 Waveform Graph Waveform
Graph Terminal. Y X
Y .
) X0 0=(X) dX 1= (X

32

:
For Loop Auto Indexing
.Waveform Graph

X . X
X0 dX .1
. Bundle Bundle
: ) X0 .(X
: ) dX X .(Y
: ) .(Y
.Waveform Graph Terminal
Bundle
Function Palette>>Programming>>Cluster & Variant

33

: Bundle Arrays and


Clusters
.Bundle

34

X0dX
100=X0 : 5=dX

:
Waveform Graph 5= dX
5.
Waveform Graph :
Waveform Graph
. X0=0 .dX=1

35


.Build Array

) X0 (X ) dX (X .
Bundle .Build Array

36

XY Graphs
XY Graphs X. Y X .Y
XY Graph Waveform Graph .

XY Graph
Controls Palette>>Modern>>Graphs

37

Charts Waveform Graphs XY Graph


.
: XY Graph
XY Graph -1 :
(a X Y .Bundle
X Y
: Bundle
Function Palette>Programming>>Cluster & Variant

38

(b X Y Cluster Bundle
.Clusters
:

39

XY Graph -2 :
XY Graph X Y
Bundle Clusters )(
.Build Array
:

Planes : XY Graph
XY Graph )(Grid Lines
XY Graph Planes NyquistS Plane
.Z Plane Planes )Radio Frequency (RF
.

40

Planes XY Graph Option Planes


Plane .

41

42

ChartsGraphs
Charts Graphs .
Charts Graphs .
.

): (Scales
X .Y
Chart Graph
X Scale Y Scale X .Y

43

44

: AutoScale


Chart Graph .
Y 0 1 Y 0 1
AutoScale .Y

45

AutoScale Graphs .Chart


AutoScale Chart Graph
.
AutoScale X Y
Operating Labeling .
.

: Loose Fit

46

.
) 10 (10
.10

: Formatting

47

Formatting Graph Chart


Format and Precision
.

.Scales

48

: Name ).(Scale Label

:Show Scale Label .Scale Label

49

: Show Scale .

: Log ). (Logarithmic

50

: Inverted
X .Y

: AutoScale AutoScale .
:The Scale Style and Colors
Major Ticks Minor Ticks Major Ticks Minor
Ticks .Marker text

51

52

:The Grid Style and Colors


. Grid Lines Gird Lines
Chart Grid Lines Major Ticks
Major GridGrid Lines Minor Ticks .Minor Grid
. .

53

:Scaling Factors
( X0) X . Offset
(dX) X .Multiplier

:The Scale Legend


Chart Graph Scale .

Chart Graph .

54

: Scale Legend Positioning


.

. Y

AutoScale

AutoScale

AutoScale

55

: The Plot Legend



.

Chart Graph Plot Legend


Chart Graph Plot Legend Positioning
.Plot Legend

Plot Legend Plot ) Plot 0 (Plot 1


Labeling Label .LabVIEW

Plot Legend Plot


.Legend Autosizing Chart
Graph .Plot Legend Autosizing

56

: Chart Graph Plot Legend Plot


Legend .
Plot Legend Operating
.
Plot Legend

57

.
: Common Plot

6
.

58

: Color

: Line Style
.

59

:Line Width
.

:Anti-Aliased

.
.

60

: Bar Plots

%100 %75 %1 .

: Fill Base Line



Chart .Graph

61

62

:Interpolation

.Histogram

:Point Style
.

63

X Scale : Y Scale
. .

64

:The Graph Palette

Graph Palette Charts Graphs


.
Graph Palette
.
: Standard Mode
Graph ) Cursors
( .

: Pan
.
.

65

):(Zooming
.

:
X Y
.

:X
X Y .

66

:Y
Y X .

:
X Y .

67

:

.

:

.

68

: Graph Cursors
Graphs Cursors Graph .
Cursor X .Y

:The Cursor Legend


Cursor Legend Cursors .Graph
Graph .Cursor

69

Cursor Graph :Cursor Legend


Cursor Legend . Cursor
Cursor Legend Create Cursor . Cursor

70

Cursors :
: Free Cursor Graph .
: Single Plot Cursor
.
: Multi-Plot Mixed Signal Graphs
.

Cursor .
: Cursor
Cursor Labeling Label .LabVIEW

:Cursor
-1 Cursor

71

Cursor Operating
.
Cursor.

Cursors
.

72

-2 Cursor Cursor
Cursor
.
: Cursor
.
Cursor .

-3 Cursor X Y Cursor Legend


.Labeling

:Cursor
Cursor Cursor .
73

Cursor .Attributes

74

75

Cursor Graph

Graph Cursor
.

76

Cursor Cursor Legend


.Delete

: Graph Annotations
Graphs .Graph Annotation

.
Annotation Cursor ).(Label

Cursor :Annotation
:Free .Graph
: Snap to All Plots Graph
.Graph
: Snap to One Plot .

77

Annotation : Graph
Edit Mode Graph Data Operations
Create Annotation Annotation .

Run Mode Graph Create Annotation


Annotation .

78

: Edit Mode Run Mode .Ctrl + M

Cursor Annotation Free


Graph
Cursor .

.Cursor

79

: Annotation
Graph Annotation
Data Operations >> Delete All Annotations
Edit Mode


Delete All Annotations
Run Mode

80

Intensity Charts and Graphs


Charts Graphs X .Y
X YZ
Intensity Charts Intensity Graphs Z .
0 .255 .Z
.
Color Scale Charts Graphs
.

Intensity Chart Intensity Graph Charts Graphs .


Chart Graphs
.

81

:Intensity Graph and Charts


Intensity Graph and Charts
Controls Palette>>Modern>>Graphs

: Intensity Graph Intensity Chart


Intensity Graph Intensity Chart
.Y X ( Z )

82

83

:Color Scale
Markers Scale Colors Markers .Scale Color
. Labeling

Marker Color Scale


Add Marker

:
Marker Operation
Marker Color .
84

Color Scale .

85

Color Scale Color Scale Color


.Scale .
.

Color Scale
Interpolate Color

86

: Intensity Charts And Graphs Charts Graphs


Z .
LabVIEW
Examples\general\graphs\intgraph.llb
Simulation of Tomography Heat Equation
Examples\analysis\mathxmpl.llb

87

3D Graphs
LabVIEW 3D Surface Graph 3D
Parametric Graph 3D Curve Graph X Y .Z
Graphs LabVIEW .LabVIEW Professional
3D Graphs
Controls Palette>>Graphs

3D Graphs Graphs . ActiveX


3D Graph Controls Palette LabVIEW ActiveX
Container 3D Graph Control . Front Panel
Reference 3D Control Graph VI Reference VI
.3D Graph
3D Graphs VI .3D Graph

88

89

3D Surface Graph
Graph .

VI Graph 3D Surface.vi
:VI
: 3D Graph 3D Graph Control Reference Reference
3D Graph Control .
: X Vector X
.
: Y Vector Y
.
:Z matrix . Z
:VI
: 3D Graph out 3D Graph Control Reference VI
.

90

: 3D Surface Graph
-1 X Vector Y Vector
.Z Matrix
X Y .Z Matrix
:

91

92

-2 X Vector Y Vector
Z Matrix X
Z Y Z
X.Y
Z n m XY
)) X(n n ( X )) Y(m m .(Y

: X Y .

93

94

3D Parametric Graph
Graph Parametric .

VI Graph 3D Parametric Surface.vi


:VI
: 3D Graph 3D Graph Control Reference
Reference 3D Graph Control .
: X Matrix .X
: Y Matrix .Y
:Z Matrix .Z
:VI
: 3D Graph out 3D Graph Control Reference VI
.

95

96

3D Curve Graph
Graph ) (Curve .

VI Graph 3D Curve.vi
:VI
: 3D Graph 3D Graph Control Reference
Reference 3D Graph Control
.
: X Vector X.
: Y Vector Y.
: Z Vector Z.
:VI
: 3D Graph out 3D Graph Control Reference VI
.
97

X X Y Y Z .Z
: m ) X(m ) Y(m ).Z(m

98

3D Graph
3D Graph Graph
CWGraph3D>> Properties

99

Graph Graph .
.

100

Graphs .
.

: Track Mode .Graph

101

Time StampsWaveforms Dynamic Data



. LabVIEW )(Data Type
. Time Stamps
Waveforms Digital Data .Dynamic Data .

102

Time Stamps
.( )
Indicator Control
.Time Stamp Indicator Time Stamp Control

:Constant Indicator Time Stamp Control


Time Stamp Control or Indicator
Controls Palette>>Modern>>Numeric

103

Time Stamp Constant Block Diagram

Function Palette>>Programming>>Timing

: Numeric Control ) Time Stamp


( . Date\Time

104

:Time Stamp
Time Stamp Control Indicator Constant
.

105

:
-1 Time Stamp
Control
Data Operations>>Set Time to Now

-2 .Data/Time Browse
Time Stamp Control

Data/Time Browse

106

Time Stamp
Data Operations>>Set Time and Date
Indicator Constant
.Browse

107

Data and Time

-3 Time Stamp Labeling


Up Down
. .Control

:Time Stamp
Time Stamp .
.

: Numeric
Relative Format .Format and Precision

108

:
Get Date/Time In Seconds
Function Palette >>Programming >> Timing

109


. .Flat Sequence Structure

Time Stamp .Add

110

Time Stamp: Numeric


Numeric .Time Stamp

To Double Precision Float . DBL
Time Stamp .DBL

To Time Stamp Numeric .Time Stamp

.
Function Palette>> Programming >>Numeric >> Conversion

111


Function Palette >> Programming >> Timing

112

Waveforms

. ) (Digital
.
LabVIEW ) ( Data Type
.Waveforms
Waveform :
Time Stamp )(t0
Numeric ).(dt
).(Y


.
Data Type LabVIEW Clusters
Waveforms .
Waveform :
Analog Waveform -1 .

113

Waveform .Analog Waveform

Digital Waveform -2 .

Analog Waveform
Digital Waveform

) (Sin .

) (Square Wave .

.
Controls Indicators Waveform Digital Waveform
Controls Palette>>Modern>>I/O

114

Waveform Y t0 dt .Attribute
Analog Waveform:Digital Waveform
:Y Analog Waveform
) ( . DBL
0 5 Digital
Waveform .
Y Digital Waveform Digital Data
. Digital Data )0(1
.

: t0 Time Stamp Y .
: dt .Y
:Attribute Waveform
Waveform
Visible Items>>Attribute

115

Attribute Variant
. LabVIEW Attribute Waveform Channel
. Attribute .
Waveform:
Waveform Waveform :

116

Waveform -1 t0 .
.Data Acquisition
-2 Graphs Waveform Waveform
Graphs Bundle x0 dx
.Graphs

-3 Graphs
:Waveform
Waveform .

Functions Palette>> Programming>>Waveform

117

Get Waveform Components .Build Waveform


: Get Waveform Components

Waveform t0 dt .Y
Unbundle .Cluster
Waveform: .
: .Waveform

.
Operating .

118

Polymorphism Get Waveform Components


Digital Waveform Digital Waveform
. Digital Waveform

119

Analog Waveform

: .

:Build Waveform
Waveform Waveform.


Waveform .
Y) Waveform to dt ( Attribute .

Waveform

120

Operating

Waveform Waveform

121

Waveform .

Build Waveform Polymorphism Digital


Waveform Digital Waveform

Analog Waveform

.Digital Waveform

122

: .

.Waveform
Analog Waveform
Function Palette>>Programming>>Waveform>>Analog Waveform

Analog Waveforms
.

123

Waveforms

Waveform :
.dt
Waveform Generation

Function Palette>>Programming>>Waveform>>Analog Waveform


>>Waveform Generation

Sine Noise Single and Multitone


... Sawtooth Triangle Wave Square Wave Wave
Waveform Measurements
Function Palette>>Programming>>Waveform>>Analog Waveform
>>Waveform Measurements

124

Frequency Domain Time Domain Waveform


FFT Phase Amplitude Tone Frequency RMS DC
...
Digital Waveform
Function Palette>>Programming>>Waveform>>Digital Waveform

125

Digital Waveform
. Waveform
Digital Conversion
Function Palette>>Programming>>Waveform>>Digital Waveform
>> Digital Conversion

. Digital Data
Waveform File I/O
Function Palette>>Programming>>Waveform>> Waveform File I/O

. Waveforms Waveforms

126

Digital Data

) Digital Data (Y .Digital Waveform


Digital Data
) Signals 0 (1 .

Digital Data Control


Controls Palette>>Modern>>I/O

127

Digital Data .


.Digital Data

128

: Digital Data
.
: Digital Data

Digital Data

Digital Conversion
Function Palette>>Programming>>Waveform>>Digital Waveform
>> Digital Conversion

:
-1 Digital Data

-2 Unsigned Integer ) U8 8(
.Digital Data
129

: Polymorphic Digital Data


Digital Waveform Polymorphic VI Selector
. Polymorphic VI Selector

130

Digital Waveform Graph


.Digital Waveform Digital Data Graph

Digital Waveform Graph


Controls Palette>>Modern>>Graphs

Digital Waveform Digital Data Digital Waveform Graph


.Graph

131

Digital Waveform Graph Digital Data -1:

.Digital Waveform Graph Digital Waveform -2

132

Dynamic Data
Express VI
.Dynamic Data
Dynamic Data Waveforms
. Waveforms Dynamic Data .
Dynamic Data
. Data
.Acquisition
Dynamic Data .Graph

Express VI Simulate :
Functions Palette>>Express>>Signal Analysis
Dynamic Data LabVIEW .

133

Dynamic Data

134

Function Palette>>Express>>Signal Manipulation

Express VIs
Waveforms ) (Scaler Values
Dynamic Data .

: Convert from Dynamic Data Convert to Dynamic Data


.

135

Mixed Signal Graph


Analog Digital
.Mixed Signal Graph

Mixed Signal Graph


Controls Palette>>Modern>>Graphs
Mixed Signal Graph Bundle
Waveform . Digital Waveform
Charts Graphs Bundle
.Mixed Signal Graph
136

Mixed Signal Graph X


X.
:
Bundle
Function Palette>> Programming >>Cluster & Variant
Mixed Signal Graph ) (Groups
) (Plot Area .
) ( Analog ) (Digital
Group 0 Group 1 . Group 0
Plot area 0 Group 1 .Plot area 1
.
:

137

Mixed Signal Graph :


Examples\general\Graphs\Mixed Signal Graph.vi
Graph Group Plot Area
Add Plot Area

138

Groups Group
Plot Area . Group
.

139

Multi-Plot Cursor
Cursors Multi-Plot Cursor
.Mixed Signal Graph Cursor Y . X
Y Plot area.
Cursor Cursor Legend Add Cursor
.(Mutli-Plot) Cursor

140

Multi-Plot Cursor Plots Y Cursor


Watch Plot . All Plots .Plot

141

Charts Graphs
Charts Graphs
. LabVIEW Chart Graph .
Chart Graph
Export Simplified Image
Run Mode

Data Operation >> Export Simplified Image


Edit Mode
.

142

143

Plot Legend Digital Display Graph Chart


.Cursor Palette Graph Palette Scale Legend
Intensity Intensity Charts :
.Graph

144

]<<^j]<^i<]<<<
< <^]<]<<^i<]<^e<^]<]

photonlv@gmail.com

LabVIEW


Strings and Files


iii ..................................................................................................
1...........................................................................................................
2...................................................................................................... Strings
2........................................................... String Indicator String Control
3........................................................................... String Controls
3................................................................................
6........................................................................ Limit Single Line
7.......................................................... Update Value while Type
9....................................................................The Scrollbar
11........................................................................................ ( )Tables
15.................................................................................................. Listboxs
16..................................................................(Selection Mode)
22................................................................................ Strings
22................................................................................ String Length
23..................................................................... Concatenate Strings
24......................................................................... Format Into String
25...................................................................... Format String
31.................................................................... Get Date/Time String
34.............................................................. Format Date/Time String
36................................................................................. Parsing Factions
36............................................................................. String Subset
37........................................................................ Scan from String
40............................................................................ Match Pattern
50....................................................................................File Input /Output
51......................................................................... High Level File I/O
51............................................ Write to Measurement File Express VI
56........................................ Read from Measurement File Express VI

61............................................................ Write to Spreadsheet File VI


65........................................................ Read from Spreadsheet File VI
69................. Text Spreadsheet Excel Spreadsheet
71.......................................................................... Low Level File I/O
71...................................................................... Text Files
71...................................................... Open/Create/Replace File
72............................................................................... Close File
73.................................................................... Write to Text File
77................................................................ Read from Text File
81.......................................................... Binary
81.................................................................... Write to Binary File
84................................................................ Read from Binary File

ii


Strings.
.Strings
Strings.
ListBox.Table
.File Path
.LabVIEW

iii


) String(
Strings LabVIEW
.
Text
. Binary LVM.TDM

Strings
String ) (Characters ASCII
. Characters ) ( ASCII Code
.
0 9
) Space( )New Line ( Carriage Return
.
String Control String Indicator String Constant LabVIEW
Strings Strings
.
String Control String Indicator

String Control String Indicator Front Panel


Controls Palette>>Modern>>Strings & Path

String Constant Block Diagram


Functions Palette>>Programming>>String

String Controls
Strings :

String Control .
String Control
.

:
Normal Display
.

\ Code Display
\ ASCII Code
) (Hex .
\20 ) (Space ASCII Code 20 .
\ .
\20 .\s

\00 \FF

\ ASCII Code
ASCII Code ) (\0C )(\FF

\b

(BS) Backspace (\08) ASCII Code

\f

(FF) Form feed (\0C) ASCII Code

\n

(LF) New Line (\0A) ASCII Code

\r

(Cr) Carriage Return (\0D) ASCII Code

\t

(HT) Tab (\09) ASCII Code

\s

Space (\20) ASCII Code

\\

(\) Backslash (\5C) ASCII Code

:
-1 s \s t \t .
.
\b Backspace \B Backspace \B LabIVEW
.\0B ASCII Code
4

-2 \FF .\0A

:
-1 .String
-2
Serial Port \n New line
\r Carriage Return .
Password Display
* .
String Control
* String Control Terminal Block
Diagram .
String Control .

Hex Display
ASCII Code
.

Limit Single Line


String Control
Enter .
Enter
String Control .Control

String Control
Limit to Single Line
6

Update Value while Type


String Control Terminals Block
Diagram Enter
Control

.
Terminal Update Value
while Type

Update Value while Typing String


ControlUpdate Value while Typing

The Scrollbar
.Front Panel
String Control String Indicator
String
Visible Items>>Scrollbar

10

) Tables(
Table Strings
.

Table Control Table Indicator


Controls Palette>>Modern>>List & Table

) Columns Header ( ) Rows Header


( Table Table
Visible Items>>Column Headers
Column Header
11

Visible Items>>Row Headers


Row Headers

Row Headers Column Headers .


Row Headers Column
Headers Operating Labeling Label
.LabVIEW

Block Diagram
.Property Node

12

:
Table Strings
Table
.Arrays and Clusters

13

Display Index Table


.Table

14

Listboxs
Multi-Column Listbox Listbox LabVIEW Listboxes

Controls Palette>>Modern>> List & Table

. Multicolumn Listbox Listbox

Items Edit Mode Item Listbox


. Labeling Operating Listbox

15

Items Block Diagram .Property Node

Items Listbox .
(Listbox Value) Listbox
. Item Item
).(Selection Mode
)(Selection Mode
Items Listbox
Selection Mode .
:
: 0 or 1 Item Item Item .
: 1 Item Item Item.
: 0 or More Items .Items
:1 or More Item .

Listbox Items .
Listbox ) (Scalar Value
Item Item .1-

16

17

Listbox Items
. Items .

18

: :Item Item Ctrl .Items


Listboxs
.
ListBox
Tip Strip .


Multi-line Input
.Enter

19

Listbox
Listbox .Editable Cells

20

Listbox
Listbox
Selection Mode>>Highlight Entire Row

21

Strings
LabVIEW Strings
.
Functions Palette>>Programming>>String

String Length
).(String

22

Concatenate Strings
String String.

Positioning
Strings .

23

Strings
Strings String.

Concatenate Strings
.
) (String

Format into String Scan from String Format into
String .Scan from String

Format into String

) (String .
:
.
) File Path (.
24

Enumerated Type .ListBox


Time Stamp ) (.
) Boolean (.
) Integer . (Float


: Format String String
String.
:Initial String String.
: Input String
Positioning Input 0 Input 1 ...
String.
: Input
.

) (DBL


:Resulting String String
Format String .Initial String

Format String
Format String %
.Format String

25

-1 Format String
Edit Format String Format String

26

-2 Format String
Format String .% Format String
.String
Format String
27

Float
Format String % number1.number2 f
Number1 String .
Number2 .
: Number 1 Number2 %f
:

Format String String.

28

Initial String Format String

float point )Scientific Notation (3.64E2


e f

)(Decimal Format
d %

29

f . 0


s . Format String

)(Boolean
0 False=>0 ) 1 (True=>1 .d

30

Boolean TRUE FALSE Result String


.s

: %% Format string % .Result String

Edit Format String


.Help

Get Date/Time String


String)Date String ( String) Time String
( Time Stamp
) (.

Functions Palette>>Programming>>Timing
31

:
: Date Format :
) (Short) (0 .1/21/94
)(Long) (1 .Friday, January 21, 1994
)(Abbreviated) (2 .Fri, Jan 21, 1994
:Time Stamp Time Stamp
) (.
:Want seconds :
True .
False .
False
.
:

32

33

Format Date/Time String


String
. Time Stamp Numeric
Time Stamp Numeric .
Get Date/Time String

Functions Palette>>Programming>>Timing

Time Stamp Numeric Time Stamp


.
Time Format String .
Time Format String
:

%a

Sat

%b

Feb

%c

%d

21

%H

24

%I

12

%m

03

%M

%p

AM PM

%S


34

%x

%X

%y

08

%Y

2008

%<digit>u

digit

%3u

0.465

: Time Format String %c


.

: Time Format String


String.

35

Parsing Factions

.
. .
String Subset
. String

:
: String String .
:Offset .
.
:Length
) (offset .String
String .

36

Scan from String


Format into String
. Strings String
) 0 9 + e E (


: Input String String .
:Format String Format String
Format String Format into String
.Edit Scan String
: Initial Scan Location .
:
:Remaining String String .
:Offset Past String .
:Output .Format String

.Strings
Serial Port Strings
Strings.
37

Format String String


Format String % f . %f
Edit Scan String Format String
.Edit Scan String
Format String
.

Format String Scan String


.

38

Format String String


.

39

Edit Scan String Match Exact


String Temp .Scan Number

Match Pattern
String .
Regular Expression .

:
: String String .
40

:Regular Expression
.
:Offset String
.0
:
: Before Substring String .
: Match String .
:After Substring String .
: Offset Past Match .
String .Regular Expression
String :
: Before Substring String .
: Match String .
:After Substring .
: Offset Past Match 1- .String
: Regular Expression .String

41

Regular Expression
:

Matching Pattern


l.g l g
leg lag lug


be?t b t bt e
? .
b e t bet e
.
be?t best et


\.
?\
\
\b Backspace
\f Form Feed
\n New Line
42

\s
\r Carriage Return
\t Tab
) \xx xx ( ASCII Code xx
\41 A ASCII Code 41
^

Regular Expression
String String
^is String is String
is the exam easy
String The exam is easy

][


] [abc a b c
[Mm]an Man man man m
an.
] [
-

] [0-9 0 9
] [a-g a g
] [L-Q L Q

] [
~



] [~0-9 0 9

Tab

] [^0-9 Tab 0
9


be+t b e
43

t bet beet beeet bt e



*


be*t b t
e
bt bet beet beeet

Regular Expression
String
deg$ deg .String
Regular Expression

Regular Expression
Regular Expression

VOLTS

VOLTS

][Vv][Oo][Ll][Tt][Ss

V
O L

volt
Volts VOLTS volts vOLTs

][ +-

+ -

[0-9]+

[\t\r\n\s]+

Tab New
Line Carriage Return

[~0-9]+


0 9

^Level

Level String
Level=10 The Level=10

Volt$

Volt String
The Input =10 Volt
The Input =10 Volt Only
44

)*(.


.
*

)*])(~[(


.

])(~[
*])(~[

)*])(~[(

][[

][cd][ao][tg

c d a o t g
cat dog dot cot cog

Match Pattern String


Regular Expression
Match Regular Expression

Regular Expression
.

45

File Paths

.File Path Hard disk
File Path Indicator File Path Control LabVIEW
.File Path Constant
Front Panel File Path Indicator File Path Control
Controls Palette>>Modern>>String & Path

Block Diagram File Path Constant


Functions Palette>>Programming>>File I/O>>File Constants

46

File Path Control


.

47

File Path
Control .Browse Option

48

:
9 File Path Control
.

.
9 .

49

File Input /Output


LabVIEW
.

Factions Palette>>Programming>>File I/O

VIs LabVIEW :
High-Level File I/O
VIs
.
Loop VIs :
Write to Measurement File Express VI
Read from Measurement File Express VI
Write to Spreadsheet File
Read from Spreadsheet File
: Low-Level File I/O

.
.
Open/Create/Replace File
50

Close File
Write to Text File
Read From Text File
Write to Binary File
Read from Binary File
:
Binary Files : . Bytes
.
Text File :
ASCII Code. String
String .ASCII Code
.Notepad .Binary Files

High Level File I/O


Write to Measurement File Express VI

Express VI :
Measurement Data File Text
) (text-based measurement file LVM
Notepad Spreadsheet . Excel
Tab ).(,
LVM
.
51

Measurement Data File Binary TDM


. LVM
.LVM
Express VI . DAQ
Express VI Express VI
.
.VI

52

53

Express VI :

54

Express VI

Express VI Dynamic Data


. Dynamic Data
Convert To Dynamic Data
Functions Palette>>Express>>Signal Manipulation
55

Read from Measurement File Express VI


Express VI LVM Text File
.TDM

56

Express VI Express VI
.
.VI

57

: Header

. .
58

: Text


59

60

Express VI Dynamic Data


Graph
Convert from Dynamic Data
Functions Palette>>Express>>Signal Manipulation

Write to Spreadsheet File VI


VI Text
Spreadsheet Spreadsheet .Excel
VI String String .
.
61

VI:
:Format String Format
. Format %.3f
.3
: File Path File Path Control
VI . VI
.
: 2 D Data .
: 1 D Data .
: 2D Data 1D Data
.
?: Append to File True VI
. False VI
. . False
: .
?: Transpose True
.
False
.
:Delimiter Tab
) (, );(.
62

63

Functions Palette>>Mathematics>>Elementary & Spatial Functions>>


Trigonometric Function

Functions Palette>>Programming>>Math & Scientific Constants

64

:
Cancel 43 .

Read from Spreadsheet File VI


VI Text
.
VI )(.

65

VI Transpose .
VI :
: Format String Format
" "%.3f =.3
:File Path .
.
: Number of Rows .
. ) (1-
.
: Start of Read Offset
.
Header )
( Header 57
) 57 (.
0 .
:Max Character/Row .
0 .
? : Transpose True Transpose
.
False .
:Delimiter . .Tab
66

VI :
: New File Path .
: All Rows .
: First Row .
:Mark After Read .
.
? : (End of File) EOF True .

67

:
Write to Spreadsheet File VI Read To Spreadsheet File VI
Error Cluster
.
VI Block Diagram
.
68

Excel Spreadsheet Text Spreadsheet


Excel Spreadsheet XLS Binary
Excel
Notepad .Binary
Text Spreadsheet Text
. Notepad

Tab ) (, . Carriage
Return.(\r\n) LineFeed
txt .csv
Excel :

69

70

Low Level File I/O


:
-1 Reference ) Rufnum
(Number .
-2 .
-3 .
-4 .


.
Read and Write to Measurement File Express VIs Read and Write to
Spreadsheet File .
VI .Loops
.
Text File Binary File
Text File .Binary File

Text Files
Open/Create/Replace File
Refnum
.

71

Operation
: ) (Create
Help .
Operation Create
Constant

Close File
.

72

Error Cluster VIs


.Simple Error Handler.vi

:
.
Open/Create/Replace File Close File Text Files
.

Write to Text File


) (String ) Array of
(Strings .

73

File Path Refnum .File


File Path

.Close File

Refnum

. File Marker File Position
.

74

Strings Write to Text File String


.

End of line

Carriage Return.\r\n Line Feed

Header .
75

File Marker File Position


File Marker File Position
. .
File
Position .
: File Position
100 File Position 100
. 50 100
File Position 150 .
.
File Position .
.
File Position File Position
.


Functions Palette >>Programming>>I/O File>>Advanced File Functions

76

Read from Text File


.Text

77

. Count
) (1-
Count .
:

File Position
File Position
File Position
78

: Tab
(\n) Line Feed Carriage Return
).(\r String Indicator ."\"Code Display
Read
.Lines

79

Count ) (-1
.
Strings String .
Strings .
:


80

Binary
Binary ASCII Code
.Notepad

.
.
Open/Create/Replace File
Close File Binary .Text
Write To Binary File Read From Binary File
.

Write to Binary File


.Binary
)(... Waveform Cluster Array

81

:
?: Prepend Array or string Size
: True LabVIEW String Array
. True .
:False .
:Prompt
. " "Choose or enter file path
.
: File Refnum .
.
File

Refnum File Position
) (
File Position Get File Position .Set File Position
File Position .
Get File Size .Text
82

:Data
) (... String Cluster
: Byte Order
Byte .(32 Bit) 4Bytes
Byte Order Bytes .
) :Big-Endian (0
.Mac
.

) :Host Order Native (1


.
): Little-Endian (2
Windows .Linux

83

: Sin Wave.vi
Functions Palette>>Programming>>Signal Generation

Read from Binary File


. Binary File
. (Byte Order) Bytes
.

84

: Data type .
: Count
.

DBL
8 .
.8
Get File size
Functions Palette >>Programming>>I/O File>>Advanced File Functions

85

86

photonlv@gmail.com

87

Вам также может понравиться