Upload
hatuyen
View
224
Download
0
Embed Size (px)
Citation preview
1
LabVIEW
LabVIEW
LabVIEW 13
LabVIEW
LabVIEW LabVIEW
Tip1
Ctrl+N VI Ctrl+B
Ctrl+R VI Ctrl+T
Ctrl+W VI Ctrl+E /
Ctrl+H Help Shift+
Tip2
(Control)(Function)
Tip3 (LocalVariable)
2
(1) (2) (3)
(Numeric)
x y
5+31
=2x
y
Tip4
LabVIEW
Functions> Programming>Structures>Formula Node
Add Input Add Output
1+2+3+4= 23 xxxy
(Boolean)
3
LED
RoundLED RoundLED
Functions>Programming>Boolean>NumberToBooleanArray
LabVIEW (SequenceCaseForLoopWhileLoop)
(0~9) Using (Case)
(Case)
0 (0,Default)
0 ; 1 (1) 1
0~9
4
(0~9) Using (ForLoop)
N 0 99 10 8
5
10 8 8 0 15 15 10 5
1 5 1
Tip5
(1).Wait(ms) Functions>AllFunctions>Wait(ms)
VI ()
(2).WaitUntilNextmsMultiple Functions>AllFunctions>WaitUntilNextmsMultiple
LabVIEWVI
Tip6
For Loop While Loop
millisecondtimervalue
Wait(ms)
millisecondstowait
millisecondtimervalue
Wait Until Next ms Multiple
millisecondmultiple
6
Using (WhileLoop)+ (ShiftRegister)
i 0 0+1=1 1 111 False
1
i=11+1=2 2 211 False
2 1
i=10 10+1=111111 True
2 x
02 12 22 02 12 22
( )
7
02 1 1 01 20+21 2 10 01 21+21 3 11
012 20+20+21 4 100 012 21+20+21 5 101 012 20+21+21 6 110 012 21+21+21 7 111
Loop 0
2 x Functions > Mathematics > Elementary & Special Functions > Power of 2
LED
LED
2 Functions>Programming>Numeric>Scale by Power of
2( ex~ 027 = 7)
Functions > Programming > Array > Build Array
LED
Add Dimension
8
LED I 123 111=7 027 10=2 022 i 1 02 12 i=11
(WaveformChart) (WaveformGraph)
(WaveformChart)
X Y Y X
Y
X LabVIEW
9
Functions > Mathematics > > Elementary & Special Functions > Trigonometric > Sine
Function>Programming>Waveform>Analog waveform>Waveform Measurements>Amplitude and Levels
Function > Propramming>Waveform > Analog waveform > Waveform Min Max
WaveformChart
10
LabVIEW For Loop
51 i=50 100502 0=sin N=101 sine (
)
Bundle()
Functions>Programming>Cluster,
Class,& Variant> Bundle
Bundle
Tips for Chart
>Data Operations> Clear Chart
--
>Properties>Appearance>()Show x scroll bar
1024 Chart History
Length 100,000
>Chart History Length
Y overlaid ;
Y stacked
>Overlay Plots / Stack Plots
11
(Graph)
LabVIEW
(Waveform graph)XY (XY graph)(Intensity Graph)
XY
(1) (WaveformGraph)
For Loop
Y X
( 0=0X ) X X 1( 1=X ) (X ) 0X X
12
1D 2D
0X X Cluster 2D Cluster Array
2D
(Transpose)
102 210
13
(2) XY (XYGraph)XY XY
XY
()Functions>Mathematics>Elementary&Special Functions>Trigonometric>Sine&Cosine
i=0 sin0=0cos0=1 ; i=25 5.0sin =1 5.0cos =0 ; i=50 sin =0 cos = -1 ; i=75 1-=5.1sin 0=5.1cos X Y
i XY (0,1)(1,0)(0,-1)(-1,0) 101
XY XY
14
I/O
I/O LabVIEW
Function>FileI/O FileI/O
;
Write to spreadsheet. viRead from spreadsheet. vi
VI /
WriteToSpreadsheetFile
WriteToSpreadsheetFile 2D 1D
(Excel,WordPad,Origin)
LabVIEW
(row)(ex:Excel)(column)
2D
ReadFromSpreadsheetFile
ReadFromSpreadsheetFile offset (row)
15
( True)(
True)
A B A B
Excel Origin
16
Transpose() Excel Origin
1. LabVIEW
2. LabVIEW
3. LabVIEW
4. http://www.phys.ncku.edu.tw/ultracold/paper/aroma.pdf5. http://intelligent.mech.yzu.edu.tw/course/experiment/experiment_handout/MEexperiment_2006.doc6. http://www.gauss.com.tw/logic/ch1/12.htm7. http://www.cinelformacao.com/labview/files/usb6008/usb6008intro.htm8. http://www.pt.ntu.edu.tw/hmchai/PTcomputer/hLabVIEW/LabVIEWindex.htm