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

1

,
A
B
C
D


( )

1-2
1-3
1-4
1-11
1-15

2

A
B
C
D
E
F
G
H
I
J
K








NI-DAQ
Measurement &
Automation Explorer(MAX)
NI-DAQmx
NI-DAQmx:

2-2
2-6
2-12
2-17
2-19
2-23
2-30
2-31
2-33
2-46
2-50
2-54

3

A

3-2
3-11

4

A
B
C
D
E
F



DAQmx Read


4-2
4-7
4-11
4-16
4-22
4-31
4-44

5

A
B
C
D
E

5-2
5-3
5-9
5-18
5-30

F
G
H
I
J
K

5-33
5-34
5-42
5-43
5-48
5-51
5-59

6

A
B
C
D
E
F
G
H
I
J
K
L

() ()
/




.

()


6-2
6-5
6-8
6-16
6-20
6-26
6-31
6-32
6-34
6-36
6-37
6-39

M
N
O

6-44
6-46
6-53
6-55

7

A
B
C
D
E


DAQmx Write


7-2
7-4
7-10
7-11
7-20
7-31

8
/
A
B

()
/

8-2
8-4
8-10

A
B
C
D

9-2
9-5
9-6
9-8

E
F
G
H
I

9-12
9-17
9-26
9-31
9-36
9-41

10

A
B
C

NIDAQmx

10-2
10-8
10-26
10-34

1
,


(Data Acquisition - DAQ).

:
A. (DAQ)
B.
C.
D.

1-1

A.
(Data Acquisition - DAQ)
, , , .
:

()

,
.

1-2

B. ()
,
.
,
. ,
, , .
.

()




-


pH

()

, ,
, , .
, ,
ni.com/sensors.

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

.

1-3

C.
.
, ,
: ().
, , ,
. , ,
: , , , .

, ()
, ()
.
,
.


,
.
, ,
, , .

, ,
.

1-4


. ,
,
: 0 5 .
,
.
, .
,
() , .

.
. -
- .

.
.
, .
(),
, ,
, .

1-5

, .
,
.
.

, -
.

.
,
. - -
(RC ) ,
.

.
,
.
.
( ),
( )
. LabVIEW ,
.

1-6


()
( , ) (
, ).

(-).
0 0.8
, 2 5 .
TT- .


: ()
.
():
.
: .
( )
.
.
.
, , .
.

1-7

, 0 ().
, 5 ().
, , .
.
, , ,
.

() ,
.
, .
,
(pulse train).
. , ,
. , DAQ Signal Accessory,
, , 24
(). ,
.
, ,
.
1-8

1-1
: , , ,
.
1. (DAQ
Signal Accessory):
a. (Function Generator)
1 (analog input).
b. (Frequency Adjust)
. , (Frequency
Range) 100 10 .
2.

Signals
Example.vi,

DAQ. , ,
, , 1,
.
C:\Exercises\LabVIEW

3. .
4. (Signal Class)
/ (Digital On/Off) ,
. Pulse State (ON/OFF) .

1-9

. ,

. ,
, 0 0.8
(), 2 5 ().
2.5
, 2.5 .
5. (Digital
Pulse). .
,

.
, .
(Pulses Counted) ,
2.5 .
6.
(Analog DC) , .
(DC signal)
0 5 . , .

, .
, .


.
7. (Time Domain).
(time-domain graph) .
.
,
.
8. (Frequency Domain).
(frequency-domain graph)
100 . ,
. LabVIEW
.
, .
9. . .

1-1.

1-10

D.

. ,
,
.

. /
.
National Instruments,
, .
, /
SCXI SCC
National Instruments.
,
,
- (Signal Conditioning eXtensions for Instrumentation
SCXI). SCXI ,
1991 25 .
Signal Conditioning Components (SCC) National Instruments
,
.
30 - .
SCXI
ni.com/sigcon.

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

1-11

1-1. / .

.

. ,
.

(), -
. , ,
.
, SCXI
( 1-2 )
.

/ (signal-to-noise ratio SNR) ,

- .

1-2. /
1-12


, , ,
/.
(, SCXI)
,
. ni.com/info
exd2hc
.
:

.
,
.

50
60 .

/
/ (Signal to Noise Ratio SNR)

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

DAQ

SCXI DAQ

SCXI

SCXI

DAQ

0.01

0.001

100

1.1

10

0.01

10

0.001

10

1.01

100

0.01

100

0.001

1.001

1000

( )

. , 10
10 .
, ,
.
, . LabVIEW
,
. LabVIEW
, ,
.
1-13

()
, .
,
, , .

()

.
,
,
-
().

.
,
.
. ,
, .
()
, SCXI .


() .
, ,
.
50 .
50 .
, .

1-14

( )
.
() .
, , ,
.

() .

1-15

1-16

2



.

:
A.
B. DAQ-
C.
D. ,

E. NI-DAQmx
F. NI-DAQmx

2-1

A.

: , ,
. ,
DAQ- ,
. ,
DAQ-.

,
,
. , ,
.
.


( )
. (,
) ,
DAQ-.
100, 68 50 . , ,
: ,
. 68 ,
, 50 .

, .
.
2-2

.
, .
, ,
.

DAQ-.
100, 68 50 .
, . ,
, .
(DAQ)
National Instruments ni.com/products.

2-3


,
,
(DAQ Signal Accessory).


, - .

.
, ,
.
,
.
.
.
TTL
.
+5 5
. , ,
, .
.
.
/
DAQ-. ,
.


:
, , / .
National Instruments
-.

2-4

- 16 ,
, 8 . National Instruments
, -
. , NI ,
/,
,

, .

. , DAQ-,
PCI , DAQ-, PCMCIA
, ,
USB .
,
PXI/CompactPCI .
DAQ- (DAQ)
National Instruments ni.com/products.

2-5

B.
.

DAQ-
: /, /
(RTSI bus).
/ / ,
DAQ . 100, 68 50
.
, .
DAQ .
/ /
DAQ .
. , PCI
, PCI,
USB .
RTSI - RTSI
. , ,
,
RTSI .
.
PXI, RTSI .
PXI , -
RTSI
.


/
2-6

, - ().
.
.

,
.
, ,
. LabVIEW
.

, .
.
, .
() . , ,
, , . , 0.5,
, .

2-7

- ()
,
/ .
,
, .


, . .

2-8

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

,
- () ,

.
.

2-9

/
/ .
DAQ -
() .
.
, .
/
,
, , .
/.

2-10


.
, ,
.


,
. .

2-11

C.
,
.


, ,
.

, ,
. DAQ-
. , .
DAQ-,
, , , . 3
23 8 .
000 111.
.
3- 5 .
,

. 16
(23) 65536 (216), 16-
.



, . DAQ
( 0 10 -10 10 ).
,
,
. , .
, 3-
0 10 . -10 10
( ) 20
2-12

. 1.25 2.50
, .


. ,
/ , , ,

.
, ,
0 5 , 3-
0-10 . , .. = 1,
. ,
,
. 0 5 ,
5 , ,
10 .

,
.
2-13

() .


.
,
.
:


(2 )

, DAQ
. , ,
:
= =

= =
= =


. , 12- 0 10
2.4 ,
-10 10
4.8 .

(2)

10
1212

2.4

2-14

20
1212

= 4.8

2-1. ,
,
: DAQ
.

DAQ-
.
. DAQ ,
. DAQ
,
.
,
. DAQ- 12 16
.
DAQ-.

.

. , 12 16
.
.


(2 )

, DAQ- :

()
()

( )

DAQ 1

DAQ 2

12
0 10

12
-10 10

16
0 10

16
-10 10

1, 2, 5, 10, 20, 50, 100

1
-
. -270 1372

. -6.548 54.874 .
.

).
DAQ
2.1 ?
2-15

2
.
-2 2
20 105 .
DAQ ,
1.5 ,
70 ?

3

. 0.8 3.9
0 100%.
2%.
DAQ ,
, , 0.62 ?

1 , ,
. ,
DAQ , .
54.874 ,
. ,
100. 12 16-
. . DAQ
1 100 24 ,
DAQ 2.1 .
DAQ 2 1.5 .
, DAQ 2, ,
.
2
. , DAQ 1 2 .
5,
DAQ . , , DAQ
1 977 .
DAQ 2
61 . 2
70 . , DAQ 2, ,
.
3 ,
. , , ,
DAQ 1 2 .
3.9 , 2.
DAQ 1 1.2 .
DAQ 2 76 .
0.62 ,
DAQ 2, ,
.

2-1
2-16

D.
,
, DAQ
, .
.
.

,

.
.
DAQ
, ,
.
.


,
,
, .


2-17

, .
,
, .
.

.
,
, 10 200 . ,
.
, .



, .
.


, , .
, ,
,
. .

2-18

E.
,
, ,
. ,
,
. ,
, ,
. .

, .

, ,
, .



: ,
.
,
. DAQ
.

National
Instruments

,
.

. AIGND (analog
input ground )
.

2-19


() (+)
(). (common-mode) ,
,
.
() .
,
,
.
, ,
(),
.



.
,
.
(V)
2-20

V = (V+ + V) / 2
V+
, V
.


(Common Mode Rejection Ratio CMRR)
.
. ,
.
. DAQ

50-60 , .. .
():
()

= 20 log

, () :
V
20 log
V
V+ + V = V


,
. (referenced singleended RSE)
, AIGND,
.
.
2-21


(non-referenced single-ended NRSE) , -,
,
. NRSE
.

NRSE
(AISENSE E-),

(AIGND).
, .

2-22

F.
.



.


. , Vm,
, Vg, Vg,
.
. ,
(50 ).
, ,
,
.
, .


, ,
.
,
.

, ,
, .
DAQ (DIFF)
NRSE .


.
.
2-23



,
. ,


.
,
,
. -
, ,
.


.
. ,

, .
AIGND.

2-24

, AIGND
.
, ,
100.
. ,
, ,
AIGND.
, ,
. ,
AIGND , 100
.
,
, .
,
AIGND,
.
. ,
() . , ,
2 , 100 ,
200 , -1%.
,
.
( ),
AIGND. ,
,
, ,
, , ( 100
1 ).
AIGND. ,
, ,
. - ,
.

. , ,
R2. ,
, R1 = R2.

,
,
( ).


(RSE) .
.
(NRSE),
.
() (AISENSE)
(AIGND).
2-25

2-26

2-2 :
,

:

1
, ,
. ,
.
, DAQ
? ( )

50
/ PCI-MIO-16E-4.
, :

1 0
2 1
3 2

2-27

1
, ,
. ,
.
,
.
3,
4.
5, 6. , ,
7,
8.
,
AISENSE.

2
, .
, DAQ
? ( )

50
/ PCI-MIO-16E-4.
, :
2-28

1 5
2 6
3 7

2
, ,
. 16
, ,
. ,
.
, .

13, 14.
15, 16. , ,
17,
18. ,
AIGND.

, AIGND.
.

2-2

2-29

G.

.
. ,
, .
DAQ , DAQ
, .
DAQ
.
, ,
. , LabVIEW,
,
.
.
NI NIDAQ , ,
.

:
NI-DAQ DAQ .
(Measurement & Automation
Explorer MAX) LabVIEW NI-DAQ.
LabVIEW , ,
,
.

2-30

H. NI-DAQ
NI-DAQ 7.0
NI-DAQ NI-DAQmx,
(API), . NIDAQ DAQ National
Instruments, / , SCXI
.
NI-DAQmx.
. NI-DAQ
, NI. ,
-,
, .

NI-DAQ
:

LabVIEW
Measurement Studio
Microsoft Visual C/C++
Microsoft .NET Languages
Visual Basic
ANSI C

NI-DAQ
NI-DAQ 7.0
Readme.

NI-DAQ
NI-DAQ NI-DAQ 6.9.x, NI-DAQ.
NI-DAQ ,
NI-DAQ 6.9.x. NI-DAQ NI-DAQmx
, NI-DAQmx NIDAQ 6.9.x.

NI-DAQmx
NI-DAQmx NI-DAQ,
,
. NI-DAQmx
DAQ .
NI-DAQmx
:

DAQ Assistant ( )
, NI-DAQmx
LabVIEW 7.0 .. DAQ Assistant NIDAQmx NIDAQmx . DAQ Assistant
2-31

LabVIEW MAX.
,
/ .
(API) DAQ
, NIDAQ.
LabVIEW, (Property Nodes)

/.
ANSI C, LabWindows/CVI,
Measurement Studio, .NET C++.

NI-DAQ NI-DAQmx
. NI-DAQ 7.0
Readme (DAQ Quick Start Guide).

2-32

I.

(Measurement & Automation


Explorer MAX) , Windows,
NI-DAQ. MAX
NI,
, .
NI-DAQ
MAX .
Measurement &
Automation Windows. MAX
:

(Data Neighborhood)
(Devices and Interfaces)
IVI
(Scales)
(Historical Data)
(Software)
(VI Logger Tasks)


(Data Neighborhood)
,
. , ,
.
.

.


(DAQ Assistant)
.

NI-DAQmx ,
, .
.

LabVIEW .
, , ,
( ), ,

.
, ,
.
.
2-33

/,
/ . (
) (0) .

NI-DAQmx
.
, . , ,
( )
( ).
, , ,
.


(Devices and Interfaces)
NI.
,
.

Self-Test ()
, ,
.


Test Panel ( )
/, /
.
NI-DAQmx.
,
LabVIEW.
LabVIEW,
.


Reset ( ) DAQ
, .

Properties RTSI
, DAQ-.
, ,
, Attributes ()
MAX.

2-34


Self-Calibrate ()
.

Scales ()
.
DAQ Assistant .


DAQ Assistant ( )
, .
,
. :
Linear () , y = mx + b.
Map Ranges ( ) ,
.
Polynomial () ,
y = a0 + (a1 * x) + (a2 * x2) + + (an* xn).
Table () ,
.


(Software)
NI.
. Software
Update Agent ( ).
National Instruments.
, Web
ni.com .

Windows
NI-DAQmx nidaq32.dll
DAQ . ,
nidaq32.dll, , . MAX
LabVIEW NI-DAQmx. MAX
. MAX
, , .
MAX Windows.

2-35

2-3 Measurement &


Automation Explorer
:

.
1. 1
.
2. 0 2.
.
. ,
, ,
.

3. MAX
StartProgramsNational InstrumentsMeasurement & Automation Explorer.
4. Devices and Interfaces. MAX
.
5. NI-DAQmx Devices. DAQ
, , .
"Dev1". , ViewRefresh ().
6. DAQ
Self-Test. ,
. OK,
.
. DAQ ,
.

7. DAQ
Properties ().
Device Properties ( ).
RTSI Configuration ( RTSI) ,
RTSI . RTSI
.
Accessory ( )
, DAQ .
, SCB-68
DAQ , . ,
,

. ,
.
None. ,
2-36

.
OK Device Properties.
8. DAQ
Test Panels. Test
Panels. Analog Input ( )
.
Channel Name Dev X/ai0, X
DAQ . 0
. Start ().
0.2 0.3 , .

9. ,
. Stop.
.


,
, LabVIEW. ,
LabVIEW , .
,
.
10. Analog Input Dev X/ai1, X
DAQ . ,
2-37

1 .
Start. .
Stop.
Acquisition Mode ( )
.
On Demand ( )
Finite ()

Continuous ()
.
Finite Continuous
(). ,
.
11. .
. frequency range ( )
100 10 Frequency Adjust (
) Low.
. Acquisition Mode
Finite Continuous Rate,
5,000, 10,000 15,000,
.
12. Analog Output.

.
.
. , 0 2
.
. DC Voltage ( )
Output Mode.
. 5 V / (Output Voltage/Amplitude)
Update ().
13. Analog Input.
. 2
Acquisition Mode On Demand.
. Start. 5 .
. Stop.
14. Digital I/O ( /)
DAQ .
.
. SCXI, 4, 2, 1 0

.
. .
.
Logic Level
2-38

( ).
. . ,
Logic Level ,
. , ,
.
15. Counter I/O (/ ).
/:
. DevX/Ctr0. Edge Source ( )
/Dev X/20MHzTimeBase, X DAQ
.
20 .
. Start. Counter Value
.
. Stop .
16. Stop.
17. MAX.

2-3

2-39

2-4
: NI-DAQmx , DAQ Assistant,
NI-DAQmx .

.

1. .
1.
1, 2.
2. MAX , ,
.
3.
Data Neighborhood
Create New ( ).
.
4. NI-DAQmx Global Channel ( NI-DAQmx)
Next.
5. Analog Input ( )
.
6. Voltage ().
,
Temperature .
,
.
7.
. DevX, X
DAQ , ai0 Next.
8. Temperature Sensor. Finish. MAX
.

2-40

9. Test .
Start , 0.2 0.3
. OK . NIDAQmx MAX ,
.
10. 3 8
:

Measurement Type: Analog Input
Sensor Type: Voltage
Physical Channel: ai1
: Sine Wave

2
.
,
NI-DAQmx Task (NI-DAQmx
).
.
1. Data Neighborhood
Create New.
2. NI-DAQmx Task Next.
3. Analog Input .
4. Voltage.
2-41

5. .
,
. , Add Existing DAQmx Global Channels
( DAQmx ).
6. <Shift>.

7. Next.
8. MyVoltageTask Finish.
9. Voltage Input Setup.
Temperature Sensor , ,
.
10. Add -> Voltage Create New Local Channels (
). ai2 .

2-42

11. , Voltage, OK.


Rename
. Square Wave.

12. OK . ,
. ,
,
MyVoltageTask.
13. Test, Start .

2-43

14. OK .
15. Save Task ( ) MAX.

3
,
, 0.2 0.3 .
, 100,
. ,
.
1. Data Neighborhood NI-DAQmx Global Channels
Temperature Sensor.
2 Voltage Input Setup Custom
Scaling ( ) Create New .
3. :
Scale Type: Linear ( : )
Name: Temperature Scale (: Temperature Scale)
4. Finish. .
.
5. 1 100, 100
slope (). , yintercept (, y ) 0.
6. Deg C (Scaled Units) Volts
(Pre-Scaled Units).
2-44

7. OK.
8. ,
40 0 .
0 40 .
9. , Save Channel.
10. Test Start . ,
.
11. OK .
12. MAX.

2-4

2-45

J. NI-DAQmx
, ,
, DAQ MAX, ,
LabVIEW . NI-DAQmx
LabVIEW ,
DAQ LabVIEW.

DAQmx
DAQmx ControlsAll
Controls
I/ODAQmx Name Controls.

DAQmx Name Controls


, , , , ,
(). , LabVIEW,
MAX,
Task Name ( ) Channel Name ( ).
, , MAX
.
(menu rings) DAQmx
Task Name DAQmx Channel Name.

DAQmx
,
NI-DAQ NI-SWITCH NI-DAQmx,
FunctionsAll FunctionsNI MeasurementsDAQmx - Data
Acquisition. , NI-DAQmx,
DAQ Quick Start Guide for NI-DAQ 7.0
NI-DAQ 7.0 Readme.

2-46

DAQmx - Data Acquisition ,


(), :

DAQmx Task Name Constant ( DAQmx)


, , DAQ Assistant.

I/O Name Filtering ( /).
.

DAQmx Global Channel Constant ( DAQmx)


, ,
. Browse ()
.
I/O Name Filtering (
/).
.

DAQmx Create Virtual Channel VI ( DAQmx)


.
/ (,
, ),
, (, ,
)
(,
).
,
MAX . ,

, ,
. DAQ ,
, .

DAQmx Read VI ( DAQmx ) ,


.
, :
, .
2-47

DAQmx Write VI ( DAQmx )


.
, ,
.

DAQmx Wait Until Done VI ( DAQmx )


.
.

DAQmx Timing VI ( DAQmx )


, .
,
.

DAQmx Trigger VI ( DAQmx ) .


.

DAQmx Start Task VI ( DAQmx )


.
.

DAQmx Stop Task VI ( DAQmx )


, DAQmx
Start Task DAQmx Write autostart () TRUE
().

DAQmx Clear Task VI ( DAQmx ) .


, , ,
. ,
, .

NI-DAQmx
NI-DAQmx.

DAQmx Channel Property Node ( DAQmx )


DAQmx .
Select Filter ( ),
, ,
, , .

DAQmx Timing Property Node ( DAQmx )


DAQmx .
Select Filter, ,
, , ,
.

DAQmx Trigger Property Node ( DAQmx )


DAQmx .
Select Filter, ,
2-48

, , ,
.

DAQmx Read Property Node ( DAQmx )


DAQmx.
Select Filter, ,
, , ,
.

DAQmx Write Property Node ( DAQmx )


DAQmx.
Select Filter, ,
, , ,
.

DAQ Assistant Express VI (- ) ,


, NI-DAQmx.
DAQ Quick Start Guide for NI-DAQ 7.0
, NI-DAQmx.

, DAQmx Device
Configuration (DAQmx ),
.

, DAQmx Advanced Task


Options ( DAQmx),
.

, DAQmx Advanced (DAQmx


),
NI-DAQmx.

2-49

K.

NI-DAQmx:

NI-DAQmx
. DAQmx Start,
DAQmx Stop DAQmx Control Task .
.
,
. ,
DAQmx Control Task, NI-DAQmx
.
:

Unverified ()
. ,
.

Verified ()
NI-DAQ
, . ,
DAQmx Control Task action ()
(verify). /, NI-DAQmx

/, NI-DAQmx
, /
. NI-DAQmx /
. NI-DAQmx
,
. .

Reserved () ,
, ,
.
, PXI
.
, ,
. ,
DAQmx Control Task action () (reserve).
, -
.
, ,
.
.

Committed () , NI-DAQmx
.
,
PXI .
, ,
, .
,
2-50

. , DAQmx Control Task


action () (commit). ,
. ,
, .
, , ,
.

Running () ,
.
, DAQmx Start. ,
.
, ,
, .
, .
, ,
, .
, ,
.

, ,
. ,
, , ,
DAQmx Control Task action reserve
.
.


,
, ?
. ,
2-51

Verify ,
, ,
, , , ,
.

Reserve :
, ,
,
,
.
,
,
. , ,
, ,
, ,

.

Commit ,
, .
, ,
.
, ,
, . ,
, ,
, ,
.
, ,
, .

Start ,
. ,

. ,
.
, .
, ,
, . ,
, ,
, .


,
. ,
:


,
2-52

. ,
, DAQmx Control Task
reserve action, .
,
.
. ,
, .

,
, , ,
. ,
. ,
:
/ .
, .
/
/,
. ,

/,
NI-DAQ

,
, / .

DAQmx Read ,
. Auto Start True (),
, .

DAQmx Write . Auto


Start True, .
, ,
Auto Start True, DAQmx Read,
.

.

-
. ,
.

2-53

,
DAQ .

DAQ , , ,
/ .

,
DAQ , ,
.

DAQ :

LabVIEW DAQ
NI-DAQ

MAX
DAQ Assistant,
.

DAQ Assistant, MAX LabVIEW,


, .

DAQmx - Data Acquisition ,


.

DAQmx .
,
, DAQmx
Control Task.

2-54

2-55

:
A.
B.
C. DAQ Assistant

3-1

A.
, , .
, .
, ,
. ,
, .
, ,
.
:
.
, ,
(Start Trigger). , ,
(Reference Trigger), ,
,
.
, ,
. , ,
(Analog Trigger)
. ,
(Digital Trigger) PFI .


,
, /
. ,
, ,
, .
, , .
, 50 C, ,
,
50 C.
2.7
.

3-2



-
.
, ,
level (threshold level), ,
. , , level
hysteresis ().

, ,
level (threshold level), , .
, , level
hysteresis.

2.7 .


(analog window trigger)
,
. ,
(window top/bottom value). ,
, .

3-3

,
.


TTL ,
: . ,
. ,
. ,
,
. ,
PFI National
Instruments.

,
. ,
, :

(Advance Trigger)
.

(Pause Trigger) .
.

(Reference Trigger)
. , ,
3-4

(pretrigger samples). , ,
(posttrigger).

3-1.

(Start Trigger)
.
, .
. E
. ,
, .

3-5


3-1.


LabVIEW
: LabVIEW
.
1.
1 2.
2. LabVIEW .


3. DAQmx Task Name,
ControlsAll ControlsI/ODAQmx Name Controls .
New Task (DAQ Assistant) ( ).
4. (DAQ Assistant)
:

Measurement Type: Analog Input


Sensor Type: Voltage
Channels: Create New Local Channels,
ai0 ai1 DAQ , <Shift>.

Name: Trigger Task


5. Finish.



.
1. Task Triggering. Start
Trigger Type ( ) Digital Edge.
2. Source () PFI0,
Edge () Rising ().
PFI0/TRIG1.

3-6

3. Test.
4. ,
PFI0.
, .
5. Y, 0.2 0.3.
Voltage 0
.
. OK, .
6. Voltage0 0 1.
7. 0 1,
. .
ai0 NI-DAQmx, ,
Trigger Task
.
. 8 12

.
, .
8. Task Triggering.
Start Analog Edge Trigger Type.
9. Voltage0 Source Rising
Slope. Level , ,
, 5.

3-7

10. Test.
11. ,
. Level, .
. ,
Voltage0, .

.

12. , Stop OK
.

(Reference Triggers)
.
1. 1
.
2. .
3. Task Timing. :

Acquire N Samples ( N )

Samples to Read ( ): 5000

Rate (Hz) ( ()): 1000

Advanced Clock Settings - Clock Type (


): Internal ()
4. Task Triggering. Start
Trigger Type none.
5. Reference Trigger Type Digital Edge
Source PFI0.
Pretrigger Samples ( ) ,
, , .
NI-DAQmx .
Samples to Read (
3-8

Task Timing) Pretrigger Samples.

Pretrigger Samples 3000.


5000 1000 ,
.
6. Test.
7. ,
. ,
,
.

, .
5 .

8. OK .
9. OK .
3-9

NI-DAQmx
NI-DAQmx
LabVIEW
, .
1. DAQmx Task Name
Generate CodeConfiguration and Example (
). LabVIEW
, .
.
,
.
2. -, .
, ,
N .
3. .
,
.
4. LabVIEW. .

3-1

3-10

: ,
, .


NI-DAQmx.
LabVIEW.

3-11

3-12

4

,
LabVIEW,
NI-DAQmx.

:
.
B.
C. DAQmx Read
D.
E.
F.

4-1

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

-
, .
NASA
.
,
.


, ,
. (). x(t),
t . t
. , 1/t,

. x(t) t = 0, t, 2t, 3t, ..
. , x(0), x(t), x(2t), ...
. x(t) ,
:
{x(0), x(t), x(2t), x(3t), , x(kt), }

. .


:
x[i] = x(it), i = 0, 1, 2,
4-2

N x(t),
:
X = {x[0], x[1], x[2], x[3], , x[N1] }

x(t). , X = {x[i]}
i - .
, X, ,
().



,
.
NI-DAQmx , -
- .
, ,
.
1000 1000
, 10 10 /.


,
(aliasing), .
, ,
.
, .

- .

4-3


,
, .
,
.
. , ,
, .

, , .
, , fs 100 . ,
: 25 , 70 , 160 510 ,
.

(fs/2 = 50 )
. .
. , F1 (25 )
, F2 (70 ), F3 (160 ) F4 (510 )
30 , 40 10 , .
4-4

:
= ( ,
, , )
,
F2 = |100 70| = 30
F3 = |(2)100 160| = 40
F4 = |(5)100 510| = 10


,
.
,
.
.

4-5

: f
fs. , .
2fs,
( ), ,
, .
fs,
. 4fs/3.
fs, (4fs /3 x 1)/2 = 2fs /3),
.


. , . ,
, ,
.
, . , ,
, .
5-10 .

4-6

B.
, , ,
. ,

. , ?
, ,
( )
, .
, , ,
.
,
, ( ,
).
,
, ( ).
.

.


( f1) ( f1).
. , b .
< f1
> f2. f1 f2 ,
. , ,
< f1,
.
,
. ,
(f1).

4-7


4-1
().

:
.
1. 0 1 .
2.

Sampling Rate Example,


C:\Exercises\LabVIEW DAQ. .

,
DAQ , .
3. :

: .
: 500
: 1500

4. . ,
, , DAQ
.
, (fn) fn = fs.
1500 750 . ,
4-8


750 . 500
, DAQ .
5. . Zoom
x.

.
, ,
. ,
(frequency-domain data)
.
6. . 5000 .
(time domain)
.
.
, 5 10
.
7. 1000 .
2fn.
. , ,
.
1000 , ,
. ,
2fn
.
8. 750 . fn
375 , .
,
, ,
. , ,
:
= | ( , ,
) |
, | 750 500 | = 250 , , .
, -
0 375 . , 500
- 250 .
4-9

9. . .
.

, ,
, ,
.
,
, ,
.

4-1

4-10

C. DAQmx Read
DAQmx Read (DAQmx ), DAQmx - Data
Acquisition, .
,
, .
, .

(Analog)
(Digital)
(Counter)
( ) (More (Raw Data))

: (single channel),
(multiple channels)
(unscaled).
: (single sample)
(multiple samples).
: (waveform)
(DBL).

.
, ,
.
, .
(I/O Name Filtering)
/ NI-DAQmx Allow
Multiple Names ( ). .
.

4-11


, :

Y ,
, .
(DBL).

t0 , Y
.
(timestamp).

t ,
Y.

Attributes () ,
, .

t0 ,
.
t0.


. LabVIEW
(x0) (x) ( Y).
, ,
.


. LabVIEW
x0, x Y ,
.
, 1D
4-12

.
, 1D
,
.

4-13

4-2.
: , .
, ,
.
, ,
.


1. .

0.0 0.4.
10.0 0.4. ,
.

-
2. -.

. DAQmx Create Virtual Channel,


FunctionsAll FunctionsNI MeasurementsDAQmx Data Acquisition,
-. ,
.
AI Voltage .
b. DAQmx Start Task, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition, -.
.
4-14

. (While Loop),
FunctionsAll FunctionsStructures, -.
, , ,
.
d. DAQmx Read, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition, -.
, .
: AnalogSingle ChannelSingle
SampleDBL.

.
e. Wait Until Next ms Multiple (
, ), FunctionsAll
FunctionsTime & Dialog, -.
100 .
f. DAQmx Stop Task, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition, -.
.
g. Simple Error Handler,
FunctionsAll FunctionsTime & Dialog, .
.
3. Voltmeter.vi C:\Exercises\LabVIEW DAQ.
4. Dev
X/ai0, X DAQ MAX.
5. .
. , .
6. .
7. DAQmx Global Channel, ControlsAll
ControlsI/ODAQmx Name Controls, .
8. -, DAQmx Create Virtual Channel
.
9. DAQmx Global Channel
task/channels in DAQmx Start Task.
10. Temperature Sensor.
. . 100
, NI-DAQmx
, 100. ,
.
11. .

4-2.
4-15

D.

. .
DAQ- National Instruments
. .


(), .
.
,
- -.
.
PCI-611X.
,
.

,
,
.
(Sample Clock) ,
. ,
() , .
(AI Convert Clock) ()
, .
(Sample Duration) ,
.
:
= (# 1)
4-16



: , .
.

(interval sampling)
.
- -. (multiplexer MUX)
.
, ,
.
, ,
. ,
. ,
. ,
.
() , ,
. ,
.
. ,
.

, 5
( ).
, ,
, DAQ-.


(round-robin sampling)
4-17

.
, (scan clock)
. (channel clock)
.
.


. . ,
, . ,
.

,
. ,
0.5 5 .

.
. ,
, ,
.
.


,
,
.
,
.

4-18

(simultaneous sampling)
,
. ,
, ,
.
,
.
, ,
50 200 .
,
15 0 3.
270 .
, 5 . 15
.
, 0.054
. , ,
,
.
PCI/PXI-611X (S-).

4-19

4-3.
.
:
.

1. :
a.
1 2 .
b. Frequency
Adjust. , Frequency Range
100 Hz 10 k.
2. Interval vs. Round-Robin Sampling Example,
C:\Exercises\LabVIEW DAQ. .


.
3. :

DAQmx: Dev X/ai1, Dev X/ai2, X DAQ


MAX.
: 5000
: Round-Robin

4. . ,
, .
:

.
.
,
. ,
,
4-20


. , DAQ ,
10 700 ,
70 .

5. Interval Sampling
. , ,
.
, .
.
.
,
.
6. . .

4-3

4-21

E.

()

,
DAQmx Read,
(Multiple Samples).
DAQmx Read
DAQmx Timing, DAQmx Start Task DAQmx Stop Task.

(Hardware-Timed) ,
,
, .
, .
,
. ,
, .
, ,
.


. LabVIEW,
.

DAQmx Timing
DAQmx Timing ( DAQmx ) ,
.
, .
: Sample Clock ( ),
Handshaking (), Implicit () Use Waveform (
).
, Sample Clock
. :

sample mode ( ) ,
.

samples per channel ( )


, sample mode Finite Samples
( - ).
, DAQ
LabVIEW.

rate ()
. ,

.

source () .
,
4-22

DAQ .

active edge ( ) ,
.
(rising) (falling) .

task/channels in ( /)
, .
NI-DAQmx .

Handshaking () DAQmx Timing



() DAQ
.
DAQmx Timing ,
/.
(Implicit)
- .
, ,
,
/ .
Use Waveform ( )
DAQmx Timing dt
, waveform. dt ,
. sample mode Finite Samples, NIDAQmx , .
. ,
DAQmx Write.
DAQmx Timing , .

-
-
.
.
DAQmx Timing. DAQmx Start
Task. , DAQmx Read ,
, . DAQmx Stop Task
, .
Error Handler , .

4-23



. DAQmx Timing /,
( ). , DAQmx Start Task .
DAQmx Read, .
, DAQmx Read , DAQmx Stop Task
, Simple Error Handler .

(number of samples per channel)


DAQmx Read , NI-DAQmx
, DAQmx Timing. NIDAQmx number of
samples per channel 1. DAQmx Read 2D ,
. ,
.

. error in DAQmx Start Task, DAQmx Read
4-24

DAQmx Stop Task ,


error out . ,
, DAQmx Start Timing.
DAQmx Start Task.
. ,
Error Handler .

?
, ,
, .

, ,
. ,
. FIFO ( First In First Out
) , , ,
.
(Direct Memory Access
DMA) (Interrupt Request IRQ).
,
. number of samples per channel
DAQmx Timing ( buffer size DAQmx Configure Input Buffer) ,
, DAQmx Read .
DAQmx Read LabVIEW,
. LabVIEW ,

DAQmx Read
4-25

DAQmx Read.


LabVIEW
. number of samples per
channel DAQmx Timing .
, DAQmx Start Task.
, .
, DAQmx
Timing. DAQmx Read
LabVIEW. DAQmx Read .

4-26


4-4.

.

LabVIEW , .
DAQ . DAQ
. ,

, ,
.


1. .

,
CreateControl ( ).

. 1000
# ( ) 10000.
DAQmx Sine Wave.
2. CH1
.

-
3. -.

4-27

a. DAQmx Timing, FunctionsAll


FunctionsNI MeasurementsDAQmx - Data Acquisition, -.
( )
. DAQ
Sample Clock .
b. DAQmx Start Task, FunctionsAll
FunctionsNI MeasurementsDAQmx - Data Acquisition, -.
.
c. DAQmx Read, FunctionsAll
FunctionsNI MeasurementsDAQmx - Data Acquisition, -.
,
. AnalogSingle
ChannelMultiple Samples1D DBL,
.
d. DAQmx Stop Task, FunctionsAll
FunctionsNI MeasurementsDAQmx - Data Acquisition, -.
.
4.

C:\Exercises\LabVIEW DAQ.

Buffered

Acquisition.vi

5. .
.
6. .

4-4.

4-28

4-5.
.
: ,
,
.

. ,
.
1. 4-4 Buffered Acquisition,
C:\Exercises\LabVIEW DAQ.
2. File Save As Buffered
Acquisition (min max).vi C:\Exercises\LabVIEW DAQ.
3. DAQmx ,
ReplaceI/ODAQmx Name
ControlsDAQmx Task Name.
4. -, .

a. Index Waveform Array,


FunctionsAll FunctionsWaveformWaveform Operations, . .
b. - Amplitude and Level Measurements,
FunctionsSignal Analysis, -.

.
Configure Amplitude and Level
Measurements ( )
Maximum peak Minimum peak.
OK
.

4-29

5.

- Amplitude and Level
Measurements CreateNumeric Indicator (
).
6. :

DAQmx: My Voltage Task


# : 1000
: 10000

7. CH1,
CH2 .
8. .
,
2.
. , ,
0, 1 2.

9. - Amplitude and Level


Measurements .
.
10. .

4-5.
4-30

F. -

,
. .
. -
.

- -
. DAQ
DAQmx Timing, DAQmx Start Task
DAQmx Read.
, .
DAQmx Read . , ,
. DAQmx Read
. , DAQmx Stop Task
. Simple Error Handler ,
.


-
:

4-31

DAQmx Read (While).

.
NI-DAQmx .
1, NI-DAQmx
, .

, (backlog).


Timing, , ()
. DAQmx Start .
DAQmx Read, ,
.

(number of samples per channel to read)
. number
of samples per channel to read .
LabVIEW ,
, ,
.
(backlog) ,
, . ,
DAQmx Read, ,
, DAQmx Read,
. DAQmx Stop Task
, Simple Error Handler .


,
,
, . ,
. .

4-32

,
, .
samples per channel (# )
DAQmx Timing. DAQmx Start Task ,
. .
, (number of samples per
channel to read) .
,
DAQmx Read LabVIEW. DAQmx
Read (), ,
, .
, . ,
DAQmx Read LabVIEW.
,
.
(backlog). LabVIEW
, ,
. ,
, LabVIEW .


,
,
4-33

(overwrite error). ,
, .
, LabVIEW .
, ,
, ,
.

( ) DAQmx Timing.
, .
:
. ,
.

,
(number of samples per channel to read).
, DAQmx Read ,
. ,
,
.

DAQmx Timing.
, .
, .

-
.


,
, FIFO DAQ .
, , .
, FIFO .
FIFO DMA IRQ,
, FIFO ,
.

, , DMA , DMA
. (DMA) ,
(IRQ), .
DMA NI-DAQmx Help
DAQmx (DAQmx Channel Property Node) ( Data Transfer Mechanism
( )).
DAQmx Timing.

FIFO .
.

,
FIFO . ,
.
FIFO .
4-34


4-6.

.
: DAQ
.
,
.


1. .

a. -,
DAQmx
CreateControl.
b.
(Properties). (Format and Precision).

.
c. (Scales). Autoscale Y
y 2 2,
. ,
0.00 0.05, .
2. :

DAQmx : Sine Wave


: 10000
# : 3000

3. ch1
.
4-35

-
4. -.

a. DAQmx Read Property Node,


FunctionsAll FunctionsNI MeasurementsDAQmx - Data
Acquisition, -.
.
PropertiesStatusAvailable
Samples per Channel.
.
b. (Unbundle by Name),
FunctionsAll FunctionsCluster, . status
.
c. Simple Error Handler,
FunctionsAll Functions Time & Dialog, -.
,
.
5.

Continuous

Acquire.vi

C:\Exercises\LabVIEW DAQ.

6. .
. , .
, ,
.
7. ,
.
, ,
. ,
. (backlog)
, , ,
, . , DAQmx Read
.

4-36


, .
8. FileSave As Continuous Acquire with File
IO.vi C:\Exercises\LabVIEW DAQ.
9. -, .

a. Merge Errors, FunctionsAll


FunctionsTime & Dialog, -.
.
b. - Write LabVIEW Measurement File,
FunctionsOutput, -. -
.

Configure Write LabVIEW Measurement File


:

4-37

10. OK .
11. .
12. - ,
LabVIEW.

a. - Read LabVIEW Measurement File,


FunctionsInput, -. -
LabVIEW .
Configure Read LabVIEW
Measurement File :

4-38

13. OK .
14. - - Read LabVIEW Measurement File
.
15. File Name Description
CreateIndicator .
Signals Create Graph Indicator
.
16. . , ,
.
17.

Read

C:\Exercises\LabVIEW DAQ.

18. .

4-6

4-39

Data

File.vi

4-7.
.

: - Write LabVIEW Measurement File


.
, ,
,
. - Write LabVIEW Measurement File.

.
1. Continuous Acquire with File IO.vi,
C:\Exercises\LabVIEW DAQ.
2. - Write LabVIEW Measurement File
Configure Write LabVIEW Measurement File.
a. Action Save to series of files (multiple
files).
b. Settings Configure Multi-file
Settings.
c. Configure Multi-file Settings
.

d. OK Configure Multi-file Settings.


e. OK Configure Write LabVIEW
Measurement File.
3. .
4-40

4. Read Data File, C:\Exercises\LabVIEW


DAQ -.
5. - Read LabVIEW Measurement File,
Configure Read LabVIEW Measurement File.
a. Action Ask User to choose file.
b. OK .
6. . ,
. C:\ .
7. OK.
8. .
9. .

4-7

4-41

4-8. ,

.
:
.

,
.
1. Continuous Acquire, C:\Exercises\
LabVIEW DAQ.
2. FileSave As Trigger Continuous
Acquire.vi C:\Exercises\LabVIEW DAQ.
3. CH1
.

-
4. - DAQmx Trigger,

FunctionsAll
FunctionsNI
MeasurementsDAQmx Data Acquisition. .
edge source CreateControl,
.

5. :
DAQmx : Sine Wave
# : 1000
: 5000
: /DevX/PFI0, X DAQ MAX.
: Rising
6. .
7. . ,
. .
8. .

4-8
4-42

4-9. NI-DAQmx
: NI-DAQmx ,
.
NI-DAQmx
. , ,
, .


1. DAQmx Task Name,
ControlsAll ControlsI/ODAQmx Name Controls, .
2. Edit Task .
3. (DAQ Assistant) ,
. Task Timing Acquire
Continuously. .
4. OK .
5. Generate CodeConfiguration and
Example.
:

Example ,
.

Configuration
DAQmx Create Virtual Channel.

Configuration and Example


.

6. - . ,
the DAQmx Task Name .
7. -.
, <Ctrl-H> HelpShow Context Help.
,
.
8. . .

4-9

4-43

DAQ
.

,
.

, -
.


. DAQ
, .

NI-DAQmx
.

4-44

4-45

5 ()

,
.
, .

:
A.
B.
C.
D.

5-1

.

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

,
() .
, ,
, , , .

, , Signal Conditioning
eXtensions for Instrumentation (SCXI) Signal Conditioning Components (SCC).
,
- ().
(),
, , DAQ National Instruments.

,
, .

5-2

B.
SCXI ,

.
.

(terminal block).
(SCXI Chassis) SCXI,

SCXIbus. SCXI, ,
, .

SCXI.

5-3

,
SCXI, .
SCXI
SCXIbus. .
SCXI-
. ,

. ,

SCXI .
() , SCXI
.
SCXI .
( )
.
SCXI.
/ ,
EXTSTROBE
SCXI . ,
SCXI.
SCXI ,
,
.

(digital pattern) (SCXI Slot 0),
SCXI, , SCXI .
, ,
,
5-4

(analog bus) SCXI. ,


. 0.
. -
,

NI-DAQ.

SCXI,
.
, .
. SCANCLK, ,
SCXI ,
- . SCXI Slot 0
.
, ,
. NI-DAQ
, .
SCXI .
1. ,
.
2. .
3. , .
4. SCXI.
. SCXI .
, ,
.

5-5

5-1. SCXI

: MAX
.
. SCXI .

, ,
.
1. SCXI.
2. 4- SCXI-1000, .
, ( ) (
). ,
.

1SCXI-1520

2SCXI-1180

8-

SCXI-1180
SCXI.
SCXI-1302

3SCXI-1125 8-
SCXI-1327

4SCXI-1141 8-
SCXI-1304 (signal ground referencing)

3. SCXI-1000.
SCXI-1349 -. ,
SCXI-1349 68- 50-
. 68- ,
. 50-
.
4. SCXI-1180 ( 2) , ,
, SCXI-1349,
.
5. ,
.
a. , ,
5-6

.
b. , SCXI-1349 SCXI-1520 1
.
c. DAQ 68- SCXI-1349.
6. .
7. MAX .
Devices and Interfaces Create
New .
8. Devices and InterfacesNI-DAQmx DeviceNI-DAQmx SCXI
ChassisSCXI-1000 Finish.

9. SCXI, .
, SCXI-1520, SCXI-1349,
, . 1
Communicating SCXI Module Slot.
10. Create New SCXI Chassis, Chassis Address
0. Auto-Detect Modules in Chassis Save.

5-7

11. SCXI Chassis Configuration,


.

. SCXI-1180 ,
. SCXI Chassis Configuration
.

a. SCXI-1125 SCXI-1327 Accessory.


b. SCXI-1141, SCXI-1304 Accessory.
c. OK .
12. Devices and Interfaces, NI-DAQmx Devices,
SCXI-1000: SC1. SCXI-1000: SC1,
.
13. SCXI-1000: SC1 Test
. OK. ,
.
14. Attributes,
, SCXI Chassis
Configuration.
15. MAX.

5-1
5-8

C.


,
.


,
.

, .
, ,
, .

.
(),
. ,
, .
-
. ,
. ,
J , 50 /C.

, , ,
10 .
200 ,
4 C - .

. 500
, 25 /C.
10 , 200
, 0.03 C.

5-9

5-2.
: () 0 1 SCXI1125
LabVIEW.
. SCXI .

,
, .
1. MAX Devices and InterfacesNI-DAQmx DevicesSCXI1000: SC1.
2. 3: SCXI-1125: SC1Mod3 Properties
. Configure. Gain Configuration
0 1 :

Channel: 0 Attenuation: 1.00

Channel: 1 Attenuation: 1.00

3. OK Details: SCXI-1125
SC1Mod3.

0 1
SCXI-1327
. ,

SCXI-1327 SCXI-1125.
, , SCXI-1327,
, SCXI-1125.
4. SCXI-1327.
SCXI-1327.

5-10

5. ,
CH 0 (S1 S2) CH 1 (S3 S4). ,
1:1, .

6. , , .
. , ,
. , .
.

5-11

a. CH 0+, CH 0.
b. ,
, CH 0 :
(+)
CH 0 . ,
.
()
CH 0 . ,
.
c. CH 1+.
d. CH 1.
e. SCXI-1327 , .
f. SCXI-1327 SCXI-1125,
.
g. .
7. MAX NI-DAQmx Global
Channels Data Neighborhood. Create New NI-DAQmx Channel
. :

Measurement Type: Analog Input

Sensor Type: Voltage.


, .
.

Physical Channel: SC1Mod3/ai0

5-12

Name: Temperature1

Measurement Type: Analog Input

Sensor Type: Voltage

Physical Channel: SC1Mod3/ai1

Name: Temperature2

8. Data Neighborhood Create


NewNI-DAQmx Task. :

Measurement Type: Analog Input

Sensor Type: Voltage

Channels: Add Existing DAQmx Global Channels


Temperature1 Temperature2.

Name: SmallVoltageTask

9. Analog Input Voltage Task Configuration


.
10. Start.
11.
.
, .
12. Stop.
13. OK .
14. Save Task.
15. MAX. NI-DAQmx.

LabVIEW
, ,
SCXI-1125/SCXI-1327.
, (
) LabVIEW. ,
,
, .
1. LabVIEW SCXI-1125 Gain vs No Gain,
5-13

C:\Exercises\LabVIEW DAQ. .

2. - .

a. DAQmx Channel Property Node,

FunctionsAll
FunctionsNI
MeasurementsDAQmx Data Acquisition, -.
/ ,
DAQmx , ActiveChans.

.
b. DAQmx Timing,
FunctionsAll FunctionsNI MeasurementsDAQmx Data
5-14

Acquisition, -.
(rate) (sample mode).
sample mode CreateConstant
.
c. Merge Errors,
FunctionsAll
FunctionsTime & Dialog, -.
.
d. DAQmx Start Task,
FunctionsAll FunctionsNI MeasurementsDAQmx Data
Acquisition, -.
.
e. DAQmx Read,
FunctionsAll FunctionsNI MeasurementsDAQmx Data
Acquisition, -.
.
AnalogMultiple ChannelsMultiple Samples1D
Waveform.
f. DAQmx Stop Task,
FunctionsAll FunctionsNI MeasurementsDAQmx Data
Acquisition, -.
.
g. Simple Error Handler,
FunctionsAll FunctionsTime & Dialog, -.

.
h. Wait until Next ms Multiple,
FunctionsAll FunctionsTime & Dialog, -.
, ,
,
.
100.
i.

Or,

FunctionsArithmetic & ComparisonExpress Boolean, .


j. Unbundle by Name,
FunctionsAll FunctionsCluster, -.
status.
.
3. .
4. :

: 1000

# (): 1000

1:
: 0.00200
5-15

: 0.00200

2:
: 5.00000
: 5.00000

5. .
6. .

. .

7. . 2
1.00000, 2 1.00000.
.
8.
CH 1.
. .

5-16

,
. 2 (1.00 1.00 ) (5.00)
(212), 0.097 .
9. 2.
,
, , .
10. .

5-2

5-17

D.

.
50 ,
.
(),
50 . , SCXI-1125
4 , 50
(- 90 ).
: ,
, , .
( ) ,
.
National Instruments ,
.

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

.

, (
) ,
,
.
5-18

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



, .
, , ,
, ,
.
, ,
.
,
. ,
, .

5-19


.
,
.
, ,
.
.
, ,
.

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

DAQ
.
, ,
.

, National Instruments.

.

5-20

,
,
. -
. , 16-
10 .
, /
10 . , , SCXI-1141,
,
16 10 .
15 80 . ,
15 , 30000 .
16 ,
, 480000 .

DAQ
.
,

,
10 , 80
30 . , ,
60000 , 960000 / .
( )
. ,
,
.
,
5-21

.
, ,
.


, ,
- .

, .

. ,
.
,
, ,
. , ,
, .

.
.
NI ,
, ,
( ),
.
NI ,
5-22

( )
,

.


, .



.
,
.




.
,
.

5-23

5-3.

:
.
SCXI1141 LabVIEW
.


. SCXI .

,
, .
1. SCXI-1302 SCXI-1304.
2. , , SCXI-1302
SCXI-1304 , .

a. SCXI-1304 /
[S1/S2 IN (0) S4/S5 IN (1)] ,
, .
b.

SCXI-1304

/ [S3 IN (0) S6 IN (1)] ,


,
.
c. 20 SCXI-1302
( 22 DAC0OUT ) IN +(0) SCXI-1304.
d. IN +(0) IN +(1) SCXI-1304.
5-24

e. 23 c SCXI-1302
( 55 AOGND ) IN (0) SCXI-1304.
f. IN (0) IN (1) SCXI-1304.
3. .
4. SCXI-1302 SCXI-1180.
5. SCXI-1304 SCXI-1141.
6. .
7. MAX. NI-DAQmx Devices
Test Panels.
8. Analog Output :

Channel Name: Dev X/ao0

Output Mode: Sine Generation

Update Rate: 1000.0

Transfer Mechanism: DMA

Output Voltage/Amplitude: 5.00

Start.
9. Analog Input :

Channel Name: SC1Mod4/ai0

Acquisition Mode: Continuous

Max Input Limit: 5.00

Min Input Limit: -5.00

10. Start. .
11. Channel Name 1 SCXI-1141.
, 0.

MAX
1. NI-DAQmx SCXI1141. FilterChannel1 FilterChannel2.
Device Lowpass Filter Enable,
5-25

, 10000.
2. FilterChannel1 FilterChannel2 FilterTask.
3. .

SCXI LabVIEW
, ,
SCXI-1141.
SCXI-1141
.
1. LabVIEW SCXI-1141 Hardware Filtering,
C:\Exercises\LabVIEW DAQ. .

2. - .

5-26

a. DAQmx Timing,
FunctionsAll FunctionsNI MeasurementsDAQmx Data
Acquisition, -.
(rate) (sample mode).
sample mode CreateConstant
.
b. DAQmx Channel Property Node,

FunctionsAll
FunctionsNI
MeasurementsDAQmx Data Acquisition, -.

.
c. DAQmx Start Task,
FunctionsAll FunctionsNI MeasurementsDAQmx Data
Acquisition, -.
.
d. DAQmx Read,
FunctionsAll FunctionsNI MeasurementsDAQmx Data
Acquisition, -.
.
AnalogMultiple ChannelsMultiple
Samples1D Waveform.
e. - Spectral Measurements,
FunctionsSignal Analysis palette, -.
- .
Configure Spectral Measurements
:
(1) Spectral Measurement Power
Spectrum, Result Linear.
(2) Hanning Window
Averaging.
(3) .
(4) OK .
Power Spectrum Power Spectrum
Graph
.
f. DAQmx Stop Task,
5-27

FunctionsAll FunctionsNI MeasurementsDAQmx Data


Acquisition, -.
.
g. Wait until Next ms Multiple,
FunctionsAll FunctionsTime & Dialog, -.
.
100.
h. Simple Error Handler,
FunctionsAll FunctionsTime & Dialog, -.

.
i. Unbundle by Name,
FunctionsAll FunctionsCluster, -.
status.
.
j. Compound Arithmetic,
FunctionsArithmetic & ComparisonExpress Numeric,
-.
, ,
.
.
Change ModeOR.
, .
3. .
4.
:

# : 100

: 10000.00

FC1: 500

FC2: 0 ( 0
SCXI-1141.)

5. HelpFind Examples, NI Example Finder.


Hardware Input and
OutputDAQmxAnalog GenerationVoltage Cont Gen Voltage Wfm-Int
Clk-Variable Rate. 100
.
6. SCXI-1141 Hardware Filtering.
7. Analog Output Frequency 100 5000
SCXI-1141 Hardware
Filtering. 0 500
.
1
.
5-28

8. FC1 2500.00 .
7.
. , ,

.

. ,
. (
SCXI-1141) , ,
. ,
,
,
. ,
.
9. 0 1

SCXI-1141.
10. .

5-3

5-29

E.

, .

.
, , .
,
,
.
,
, ,
.
50 ,
- .

.
.
, 12 ,
, . ,
,

50 .



. (number) ,
.
/
, , .
, (Underwriters Laboratories
UL) (International Electrotechnical
Commission IEC)
. , , (
, ) .
,
.

.


( )
,
.
, ,
, .

5-30


, ,
,
( ) . ,
,
.
, .


.
, .
, ,
. ,
. ,
.

.

.

IV .
, , .

III . ,
,
.
5-31

II ,
. , , , .

I ,

. I , ,
.



. ,
, .
SCXI National Instruments
250 Vrms. ,
2300
, .
SCXI IEC-1010
.
.

IEC 664-1
.

IEC 1010-1
, .

5-32

F.
() ,
, , , ,
, .

.

5-33

G.

(thermocouple). ,
. ,
, ,
.
, (Thomas Seebeck),
1821 . . ,
:
V S T

V , S , T .
S ,
.
,
(ANSI). ,
J- ( )
.

, .
.



, ,
.
, 5-1, J-
, .
.

5-1. J-

, J1, J2
J3. J1 ,
5-34

. J2 J3
,
. J1
J2 J3 -
. J2
J3 .



. (cold junction)
0 C .
(NIST)
, 5-2.

5-2. ,
0 C

5-2 T1 Tref.
Tref 0 C. ,
, ,
,
. , ,
.
0 C
. 0 C,
.
, .
,
.
,
.
(). ,
5-35

.

, , ,
, 5-1, ,
.
J2 J3.

, 5-3,
,
.

5-3.

, 5-4.
5-1 ,
J3, ,
. , J3 J4
, ,
, , 5-4
5-1. , ,
5-4, 5-1.

5-4.

5-4 J2 J4 (-).
, J2 J4 .
5-36

, ,
. J1 J3 () ,
. ,
J1 J3. VJx(Ty) ,
Jx Ty,
:

VMEAS = VJ 1 (TTC ) + VJ 3 (Tref )

(5-1)

VMEAS , , TTC J1, Tref


.
, 5-1 VJx(Ty) ,
Ty .
VJ1 VJ3
, 5-1 . , ,
NIST
0 C.
J3 , J1,
, VJ3(Tref) = VJ1(Tref). VJ1 ,
, VTC. ,
5-1 :

VMEAS = VTC (TTC ) + VTC (Tref )

(5-2)

, VMEAS Tref -
, .

, , ,
-
. ,
.
, .
, SCXI ,
, .
. NI-DAQ, NI LabVIEW Measurement Studio

, .


.

.

. :
T = a0 + a1v + a2 v 2 + ... + an v n

(5-3)

5-37

v , T , a0 an
, .
NI .
5-1. ()

()

(/C)

(C)

-270 1000

9.835 76.358

58.70 0 C

-210 1200

8.096 69.536

50.37 0 C

-270 1372

6.548 54.874

39.48 0 C

- 10%

- 13%

-270 400

6.258 20.869

-50 1768

0.236 18.698

-50 1768

0.226 21.108

38.74 0 C
10.19 600
C
10.35 600
C

S
R

5-38

5-4.
: .

,
SCXI-1125 LabVIEW.

SCXI-1125 MAX
1. NI-DAQmx .
:

Measurement Type: Analog Input

Sensor Type: Temperature

Temperature Type: Thermocouple

Physical Channel: SC1Mod3/ai0

Name: ThermoTemp

2. Analog Input Thermocouple Channel Settings.


0 100 C. Thermocouple Type
J. CJC Source
Built In.
. Built-In

, MAX NI-DAQ ,
SCXI-1327.
3. Device Lowpass Filter Cutoff
Frequency 4 .
4. Test .
5. .
,
. , OK MAX.
6. Yes .

LabVIEW
,
SCXI-1125/SCXI-1327. ,
, ,
,
.
1. SCXI-1125 Temperature Reader,
5-39

C:\Exercises\LabVIEW DAQ. .

2. -.

a. DAQmx Timing, FunctionsAll


FunctionsNI MeasurementsDAQmx Data Acquisition, -.
(rate) (sample mode).
sample mode
CreateConstant .
b. DAQmx Start Task, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition, -.
.
c. DAQmx Read, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition, -.
.
AnalogMultiple
ChannelsMultiple Samples1D Waveform.
d. Bundle by Name,
5-40

FunctionsAll FunctionsCluster, -.
e. Simple Error Handler,
FunctionsAll FunctionsTime & Dialog, -.
.
f. Or, FunctionsArithmetic &
ComparisonExpress Boolean, -.
g. Unbundle by Name,
FunctionsAll FunctionsCluster, -.
status.
.

3. .
4. :
DAQmx : ThermoTemp (
.)

# : 100

: 60.00

: 30

5. .
6.
, .

.
7. .
8. .

5-4

5-41

H.
()
.

L
L

, ,
.

() ().
,
, /. ,
.
(), 10-6.
, ,
, ,
D .
() .

( )
( ), = /.
, , 0.25 0.3.

5-42

I.
,
, ,
. ,
,
.
.
,
, , .
,
, .

. ,

. , , ,
,
. .
30 3000 ,
120, 350 1000 .

,

. ,
.
,
(gauge factor).

()
,


():

5-43

R R
= R = R
L

L
2.


. , ,
. ,
,
,
.
, . ,
, ,
23 ppm/C. 1000
11.5 /C. ,
.


,
.
. , ,
500 .
2,
2 (500
106) = 0.1%. 120
0.12 .

, ,

.
(Wheatstone bridge), ,
, VEX.

VO
R3
R2
VO =

VEX
R3 + R4 R1 + R2

, R1/R2 = R3/R4, VO .
5-44

, .
.
, R4 ,
,
.
RG,
R - R = RG . , R1 = R2
R3 = RG, ,
VO/VEX .
1/(1 + /2),
.

VO

1
=

VEX
4 1 +

, .
, ,
(RG + R),
. ,
(dummy gauge).
.
, VO
, .

,
, .
, ,
(RG + R), (RG R).
5-45

,
, ,
.

VO
KT
=
2
VEX
,
,
. .

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



(lead wires) .
,
. ,
, . ,
5-46

, , 15
1 . 2
. ,
.
,
(1 + RL/RG).
, RL
. ,
.
, ,
.

,
. RL1 RL3
. - .
RL2 .
, , ,
.

5-47

J.

. ,
,
, .



, .

, .

R1 R2.
, ,
.
VEX/2 .



.
, 3 10 .

, -
. , .
,
, , / .



,
, ,
.

/ (remote sensing) .

5-48

/.
,
,
.

.

,
. ,
.

.


. ,

10 / (10 1 ).

,
-. , SCXI
, 2000.

,
,
. ,

. ,
.


.
,
,
. ,
.
.
, ,
.



. ,
5-5 , SCXI-1321.
(RPOT),
. RNULL
, .
5-49

5-5. SCXI-1321


, , .

. ,
SC-2043-SG . SC-2043-SG
, 50
,
10. ,
5 .




.
.

, R.
,
, ,
.

5-50

K.

. (
) NI-DAQ. Strain_Convert
Strain_Buf_Convert. LabVIEW Convert Strain
Gauge Reading, FunctionsNI MeasurementsData
AcquisitionSignal Conditioning.

Vr,
Vr =

VO ( ) VO ( )

VEX
VO() , VO( )
, . VEX
.
(+) () ,
, . () ,
, -
, .
, , :

RG =

GF =

RL =

5-51

5-52

5-5.
:

,
SCXI-1520
.


SCXI-1314
. SCXI .
,
, .

1. .
2. SCXI-1314.
3. SCXI-1314 QTR0, .

, I .
120 ,
. ,
.
SCXI-1314 , ,
5-53

120 .
. 120 .

, , ,
.
4. CH0 SCXI-1314,
.
a. :

S+ S .

RS+ RS (
)
P+ P .
SCA .
SCB (
).
b. P+ CH0.
c. QTR CH0.
d. QTR S+.
e. S+ SCA.
f. P SCA.
.

5-54

5. SCXI-1314 .
6. SCXI-1314 SCXI-1520.
7. .

MAX
1. MAX NI-DAQmx
(Analog Input Strain Channel). Strain.
2. .

3. Device. Calibration
5-55

Strain Gage Calibration.

4. Next.
5. .
Err % Offset Adjustment Gain Adjustment
(with shunt).
6. Calibrate. .
7. Finish.
8. MAX. Strain.

,
,
1. LabVIEW HelpFind Examples
NI Example Finder.
Hardware Input and OutputDAQmxAnalog MeasurementsStrain Acq
Strain Samples (with Calibration).
2. -. DAQmx
Channel Property Node.
3.
.

Physical Channels: SC1Mod1/ai0

Input Limits: High: 0.01, Low: -0.01

Filter Enabled?: TRUE (


Data OperationsChange Value to True.)
5-56

Gauge Factor: .

Nominal Gage Resistance: 120

Strain Configuration: Quarter Bridge I (


, .)

Excitation Voltage: 2.500

Do Strain Null?: TRUE

Do Shunt Cal?: TRUE

Shunt Location: R3

Shunt Resistance: 100000

Measure Actual Excitation?: TRUE

4. .
5.
.
6. . ,
,
, .
7. . .

5-5

5-57

5-6.

:
.
. SCXI .
,
, .

1. .
2. SCXI-1304, SCXI-1327, SCXI-1314 SCXI-1302
.
3.
.
4. .
5. 68-
.
6. MAX. Devices and
InterfacesNI-DAQmx Devices.
7. SCXI-1000 MAX.

5-6

5-58

, SCXI SCC.

, ,
..

,
.

5-59

5-60

6

.

:
A. ()
()
B.
C.
D. ,
E.

6-1

A. ()
()
, DAQ ,
(time-domain).
, .
,
.
(frequencydomain). ,
.
,
, (discrete
Fourier transform DFT).
.
. , ,
, , ,
.

N DAQ
N ,
N ,
.
fs ,
( ) t,

t =

1
fs

x[i], 0 I N 1( N
). ,
N 1

X k = xi e

j 2 ik
N

, k = 0, 1, 2, , N 1,

(6-1)

i =0

( j ) N , (X[k], 0
k N 1) x[i] . ,
6-2

N .
, t,

f =

fs
1
=
N N t

X. f .
( f), N
fs, fs
N.


, X[0] (
) . 6-1,
+1 .
.

+1,
x[0] = x[1] = x[2] = x[3] = 1
6-1
,

exp ( j ) = cos( ) j sin( )


:
N 1

X [0] = xi e

j 2 i 0
N

= x[0] + x[1] + x[3] = 4

i =0



X [1] = x[0] + x[1] cos j sin + x[2] ( cos ( ) j sin ( ) ) +
2
2

3
x[3] cos
2

3
j sin = (1 j 1 + j ) = 0

2
6-3

X [2] = x[0] + x[1](cos( ) j sin( )) + x[2](cos(2 ) j sin(2 )) +


x[3](cos(3 ) j sin(3 )) = (1 1 + 1 1) = 0

3
3
X [3] = x[0] + x[1] cos j sin + x[2] ( cos ( 3 ) j sin ( 3 ) )
2
2

9
9
+ x[3] cos
j sin
= (1 + j 1 j ) = 0
2
2

, X[0], , .
, X[0] N ( ).
N = 4, X[0] = 4. N = 10, X[0] = 10.
X[.] N .
N .


, N N
. .
6-1 , x[i]
, X[k] ,
. ,
. (x[i] ),
, , DAQ ,
N/2 :
X [k ] = X [ N k ] ( X [k ]) = ( X [ N k ])
X[k] , (X[k]) .
, ,
.
.

,
N . -
.
.
. ,

, .
6-4

B. /
t , , (k = 0)
0 , k- (k > 0, k )
f
kt . , f, f = s , ,
N
k- kf .
.
.
N, - ,
k- .


N
.
2
,
X.
, N p =


X[0]
X[1]
X[2]
X[3]
.
.
.
X[p2]
X[p1]
X[p]
X[p+1]
X[p+2]
.
.
.
X[N3]
X[N2]
X[N1]



f
2f
3f
.
.
.
(p2)f
(p1)f
pf ( )
(p1)f
(p2)f
.
.
.
3f
2f
f

p- X[p] .
, , .
, N = 8, p = N/2 = 4,
X[0]DC
X[1] f
X[2]2f
X[3]3f
X[4]4f ( )
X[5]3f
6-5

X[6]2f
X[7] f
X[1] X[7], X[2] X[6], X[3] X[5] .
, X[1], X[2] X[3]
, X[5], X[6] X[7] . ,
X[4] .
N = 8.

,
, , .


, N . p = (N 1)/2.
,
X.

X[0]
X[1]
X[2]
X[3]
.
.
.
X[p1]
X[p]
X[p+1]
X[p+2]
.
.
.



f
2f
3f
.
.
.
(p1)f
pf
pf
(p1)f
.
.
.
6-6

X[N3]
X[N2]
X[N1]

3f
2f
f

N , N/2 . ,
.
N = 7, p = (N1)/2 = (71)/2 = 3,
X[0]DC
X[1] f
X[2]2f
X[3]3f
X[4]3f
X[5]2f
X[6] f
X[1] X[6], X[2] X[5], X[3] X[4] .
X[1], X[2] X[3] , X[4], X[5] X[6] . N , .
N = 7.

,
.


6-1 N
N2 , ,
.
2
N = 2m m = 1, 2, 3,
, , N log2 (N) .
.
6-7

().
, (N) 2.

, .
2 - .
,
,
.


,
2 . ,
,
2 . , 10 .
, 16 (= 24,
). .

,
2, ,
(, f = fs/N), N.

C.
,
.
, . ,
k- (k- /) |X[k]|2.
, ,
. / ,
kf
kf,
.
2

N
X [0] X .
2
2

6-8


/,
, .
, /,
.
,
, , .
,
.


f = fs/N.
N
x[n] Sxx. N , p = .
2
Sxx,
.


Sxx[0]
Sxx[1] = Sxx[N1]
Sxx[2] = Sxx[N2]
Sxx[3] = Sxx[N3]
.
.
.
Sxx[p2] = Sxx[N(p2)]
Sxx[p1] = Sxx[N(p1)]
Sxx[p]


f
2f
3f
.
.
.
(p2)f
(p1)f


2 Vpeak (Vpk) N = 8.

6-9


2
( Vrms
).
2
= 2 ,
2 Vpk, Vrms =
2
2
Vrms
= 2 .
, , .

N , p = (N 1)/2.
Sxx, .

Sxx[0]
Sxx[1] = Sxx[N1]
Sxx[2] = Sxx[N2]
Sxx[3] = Sxx[N3]
.
.
.
Sxx[p2] = Sxx[N(p2)]
Sxx[p1] = Sxx[N(p1)]
Sxx[p]


f
2f
3f
.
.
.
(p2)f
(p1)f
pf

N = 7.

-
- Spectral Measurements ( ), Signal
Analysis, .
.

6-10

(peak), (RMS), (power spectrum)


(power spectral density)
. ,
.

.

6-11

6-1.
:
.

,
, , ,
.
.


1. .
2. -.

-
3. -.

6-12

a. - Simulate Signal,
FunctionsSignal Analysis, -.
.
Configure Simulate Signals ,
.

(1) OK .
(2) - Simulate Signals
error out.
(3) Frequency
6-13

CreateControl .

(4) Amplitude
CreateControl .
b. - Spectral Measurements,
FunctionsSignal Analysis, -.
. Configure
Spectral Measurements ,
.

(1) OK .
(2) - Spectral Measurements
error out.
(3) Power Spectrum
CreateGraph Indicator .
c. Or (),
FunctionsArithmetic&ComparisonExpress Boolean, -.
d. Unbundle by Name,
FunctionsAll FunctionsCluster, -.
(error status).
.
4.

Power

Spectrum
6-14

Express.vi

C:\Exercises\LabVIEW DAQ.

5. .
6. , - Simulate Signal.
.
7. .

6-1

6-15

D.


. /
,
. .
, . ,
, .

-
, .

, .
, , ,
- 0 fs/2. , /,
, ,
.
.
6-1
.
. ,
.
1 2.
3. 2 ,
. ,
2 , ,
( )
.

6-16

6-1. .

6-2
, 1.25.
1.25 . ,
, ,
. 3,
. .
.

6-2.
.

.
, +, .
,
6-17

,
(windowing).
. ,
, .
, .

,
. 6-3,
(Hamming window).
.


. ,
, .

6-3. ,

,
6-1, ,
6-18

, .
.
:


,
.

6-19

E.


.
,
.
, .
.
- Spectral Measurements, :
rectangular ( ), Hanning, Hamming, Blackman-Harris, Exact
Blackman, Blackman, Flat Top, 4 Term B-Harris, 7 Term B-Harris Low Sidelobe.
AnalyzeSignal ProcessingWindows
: Exponential, General Cosine, Cosine Tapered, Force, Kaiser-Bessel Triangle.

Rectangular ()
, ,
.
w[n] = 1.0 n = 0, 1, 2, ..., N 1
N .
,
.
. 6-4 N = 32.

6-4. .

,
. ,

. ,
.

Hanning
(Hanning) , .
:
w[n] = 0.5 0.5 cos(2n/N) n = 0, 1, 2, ..., N 1
6-20

6-5 N = 32.

6-5.

,
, .

Hamming
(Hamming) .
:
w[n] = 0.54 0.46 cos(2n/N) n = 0, 1, 2, ..., N 1
6-6 N = 32.

6-6.

.
, .

BlackmanHarris
- (Blackman-Harris), ,
,
.
-
. :
w[n] = 0.422323 0.49755 cos(2n/N) + 0.07922 cos(4n/N)
6-21

n = 0, 1, 2, ..., N 1
6-7 - N = 32.

6-7. -

Exact Blackman
Exact Blackman -,
.
:
w[n] = [a0 a1 cos(2n/N) + a2 cos(4n/N)]
n = 0, 1, 2, ..., N 1
a0 = 7938/18608
a1 = 9240/18608
a2 = 1430/18608
6-8 Exact Blackman N = 32.

6-8. Exact Blackman

Blackman
Blackman ,
.
6-22

:
w[n] = 0.42 0.5 cos(2n/N) + 0.08 cos(4n/N)
n = 0, 1, 2, ..., N 1
6-9 Blackman N = 32.

6-9. Blackman

Flat Top
(Flat Top) ,
, .
.
:
w[n] = 0.21557895 0.41663158 cos(2n/N) + 0.277263158 cos(4n/N)
0.083578947 cos (6n/N) + 0.006947368 cos (8n/N)
n = 0, 1, 2, ..., N 1
6-10 N = 32.

6-10. .

4 Term B-Harris
4 Term B-Harris -,
.
6-23

:
w[n] = 0.35875 0.48829 cos(2n/N)
+ 0.14128 cos(4n/N) 0.01168 cos(6n/N)
n = 0, 1, 2, ..., N 1
6-11 4 Term B-Harris N = 32.

6-11. 4 Term B-Harris

7 Term B-Harris
7 Term B- -,
.
:
w[n] = 0.27105 0.43329 cos(2n/N) + 0.21812 cos(4n/N)
0.06593 cos(6n/N) + 0.01081 cos(8n/N)
7.7658E-4 cos(10n/N) + 1.3887E 5 cos(12n/N)
n = 0, 1, 2, ..., N 1.
6-12 7 Term B-Harris N = 32.

6-12. 7 Term B-Harris

Low Sidelobe
Low Sidelobe .

6-24

:
w[n] = 0.323215218 0.471492057 cos(2n/N) + 0.17553428 cos(4n/N)
0.028497078 cos(6n/N) + 0.001261367 cos(8n/N)
n = 0, 1, 2, ..., N 1
6-13 Low Sidelobe N = 32.

6-13. Low Sidelobe

6-25

F.
,
. .
,
.

,

,



(
)

( ),
(
)
Kaiser-Bessel

,
.

w[n] = 0.5 0.5


cos(2n/N)

w[n] = 0.54 0.46


cos(2n/N)

w[n] = 0.422323
0.49755 cos(2n/N)
+
0.07922
cos(4n/N)

Blackman

Exact Blackman

w[n] = 7938/18608
9240/18608
cos(2n/N)
+
1430/18608
cos(4n/N)

Blackman

w[n] = 1.0

6-26

,
,

,
,
,
,

Blackman

0.42 0.5 cos(2n/N)


+ 0.08 cos(4n/N)

w[n] = 0.21557895
0.41663158
cos(2n/N)
+
0.277263158
cos(4n/N)

0.083578947
cos(6n/N)
+
0.006947368
cos
(8n/N)
w[n] = 0.35875
0.48829 cos(2n/N)
+
0.14128
cos(4n/N) 0.01168
cos(6n/N)
w[n] = 0.27105
0.43329 cos(2n/N)
+
0.21812
cos(4n/N) 0.06593
cos(6n/N)
+
0.01081 cos(8n/N)
7.7658E-4
cos(10n/N)
+
1.3887E

5
cos(12n/N)
w[n] = 0.323215218

0.471492057
cos(2n/N)
+
0.17553428
cos(4n/N)

0.028497078
cos(6n/N)
+
0.001261367
cos(8n/N)

4 Term B-Harris

7 Term B-Harris

Low Sidelobe

,

,

Blackman

Blackman

6-27

6-2.
: ,
,
.


. ,
.
. ,
, .
,
.


1. .

-
2. -.

6-28

a. - Simulate Signal,
FunctionsSignal Analysis, -. -
, .
Configure Simulate Signals
Samples per Second (Hz) 1000,
Automatic 1000 Number of Samples.
. OK
.
b. - Spectral Measurements,
FunctionsSignal Analysis, -.
. Configure
Spectral Measurements Power Spectrum, Result dB,
None Window ()
Averaging (). OK
.
3.

Window
Comparison.vi

C:\Exercises\LabVIEW DAQ.
4. . ,
0.001,
1.000. ,
70, 60.
,
.
5. ,
( 1)
( 2) ,
. ,
.
.
6. -.
- Spectral Measurements .
6-29

7. .
8. , - Spectral
Measurements. ?
9. .

6-2

6-30

G.
,
. .
,
.
,
. ,
. , ,
(
).

6-31

H.
.
, ,
:
( ) (lowpass)
.
( ) (highpass)
.
() (bandpass) .
(bandstop) .
.

fc, fc.
fc1 fc2,
fc1 fc2. fc, fc1 fc2
.
.
, ,
().
(0 ) ,
. () ,
().
.

,
,
.

6-32


, 10 , 30 50 , , ,
. 20
, 20 40 .
.

6-33

I. ()
(0
) (- ) .
.
.
() (0 ) (- )
.


(0 ) (- ) .
.
.
() (0 )
(- ) . ,
() .
, 0 -3 .
-3 ,
(0.5 , 1 ).


, .

,
. ()
, ,

6-34

.
:
= 20 log10 [ Ao ( f ) / Ai ( f )]
log10 10, Ai ( f ) A0(f)
f .
, 0.02 ,
0,02 = 20 log10 [ A0 ( f ) / Ai ( f )]
A0 ( f ) / Ai ( f ) = 10 0,001 = 0,9977

, .
60 , :
60 = 20 log10 [ A0 ( f ) / Ai ( f )]
A0 ( f ) / Ai ( f ) = 10 3 = 0,001

, 1/1000 .
, ,
.

. ,
.

6-35

J.

,
. x(t), y(t) ,
t .
50 .
,
, .
,
, .

,
.
, , .
:

, ,
.
/ ,
, .
(
) .

.
/.
.

6-36

K.

.
(x[0] =1 x[i] = 0, i 0), .

. ,
.
, . ,
,
, , .


,
().
,
(). ,
, .
,
-
, -
, .
. x[k]
k , , 1 < k < N, N
.
. y[k] k-
y[k] = x[k] + x[k1] + x[k2] + x[k3] + .....+ x[1] (6-2)

, N y[N]. y[k]
k- , y[k-1] (k-1)-, 6-2
y[k] = y[k-1] + x[k]

(6-2b)

8%, 6-2 6-2b


:
y[k] = 1.08x[k] + 1.08x[k-1] + 1.08x[k 2] + 1.08x[k 3] + ... + 1.08x[1] (6-3)
y[k] = y[k-1] + 1.08x[k]

(6-3b)

6-37

, 6-3 6-3b
. , 6-3
, 6-3b
, . 6-3
. 6-3b .


6-3 , , 1.08.
6-3b y[k-1] 1, x[k] 1.08.
.

, .
6-2, 6-2b, 6-3 6-3b, ,
.


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

6-38

L.

,

. x[.], y[.],
, ,
a0 y[i ] + a1 y[i 1] + a 2 y[i 2] + ... + a N y 1 y[i ( N y 1)] =

= b0 x[i ] + b1 x[i 1] + b2 x[i 2] + ... + bN x 1 x[i ( N x 1)]


a0 y[i ] = a1 y[i 1] a2 y[i 2] ... a N y 1 y[i ( N y 1)] +
+ b0 x[i ] + b1 x[i 1] + b2 x[i 2] + ... + bN x 1 x[i ( N x 1)]
N 1
N x 1

1 y
y[i ] = a j y[i j ] + bk x[i k ]
a0 j =1
k =0

(6-4)

Nx (b[k]), Ny (a[j]).
i
(x[i] x[i-k], k0),
, (y[i-j] j0) . Nx Ny,
.
. , LabVlEW,
a0 1.


, , ,
.
, 20-30, ,
, . ,
.
LabVIEW Help.
1 20, 30- .
, , ,
.
, 6-4,
. , ,
, ,
.
.

:

(Butterworth)

(Chebyshev)
6-39

II

(Bessel)


. - Filter,
Frequency Response Function (Mag-Phase)
.


,
. ,
.
. 6-14
.

6-14.

, 0 ( 0),
. ,
, .
, 0 ,
.
,
. 6-14,
, .



-
( ) (
6-40

). ,
, .
.
LabVIEW, ( )
.
(
) ,
,
.
6-15 .
. ,
. ,
.

.6-15.



.
.

II
II,
II , ,

. ( )
. II
() ,
,
. 6-16
II .

6-41

.6-16. II



.
.
,
, .


,
.
( ), ( ).
(
).
() .
,
.
,
. 6-17
.

6-42

.6-17.


.
( ) , ( )
.



, , .
, .
,
.
.
- .

.6-18.

6-43

M.
-
,
().
, .

, LabVIEW,
: , ,
.
. ,
, , ,
, .

,
,
, :
. , , :
,
. -
. , , ,

.
6-44

6-45

N.
:
y[i ] = a1 y[i 1] a2 y[i 2] ... a N y 1 y[i ( N y 1)] +

(6-5)

+ b0 x[i ] + b1 x[i 1] + b2 x[i 2] + ... + bN x 1 x[i ( N x 1)]

Nx

- ,

Ny

, a0 - 1. ,
N x = N y = 2 , :
y[i ] = a1 y[i 1] a2 y[i 2] + b0 x[i ] + b1 x[i 1] + b2 x[i 2]

(6-6)

( i ),
( i 1 i 2 ),
( i ) (
i 1 i 2 ).
, ,
.
( x[i 1] x[i 2] )
( y[i 1] y[i 2] ),
. ,
x[i 1] y[i 1] ,
, x[i 2] y[i 2] .
.
6-6 ,
. ,
, ,
6-6,
.
,
.
( ) . - .
:

,
.

(
), ,
,
. ( )
.

6-46

6-4,

- -
.

Filter ,
.
,
. init/cont
TRUE ( ). .

6-47

6-3.

:

, DAQ
. ,
, DAQ .
.
,
.


1. .
2.
, ,
.
3. Stop.

-
4. -.

a. DAQmx Create Channel,


FunctionsAll FunctionsNI MeasurementsDAQmx - Data Acquisition,
-. .
Analog InputVoltage .
physical channels CreateControl
.
name to assign CreateConstant
. analog in.
6-48

b. DAQmx Timing, FunctionsAll


FunctionsNI MeasurementsDAQmx - Data Acquisition, -.
.
sample mode CreateConstant
. Continuous Samples .
samples per channel
CreateControl .
.
rate CreateControl .
c. DAQmx Start, FunctionsAll
FunctionsNI MeasurementsDAQmx - Data Acquisition, -.

.
d. DAQmx Read, FunctionsAll
FunctionsNI MeasurementsDAQmx - Data Acquisition, -.
, DAQmx Timing.
AnalogSingle ChannelMultiple SamplesWaveform
.
e. - Spectral Measurements,
Functions Signal Analysis, -.
. Configure
Spectral Measurements ,
.

- Spectral Measurements .
6-49

OK .
f. - Filter, Functions Signal
Analysis, -.
.
Configure Filter , .

g. DAQmx Stop Task, FunctionsAll


FunctionsNI MeasurementsDAQmx - Data Acquisition, . .
h. Unbundle by Name,
FunctionsAll FunctionsCluster, -.
status .
i. Merge Errors, FunctionsAll
FunctionsTime & Dialog, -.
.
j. Simple Error Handler,
FunctionsAll FunctionsTime & Dialog, -.
,
.
5.
.

6-50

6. IIR DAQ Filter.vi C:\Exercises\LabVIEW


DAQ.
7. Dev X/ai2,
X DAQ .
10000 10000.
8. 1 2.
2 10 ,
5 .
9. HelpFind Examples NI Example
Hardware
Input
and
Finder,

OutputDAQmxAnalog GenerationVoltage Cont Gen Voltage Wfm-Int


Clk-Variable Rate. ,
100 1.
10. IIR DAQ Filter.
.
,
.
.
.
,
.
. .
6-51

11. .
, .
500 .
. - ,
, .
,
0 5 . ,
.
.
12. 500 Lower FC
400 . : Butterworth
5. - Filter. ,
. ,
. ,
. ,
. 1 20,
30 .
, ,
.
13. ,
.
14. .

6-3

6-52

O.


, ,
,
.
(Finite Impulse Response FIR)
,
,

n 1

yi = hk xi k
k =0

x , y
, h .

. - ,
, .
:
y[i] = b0 x[i] + b1 x[i 1] + b2 x[i 2] + ... + bM 1 x[i ( M 1)]

bQ, b1,..., b-1 .


:

, , ,
.

.
.

.

.
- ,
. ,
,
. , , , .

6-53


.
,

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

, :
.

6-54

()
, ().
,
.

, /
. Power Spectrum,
, .
2
.
Vrms
.

,
.
.
,

.

,
, .


,
, .

,
.


. ,
, .


/ .

,
.
,
init/cont .

- Spectral Measurements Express Filter



.

6-55

6-56

7

.
, ,

:
.
.
.
D.
E.
F.
G.

7-1

.
- - ()
. -
,
. (update
clock).
, .


, .
.
+ 10 .
.


,
. ,
:

= +Vref

= Vref

, +10 ,
10 +10 .
5 +5 , .
,
+5 . 5 +5 ,
,
.


,
.
, :

= +Vref

= 0
7-2

, +10 ,
0 +10 .
0 +5 , .
,
+5 . 0 +5 ,
,
.

7-3

B. DAQmx
DAQmx Write, DAQmx - Data Acquisition,
.
,
, .
DAQmx Write.
.
DAQmx Write.
:

,
(unscaled).
(single sample)
(multiple samples).
: (waveform)
(DBL).

.
auto start
. ,
.
auto start .
,
DAQmx Timing, DAQmx Start
Task DAQmx Stop Task. DAQmx
,
.


, , ,
. ,
.
,
.

,
, ,
.
, .

,
7-4

DAQ , .
,
.
. ,
, .



DAQmx Timing / DAQmx Sample Timing.
Sample Clock Timing Sample
Timing Type Sample Clock, DAQmx,
(Sample Clock) DAQ .
Sample Timing Type
On Demand. DAQmx
Timing DAQmx Sample Timing Type,
.
, DAQmx Timing Use Waveform
.
dt, ( ) .

. , Use Waveform DAQmx Timing
,
. ,
DAQmx Write.

7-5

7-1.
: , + 5
DAQ
.
. ,

.
.

1. 0 1.
2. -.
CreateControl
CreateConstant .

a. DAQmx Create Virtual Channel,


FunctionsAll FunctionsNI MeasurementsDAQmx Data Acquisition,
-.
. Analog
OutputVoltage . motor.
b. DAQmx Write, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition, . ,
, .
AnalogSingle ChannelSingle SampleDBL.
,
auto start . DAQmx
Write Start/Stop Task.
.
c. Simple Error Handler,
FunctionsAll FunctionsTime & Dialog, .
, .
3. :

: Dev X/ao0, X DAQ .

: 5

4. Servo Fan.vi C:\Exercises\LabVIEW DAQ.


7-6

5. . DAQ +5
0 .
, .
6. Voltmeter, C:\Exercises\LabVIEW DAQ.
7. :
: Dev X/ai1, X DAQ .
8. Voltmeter. +5
.
9. .

7-1

7-7

7-2.

: .
Servo Fan, 71, .
.
1. 0 1.
2. Servo Fan, C:\Exercises\LabVIEW DAQ.
3. FileSave As Variable Servo Fan.vi
C:\Exercises\LabVIEW DAQ.
4.
, ControlsNumeric Controls,
Replace
. (Slide) Numeric
Controls. .

-
5. -, .

a. DAQmx Start Task, FunctionsAll


FunctionsNI MeasurementsDAQmx - Data Acquisition, -.
. Start Task,
auto start .
b. DAQmx Stop Task, FunctionsAll
FunctionsNI MeasurementsDAQmx - Data Acquisition, -.
.
6. .

7-8

7. .
8. Continuous Acquire with MIO,
C:\Exercises\LabVIEW DAQ.
:

: Dev
.

# : 1000

: 1000

X/ai1, X

DAQ

9. Continuous Acquire with MIO.


10. Variable Servo Fan
:
: Dev X/ao0, X DAQ .
11. Variable Servo Fan.
, .
12. .

7-2

7-9

C.

DAQmx Write multiple samples.
, ,
.
.
.
:
1. . LabVIEW
DAQ .

.
2. .
. ,
.
,
, .
, ,
. ,
.
, .

7-10

D.

-
.


(Sample Clock)
.


.
.

7-11




.
DAQmx Timing ,
data DAQmx Write. , ,
, .

Create Virtual Channel.
MAX,
/ DAQmx Timing.
DAQmx Timing ,
, (Sample Clock)
(Use Waveform).
, sample mode Finite Samples .
(Sample Clock)
rate number of samples.
. Use Waveform
waveform.
( )
, .
DAQmx Write
.
. Use Waveform DAQmx
Timing DAQmx
Write. ,
, data DAQmx Write.
(Sample Clock) ,
DAQmx Write . ,
, ,
data DAQmx Write.
auto start
. ,
, auto start .
DAQmx Start . DAQmx Wait Until Done
, .
7-12

DAQmx Stop Task, . ,


LabVIEW ,
, .

DAQmx Reset

,
,
DAQmx Reset ( DAQmx - Data AcquisitionDAQmx Device
Configuration), .
, ,
, .
, , ,
.
,
. AO Write One Update,
Utility.


(update rate)
, .
.

:
= [() ( )]/(- )
, ()
. ,
1000 , .
1 ,

[(1 ) (1000 )]/(1000 ) = 1
, ,
7-13

:
[(1 ) (2000 )]/(1000 ) = 2
, ,
:
[(2 ) (1000 )]/(1000 ) = 2
,
.

7-14

7-3.

: .
.

.
, 7-4.
, WAV
DAQ .
1. 0
. GND
. .
2. .

-
3. -, .

a. File Dialog, FunctionsAll


FunctionsFile I/OAdvanced File I/O Functions, -.
.
WAV ,
pattern CreateConstant .
*.wav WAV .
b. Snd Read Wave File, FunctionsAll
FunctionsGraphics & SoundSoundSound File, -.
(.wav),
, . ,
WAV , .
mono 16-bit.
c.

FunctionsArithmetic & ComparisonExpress Numeric, -.


16- (216 =
65536) , -1 1.
d. Array Size, FunctionsAll
FunctionsArray -.
7-15

, WAV .
( ),
DAQmx Timing.
e. DAQmx Create Virtual Channel,
FunctionsAll FunctionsNI MeasurementsDAQmx Data Acquisition
-.
.
Analog OutputVoltage.
physical channels CreateControl
.
f. DAQmx Timing, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition -.
.
rate CreateConstant
. WAV 44100 ,
rate 44100.
g. DAQmx Write, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition -.

.

AnalogSingle ChannelMultiple Samples1D DBL.
h. DAQmx Start Task, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition -.
.
i. DAQmx Wait Until Done,
FunctionsAll FunctionsNI MeasurementsDAQmx Data Acquisition
-. .
j. DAQmx Stop Task, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition -.
.
k. Simple Error Handler,
FunctionsAll Functions Time & Dialog -.

.


4. Dev X/ao0, X
DAQ .
5.
C:\Exercises\LabVIEW DAQ.

Tone

Generation

(7-3).vi

6. .
7. . , WAV .
NISoundFile.wav, C:\Exercises\LabVIEW DAQ.
WAV .
8. .

7-3
7-16


7-4
().

: .
. ,

.
,
( 20 16 )
.
1. 0 1.


2. Tone Generation (7-4),
C:\Exercises\LabVIEW DAQ. .

-
3. -.

7-17

a. DAQmx Create Virtual Channel,


FunctionsAll FunctionsNI MeasurementsDAQmx Data Acquisition
-.
.
Analog OutputVoltage.
physical channels CreateControl
.
b. Sine Waveform, FunctionsAll
FunctionsWaveformWaveform Generation, -.
.
c. DAQmx Timing, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition -.
.
d. DAQmx Write, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition -.

.

AnalogSingle ChannelMultiple SamplesWaveform.
e. DAQmx Start Task, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition -.
.
f. DAQmx Wait Until Done,
FunctionsAll FunctionsNI MeasurementsDAQmx Data Acquisition
-. .
g. DAQmx Stop Task, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition -.
.
h. Simple Error Handler,
FunctionsAll Functions Time & Dialog -.

.
4. .
5. Continuous Acquire with MIO,
C:\Exercises\LabVIEW DAQ. ,
Tone Generation (7-4).
6.
Continuous Acquire with MIO:

: Dev

# : 5000

: 10000

X/ai1, X

c DAQ

7. Continuous Acquire with MIO.


8. Tone Generation (7-4)
7-18

: Dev X/ao0, X DAQ

: 1

: 10000


Fs: 100000 ,
Sine Waveform.
#s: 100000 , Sine
Waveform.

9. Tone Generation (7-4). .


1 ,
.
10. Tone Generation (7-4),
:

: 10


Fs: 1000
#s: 1000

11. Tone Generation (7-4) .


12. .

7-4

7-19

E.



.
, , .

.

,
:

DAQmx Timing Continuous Samples.

DAQmx Wait Until Done DAQmx Is


Task Done.

7-20


Create Virtual Channel Timing.
DAQmx Write, DAQmx Start Task .
DAQmx Is Task Done
.
, . ,
, .
DAQmx Stop Task ,
, .
.

. Write
. Write
property node, Regeneration Mode
dont Allow Regeneration. ,

.
. ,
,
.

7-21

7-5.
.
: .
.
() . ,
7-6.
,
WAV DAQ .
1. 0
. GND
. .
2. Tone Generation (7-3), 7-3.
3. Continuous Tone Generation (7-5).vi
C:\Exercises\LabVIEW DAQ.

-
4. -, .

a. DAQmx Is Task Done,


FunctionsAll
FunctionsNI
MeasurementsDAQmx

Data
AcquisitionDAQmx Advanced Task Options -.

.

, STOP.
5.
Dev X/ao0, X DAQ .
6. .
7. . , WAV .
7-22

NISoundFile.wav, C:\Exercises\LabVIEW DAQ.

8. WAV . STOP
.
9. .

7-5

7-23

7-6 ().
.
:
.

. 7-5 ,

.

, .
1. 0 1.


2. Tone Generation (7-4), 7-4.
, .

-
3. -, .

7-24

a. DAQmx Create Virtual Channel,


FunctionsAll FunctionsNI MeasurementsDAQmx Data Acquisition
-.
.
Analog OutputVoltage.
physical channels CreateControl
.
b. Sine Waveform, FunctionsAll
FunctionsWaveformWaveform Generation, -.
. .
Sine Waveform
Frequency. Sine Waveform
1/2 Frequency.
, , .
DAQmx Write .
c.

FunctionsArithmetic & ComparisonExpress Numeric, -.


y
CreateConstant .
d. Append Waveforms,
FunctionsAll FunctionsWaveformWaveform Operations . B A.
,
.
e. DAQmx Timing, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition -.
.
f. DAQmx Write, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition -.

.

AnalogSingle ChannelMultiple SamplesWaveform.
g. DAQmx Start Task, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition -.
.
h. DAQmx Is Task Done,
FunctionsAll
FunctionsNI
MeasurementsDAQmx

Data
AcquisitionDAQmx Advanced Task Options -.

.

, STOP.
i. DAQmx Stop Task, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition -.
.
j. Simple Error Handler,
FunctionsAll Functions Time & Dialog -.

.
4. Siren.vi C:\Exercises\LabVIEW DAQ.
7-25

5. Continuous Acquire with MIO,


C:\Exercises\LabVIEW DAQ, ,
Siren.
6.
Continuous Acquire with MIO:

: Dev

# : 10000

: 10000

X/ai1, X

c DAQ

7. Continuous Acquire with MIO.


8. Siren
:

: Dev X/ao0, X DAQ

: 1

: 1000


Fs: 10000
#s: 500
#s , Sine Waveform.
Buffer Size,
. #s, 1000, Sine
Waveform 1000 , ,
Sine Waveform.

9. .
0 ,
.
10. .

7-6

7-26


7-7.


: .

7-5 ,
.
.
() . ,
7-8.
1. 0
. GND
. .
2. Continuous Tone Generation (7-5), 7-5.
3. File Save As Triggered
Continuous Tone Generation Option A.vi C:\Exercises\LabVIEW
DAQ.

-
4. -, .

a. DAQmx Trigger, FunctionsAll


FunctionsNI MeasurementsDAQmx - Data Acquisition, -.
.
5. .
6.
Dev X/ao0, X DAQ .
7. .
8. . , WAV .
NISoundFile.wav, C:\Exercises\LabVIEW DAQ.
7-27

9. Digital Trigger . ,
, . ,
, , .
WAV .
10. STOP .
11. .

7-7

7-28

7-8 ().
.
:
.
. 7-7 ,

.
,
. , ,
.
.
. Digital Trigger PFI0 (

-) EXTTRIG ( Lab/1200) DAQ


. ,
, .
1. 0 1 .
2. Siren, 7-6,
Triggered Siren.vi C:\Exercises\LabVIEW DAQ.
3. . -, .

a. DAQmx Trigger, FunctionsAll


FunctionsNI MeasurementsDAQmx - Data Acquisition, -.
.
4. .
5. Continuous Acquire with MIO,
C:\Exercises\LabVIEW DAQ, .

6.
Continuous Acquire with MIO:

: Dev

X/ai1, X

7-29

c DAQ

# : 10000

: 10000

7. Continuous Acquire with MIO.


8. Triggered Siren
:

: Dev X/ao0, X DAQ

: 1

: 1000


Fs: 10000
#s: 500

(): /Dev X/PFI0, X DAQ

: Rising

9. Triggered Siren. Continuous Acquire


with MIO , Triggered Siren
.
10. Digital Trigger . ,
.
, .

7-8

7-30

DAQmx

,

,
.

(update rate)
, .


, Use Waveform DAQmx
Timing.

7-31

7-32

8
/

, /.

:
A. ()
B. /
C. /
D.

8-1

A. ()
DAQ
. ,
.
0 +0.8 .
+2 +5 . +0.8 +2.0
.

, ,
, +0.8
+2.0 .

/

/.

(Bit) , .
, 1 0.

(Line) .
, ,
, , .
. , 8 , , .

(Port) . 4-
8- . DAQ 4- ,
- 8- .
LabVIEW .

(Port Width) . , .
.

() (Mask) , .
, , ,
.

8-2

NI-DAQmx

NI-DAQmx
. X DAQ
, Y , A B
DAQ .

Dev X/Port Y

Dev X/Port Y/LineA

Dev X/Port Y/LineA:B. (


) , .
( )
Dev X/Port Y/LineA, Dev X/Port Y/LineB.
.

8-3

B. /
/ NI-DAQmx
digital DAQmx Read DAQmx Write.
/
DAQmx Timing DAQmx Triggering.
DAQmx Create Virtual Channel.

DAQmx Create Virtual Channel


,
Digital Input Digital Output DAQmx Create Virtual Channel.
, ,
. line grouping, ,
.
.

DAQmx Read
DAQmx Read .
,
, , - ,
.
digital .

(single channel)
(multiple channels). line grouping one channel for all lines (
), single channel
. line grouping one channel
for each line ( ),
multiple channels.
.
(-) ,
. (Boolean)
( ) (1D Boolean).
8- (U8)
32- (U32).
, ,
, .
U8 U32,
Number to Boolean Array, NumericConversion,
.
8-4

DAQmx Write
DAQmx Write .
,
, ( ),
.
digital DAQmx Write.


,
DAQmx Read .
auto start DAQmx Write
.
DAQmx Start Task DAQmx Stop Task,
auto start .
.

DAQmx Timing
(handshaking) DAQmx Timing
/
()
. ,
/ .
. .

,
. -
,
8255.

DAQmx Trigger
DAQmx Trigger
/.
. /
, /.
4,
.

8-5

8-1.
: LabVIEW
,
.


1. DAQmx Task .
2. DAQmx Task New
Task (DAQ Assistant) .
3. :

Measurement Type: Digital I/O

Digital I/O Type: Port Output

Name: Digital Output

4. Test.
.
0 +5
. ,
.
5. OK. Settings Invert Line.
6. Test.
,
0 .
7. OK .
,
.

-
8. - .

8-6

a. DAQmx Start Task, FunctionsAll


FunctionsNI MeasurementsDAQmx - Data Acquisition, . .
b. DAQmx Write, FunctionsAll
FunctionsNI MeasurementsDAQmx - Data Acquisition, .
: DigitalMultiple ChannelsSingle Sample1D Boolean.

, .
data CreateControl
.
c. DAQmx Clear Task,
FunctionsAll FunctionsNI MeasurementsDAQmx - Data Acquisition,
-. ,
.
d. Simple Error Handler,
FunctionsAll FunctionsTime & Dialog, -.
,
.
e. Unbundle By Name,
Functions All FunctionsCluster, -.
f. Or, FunctionsArithmetic
&
ComparisonExpress Boolean, -.
9. Digital Writer.vi C:\Exercises\LabVIEW
DAQ.
10. .
.
. , .
.
11. .
.
12. STOP .
13. .

8-1
8-7

8-2.

:
.
,
DAQmx Read.


1. .

, DAQmx Physical Channel,


-
CreateControl .

-
2. -.

a. DAQmx Create Virtual Channel,


FunctionsAll FunctionsNI MeasurementsDAQmx Data Acquisition,
-. .
Digital Input .
line grouping
CreateConstant .
b. DAQmx Start Task, FunctionsAll
FunctionsNI MeasurementsDAQmx - Data Acquisition, -.
.
c. DAQmx Read, FunctionsAll
8-8

FunctionsNI MeasurementsDAQmx - Data Acquisition, -.


DigitalSingle ChannelSingle SampleBoolean
.
data CreateIndicator .
d. DAQmx Clear Task, FunctionsAll
FunctionsNI MeasurementsDAQmx - Data Acquisition, -.
, .
e. Simple Error Handler,
FunctionsAll FunctionsTime & Dialog, -.
,
.
f. Unbundle By Name,
Functions All FunctionsCluster, -.
g. Or, FunctionsArithmetic &
ComparisonExpress Boolean, -.
3. Digital Reader.vi C:\Exercises\LabVIEW
DAQ.

4. Dev
DAQ .

X/port0/line6, X

5. .
6. (quadrature encoder)
.
. .
7. , 0.
. ,

, 0 7,
DAQmx Read.
8. .
?
9. .

8-2

8-9

DAQ - :
.
/.
.

DAQ - ,
.

0 +0.8
(logic low), +2 +5
(logic high). +0.8 +2
.

()
/,
DAQ , DIO-6533.


DAQmx Read DAQmx Write.

8-10

8-11

DAQ
. ,
, , , ,
.
DAQmx , .

:
A.
B.
C.
D.
E.
F.

9-1

A.
.
:
0 0.8 = (logic low)
2 5 = (logic high)
/ = 50

/
.
, .
(
) (
).
,
, , / .
/ ,
. , ,
, 50 .

,
.
.
. - DAQSTC, 10
.
, - DAQ ,
.

, , ,
.

9-2

(Count Register) .
.

(Source)
, .
. , ,
.
. ,
. ,
.
.

(Gate) ,
(Source) . ,
,
.
.
/,

.

(Out) , -,
. .


, /
.
PFI (Programmable Function Input
) .
.
PFI .
,
. , 68-
PFI9 0,
.
. ,
3
.

,
.

(Terminal Count) ,
0. , , ,
, , .
9-3

0.

(Resolution)
, .
, :
= 2 1
16, 24 32
.

(Timebase) , DAQ
. 100
80 . DAQ ,
.

9-4

B.
DAQ
DAQ-STC NI-TIO.

DAQ-STC
DAQ-STC 24- , National
Instruments .
-. DAQ-STC ,
, ,
100 20 .
DAQ-STC
National Instruments.
DAQ-STC.

NI-TIO
NI-TIO ,
National Instruments. NI-TIO 32- ,
DAQ-STC. NI-TIO ,
,
; ,
100 , 20 80 . NI-TIO
660x.
.

DAQ-STC.

9-5

C.
/
DAQmx Read.
counter DAQmx Read.
, DAQmx Write .
DAQmx
Create Virtual Channel, DAQmx Timing DAQmx Triggering.

DAQmx Create Virtual Channel



Counter Input Counter Output DAQmx Create Virtual Channel.
(Counter Input) , ,
, .
(Counter Output)
, (frequency), (time)
(ticks) .

DAQmx Read

counter DAQmx Read.
,
.

(single sample) (multiple samples)


. :
(floating-point)
32- (U32). multiple samples 1D
1D 32-
.

DAQmx Timing
Sample Clock Implicit
DAQmx Timing. Sample Clock
. Implicit
.
Implicit DAQmx Timing
.

9-6

DAQmx Trigger
DAQmx Trigger.
.
,
.
DAQmx Trigger Property Node .
4, .

9-7

D.

.
.
.



.
.
.
.

.
,
, . .
.
.
(Source)
.

:
= ( ) ( )
= 1/

, .

9-8


,
, .

LabVIEW.
.
, .

, ,
. ,
. ,
24- :
2 1 = 224 1 = 16777215
16777215,
.
0.

9-9

9-1. .
: , .
, .


1. . .

-
2. -.

a. DAQmx Create Virtual Channel,


FunctionsAll FunctionsNI MeasurementsDAQmx Data Acquisition,
-. .
Counter InputCount Edges .
count direction,
initial count counter inputs CreateControl
.
b. DAQmx Start Task, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition, -.
.
c. DAQmx Read, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition, -.
CounterSingle SampleDBL

.
9-10

data CreateIndicator
.
d. DAQmx Stop Task, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition, -.
.
e. Wait Until Next ms Multiple,
FunctionsAll FunctionsTime & Dialog, -.
f. Unbundle by Name,
FunctionsAll FunctionsCluster, -.
g. Or, FunctionsArithmetic &
ComparisonExpress Boolean, -.
h. Simple Error Handler,
FunctionsAll FunctionsTime & Dialog, -.
3.

Simple

Edge

Counting.vi

C:\Exercises\LabVIEW DAQ.

4. A (quadrature encoder)
(Counter 0 Source)
E-.
5. :

: Dev X/ctr0, X DAQ

: 0

: Count Up

6. . (quadrature encoder)
. .
, 0.
7. .

9-1

9-11

E.

NI-DAQmx
.
( ),
.


, ,
/ .
, (gate)
, ,
DAQmx Trigger property node.



. ,
, (Gate)
. .


, .

. , DMA (
DAQmx Channel Property node),
PCI.


, , ,
. ,
DAQmx Timing .

9-12

9-2.
.
:
.


( )
(gate).

, (
).
1.

Simple

Edge

Counting,

C:\Exercises\LabVIEW DAQ.

2. FileSave As Simple Edge Counting Gated.vi C:\Exercises\LabVIEW DAQ.


3. -, .

a. DAQmx Trigger Property Node,

FunctionsAll
FunctionsNI
MeasurementsDAQmx Data Acquisition, -.

. , .

:
PropertiesMorePauseTrigger Type
PropertiesMorePauseDigital LevelSource
PropertiesMorePauseDigital LevelPause When
b.
CreateControl .
4.
:
9-13

: Digital

: /Dev X/PFI0, X DAQ . PFI0


.

, : Low

5. . .
, . ,
,
.
6.
, : High.
7. .
8. .



,
. DAQmx Timing
Simple Edge Counting.
1.

Simple

Edge

Counting,

C:\Exercises\LabVIEW DAQ.

2. FileSave As Simple Edge Counting - Cont


Buffered.vi C:\Exercises\LabVIEW DAQ.
3. -, DAQmx Timing,
.

4.
:

9-14

: /Dev X/PFI0, X DAQ

: Rising

: 10000

5. .
.
, .
, .
6. .



. , .
1.

Simple

Edge

Counting,

C:\Exercises\LabVIEW DAQ.

2. FileSave As Simple Edge Counting - Finite


Buffered.vi C:\Exercises\LabVIEW DAQ.
3. -, .

a.
Remove While Loop .
b. DAQmx Channel Property Node,

FunctionsAll
FunctionsNI
MeasurementsDAQmx Data Acquisition, -.

.
PropertiesCounter InputCount EdgesInput
Terminal .
CreateConstant
20 MHz Timebase
DAQ .
,
9-15

(timebase).
c. DAQmx Clear Task,
FunctionsAll FunctionsNI MeasurementsDAQmx - Data
Acquisition, -. ,
.
4.
:

# : 1000

: 1000

: /Dev X/PFI9, X DAQ . PFI9


, (Gate) 0.

5. (Gate)
0.
6. . , ,
,
.
7. .

9-2

9-16

F.
, .
.
, , .

, .

. ,
. , ,

.


, .
: (delay) (width).
, .
.
, ,
.
.
, . ,
, .
, ,
, , .
, ,
, .
,
, , .
, , (duty cycle).
. ,
0 1. . ,
, , 0.5 50%.
9-17

50% ,
, 50%,
.

9-18

9-3. .
: ,
.
.
,
, ,
.

-
1. -.

a. DAQmx Create Virtual Channel,


FunctionsAll FunctionsNI MeasurementsDAQmx Data Acquisition,
-. .
Counter OutputPulse GenerationFrequency
.
duty cycle, frequency, counter, idle
state initial delay CreateControl .
b. DAQmx Start Task, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition, -.
.
c. DAQmx Wait Until Done,
FunctionsAll FunctionsNI MeasurementsDAQmx Data Acquisition,
-. .
, ,
, .
timeout
CreateConstant .
10 .
d. DAQmx Stop Task, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition, -.
.
2.

C:\Exercises\LabVIEW DAQ.

Single

Pulse

9-19

Generation.vi

3. :

: /Dev X/ctr1, X DAQ

: 0.5

: 0.5

: Low

: 0.25

4. 1 source 0 1
.
5. Continuous Acquire with MIO,
C:\Exercises\LabVIEW DAQ.
6. Continuous Acquire with MIO
:

: Dev

# : 1000

: 10000

X/ai1, X

DAQ

7. Continuous Acquire with MIO.


8. Single Pulse Generation. ,
Continuous Acquire with MIO. ,
, , .
.
Y. ,
( ) AutoScale Y
, .
-2 6.

9. Continuous Acquire with MIO.


10.

Simple

Edge

Counting,

C:\Exercises\LabVIEW DAQ.

11. /Dev X/ctr0, X


DAQ .
12. Simple Edge Counting.
13. Single Pulse Generation ,
9-20

Simple Edge Counting .


14. . .

9-3

9-21

9-4.

:
Single Pulse Generation
.
1.

Single

Pulse

Generation,

C:\Exercises\LabVIEW DAQ.

-
2. -, .

a. DAQmx Timing, FunctionsAll


FunctionsNI MeasurementsDAQmx - Data Acquisition, -.
Implicit ,
.
(Implicit)
,
.
b. DAQmx Is Task Done,
FunctionsAll
FunctionsNI MeasurementsDAQmx - Data AcquisitionDAQmx Advanced
Task Options, -. .
,
, .
3. :

: /Dev X/ctr1, X c DAQ .

: 0.5

: 0.5

9-22

: Low

: 0.25

4. 1 1 .
5. FileSave As Pulse Train Generator.vi
C:\Exercises\LabVIEW DAQ.
6. Continuous Acquire with MIO,
C:\Exercises\LabVIEW DAQ.

7. Continuous Acquire with MIO


:

: Dev

# : 1000

: 10000

X/ai1, X

DAQ

8. Continuous Acquire with MIO.


9. Pulse Train Generator.
Continuous Acquire with MIO.
10. Pulse Train Generator.

9-4

9-23

9-5.

:
.

, .


. Pulse Train Generator
.
1.

Pulse

Train

Generator,

C:\Exercises\LabVIEW DAQ.

2. FileSave As Retriggerable Pulse Train.vi


C:\Exercises\LabVIEW DAQ.

-
3. -, .

a. DAQmx Timing,
FunctionsAll
FunctionsNI
MeasurementsDAQmx
Data
Acquisition, -.
Implicit. sample mode Finite
Samples. samples per
channel CreateControl.
b. DAQmx Trigger,
FunctionsAll
FunctionsNI
MeasurementsDAQmx
Data
Acquisition, -.
.
source CreateConstant .
Dev X/PFI0, X
DAQ .
c. DAQmx Trigger Property Node,

FunctionsAll
FunctionsNI
MeasurementsDAQmx - Data Acquisition, -.

9-24

.
PropertiesStartMoreRetriggerable
.
CreateConstant .
True,
.
4.
:

: Dev X/ctr0, X DAQ

: 0.5

: 5

: Low

: 0

# : 5

5. 0 1 .
6. MAX NI-DAQmx .
Analog Input .
Acquisition Mode Continuous, Rate
50.00 # Points to Read 50.
7. .
.
.
# .
8. .
, ,
.
9. . MAX.
10. .

9-5

9-25

G.

(Gate), (Source)
. .

, .


.
, .
, ,
, .
,
(Gate).


.

. ,
.
,
.

9-26

.
,
. , 100 .
:
= - (1/ )
100
:
= 4 (1/100000) = 0.04


,
.
:
= - (1/ (2 ))
100
:
= 4 (1/200000) = 0.02


.
, .

.
, ,
.
, .

:
= - (1/ )
100
= 2 (1/100,000) = 0.02
0.02 ,
50%.

9-27

9-6. ,
.
: ,
.
1. -.


2. -

3.

C:\Exercises\LabVIEW DAQ.

Signal

Measurements.vi

4. 0 (Out 0) 1 (Gate 1)
.
5.

Single

Pulse

Generation,

C:\Exercises\LabVIEW DAQ.

6. Single Pulse Generation


:

: Dev X/ctr0, X DAQ

: 0.5

: 1

: Low

: 0.5

7. Signal Measurements
:
: Dev X/ctr1, X DAQ

: Rising
9-28

: 0.001000

: 0.000001
.
. ,

. .

8. Signal Measurements.
9. Single Pulse Generation.
, Signal Measurements 0.5
, Single Pulse Generation.


1. Single Pulse Generation Pulse Train Generator,
9-4.
2. Signal Measurements (Period)
(Pulse Width). Measurement Time
, 0.05.
3. Pulse Train Generator
:

: /Dev X/ctr0, X DAQ

: 0.5

: 2

: Low

: 0.25

4. Pulse Train Generator.


5. Signal Measurements. ,
0.5 .
6. Pulse Train Generator.


1. Signal Measurements (semi period)
(Period).

9-29

2. Pulse Train Generator, ,


.
3. Signal Measurements. 0.25 .
4. Pulse Train Generator.
5. Signal Measurements.
6. .

9-6

9-30

H.

.
. ,
.
,

, .

.
, .

.
,
, .



, . ,

20 , . ,
5 ,
. ,
,
.

,
.
, .
. , ,
. ,
,
.
1 ,
, 1%
.
9-31

33% 20% , ,
, .
,
50 5 .

50
50
5

400
4

:
+1
401
5

:
-1
399
3

+1

49,88
4

-1

50,13
6,67

NI-DAQmx Low Frequency with 1 Counter (


)


,
. 1 , ,
. 1
0, .
0,
1. ,
1, , , 1,
. , 0 10 ,
0.1 . 100
, 1, , (100
1)/0.1 1000 10 . NI-DAQmx High Frequency with 2
Counters ( ).


,
, ( 0)
, , ( 1),
.
, 0
1.
,
.
, , 0
5 5. ,
,
10
( 10). 1
20
. 1 100
, , ,
5 (50 100 ). ,
9-32

, , 0 0.5
2 .
,
F = ( 1 + 2) /(#
1)
,
F = (5 + 5) 20000000/(100 1)
F = 200000000/101 200000000/99
F = 1,980,198 2,020,202
NI-DAQmx Large Range with 2 Counters (
).

9-33

9-7.
: .

, .
1.
(Gate) 1.
2. -.


3. -.

a. DAQmx Create Virtual


Channel: measurement method, minimum value, maximum value, counter, starting
edge, measurement time divisor CreateControl .
b. DAQmx Read CounterSingle SampleDouble
. data
CreateIndicator .
4.

C:\Exercises\LabVIEW DAQ.

Frequency

Measurements.vi

5. :

: Dev X/ctr1, X DAQ

: 2

: 10000

: 4
9-34

: Rising

: 1

6. Frequency
Range 100 Hz 10 kHz.
. 100 .
7. . 100 .
8. ,
.


9. 1.
Source 1.
10. High Frequency with
2 Counters. 0.001.
1000000.
11. Frequency
Range 13 kHz 1 MHz.
.
12. . 1 .
13. ,
.


14. Large Range with 2
Counters. 5.
15. Frequency
Range 13 kHz 1 MHz.
.
16. . 1 .
17. ,
.

9-7

9-35

I.
(quadrature encoder)
, .
, ,
.
.
NI-TIO .
Am9513 DAQ-STC,
.
,
, NI-TIO.


,
.
.


. .
( ) . ,
, .
.
,
.

, .
.
. ( )
,
9-36

.
, .
, .
24
.


,
. ,
.
(Channel A) (Channel B).
90 , .
.
, .
, .

,
. ,
, NI
. ,
, ,
.
.


DAQ-STC
,
(up/down line). 0 DIO6
, 1 DIO7 (..
9-37

). ,
.
,
. , ,
.

DAQ-STC
DAQ-STC

(Source)

/.(Up/Down Line). Source ,


/.
, DIO6,
.
.
, , ,
.
, . ,
, ,
. ,
, . ,
, .
,
.
- Using Quadrature Encoders
with E Series DAQ Boards /
DAQ-STC .

9-38

9-8.
: ,

.
1. 0
.
. 0

DIO6. DIO6.
0 .
2.

Quadrature

Encoder,

C:\Exercises\LabVIEW DAQ.

3. -, .

Externally Controlled.
STC port0/line6 0.


4. Dev X/ctr0,
X DAQ .
5. .
, , .
,
. ,
, 16777215 (= 224 1).
, 1, 2, ...,
.

0/ 6 ,
. 0/ 6
,
1.
9-39

, .
0/ 6. ,
,
, 1
.

- ,
.

,
, . ,
, , 1.
, . ,
,
.
6. .
(- 16777215),
.
7. .

9-8

9-40

: , ,
.

NI :
DAQ-STC (24-bit) E-
NI-TIO (32-bit) 660x

,
Easy Counter.

,
, 90 .

9-41

9-42

10


,
DAQ .

:
A.
B.
C.

10-1

A.

NI-DAQmx
.
. ,
,
. DAQmx Start, DAQmx Stop DAQmx
Control Task .
, DAQmx Control Task,
NI-DAQmx .
, , ,
.

Unverified () ,
.
, .

Verified ()
,
. ,
. .
DAQmx Control Task action
() (verify).

Reserved () ,
, ,
.
, .
,
.
,
.
. DAQmx Control Task
action () (reserve).

Committed () ,
, .

.
. , ,
.
DAQmx Control Task action () (commit).
,
.
DAQmx Control Task action ()
Unreserve. ,
.

Running () ,
10-2

.
, DAQmx Start. ,
.
, ,
, DAQmx Read,
,
. ,
, .
,
DAQmx Stop.
. - ,
, .
.




. ,
.

Verify ,
, ,
, , , ,
.

Reserve :
,
, ,
,
10-3

.
,
,
. , ,
, ,
, ,

.

Commit ,
, .
,
, .
, ,
, . ,

, , ,
, .
,
, , .

Start ,
. ,

. ,
.
, .
, ,
, . ,
, ,
, .

10-4

10-1.
.
:
NI-DAQmx
,
.
, , ,
.

-
1. -:

a. - Prompt User for Input,


FunctionsInput, -. ,
,
. Configure Prompt
User for Input, , .

10-5

b. DAQmx Create Virtual Channel,


FunctionsAll FunctionsNI MeasurementsDAQmx Data Acquisition,
-. .
Analog InputVoltage.
physical channel CreateConstant
. Dev X/ai1, X
DAQ .
c. DAQmx Control Task,
FunctionsAll FunctionsNI MeasurementsDAQmx Data Acquisition,
-. ,
action. action
CreateConstant .
verify ,
.
d. Simple Error Handler,
FunctionsAll FunctionsTime & Dialog, -.
2. . ,
. 5 10
. OK.
3. ,
.
.
4.
. .
5. -.

10-6

6. 1 .
7. .
8. .

9. , , ,
.
10. .
11.

C:\Exercises\LabVIEW DAQ.

Explicit

12. .

10-1

10-7

Transitions.vi

B.


.
,
.
. ,
,
.
, .
, , ,
. ,
.
, ,
,
, .

. , ,
, , ,
, .



.

PFI RTSI. RTSI
RTSI .
-
.


PFI RTSI,
10-8

AI Start Trigger. AI Start Trigger ,


,
. , ,
,
. , , ,
MIO. .

,
PFI0, DAQmx
Trigger. DAQmx Trigger
AI Start Trigger. ,
, ,
AI Start Trigger,
.
:
, .
, , AI
Start Trigger.
/.

,
.
/ .
10-9

10-2.

:
.

, .
DAQmx Timing AI Start Trigger.

I

1. .

.
-.

-
2. -.

10-10

a. DAQmx Create Virtual Channel,


FunctionsAll FunctionsNI MeasurementsDAQmx Data Acquisition,
-. .
.
Analog InputVoltage.
Analog OutputVoltage.
b. DAQmx Timing, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition, -.
. .
sample mode Continuous.
c. DAQmx Trigger, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition, -.
.
/Dev X/PFI0.
/Dev X/ai/ StartTrigger. X
DAQ .
d. Basic Function Generator,
FunctionsAll FunctionsWaveformAnalog WaveformWaveform Generation,
-. ,
signal type. signal
type CreateControl .
e. DAQmx Write, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition, -.
AnalogSingle ChannelMultiple SamplesWaveform
.
f. DAQmx Start Task, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition, -.
.
g. DAQmx Read, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition, -.
AnalogMultipleChannelsMultiple SamplesWaveform
.
h. DAQmx Is Task Done, FunctionsAll
FunctionsNI MeasurementsDAQmx Data AcquisitionDAQmx Advanced
Task Options, -.
, .
10-11


- .
i. DAQmx Clear Task, FunctionsAll
FunctionsNI MeasurementsDAQmx Data Acquisition, -.
.
j. Unbundle by Name,
FunctionsAll FunctionsCluster, -.
k. Or, FunctionsArithmetic &
ComparisonBoolean, -.
l. Simple Error Handler, FunctionsAll
FunctionsTime & Dialog, -.
3. Simultaneous AI AO Start - HW.vi
C:\Exercises\LabVIEW DAQ.
4. 0 1.

2.
5. .

: Dev X/ai1:2, X
DAQ

: 1000

: Dev X/ao0, X
DAQ

: 1000

: Sine Wave

: 100

6. . .
7. .
8. ,
.
9. . .
.
10. , .

II
1. FileSave As Simultaneous
AI AO Start - SW.vi C:\Exercises\LabVIEW DAQ.
10-12

2. - .

DAQmx Trigger .
, ,
Run. , , .
3. 0 1.

2.
4. .

: Dev X/ai1:2, X
DAQ

: 1000

: Dev X/ao0, X
DAQ

: 1000

: Sine Wave

: 100

5. .
6. . .
7. . .

10-2

10-13



,
,
. ,
.
AI Start Trigger
.

,
.
.
,
.
,
.
, -.

-
.
.


,
, ,
.

RTSI
,
.
, AI Start Trigger
-.
, 0, :
AI Sample Clock,
AI Start Trigger, AI Reference Trigger.
10-14

1
AO Sample Clock.
NI-DAQmx.
PFI RTSI.
NI-DAQmx
.
(AO Sample Clock) PFI
, NI-DAQmx AO Sample Clock
(AI Sample Clock).
.
NI-DAQmx Devices MAX NI-DAQmx .
Device Routes ,
, . ,
, ,
0 AI Sample Clock, .
, RTSI
, .
, , ,
. <Shift>
, ,
.
DAQ PCI-MIO-16E-4.

AO Sample Clock AI Sample Clock.

10-15


(Real-Time System Integration - RTSI)
RTSI ,
.
.
DAQ . RTSI
,
, .. DAQ
PXI. RTSI ,

.
RTSI MAX
NI-DAQmx Devices, Create New NI-DAQmx Device,
RTSI Cable. RTSI NIDAQmx . RTSI cable
, .

10-16

10-3. RTSI
: RTSI MAX.
RTSI DAQ
.
. , RTSI
DAQ
.
(AO Sample Clock) (AI Sample Clock),
10-4
. RTSI
MAX.
1. MAX,
LabVIEW ToolsMeasurement & Automation Explorer.
2. Devices and Interfaces NI-DAQmx
Devices.
3. Create New NI-DAQmx DeviceRTSI Cable.

4. RTSI NI-DAQmx RTSI Cable:


RTSICable0. Add Device to
RTSI Cable . DAQ .

10-17

NI-DAQmx
, Properties RTSI
RTSI
Configuration Device Properties, .

10-3

10-18

10-4.

:
, .

- :
AO Sample Clock AI Sample Clock.
1. Simultaneous AI AO Start SW,
C:\Exercises\LabVIEW DAQ.
2. FileSave As Synchronized AI and AO.vi
C:\Exercises\LabVIEW DAQ.

-
3. - .

,

. ,
/Dev X/ao/SampleClock, X
DAQ .
4. 0 1.
2.
5.
:

10-19

: Dev X/ai1:2, X
DAQ

: Dev X/ao0, X
DAQ

: 10000

: Square Wave

: 100

6. .
7. . .

10-4

10-20


,
/.

, ,

, .

,
,
/. ,
, ,
.
.
.
. (AO
Sample Clock) .

.

10-21


10-5.

:
,
.
:

, , ,
.
,
.
,
.

-
1. -.

source DAQmx Timing,


I/O Name Filtering .
Include Advanced Terminals OK
Filter Names. /Dev X/Ctr0InternalOutput,
X DAQ .
2. AI - External Clock from Counter.vi
C:\Exercises\LabVIEW DAQ.
3. 1.
4. :

: Dev

: Dev X/ctr0, X DAQ

X/ai1, X DAQ

10-22

: 1000

# : 200

5. .
6. . ,
.
7. .

10-5

10-23


.
.
,
,
. .
, ,
, , ,
.
,
/ .
, ,

.
,
( 9-5).
. ,
, ,
,
.

.
,
. NI-DAQmx
,
,
.


,
, .
, N-
(2 < N < ). ,
10-24

DAQ - National Instruments.


DAQmx
.

.
,
, N- .
DAQmx Create Virtual Channel Counter OutputPulse
GenerationTicks. high ticks low ticks N-
. (ticks) PFI,
.



AI Sample
Clock AO Sample Clock
.
, DAQmx Export Signal
/ PFI .
PFI .

10-25

C.

DAQ ,
.
. ,
,
, ,
, .

, . ,
, /
,
.
.
, ,
(Phase-Lock-Loop).
.
.



, DAQ .
, ,
, .


. ,
(jitter).
,
.
,
. 5-10
10-26

, .
, (transmission latency),

. ,
.
(jitter),
.


. .
.
- ,
RTSI . RTSI ,
.

RTSI
, RTSI ,

National Instruments
. RTSI, DAQ
,
/ , PCI.
RTSI ,
/ .
DAQ NI RTSI.
DAQ , PCI -,
RTSI RTSI ,
RTSI . RTSI PCI DAQ
34- .
- . RTSI
, , .
RTSI ,
RTSI .
RTSI ,
. 0 6
, 7, RTSI Clock,
. RTSI
ni.com/catalog.
PXI RTSI PXI
PXI Trigger, J2 .
PXI Trigger PXI Systems Alliance
- . , PXI
, PXI ,
PXI DAQ .
. PXI Systems Alliance
10-27

www.pxisa.org.
20 ,
, RTSI
. -
.
(Phase-Locked-Loop PLL)
. PLL .

RTSI
NI-DAQmx RTSI.
NI-DAQmx,
. PCI RTSI
MAX, 10-2. PXI
PXI.
. NI-DAQmx
, PFI RTSI ,
DAQmx Export Signal.


RTSI, . NI-DAQmx
RTSI , , RTSI
. , Traditional NI-DAQ driver,
- RTSI , NI-DAQmx
. RTSI , ,
, .
RTSI
RTSI MAX. NI-DAQmx
. PCI
, ,
Properties. .

10-28

RTSI , NI-DAQmx. PXI


PXI (
) Triggers.
RTSI
, .

AI Start or Reference Trigger

AI Convert Clock

AI Sample Clock

AO Sample Clock

AO Reference Trigger

GPCTR0 Source, Gate, or Output


,
. :
, ,
,
.

, ,
. ,

.


(master) ,
AI Start Trigger RTSI ,
.
.
,
.
, ,
.

.

10-29

AI
Start Trigger . ,
RTSI.
, DAQmx Triggering
.





.
- RTSI ,
-.
,

. ,
, ,
, . ,
. .
, ,
NIDAQmx. ,
RTSI. RTSI
( PXI ), NI-DAQmx .
AI Sample Clock
DAQmx Timing.
.

10-30


, .
,

.

, ,
, .
-
, RTSI clock
.
,

, RTSI 7.
,
.
,
,
.
,
,
.
DAQmx Timing property node
20 .
DAQmx Trigger ,
AI Start Trigger.
.

10-31



,
.
,

.
DAQmx Trigger,
.



. , ,
.
MIO /,
,
. NI-DAQmx,
.
Traditional NI-DAQ Traditional NI-DAQ
, NI-DAQmx,
NI-DAQmx. Traditional NI-DAQ NI-DAQmx
API, , ,
, NI-Motion NI-IMAQ.
.

(interoperability).
10-32

Traditional NI-DAQ NI-DAQmx


, NIDAQ, Traditional NI-DAQ. NI-DAQ
NI-DAQmx.
Traditional NI-DAQ NI-DAQmx ,
:

NI-DAQmx API
NI-DAQmx , ,
Traditional NI-DAQ API.
NI-DAQmx DAQmx Stop Task DAQmx Clear
Task.

Traditional NI-DAQ API


,
NI-DAQmx API. Traditional NI-DAQ Device
Reset. SCXI
, Traditional NI-DAQ Device Reset.


Traditional NI-DAQ Devices MAX
Reset.

Traditional NI-DAQ (
NI-DAQmx) Traditional NIDAQ Devices MAX Reset Driver.


SCXI .
, SCXI
SCXI.
API .


Traditional NI-DAQ NIDAQmx. NI 653x . REQ
MIO RTSI 0, RTSI Control. MIO
RTSI 0, DAQmx
Timing. MIO 4. ,
RTSI RTSI
.

10-33

, AI Start Trigger.

, .

RTSI .

10-34

10-35


,
, :

/

A.

. , ,
. ,

,
LabVIEW
.
.

: , , .


(thermocouple).
, ,
.
, ,
, ,
70 C.
.
, ,
,
.
, (Thomas Seebeck),
1821 .
:
V S T

V , S , T
.
S ,
,
-1. -

.

-1. , ,

,
,

(ANSI). , J-
( ) .

-2. .

-2 . ,
, .

,
.
.
.
.
- .
-1
. , .
.
-1. .

(C)

()

(/C)

-270 1000

9.835 76.358

58.70 0 C

-210 1200

8.096 69.536

50.37 0 C

-270 1372

6.548 54.874

39.48 0 C

- 10%

- 13%

-270 400

6.258 20.869

-50 1768

0.236 18.698

-50 1768

0.226 21.108

38.74 0 C
10.19 600
C
10.35 600
C

S
R

:




(7 40 )

, ,
-3.
.
100 .
, , ,
. ,
,
( ,
).

-3.

,
. ,
- .

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

-4.

:
,


, ,


,
-

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

.

-5. -

, .
-6,
.
,
.

-6.

, :

, ,


,
- .
, ,
.
.
, , , ,
().
, .
,
, ,
. ,
(Vm)
, ,
, .
,
.
.
,
,
. -7
. R1 R2, Rg
.
,
.

-7.

. /
.

,
.


-
,
,
. () ,
.
,
LabVIEW.
,
(settling time)
.
,
, . -8

. ,
ts,
(% V).
, .
(, )
,
.

-8.

, , ,
-9. CH0 +5 , CH1
5 . , , ,
10 .
, 10 ,
200 .
, .
, , , .

-9.

-10 -9
. , ,
()
, .

-10. ,


.
,
. ,
AT-MIO-16X.
,
16- , 40 . ,

, 10 , 25
( ).
10%, ,
100 .

:
,
.
DAQ .
, .
DAQ National Instruments
NI-PGIA,
. -11
NI-PGIA .

-11. NI-PGIA .


(least significant bit LSB). ,
(.. ,
).
=


(2 )

, AT-MIO-16X
0.5 ( 76.3 ), , 1,
10 .

5
10/1
0.5 = 16 0.5 =
= 76.3
65536
2


-
(). ,

FIFO ,
. FIFO
- ,
.
- .
: , ,
-, -
.


,
,
. -12
8- .

-12.

,
. ,
, 1 , 2 , 4 8 .
, .
, .
, .

, .
, .
8-
.
0. , (),
1, ()
. ,
1, 0. ,
, ,
n . 8-
2 . -13
8-
.

-13. 8-

-
(flash) .
n-
2n1 . -14,
.

.
, 1, 0.
.
8
.
. , , , ,
.

-14.


-
.
,
.
.

, .

-
-
. -

. ,
. ,
16 48
.

-2. /



DAQ