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

. ..

LabView


V

..

. ..

-2004


I. 3
1.1. ..3
1.2. .4
1.2.1. .4
1.2.2. .5
1.2.3. ..6
1.2.4. - .7
1.2.5. 7
1.3. 8
1.3.1. ..8
1.3.2. 11
II. LabView12
2.1. 12
2.2. LabView.13
2.3. LabView..15
2.4. LabVIEW.17
2.4.1 Tools () 17
2.4.2 Controls (). .18
2.4.3 Functions () ..20
2.5. .21
2.6. LabView.24
III. ..27
3.1. , sin(t).27
3.2. .
..32
3.3. . ..39
3.4. .40
IV. .43
V. . 44

I.
1.1.
, ,

. , ,
() ,
.
.

.

.
. .

. , ,
.
,
. ,

. -
, -
,
(

, , ,
), ,
, .


- .
.
- ,

,
.
, .

1.2.

.1

-.
,
. . 1
.
, ,

.
.
, ,
-
.
1.2.1.

, .
. 2 - 3 .

.2 -

, . , , .

.

. , 104
1
1,2 .
. , N- 2N-1
2N .
( ) .
104, , 4 .
1.2.2.

, (. 3).
, -
.

.3
,
, ,
. ,
U.
,
,
.
1 0
.

1.2.3.

, .
1/2, 1/4, 1/8 ..
. N-
N
() 2N-1
.
, N=10 100
105...106 .
,
, ,
18 200
.

1.2.4. -
-


. -

.
- ,
.

1.2.5.

. . 4
8- .

.4 8-

.
4-
. (AD9042, AD9070 .)
,
(AD775, AD9040A .)
.
2, 16
, 1. , 2 16
1. , 2
. 1 2
: 1
8- , 2
4-.

1.3.

U(t) 0 , U
D(t) - .

.
1 (. 5),


, .
.

.5

1.3.1.

- ,

. ,

. , 12-
1/4096, 0,0245% , -72,2 .

U Dj ().
.
h=U/(2N-1), U -
( ),
, N - .
, .

-

.


. .

- U,

U.01 - ,
1.
:


,
.

,
.

-
D(U) ( 2 . 5).
,
.
, .
, . 5

hk
h.

. , . 6,

.6


: .
-

. i+1 . 6.
,
.
-

D
.
.

10

1.3.2

, .
, .

() -

, ,
.
. , ,
.

(t) - ,

, . , ,
,
, , ,
- ,
, .
( -)
.
() - ,
.
.

11

2.1.

II. LabView


.
.
:
DAQ boards ( Data Acquisition Boards )
, .

,
( LabView).

, (),
,
-

,
.
, ,
,
, .
10 National Instruments
LabView

. LabView ,

. LabView
,
, . LabView

.
LabView
, .
-.


.
LabView
PC.
LabVIEW, C ,

. LabView :
,
,
,

12

LabView

, ,
, , ,
, ,
.
LabView - ,
,
.
LabView (VIs),
. , VIs
. , VIs
:
VIs ,
,
VIs
, VIs
VIs.
2.2. LabView
LabView
-,
(Virtual Instruments VI). , LabView
"" .



, , ,
. LabView
, ,
LabVIEW .
(VI)
. LabView 600
50
.
(VI)
.
(DSP), ,
. ,
, .
,
. ,
/ ,
.


LabView
(VI).
13


.
- .
LabView - .
,
.
LabView .
, ,
, .
,
.
, ,
, , ,
. .
. LabView
.
.
. ,
, , ,
.
.
,
,
,
. "".
.

-

.

.
,
, /,
ASCII, . LabView
,
. (Help Window) .
LabView
Error Window.
-, ,
. ,
-.

.
LabView,
, ,
14

(FOR), (WHILE) (CASE),


, .
, .


LabView . VI
- subVI.
subVI,
subVI,
.
, ,

.
VI. VI
,
,
.
,
.


, . LabView
,
. LabView
. ,
,

.
2.3. LabView
LabVIEW
(), -
, .
1. , ,
- ,
-
.

15

.7 - Fluke 8840A
.7
, , "Measurement",
,
- "Function", "Range"
"Trigger Mode".
2. , - ( -) .

.8 - - Fluke 8840A
, ,
, , ,
.
. .8 "Send DEMO" - ,
,
,
..
,
" " , -
16

. , .
- -
, LabView
.

,
.
, ,
, -
, .

2.4 LabVIEW.
LabView Tools ( ),
Controls ( ), Functions ( ),
.

().
2.4.1 Tools ()
,
. , , ,
. Tools - , Show Tools Palette
Windows, . ,
, .
, Tools
.
Tools
.

.
,


.

.

,
, ,

.


.
17

.
,

,
()

().

.

,

-.

,
().

.

,


.



.


.
,

, ,
.

.
,

.


.



.

.


.


.

Controls () Functions ().


,
,
, .
,

.
2.4.2 Controls ().

Controls.
. Controls - ,
, Show Controls Palette Windows.
Controls,
.
,
. Controls ""

18

"".

Numeric
( ).


.

Boolean (
).

( 0, 1).

String
( ).


List & Ring (


).

,

.

Array & Cluster


( ).



.

Graph.
,


().

Path & Refnum


( ).


.

Decorations
().


.

Control .

,

User Controls (
).

,
.

ActiveX
( ActiveX).
,

ActiveX
.

19

2.4.3 Functions ()
Functions -.
. Functions
- , , Show Functions Palette
Windows. ,
Diagram. ""
,
"".

Structures ().

, For .

Numeric
( ).

,

Boolean (
).
.

String
( ).


.

Array ().

.

Cluster
().

.

Comparison
().
,
,
.

Time & Dialog.



,
,
.

File I/O (/
).

Communication ().
20

/ .


TCP, DDE, Apple
Events, OLE.

Instrument I/O (
/).


GPIB, VISA(

).

Data
Acquisition ( ).


.

Analysis ().

.

Tutorial
( ).
,


LabVIEW.

Advanced
().

,
, ..

VI.


.

Instrument Drivers
( ).
,
,
, ,
..,
GPIB

User Libraries.


.

Application Control
( ).
,
(),
VI ,

.

2.5
: , -, .

VI
. - .
, .
.
Controls.
-
21

.
,

- . , ,
,

. - , -,
, Code Interface Node (CINs) (, ,
). -
, , . - ,
. For , While
. CINs - , C.
- , -

-.

. -.
-
. ,
, - ,
. , -
.
,
. -
,
. , Add
Subtract -,
.

- .
. ,
.
.
.
.

Scalar

1D Array 2D Array Color

Number

Orange (floating point), Blue (integer)

Boolean

Green

String

Purple
22

"
". ,
, ,
. , .
,
, , .

. , ,
.
"" .


. ,
. ,

-.
LabView,
LabView Create Constant, Create Control
Create Indicator. ,
, ,
.

LabView .
, -,
, Online help

.
, ,
, Show Help Help menu,
.
-, ,
, .

Locked Help
,
23

, .
, .

2.6 LabView
, LabView
,
, .

LabView.
.

. (AI Create Channel CREATE_CHANNEL.vi)

( ).
,
. ,
(.. 0-15 0-31)
,
:
I.
( ) 0 31
- ( 2)
II.
A.
0 1
B.
1 2
C.
2 5
( 16-)
III.
A.
0 - 16
B.
1 - 32

(AI Sample Channel - ADCHAN.vi)

.

.
.

24

(AI Acquire Waveform - STREAM.vi)

.
.
.

(AI Acquire Waveforms - SOFT.vi)

,
. .
.
, (), - .
64.
"AI Huge Waveforms - SOFT_HUGE.vi",
.

(AI Huge
Waveforms - SOFT_HUGE.vi)

,
. .
.
, (), - .
"AI Acquire Waveform - STREAM.vi"
64.

(AO Set DA Code - OUTDA.vi)

(AO Generate Waveform DASTREAM())

.
25

64 (.. 32767 ).
"AO Generate Huge Waveform - DASTREAM.vi",
.
User Libraries Functions
().

26

III.
3.1 , sin(t)

, sin(t).

1. LabView , New VI
LabView.
3. Vertical Toggle Switch (Boolean ( ))
. (Boolean)
Controls, , Vertical Toggle Switch .
,
Vertical Toggle Switch , .

4. Power . , Show
Label .
,

.
5. Waveform Chart (Graphs ()) ,
Sin Plot.

6.
, 10.0 Y
, 1.0 ,
-1 1.
Y Scale () > > AutoScale () Y.

27

7.

-,

Windows>>Show
Diagram.
8. , Sin Plot Power -.
,
.
9. - sin Functins
(Numeric>>Trigonometric).

,
, Help.
.

10. While Loop (Functions>>Structures ( Structures)),


. ,

, ,
while.
, , ,
( ) sin,
Power Sin Plot .

28

while : ,
( )
, ,

. I,
.

While, -,
While Remove Loop.
Functions. ,
While, , ,
(), . ,
sin .
11. -,
.
sin Sin Plot , sin (
, sin). ,
, . ,
Sin Plot . , Sin Plot
, ,
. ,
.

, ,
.
, .
Help.

29

, Remove Bad
Wires Edit. ,
12. . (
Wait (Functions>>Time & dialog ( Time & dialog))).
, Wait.
(Numeric Constant Numeric)

12. sin, i 20.


Divide Numeric Constant
Numeric.

30

13. , Windows > > Show Front Panel,

.
14.
, Power,
(
), ( , Run
Operate).

15. , Power ,

.
, .

31

3.2 .
.

LabView
, . ( EFG-3210
, .
B7-20.)

:
, .

User Libraries>>DLLDRV Vis.

(AI Acquire
Waveform - STREAM.vi) .
:
- - , .
.
.
-
- ,
. (AI Create Channel - CREATE_CHANNEL.vi).
LabView, .
.
Digital Control
Numeric.
:

32

,
ScaleY>>AutoScaleY.

.
:
Period = 100; Channel = 0; NumPoints = 100;

-,

Windows>>Show
Diagram.
-
(AI Acquire Waveform - STREAM.vi) . (AI
Create Channel - CREATE_CHANNEL.vi) , (
User Libraries>>DLLDRV Vis).
. while.
,
. .

33

, :


, .

. ,
. :
34

,
. Veff .
Vmax 0.7 .
.

. (AI Acquire Waveform
- STREAM.vi) .
Array Max & Min (Functions>>Array)
.

35

,
D1 = 200 .

- V1 . ,
D2 = 1000 .
V V1
- V2 . V0 = 2
.
D2 D1
Veff
n = log 2 (
) + 1 V0 -
V0
, Veff - , .

. 2
.

36


( ).
(AI Acquire Waveform - STREAM.vi)
. (- M , M ),
M = 2 n 1 (n ). .
,
. Amin
Amax Array Max & Min (Functions>>Array)
( Amax Amin )
Veff .
2M

Numeric
Constant 100
100.

U =


Buneman Frequency Estimator (Functions>> Analyse>> Signal Processing
>>Frequency Domain) .

beta .
beta ( f descr )
f =
_

37

f descr =

1
- , T - .
T

,
, .

38


,
.
. .
,
.
3.3

, .

Waveform Graph ( Graph).
LabView Auto Power Spectrum
(Functions>> Analyse>>
Signal Processing >>Frequency Domain).
(Waveform Graph) .
(AI Acquire Waveform STREAM.vi) Auto Power Spectrum .

39

,
. ,
.

3.4

,
,
. , ,
.
. ,
( ) ,
, f ,
, fsignal ,
.
(
).


1
T =
,
fd
T - , f d - .

40

1000 ..
(10 6 ), (10 3 ).
:

f d =10 , Chanel = 0, Num Points = 1000. 0.2 .


.

41


(
)

. . ( . [2] )

. .

42

IV.
1.
2.
3.
4.
5.
6.
7.
8.
9.





LabView
LabView
?
.
?

43

V.
1. .. , .
. :,2000.
2. . .
, 1983.
3. . , . , 2 , 1993
4. . , , 1980
5. .. , .. , .. , .. , .. , ..
, .. , .. , ..
. :,1994.
6. .., . . . -
,1986.
7. .. . . 2001.
8. Windows95, BINOM Publishers,1996/
9. Lcard-305.
10. LabView 6i

44