Upload
sorbonkodirov
View
42
Download
5
Embed Size (px)
DESCRIPTION
Хорошая книгу советую всем!
Citation preview
1 , A 1-2B ( ) 1-3C 1-4D 1-11 1-15 2 A 2-2B 2-6C 2-12D 2-17E 2-19F 2-23G 2-30H NI-DAQ 2-31I Measurement &
Automation Explorer(MAX) 2-33
J NI-DAQmx 2-46K NI-DAQmx: 2-50 2-54 3 A 3-2 3-11 4 A 4-2B 4-7C DAQmx Read 4-11D 4-16E 4-22F 4-31 4-44 5 A 5-2B 5-3C 5-9D 5-18E 5-30
F 5-33G 5-34H 5-42I 5-43J 5-48K 5-51 5-59 6 A () () 6-2B / 6-5C 6-8D 6-16E 6-20F 6-26G . 6-31H 6-32I () 6-34J 6-36K 6-37L 6-39
M 6-44N 6-46O 6-53 6-55 7 A 7-2B DAQmx Write 7-4C 7-10D 7-11E 7-20 7-31 8 / A () 8-2B / 8-4 8-10 9 A 9-2B - 9-5C 9-6D 9-8
E 9-12F 9-17G 9-26H 9-31I 9-36 9-41 10 A NI-
DAQmx 10-2
B 10-8C 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, C:\Exercises\LabVIEW DAQ. , , , , 1, .
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) , (). , . , / , , - , .
SCXI
DAQ
/
DAQ
0.01 0.001 100 1.1 10
SCXI DAQ
0.01 10 0.001 10 1.01 100
SCXI 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 . 10 20 (2) = 1212 = 2.4 1212 = 4.8
2-14
2-1. , , : DAQ .
DAQ- .
-. DAQ , . DAQ , . , . DAQ- 12 16 .
DAQ-. . . , 12 16 .
.
= (2 ) , DAQ- :
DAQ 1 DAQ 2
() 12 12 16 16 () 0 10 -10 10 0 10 -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 single-ended 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 NI-DAQ , , .
: 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), . NI-DAQ 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 NI-DAQ 6.9.x. NI-DAQmx
NI-DAQmx NI-DAQ, , . NI-DAQmx DAQ . NI-DAQmx : DAQ Assistant ( )
, NI-DAQmx LabVIEW 7.0 .. DAQ Assistant NI-DAQmx NI-DAQmx . DAQ Assistant
2-31
LabVIEW MAX. ,
/ . (API) DAQ
, NI-DAQ.
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 . NI-DAQmx 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. .
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 (). , y-intercept (, 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
3
. : 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 , . 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, NI-DAQmx , . . , 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. NI-DAQmx 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. Buffered Acquisition.vi C:\Exercises\LabVIEW DAQ. 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 Data File.vi C:\Exercises\LabVIEW DAQ. 18. . 4-6
4-39
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. -. , 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 8-
2SCXI-1180
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 SCXI-1125 LabVIEW.
. SCXI . , , .
1. MAX Devices and InterfacesNI-DAQmx DevicesSCXI-1000: 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. : . SCXI-1141 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 SCXI-1141. 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, :
1 3( ) ( )MEAS J TC J refV V T V T= + (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 :
( ) ( )MEAS TC TC TC refV V T V T= + (5-2)
, VMEAS Tref - , .
, , , - . , . , . , SCXI , , .
. NI-DAQ, NI LabVIEW Measurement Studio , .
. . . :
20 1 2 ...
nnT a a v a v a v= + + + + (5-3)
5-37
v , T , a0 an , . NI . 5-1. ()
+
(C)
()
(/C)
E -270 1000 9.835 76.358 58.70 0 C
J -210 1200 8.096 69.536 50.37 0 C
K -270 1372 6.548 54.874 39.48 0 C
T -270 400 6.258 20.869 38.74 0 C
S - 10% -50 1768 0.236 18.698 10.19 600 C
R - 13% -50 1768 0.226 21.108 10.35 600 C
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.
() .
LL
= , , .
() (). , , /. , . (), 10-6.
, , , , D . () . ( ) ( ), = /. , , 0.25 0.3.
5-42
I.
, , , . , , . .
, , , . , , . . , . , , , , . . 30 3000 , 120, 350 1000 .
, . , .
, (gauge factor). () , ():
5-43
R RR R LL
= =
2.
. , , . , , , . , . , , , 23 ppm/C. 1000 11.5 /C. , .
, . . , , 500 . 2, 2 (500 106) = 0.1%. 120 0.12 .
, , . (Wheatstone bridge), , , VEX.
VO
3 2
3 4 1 2O E
R RV VR R R R
= + + X
, R1/R2 = R3/R4, VO .
5-44
, . . , R4 , , . RG, R - R = RG . , R1 = R2 R3 = RG, , VO/VEX . 1/(1 + /2), .
14 1
2
O
EX
V V
= +
, .
, , (RG + R), . , (dummy gauge). . , VO , .
, , . , , (RG + R), (RG R). 5-45
, , , .
2O
EX
V KTV
=
, , . .
, , , , . , , , . . -, () , . , . , , , . , .
(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,
( ) ( )O O r
EX
V VV
V=
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). , . , . (frequency-domain). , .
, , (discrete Fourier transform DFT). . . , , , , , .
N DAQ N , N , .
fs , ( ) t,
1
s
tf
= x[i], 0 I N 1( N ). ,
21
0
j ikNN
k ii
X x e
== , k = 0, 1, 2, , N 1, (6-1)
( j ) N , (X[k], 0 k N 1) x[i] . , 6-2
N . , t,
1sffN 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 ( ) cos( ) sin( )j j = :
2 01
0[0] [0] [1] [3] 4
j iNN
ii
X x e x x x
== = + + =
( ) ( )( )[1] [0] [1] cos sin [2] cos sin2 2
3 3[3] cos sin (1 1 ) 02 2
X x x j x j
x j j j
= + + = + =
+
6-3
[2] [0] [1](cos( ) sin( )) [2](cos(2 ) sin(2 ))
[3](cos(3 ) sin(3 )) (1 1 1 1) 0X x x j x jx j
= + + = + =
+
( ) ( )( )3 3[3] [0] [1] cos sin [2] cos 3 sin 32 2
9 9[3] cos sin (1 1 ) 02 2
X x x j x j
x j j j
= + + + = + =
, 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 )
kt . , f, sffN
= , , k- kf . . . N, - , k- .
, N 2Np = .
, X. X[0] X[1] f X[2] 2f X[3] 3f . . .
.
.
. X[p2] (p2)f X[p1] (p1)f X[p] pf ( ) X[p+1] (p1)f X[p+2] (p2)f . . .
.
.
. X[N3] 3f X[N2] 2f X[N1] 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] f X[2] 2f X[3] 3f . . .
.
.
. X[p1] (p1)f X[p] pf X[p+1] pf X[p+2] (p1)f . . .
.
.
.
6-6
X[N3] 3f X[N2] 2f X[N1] 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[0]X 2
2NX .
6-8
/, , . , /, . , , , . , .
f = fs/N.
x[n] Sxx. N , 2Np = .
Sxx, . Sxx[0] Sxx[1] = Sxx[N1] f Sxx[2] = Sxx[N2] 2f Sxx[3] = Sxx[N3] 3f . . .
.
.
. Sxx[p2] = Sxx[N(p2)] (p2)f Sxx[p1] = Sxx[N(p1)] (p1)f Sxx[p]
2 Vpeak (Vpk) N = 8.
6-9
( ).
2 Vpk,
2rmsV
2 22rms
V = = , .
, , .
2 2rmsV =
N , p = (N 1)/2. Sxx, . Sxx[0] Sxx[1] = Sxx[N1] f Sxx[2] = Sxx[N2] 2f Sxx[3] = Sxx[N3] 3f . . .
.
.
. Sxx[p2] = Sxx[N(p2)] (p2)f Sxx[p1] = Sxx[N(p1)] (p1)f Sxx[p] 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 Express.vi
6-14
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] = 1.0
, , , ,
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
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)
4 Term B-Harris w[n] = 0.35875 0.48829 cos(2n/N) + 0.14128 cos(4n/N) 0.01168 cos(6n/N)
Blackman
7 Term B-Harris 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)
Blackman
Low Sidelobe w[n] = 0.323215218 0.471492057 cos(2n/N) + 0.17553428 cos(4n/N) 0.028497078 cos(6n/N) + 0.001261367 cos(8n/N)
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
. :
10 20log [ ( ) / ( )]o iA f A f=
log10 10, ) A0(f) f .
( fAi
, 0.02 ,
9977,010)(/)(
)](/)([log2002,0001,0
0
010
===
fAfAfAfA
i
i
, . 60 , :
001,010)(/)(
)](/)([log20603
0
010
===
fAfAfAfA
i
i
, 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] =