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

LabVIEW

April 2003 Edition


Part Number 322661B-01

2006 - :
" National Instruments"

National Instruments

2000 - 2003 National Instruments Corporation. All rights reserved.


.............................................................................9
............................................................................................9
...................................................................................10

1.

................................. 1-1

1.1.

....................................1-1

1.2.

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

2.



............................................................................................. 2-1

2.1.


...........................................................................................................2-2

2.1.1. .................................2-2
2.1.2. ................................................................................2-3
2.1.3. NI-DAQ...........................................................................................................................2-3

2.2.

........................................................................................2-4

2.2.1. ......................................................................2-5
2.2.2. .....................................................................................................2-5

3.

....... 3-1

3.1.

.................................3-1

3.2.

Windows.........................................3-2

3.2.1.
3.2.2.
3.2.3.
3.2.4.

Measurement & Automation Explorer..........................................................................3-3


DAQ Assistant ................................................................................................................3-3
VISA IVI..................................3-3
FieldPoint .....................................................................3-3

3.3.


Mac OS..................................................................................................................3-4

3.3.1. NI-DAQ Configuration ..................................................................................3-4


3.3.2. NI-488.2 Configuration ..................................................................................3-4
3.3.3. Macintosh.................................3-4

4.

.................................................................... 4-1

4.1.

....................................................................................4-1

National Instruments

LabVIEW

4.2.

..........................................................................................4-2

4.2.1. ...............................................................................4-2
4.2.2. .................................................................................4-2

4.3.

..........................................................................4-3

4.3.1.
4.3.2.
4.3.3.
4.3.4.

........................................................................................................................4-4
................................................................................................................4-5
...................................................................................................4-6
.........................................................................................................................4-6

4.4.

...................................................................................4-6

4.4.1. ....................................4-6
....................................................................................................4-7
4.4.2.
............................................................................................................................4-9
4.4.3.
...................................................................................................................... 4-11

4.5.

...........................................4-13

4.6.

....................................................................................4-13

4.6.1. .................................................................................................... 4-13


4.6.2. ?...............................................................................4-15

4.7.

- .....................................................................................4-16

4.7.1. ......................................................................................... 4-18


4.7.2. ............................................................................................................. 4-18

4.8.

.................................................................................................................4-19

4.8.1. ................................................................... 4-19


4.8.2. ......................................................................................... 4-20
4.8.3. ..................................................................................... 4-21

4.9.

...........................................................................................4-22

4.9.1. ................................................................................................................. 4-22


4.9.2. ............................................................................................................... 4-22
........................................................................................................ 4-22

4.10. ...................................................................................4-24
4.10.1. ................................................................................................. 4-25
4.10.2. ............................................................................................ 4-25

5.

.. 5-1

5.1.

-.........................................................5-1

5.1.1.
5.1.2.
5.1.3.
5.1.4.
5.1.5.

DAQmx (DAQmx Name Control) .................................5-1


IVI (IVI Logical Name Control) ..................................5-2
VISA (VISA Resource Name) ..............................................5-2
- FieldPoint (FieldPoint I/O Point Control).................5-2
Motion (Motion Resource Name Control) ...........................5-2

5.2.

VI ................................................................................................5-3

LabVIEW

ni.com

5.3.

..............................................................................................................5-3

5.4.

DAQ .............................................................5-3

5.4.1. ..........................................................................5-5
5.4.2. .............................................................................................................................5-5
5.4.3. (Waveform Control
Digital Waveform Control).........................................................................................5-6
(Start Time t0)...................................................................................5-6
(Delta t dt) .....................................................................5-6
(Waveform Data and Digital Waveform Data Y)........................5-6
..................................................................................................................5-7
.............................................................................................5-7
Waveform .........................................................5-8
(Digital Waveform
Control) .................................................................................................................... 5-10

5.5.

VISA ...........................................................5-11

5.6.

FieldPoint .....................................5-11

5.6.1. .................................................................................................... 5-11


5.6.2. FieldPoint I/O Point ....................................... 5-11

6.

.................. 6-1

6.1.

....................................6-1

6.2.

VI NI-DAQ
.......................................................................................................................6-1

6.2.1. NI-DAQmx.............................................................................6-2
6.2.2. ....................................................................................................6-3
NI-DAQmx ..............................................6-4

6.3.
....................................................................................6-4

7.

.................. 7-1

7.1.

...........................7-1

7.2.


.....................................................................................7-2

7.2.1. NI-DAQmx .........................................................................7-2


7.2.2. ,
....................................................................7-3

7.3.


..................................................................................7-4

7.3.1.
..........................................................................................................................7-5

National Instruments

LabVIEW

7.4.


FieldPoint ..............................................................................................................7-6

8.

......................................................... 8-1

8.1.

VI NI-DAQ...........................................8-1

8.1.1. NI-DAQmx .....................................................8-2

8.2.

VI FieldPoint........................................8-3

9.

............................................................... 9-1

9.1.

.........................................................................9-1

9.2.

VI NI-DAQ ..........................................................9-3

9.3.

..........9-4

9.4.

VI FieldPoint .......................................................9-5

10.

........................................................ 10-1

10.1. .........................................................10-1
10.2. VI NI-DAQmx .....................................10-3
10.3. VI FieldPoint .......................................10-4

11.

.................................................. 11-1

11.1. ....................................................11-1
11.1.1. 2- ........................................................ 11-1
11.1.2. 4- ........................................................ 11-2

11.2.
(DMM).................................................................................................................11-3

12.

......................................................... 12-1

12.1. .........................................................12-1
12.1.1. .......................................................................... 12-1
12.1.2. .................................................................. 12-1
12.1.3. ......................................................... 12-2

12.2. VI NI-DAQmx .....................................12-3


12.3. ......................12-4

13.

................ 13-1

LabVIEW

ni.com

13.1. VI NI-DAQ 13-1


13.1.1. NI-DAQmx............................................................ 13-2

13.2. 13-2
13.3. ...............................................................13-3

14.

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

14.1. ..........................................................................14-1
14.1.1. .................................................................................................. 14-2

14.2. ...............14-2
14.3. .............................................................................14-4
14.3.1.
....................................................................................................................... 14-5

14.4.
...........................................................................................................14-5
14.4.1.
.......................................................................................... 14-6

......................................................................... 14-6
VI NI-DAQmx ................. 14-7
14.4.2. .... 14-8

.............................................................................................. 14-9

15.

............ 15-1

15.1. ...............15-1
15.2.
VI NI-DAQmx.....................................................................................................15-5
15.3. FieldPoint VI...15-6

16.


LABVIEW........................................ 16-1

16.1. .....16-1
16.1.1. ................................................................................ 16-2
.................................................................................. 16-2
16.1.2. ........................................................................... 16-3
16.1.3. ........................................................................................ 16-5
LabVIEW Plug and Play ......................................................................... 16-5
IVI .......................................................................................................... 16-5
, .................................................................... 16-6

National Instruments

LabVIEW

16.2. VISA LabVIEW ..............................................................................................16-6


16.2.1. ASCII
.................................................................................................... 16-6

16.3. ............................................................................16-7
16.3.1. Instrument I/O Assistant............................................. 16-7
16.3.2. VISA............................................................ 16-8
16.3.3. Getting Started VI....................................................... 16-8
Getting Started VI ..................................... 16-9

16.4. VI .........................................16-9
/ ......................................................................... 16-9
Error In/Error Out .................................................................... 16-10

16.5. VISA ......................................................................16-10


16.5.1. VISA.................................................................................. 16-10
16.5.2. VISA ................................................................................ 16-11
GPIB SRQ ............................................................... 16-11
16.5.3. VISA VI ............................... 16-12

16.6. ......................................................16-12
16.6.1. Instrument I/O Assistant..................... 16-13
16.6.2. ........................................................................... 16-13
16.6.3. , ............................................. 16-13
Waveform............................................................. 16-14

17.

1. ........................................... 17-1

GPIB ..................................................................................17-1
, .......................................................................... 17-2
................................................................................. 17-2

...............................................17-3
................................................................................................... 17-4
............. 17-4
.............................................. 17-5

PXI.............................................17-5
......................................................................17-5

18.

2.
................................ 18-1

19.

.................................................................................... 19-1

LabVIEW

ni.com


LabVIEW.
,
LabVIEW. ,
,
LabVIEW. LabVIEW,
Getting Started with
LabVIEW ( LabVIEW).

(LabVIEW User Manual) ,
. ,
LabVIEW,
(DAQ).
. LabVIEW (LabVIEW Real-Time)
. ,
, LabVIEW
Real-Time Module User Manual.


:
[]


, [response].

""

. FilePage SetupOptions
File , Page
Setup Options .
, .
.

bold

,
,
.
.

italic

,
, ,
.

National Instruments

LabVIEW

monospace

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

Platform

, ,
,
.



,
:

Getting Started with LabVIEW


LabVIEW User Manual
LabVIEW Help
LabVIEW Analysis Concepts
Measurement & Automation Explorer Help
DAQ Quick Start Guide for NI-DAQ 7.0
Data Acquisition VIs for Traditional NI-DAQ help
DAQmx Data Acquisition VIs help
NI-DAQmx Help
Getting Started with SCXI
LabVIEW Real-Time Module User Manual
LabVIEW Real-Time Module for Mac OS X User Manual Addendum
NI Developer Zone at ni.com/zone

. ,
Traditional NI-DAQ.

LabVIEW

10

ni.com

1.

1
1.


,
.
,

, ,
,


.

, .

. 19-
. 30-
20-
,
, .
, ,

. ,


.

1.1.



,

. National Instruments

(DAQ) ,
IEEE 488 (GPIB)

National Instruments

1-1

LabVIEW

1.

PXI,
.

,
National
Instruments, , LabVIEW, LabWindowsTM/CVITM
Measurement Studio.
,
.


,

.
, ,
,
.

1.2.


.
.
- -

. , ,
,
.

LabVIEW

1-2

ni.com

2.

2
2.





/ .
,
.
, ,
, ,
.

, ,
GPIB, PXI ( PCI
) RS-232.
,
,
,
.
,
(, ),
.

.

.

National Instruments

2-1

LabVIEW

2.

2.1.



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

, .
,
.
,
,

. LabVIEW
,
.

2.1.1.


, , ,

.
DAQ-
, , ,

.

(), DAQ .
,
LabVIEW

2-2

ni.com

2.

DAQ-
.
:
PCI
PCMCIA
.

Ethernet.

.

2.1.2.
DAQ-,

. ,
,
DAQ-,
.

.

, .
, LabVIEW, ,
, ,
.
NI
NI-DAQ, (VI
Virtual Instrument) ,
.

2.1.3. NI-DAQ
NI-DAQ 7.0 : Traditional NI-DAQ
NI-DAQmx.
(API)
.
Traditional NI-DAQ NIDAQ 6.9.x. Traditional NI-DAQ VI
, NI-DAQ 6.9.x. NI-DAQ 6.9.x , NI National Instruments

2-3

LabVIEW

2.

DAQ Traditional NIDAQmx .


NI-DAQmx NI-DAQ
VI,
. NI-DAQmx
NI-DAQ :
DAQ
Assistant; ,

;
(API)
VI,
.
Traditional NI-DAQ NI-DAQmx
.
National Instruments ni.com/daq.
,
, DAQ Quick Start Guide for NIDAQ 7.0.

2.2.


,
, .
,
,
.

, ,
. ,
,
.
, ,
.

.
, ,
GPIB PXI.
,
,

LabVIEW

2-4

ni.com

2.

, , , ,
.

,
, , "" .

,

. , ,
,
.

2.2.1.
,
- : GPIB, PXI RS-232.
, ,
.

2.2.2.

.
,
.
, ,
.
:
.
,
, ,
.
.

.
.
- ,
,
,
.

National Instruments

2-5

LabVIEW

2.

NI 2200 , 150 .

NI Instrument Driver Network
ni.com/idnet.

LabVIEW

2-6

ni.com

3.

3
3.


National
Instruments.
NI-DAQ
LabVIEW National
Instruments. NI-DMM, NI-SCOPE, NI-FGEN NI-SWITCH
LabVIEW
.
NI-488.2, NI-VISA
IVI (Interchangeable Virtual Instruments).
VI LabVIEW ,

.

3.1.


.
,
.
.

, ,
, GPIB
Ethernet.


.

.

National Instruments

3-1

LabVIEW

3.

1. LabVIEW .
LabVIEW National Instruments,
.
, ,
.
NI-DAQ DAQ
Quick Start Guide for NI-DAQ 7.0.
. Windows 2000/NT/XP Professional
LabVIEW ,

.
2. .
3. .
, ,
. ,

, ,
..
, -
, VI
;
.
4. .
5.
Measurement & Automation Explorer (MAX) (Windows)
Configuration Utility (Macintosh).


, Measurement &
Automation Explorer Help Troubleshooting Wizards
ni.com/support.

3.2.


Windows
Windows

.

LabVIEW

3-2

ni.com

3.

3.2.1. Measurement & Automation Explorer


MAX Windows,
National Instruments,
,
, ,
. MAX
,
Traditional DAQ. MAX

Measurement & Automation .

3.2.2. DAQ Assistant


DAQ Assistant LabVIEW 7.0 ,
NI-DAQmx,
, . DAQ
Assistant
NI-DAQmx, ,
. DAQ
Assistant LabVIEW MAX.

3.2.3. VISA
IVI
VISA IVI
VISA
IVI. VISA
Devices and Interfaces, IVI
IVI MAX.
LabVIEW
. , scope
GPIB.

3.2.4. FieldPoint
, (items)
FieldPoint MAX.
,

Devices and Interfaces, Ethernet
Remote Systems.
Data Neighborhood. - LabVIEW
, .

National Instruments

3-3

LabVIEW

3.

3.3.


Mac OS
Mac OS 9

.
. Mac OS X
.
Mac OS X LabVIEW RealTime Module for Mac OS X User Manual Addendum.

3.3.1. NI-DAQ Configuration


,
Macintosh, NI-DAQ Configuration. Mac
OS ,
DAQ-
NI-DAQ Configuration.
,
(SCXI).
,

NI-DAQ Configuration. LabVIEW
.

3.3.2. NI-488.2 Configuration


GPIB ,
Macintosh, NI488.2 Configuration, GPIB
.
.

3.3.3.
Macintosh
VISA Find Resource
VISA-.

LabVIEW

3-4

ni.com

4.

4
4.

4.1.



,
.
.

, , , , .. 4.1

().
4.1.





()

()

National Instruments

pH

4-1

LabVIEW

4.

4.2.



"" .

4.2.1.
- ,
, ,

(. 4.1).
"" .
,
,
, .
. ("")
. ""
, ,
10 200 .
, .
.

. 4.1. (Ground )

4.2.2.

(. 4.2).
,
, .
, . 4.2.
, . 4.1,

.
LabVIEW

4-2

ni.com

4.

. 4.2.

4.3.




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

, , .
. 4.3.
.

National Instruments

4-3

LabVIEW

4.

, ,

, 4- 3 ,

,
,


( )

DAQ

. 4.3. ,


(DAQ - )

. 4.3. ,

4.3.1.

,
.
/
(DAQ)
(SCXI)
( . 4.4 ).
,

-
().

LabVIEW

4-4

ni.com

4.

MUX

+
_

ADC
DAQ

. 4.4. /

(DAQ , MUX , ADC )

(DAQ),
-
, ,
/ .

(SCXI),

.
National Instruments ni.com/info
exd2hc.
. :

.
.

50 60 .

4.3.2.
, ,
. LabVIEW
, ,

. LabVIEW ,
,
, .

National Instruments

4-5

LabVIEW

4.

4.3.3.

,
. ,
,

, . ,

.

4.3.4.

, ()
.
- ,
,
.
,

.

, ,

.

.

SCXI .

4.4.

4.4.1.


() .

.
LabVIEW

4-6

ni.com

4.



() .
National Instruments,
8-
, . 4-5.
(MUX)
,
.
. 4-5 AIGND ( )
.

. 4-5.
Instrumentation amplifier



()
: ( + )
National Instruments

4-7

LabVIEW

4.

( ). (
)
,
.

, .
,
, .


,

(CMRR Common-Mode Rejection Ratio).




.
,
.
:

V + V-
Vcm = +

V+ V- -

.



.

. CMRR,

, .

.

60 ( ).
(dB) :

LabVIEW

4-8

ni.com

4.

K
CMRR(dB) = 20 log D
K CM

KD KCM
.
. 4-6
, dB :
V
20 log cm
Vout
V+ + V- = Vcm .

. 4-6.
Instrumentation Amplifier

4.4.2.


,
.
(Referenced Single-Ended Measurement Systems RSE),

AIGND,
. ( ""
). . 4-7
16-
.

National Instruments

4-9

LabVIEW

4.

. 4-7.

Instrumentation Amplifier


(NonReferenced Single-Ended Measurement Systems NRSE).

,
,
(. 4-8).

LabVIEW

4-10

ni.com

4.

. 4-8.
(NRSE)
Instrumentation Amplifier

NRSE
( E
AISENSE),
(AIGND).

.

4.4.3.

. 4-9
.

National Instruments

4-11

LabVIEW

4.

()
(DIFF)

)
:
:






(NRSE)


(RSE)

Vg

. 4-9.

LabVIEW

4-12

ni.com

4.

4.5.



.

.

, .
, .
.
.
, .

4.6.



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


, .

4.6.1.

(Aliasing),
. ,
, .

.


.
,
.
. ,
,
.
National Instruments

4-13

LabVIEW

4.


,
.
, , f S 100 ,
: 25 , 70 ,
160 510 (. 4-10).

. 4-10.
Magnitude - , Frequency ,
Nyquist Frequency ,
Sampling Frequency

. 4-11,
( f S 2 = 50 ) ,
, ,
. ,
F1 = 25 ,
F2 = 70 , F3 = 160 ,

F4 = 510 F2 = 30 , F3 = 40
F4 = 10 .
.

LabVIEW

4-14

ni.com

4.

. 4-11.
Magnitude , Frequency , Nyquist Frequency
, Sampling Frequency ,
Solid Arrows Actual Frequency
, Dashed Arrows Alias


:
f a= f nS - f x , f nS ,
, f x .
,
F2 = 100 - 70 = 30
F3 = (2)100 - 160 = 40
F4 = (5)100 - 510 = 10

4.6.2. ?
,
.

. . 4-12
,
.

National Instruments

4-15

LabVIEW

4.

. 4-12.
A, B, C f S , 2 f S , 4 f S 3
f
f S = f ,
.
2 f S ,
, .. ,
,
B. C
4 f S / 3 . 2 f S ,

(4 f S / 3 1) / 2 = 2 f S / 3 ,
, .
f S
.

4.7.

-
.

(ON) (OFF).
. 4-13.

LabVIEW

4-16

ni.com

4.

. 4-13. .
Signals , Digital , Analog ;
On-Off , Pulse Train ; DC ,
Time Domain , Frequency Domain ;
TTL Line , Counter-Timer /;
ADC/DAC / (slow , fast ),
Analysis ; State , Rate ; Level ,
Shape , Freq. Content


-. (. 4-14):

00,8 (Low)

25 (High)

/ 50 (Rise/Fall)

. 4-14.
Indeterminate

National Instruments

4-17

LabVIEW

4.

4.7.1.

-.

. , ,
: 1 0
. .
. ,
8- , .. 8- .
E 8-
. . , ,
8 , 8.

4.7.2.
()

.
,
.
1.
.
2. 8-, 16- 32-
().
3.
.
4.
.
5.
.
, .
. .
, ,
.
E ,
8255 8.

LabVIEW

4-18

ni.com

4.

4.8.

(Trigger) - , ,
. ,
. , ,

.

.
.


, .
,
Start Trigger.
,
(Reference Trigger), Stop Trigger.

, ,
.
, .
,
(Edge Trigger)
( - Window Trigger).
,
PFI (Programmable Function Input).

4.8.1.
,
, ,

.
, ,
, ,
,
.
. 4-15
3.2 .
National Instruments

4-19

LabVIEW

4.

. 4-15.

4.8.2.
,
(Enters) (Leaves) (),
.
(Window
Top) (Window Bottom) .
. 4-16 , .

. 4-16.

LabVIEW

4-20

ni.com

4.

. 4-17 , .

. 4-17.

4.8.3.

, : .

,
.
.
. 4-18
(Falling Edge) .
National Instruments
PFI.

. 4-18.
Data Capture Initiated

National Instruments

4-21

LabVIEW

4.

4.9.



,
, .

(Windowing).
LabVIEW Analysis Concepts (
LabVIEW).

4.9.1.

.

. ,
, , ,
,
.
50 60 .
() 4
50 60 .
.

10 25 .
4 Digital
Filtering ( ) LabVIEW Analysis
Concepts ( LabVIEW).

4.9.2.

,
.



. ,
,
, .

(Window Function).

LabVIEW

4-22

ni.com

4.




(Discrete Fourier Transform DFT)
(Fast Fourier Transform FFT). DFT / FFT
, , 7,5 ,
, ,
.
,

.
( )
,
. ,
0 f S 2 .
()
.

. 4-2
,
.

National Instruments

4-23

LabVIEW

4.

(Rectangular)
( )

(Triangle)

4-2.

,
,
(

)
;
,

(Hanning)

(Hamming)

,

;


;





,

,
(
)


.
.

4.10.

.

. ,
,
,

.
LabVIEW

4-24

ni.com

4.

EEPROM
( ).

. :
, .
National Instruments
ni.com/calibration.

4.10.1.
,
,
.
EEPROM
.
, EEPROM,

(National Institute of Standards and
Technology NIST) .
NIST ,
, NIST.

4.10.2.
()
.

, , .


, .

National Instruments

4-25

LabVIEW

5.

5
5.


LabVIEW ,
.

5.1.

-
,
,
/ (I/O Control),
-. I/O Control
. -
/ ()
Traditional NI-DAQ, NIDAQmx, IVI, VISA, FieldPoint Motion VI. ,
-,

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

5.1.1. DAQmx (DAQmx Name


Control)

NI-DAQmx, DAQmx
Name Controls , , ,
,
MAX DAQ Assistant.

National Instruments

5-1

LabVIEW

5.

I/O Name
Filtering.
NI-DAQmx
.

5.1.2. IVI (IVI Logical Name


Control)
IVI
, c MAX,
IVI Logical Name.
IVI Logical
Name , IVI
. IVI Logical Name
VISA IVI
MAX.

5.1.3. VISA (VISA Resource Name)


VISA Resource Name
VISA, MAX. VISA

.

5.1.4. - FieldPoint (FieldPoint


I/O Point Control)
() - FieldPoint,
MAX,
FieldPoint I/O Point.
, MAX.

5.1.5. Motion (Motion Resource


Name Control)
,
MAX, Motion Resource Name.

, Allow Undefined
Names MAX.

LabVIEW

5-2

ni.com

5.

5.2. VI
VI DAQmx
: ,
. VI NI-DAQmx

,
. VI DAQmx -
.
VI
Polymorphic VIs and Functions ( VI ) 5
Building the Block Diagram ( -)
LabVIEW User Manual ( LabVIEW).

5.3.

VI NI-DAQmx, NI-VISA IVI Instrument Driver API.


API . ,
( ) VISA VI VISA
Configure Serial Port.
, Property Node.
Property Node NI-DAQmx
NI-DAQmx,
VISA Advanced VISA,
Modular Instrument IVI Instrument Drivers
API IVI.

5.4. DAQ

VI NI Measurements
, . 5.1.

National Instruments

5-3

LabVIEW

5.

. 5-1. DAQ-
Create Tasks and Channels ; Set Timing (Optional)
(); Set Triggering (Optional)
(); Read or Write Data
; Clear

,
.

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

DAQ Assistant.
NI-DAQmx (Start),
(Stop) (Clear) . , ,

/, VI Start.
NI-DAQmx LabVIEW
VI, .
NI-DAQmx VI , ,
. VI NI-DAQmx
.
VI NI-DAQmx
DAQmx (DAQmx Data Acquisition VIs help).
LabVIEW

5-4

ni.com

5.

5.4.1.
(),

. ,
NI-DAQmx, .
(),
,
, ,
. Traditional NI-DAQ

,
, NIDAQmx .

5.4.2.
NI-DAQmx
,
.
, .
,
.
NI-DAQmx
, .

.
1. .
2. ,
().
3. .
4. .
2 3 , .
,
,

.

National Instruments

5-5

LabVIEW

5.

5.4.3.
(Waveform Control Digital Waveform
Control)

Waveform
Digital Waveform, Waveform Graph
Digital Waveform Graph. LabVIEW ,
, ,
Waveform.
(1D
Array of Waveform).
Digital Waveform.

, (start time t0),
(delta t), ,
.
VI Waveform.

(Start Time t0)


t0 ,
.

, ,
.

(Delta t dt)
dt
.

(Waveform Data and Digital


Waveform Data Y)

, .

.
, .
,
.

LabVIEW

5-6

ni.com

5.

,
. NI DAQ
.
Set Waveform Attributes, Get
Waveform Attributes.



Waveform Control
Waveform Graph, Digital
Waveform Control Digital Waveform Graph.
t0, dt Y
Waveform Control Digital Waveform
Control,
.
(graph), t0
x.
dt t0 x.
Y ,
.

, dt,

Build Waveform.
VI . 5-2
1 10000 DAQ-,
7:00. (Y).
(t0) 7:00:00 p.m.
x. dt 1 (1000 / = 1
/). , 10000 10 ,
7:00:10 p.m.

National Instruments

5-7

LabVIEW

5.

. 5-2. Waveform Graph ( )


DAQ Channel Name , number of samples ,
sample rate

Waveform
VI , / .
,
,
, , .
- . 5-3
,
.

LabVIEW

5-8

ni.com

5.

. 5-3. Waveform
VI AI Acquire Waveform
c

Waveform. [1]
(t0),
(dt)
(Y). VI Digital IIR Filter
.
.

, . 5-4.

. 5-4. Waveform

VI AI Sample Channel
, .
, , ,
.
.

National Instruments

5-9

LabVIEW

5.


(. 5-5). VI Sine Waveform , VI AO
Generate Waveform .

. 5-5. Waveform


Get Waveform Components
,
. 5-6. Negate ,
.

. 5-6.


(Digital Waveform Control)

VI
Digital Waveform.
NI-DAQmx VI Digital I/O. Digital
Waveform VI,
,
, Waveform VI,
.

LabVIEW

5-10

ni.com

5.

5.5. VISA
,
, VI
VISA. VI VISA
VISA LabVIEW 16
LabVIEW.

5.6.
FieldPoint
-
FieldPoint VI FieldPoint.
FieldPoint VI FP Read FP
Write ( FP). VI FP Read
-,
FieldPoint IO Point. VI FP Write
, FieldPoint IO
Point.

5.6.1.
FieldPoint - (I/O
points), .
(Items).
MAX, LabVIEW
FieldPoint I/O Point.

5.6.2. FieldPoint I/O


Point
MAX FieldPoint
FieldPoint I/O Point. FieldPoint I/O
Point . ,
,
,
() .
FieldPoint ,
MAX.

National Instruments

5-11

LabVIEW

6.

6
6.

6.1.

: (DC)
(AC).
, .

, , .
, ,
: , ,
.
. 7
.

.
,
. :

P = I 2 R P = V 2 R , P (), I (), R
(), V ().

6.2. VI NI-DAQ


,
.

.

4 .
National Instruments

6-1

LabVIEW

6.

. 6-1
U 0 10 ,
W 0 200 (mph).
:

mph
U (V ) 20
= W (mph )
V
, . 6-1
R,
. , R
,
, .

. 6-1.
Anemometer , DAQ Device Channel DAQ-, DAQ
Device Ground DAQ-

6.2.1. NI-DAQmx
- . 6-2
VI NI-DAQmx. VI DAQmx Create Virtual Channel
Analog Input Voltage (
) Physical Channel,
0 10 .
VI DAQmx Read .
(Multiply)
010 0200 /
20 /.

LabVIEW

6-2

ni.com

6.

. 6-2. VI DAQmx

6.2.2.

.
. 6-3 ,
(Speed)
, , . ,
29 /, ,
. ,
29 /.

.

. 6-3.

. 6-4.

National Instruments

6-3

LabVIEW

6.

. 6-4.

Transducer (Anemometer) ();


Analog-to-Digital Conversion (DAQ Device) -
( );
Software Signal Conditioning (Averaging, LabVIEW VI)
() ( VI);
DC Measurement (Wind Speed)
( )

NI-DAQmx
- . 6-5 VI NI-DAQmx. VI
DAQmx Read Analog Wfm 1Chan NSamp 1000
, VI
DAQmx Create Virtual Channel. VI Mean 1000 ,
VI DAQmx Read,
.

6-5. VI NI-DAQmx

6.3.

. 6-6 ,

. ,
, .

LabVIEW

6-4

ni.com

6.

. 6-6.

Voltage (Sinusoid) ();
Analog-to-Digital Conversion (Instrument DMM) -
( );
IVI Driver Software (LabVIEW subVIs) IVI
( LabVIEW);
DC Measurement (Voltage)

- (. 6-7)
VI IVI. VI IviDmm Initialize

. VI IviDmm Configure Measurement
. VI IviDmm Read
, VI IviDmm Close .

. 6-7. VI
IVI
,
VI IviDmm Read
For Loop.

.

National Instruments

6-5

LabVIEW

7.

7
7.



,
FiledPoint .

7.1.




,
.
, ,
. ,
, ,
120 (VAC),
, ,
120 (VDC).
()
Vrms .

, .
Vrms = Vpeak / 2 .
120 ,
,
() Vpeak 170 .

6 .

National Instruments

7-1

LabVIEW

7.

7.2.

. 7-1
.

. 7-1.
DAQ-
Voltage (Sinusoid) ();
Analog-to-Digital Conversion (DAQ Device) -
( );
Software Signal Conditioning (Analysis, LabVIEW subVI)
( LabVIEW subVI);
RMS Measurement (Voltage)

7.2.1. NI-DAQmx
- . 7-2
VI NI-DAQmx. VI DAQmx Create Virtual Channel
. VI DAQmx
Timing Sample Clock
(Finite Sample). Samples
per Channel Rate ,
.
20 000
20 000 /,
1 . VI DAQmx Read 20000
(Waveform) VI
Basic Averaged DC-RMS,
.

LabVIEW

7-2

ni.com

7.

. 7-2. -
VI NI-DAQmx

7.2.2. ,


. 7-3 ,
.

. 7-3. ,

Waveform (Sinusoid) ();


Analog-to-Digital Conversion (DAQ Device) -
( );
Software Signal Conditioning (Analysis, LabVIEW subVI)
( LabVIEW subVI);
Measurements (Voltages)

,
, ,
( ) ,
.
-
. 7.2 , Basic
Averaged DC-RMS VI Waveform Min Max

National Instruments

7-3

LabVIEW

7.

,
.

7.3.

. 7-4 ,
.
, ,
.

7-4. Vrms
Voltage (Sinusoid) ();
Analog-to-Digital Conversion (Instrument, DMM) -
( );
IVI Driver Software (LabVIEW subVIs) ( LabVIEW subVI);
DC Measurement (Voltage)

- (. 7-5) Vrms VI
IVI. VI IviDmm Initialize
. VI IviDmm Configure
Measurement
. VI IviDmm Read , VI IviDmm
Close .

. 7-5. - Vrms

LabVIEW

7-4

ni.com

7.

7.3.1.

, . 7-6,
.
, ,
.

7-6.

Voltage (Sinusoid) ();
Analog-to-Digital Conversion (Instrument, Scope) -
( );
IVI Driver Software (LabVIEW subVI) ( LabVIEW subVI);
Measurement (Voltage)

- . 7-7
VI IVI. VI IviScope Initialize

, VI IviScope Auto Setup [AS]
, VI IviScope Configure Channel
. VI IviScope
Read Waveform Measurement [WM]
, , VI IviScope Close .

. 7-7. -
VI IVI

National Instruments

7-5

LabVIEW

7.

7.4.


FieldPoint
. 7-8 , Vrms
FieldPoint.

. 7-8. FieldPoint

Voltage (Sinusoid) ();


Analog-to-Digital Conversion (FieldPoint System) -
( FieldPoint);
IVI Driver Software (LabVIEW subVI) IVI (
LabVIEW subVI); RMS Measurement (Voltage)

- . 7-9 Vrms VI
FieldPoint.
FieldPoint I/O Point cFP-AI-102.

. 7-9. - Vrms VI FieldPoint

LabVIEW

7-6

ni.com

8.

8
8.


8 ,
, FiledPoint
.

8.1.

VI NI-DAQ

-
, (. 8-1).

. 8-1.

Sensor (Thermocouple) ();
Signal Conditioning () ;
Analog-to-Digital Conversion (DAQ Device) -
( );
DC Measurement (Temperature)
()

,
...,
.

ni.com/info National Instruments, ext4n9.
. 8-2,
R , .
, , ,
R
.
National Instruments

8-1

LabVIEW

8.

. 8-2.
Thermocouple ;
DAQ Device Channel ;
DAQ Device Ground

8.1.1. NI-DAQmx
- . 8-3
DAQmx Task Name.
, My Temperature Task,
DAQ Assistant.
, ,
(CJC),
.. VI DAQmx Read
. NI-DAQmx
-.
5
DAQ .

. 8-3. - VI
NI-DAQmx

VI DAQmx Create Channel.

LabVIEW

8-2

ni.com

8.

8.2.

VI
FieldPoint
. 8-4
FieldPoint.

. 8-4. FieldPoint

Transducer (Thermocouple) ();


Analog-to-Digital Conversion (FieldPoint System) -
( FieldPoint);
DC Measurement (Temperature)
()

- . 8-5
VI FiledPoint.
FieldPoint I/O Point cFP-TC-120.

. 8-5. -
FieldPoint

National Instruments

8-3

LabVIEW

9.

9
9.


9
,
FiledPoint .

9.1.



, 4-20 .
,
(4 ) ,

.

, ( 2000
), . 4-20
,
, .
4-20
. . 9-1
(
) .
24 .
,
,
.

National Instruments

9-1

LabVIEW

9.

. 9-1.
Level Sensor ;
Remote Sensor Electronics
;
24 V Loop Supply 24 ;
DAQ Device Channel ;
DAQ Device Ground ;
Rp= 249 W Precision 249


Rp= 249 .
:
I mA =

V(Volts)
R (kOhm)

4-20 ,
Rp= 249 0,996 4,98 ,

.
,
. . 9-2
0 50 (L , I ).
4 0 , 20
50 .

LabVIEW

9-2

ni.com

9.

. 9-2.
Rp= 0,249 , L
:

L=

9.2.

25 V
25
8 0,249 2

VI NI-DAQ
. 9-3
.

. 9-3.
Transducer (Level Sensor) ( );
Analog-to-Digital Conversion (DAQ Device) -
( );
Current Measurement (Tank Level) (
)


, ,

National Instruments

9-3

LabVIEW

9.


, . 9.1.
- -
(. 8.3)
.

9.3.



. 9-4 ,
.
, ,
.

. 9-4.
Voltage (Sinusoid) ();
Analog-to-Digital Conversion (Instrument, DMM) -
( );
IVI Driver Software (LabVIEW subVIs) ( LabVIEW subVI);
DC Measurement (Voltage)

- (. 9-5) VI
IVI. VI IviDmm Initialize
. VI IviDmm Configure
Measurement . VI IviDmm
Read , VI IviDmm Close .

. 9-5. -

LabVIEW

9-4

ni.com

9.

9.4.

VI FieldPoint
. 9-6
FieldPoint.

. 9-6. FieldPoint
Transducer (Level Sensor) ( );
Analog-to-Digital Conversion (FieldPoint System) -
( FieldPoint);
Current Measurement (Tank Level) (
)

- . 9-9 VI
FieldPoint.
FiledPoint I/O Point cFP-AI-100.

. 9-7. -
FieldPoint

National Instruments

9-5

LabVIEW

10.

10
10.
10

FiledPoint.

10.1.
(e)
. ,
(. 10-1).

. 10-1.
()
(). ,
, /.
.
- (e).
(Force) (. 10-1),
(D),
, .

.
( )
( ) .
,
0,25 0,30.

.
,
National Instruments

10-1

LabVIEW

10.

.
,
.
,
.
(
)
.


. . 10-2,

,
(Wheatstone).
,
(Vm).
,
.

. 10-2.
DC Voltage Excitation ;
Supplied by Signal Conditioning Hardware
;
Physical strain gage ; Rg is value at rest

,
.
4 ,
.
,
(. 102).
.

LabVIEW

10-2

ni.com

10.

National Instruments SCXI-1520


,
,
, 8
, , ,
.

National Instruments SCXI-1121 National
Instruments SCXI-1122,

. SCXI,
SC-2043SG,
.

National Instruments.
SCXI
. ,
,
Getting Started with SCXI (
SCXI).

10.2. VI NIDAQmx
- . 10-3
NI-DAQmx Task Name Constant.
MAX MyStrainTask
, ,
.. VI DAQmx
. NI-DAQmx Task Name
Constant
-.

. 10-3. Task I/O Constant

National Instruments

10-3

LabVIEW

10.

10.3. VI
FieldPoint
- . 10-4
VI FieldPoint
FieldPoint I/O Point cFP-SC-140.

. 10-4 FieldPoint

LabVIEW

10-4

ni.com

11.

11
11.
11
.

11.1.

. 1
1 , 1 .
2 : 2
4- .
,
.
V
: R = , R , V
I
, I .

11.1.1. 2-
, 100 , 2 (. 11-1).

. 11-1. 2-

National Instruments

11-1

LabVIEW

11.

(Test Current)
RS. ,
,
.
2-
RLead .

Ix RLead,
RS.
0,01 1 , 2 RS 100 .

11.1.2. 4-
, 100 , 4 (. 11-2),
, 2 .

. 11-2. 4-

,
(
, ).
,
, .
LabVIEW

11-2

ni.com

11.

, 4- -

.

11.2.
(DMM)
. 11-3 .

. 11-3.
Resistance (Resistor) (); Analog-to-Digital Conversion
(Instrument, DMM) - (
); IVI Driver Software (LabVIEW subVIs) IVI
( LabVIEW subVI); Resistance Measurement (Ohms)
()

- (. 11-4)
VI IVI. VI IviDmm Initialize

. VI IviDmm Configure Measurement
. VI IviDmm Read
, VI IviDmm Close .
, -
. 6-7
VI IVI. ,
- . 11-4 ,
2- .

. 11-4.

National Instruments

11-3

LabVIEW

12.

12
12.
12
- .

12.1.

, , ,
.

12.1.1.
,
, (DC).
VI (SinglePoint Analog Output).
VI,
,

. ,
, LabVIEW
VI. ,
, ,

.

4 .

12.1.2.
,
,
. , -
.
VI, ,
, Sine Generation VI,
National Instruments

12-1

LabVIEW

12.

Waveform
.

.
,
.
,
.

12.1.3.
DAQ-,
.
E
AO0, AO1 AO GND, AO0
0, AO1 1, AO GND

. . 12-1 ,
NI.

. 12-1.
Load ; I/O Connector -;
Analog Output Channels

LabVIEW

12-2

ni.com

12.


-.

12.2. VI NIDAQmx
VI NI-DAQmx.
- . 12-2 VI NI-DAQmx
. VI Sine
Waveform 10
1 . VI DAQmx Write
, VI DAQmx Timing
, ,
VI DAQmx Wait Until Done
. VI
,
.

. 12-2. VI NIDAQmx

National Instruments

12-3

LabVIEW

12.

12.3.

- . 12-3
5 2 VI
IVI. VI IviFgen Initialize
IVI . VI IviFgen Configure
Standard Waveform [STD] , VI
IviFgen Initiate Generation
.

. 12-3. VI IVI

LabVIEW

12-4

ni.com

13.

13
13.


.

13.1.
VI NI-DAQ

NI-DAQmx.

, ,
. ,
100 ,
, , 200 .
5-10
.
,
. ,
, 3- . , ,
10- . ,
100 500
15- .
5 ,
5 , : 5 3
= 15 .
,
, .

, . ,
500 100 ,
5 .

National Instruments

13-1

LabVIEW

13.

13.1.1. NI-DAQmx
- . 13-1
, Waveform, VI NIDAQmx. VI DAQmx Create Virtual Channel
. VI DAQmx Timing
Sample Clock
Finite. Samples per Channel Rate
.
100
500 , 1/5 . VI DAQmx
Read 100
VI Extract Single Tone Information
( ),
.

. 13-1. VI NIDAQmx
,
Physical Channel I/O,
VI DAQmx Read
VI Extract Single Tone Information
.

13.2.

- . 13-2
VI IVI. ..
,
VI - .

LabVIEW

13-2

ni.com

13.

. 13-2.
VI IviScope Initialize
. IVIScope Auto Setup [AS]
, , VI
IviScope Configure Channel .
VI IVI IniScope Read Waveform Measurement [WM]
, VI IviScope Close .
, - . 13-2
- VI
IVI (. 7-7). -
(Measurement Function).

13.3.

, .
()
.
, (aliased)
.

, .
, , 800
, 500 , c
200 ,
|800 (2 500)| = 200


.
,
, ,
. ,
National Instruments

13-3

LabVIEW

13.

800 ,
1600 , ,
5-10 , 800 .
100 ,
() fc =250
250 250
. 13-3 .

. 13-3.
Ideal Filter ; Real Filter ;
Passband ; Stopband ;
Transition Region

(. 13-4),
.
.
,
Vout/Vin 1,
, Vout/Vin 0. Vout/Vin
1 0
.
- . 13-4
.

. 13-4.

LabVIEW

13-4

ni.com

13.

VI Digital IIR Filter


IIR filter specifications (. 13-5),
.

. 13-5. Digital IIR Filter


( )

5- 250 .
. ,
. ,
.
, (Upper cutoff frequency), (Passband ripple)
(Stopband attenuation).
. 4 Digital Filtering ( )
LabVIEW Analysis Concept Manual (
LabVIEW).

National Instruments

13-5

LabVIEW

14. ,

14
14. ,


14 , ,

.

14.1.
.
- 4
.

.
() ,
,
() .


.
, ,
50 (. 14-1).

. 14-1.
Maximum Rise/Fall Time
/ ; High, Inderteminate, Low
,
National Instruments

14-1

LabVIEW

14. ,

14.1.1.
. 14-2 .

14-2.
GATE (); SOURCE (CLK)
(); Count Register ; OUT -

GATE
.
SOURCE (CLK) ,
, ,

( ).

().
, .
N n ()
, N = 2n.
OUT ,
.

14.2.



. ,

, .
,
, .

LabVIEW

14-2

ni.com

14. ,

,
.

,
.

.
, . . 14-3
.

. 14-3.
Period Measurement ; Pulse Period ;
Pulse Width Measurement ;
Width ( )

T t
N
N
: T(s ) =
(s) =
,
f0
f0
N f0,
T t ( ).
( ),
f
, : f (Hz ) = 0 .
N

, .
,
(Ticks). ,
.

National Instruments

14-3

LabVIEW

14. ,

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


.
. 14-4
.

. 14-4.
Input Signal ; Counter Timebase
; Miss Both Edges ;
Miss One, Catch One , ;
Catch Both Edges


. ,

.
,
.
,

. .
,
.
.
, 20
5
LabVIEW

14-4

ni.com

14. ,

3, 4 5 ,
6,67 , 5 4 ,
33%.

14.3.1.

dQuant

:

Quant =

fx
f0 - f x

fx , f0
( ).

, . . 14-1

.
14-1.

10
100
0.01%
100
100
0.1%
1
100
1.01%
10
20
0.05%
100
20
0.5%
1
20
5.26%

14.4.

,
.
, .


.

National Instruments

14-5

LabVIEW

14. ,

14.4.1.


.

,
" ".

. 14-5.
Measurement Time ; Timebase (Ts)
; Signal to Measure


, ,
. ,

,
VI NI-DAQ Read.

:

Tx =

Tm
Nx

fx =

Nx
,
Tm

Tx fx , Tm
, Nx .





:
LabVIEW

14-6

ni.com

14. ,

Quant =

Tx
Tm

Quant =

1
Tm f x ,

dQuant ; Tx fx
; Tm - .

. . 4-2

. ,

.
14-2.

10
1
10.00%
100
1
1.00%
1
1
0.1%
10
1
0.01%
10
100
0.1%
1
100
0.001%
10
100
0.0001%
10
1
0.010%
100
1
0.0010%
1
1
0.0001%
10
1
0.00001%


VI NI-DAQmx
- . 14-6
10 VI NI-DAQmx. Starting Edge
( ) Rising
( ),
. VI DAQmx Read
().

National Instruments

14-7

LabVIEW

14. ,

. 14-6. NI-DAQmx

:
NI-DAQmx Help.

14.4.2.

,
,
. ,

.
,
,
Divisor
() .
,
.
Divisor Tx ( fx),
TDx (fDx)
:

TDx =

Tx
KD

f Dx = K D f x

KD .
, 24-
100 , KD = 1 (
)
0.006 50 ,

LabVIEW

14-8

ni.com

14. ,

f
f x = 0 K D ,
Nx
f
f x min = 0
N x max

100kHz
K D =
1 = 0.006 Hz
24
2

f
f x max = 0
N x min

100kHz
K D =
1 = 50 kHz
2

, KD = 4,
0.024 200 ,
f
f x min = 0
N x max

100kHz
K D =
4 = 0.024 Hz
24
2

f
f x max = 0
N x min

100kHz
K D =
4 = 200 kHz
2

Quant =

1
-
K D f 0 Tx - 1

Quant =

fx
-
K D f0 - f x


, ,
. . 14-3


20 .

National Instruments

14-9

LabVIEW

14. ,

14-3.

1
10
100
1
10
1
10
100
1
10
1
10
100
1
10

4
4
4
4
4
10
10
10
10
10
100
100
100
100
100

0.00125 %
0.0125 %
0.125 %
1.25 %
12.5 %
0.0005 %
0.005 %
0.05 %
0.5 %
5.0 %
0.00005 %
0.0005 %
0.005 %
0.05 %
0.5 %

, .
,

,

. , ,
1 1
2% ,
, ,
50 .

4 .

LabVIEW

14-10

ni.com

15.

15
15.



FieldPoint.

15.1.


, /. . 15-1
(0 ) (5 ) .
.

. 15-1. (High Pulse)


(Low Pulse)

,
,
.

,
.
. 15-2 15-3 ,
.

National Instruments

15-1

LabVIEW

15.

. 15-2.
Counter Starts ; Initial Delay ;
Low Time (Tlow) ;
High Time (Thigh)

. 15-3.
,
.
Thigh ,
5 .
Tlow ,
0 .
T
. , .

(Duty Cycle) (. 15-4).
kdc
:
k dc = Thigh T

0 1
.
LabVIEW

15-2

ni.com

15.

0.5
50%. , 50 %, ,
,
, 50%, , , ,
,
.

. 15-4. (Duty Cycle)


, , ,
:
,
, .
,
. ,
, ..
, 5 ,
, .. ,
0 .
.

. ,

National Instruments

15-3

LabVIEW

15.

, ,
Thigh,
(. 15-5).
.

. 15-5.
Generation Complete

,

, ,
Tlow,
(. 15-6).
( )
.

. 15-6.

,
.
- (),
- ().
LabVIEW

15-4

ni.com

15.

15.2.
VI NI-DAQmx
- . 15-7
VI NI-DAQmx. VI NI-DAQmx Create Channel
:
,
10
50%. ,
, 50 ,
, 50 . VI DAQmx
Timing 5 ,
. VI DAQmx Start
. VI DAQmx Wait Until Done

. VI,

5 .

. 15-7. VI NI-DAQmx

National Instruments

15-5

LabVIEW

15.

15.3.
FieldPoint VI
- . 15-8
VI FieldPoint.
FieldPoint I/O Point
cFP-PG-522, .
,
, .

. 15-8. VI FieldPoint

LabVIEW

15-6

ni.com

16. LabVIEW

16
16.


LabVIEW
,
VISA .

16.1.


. LabVIEW
(VI)
VISA .
,
.
, ,
, , .

,
.
LabVIEW Instrument Driver Library
, .. GPIB,
VXI RS-232/422. VI
,
,

.

VI -.
LabVIEW
VISA. VISA
. VISA
,
, GPIB, PXI VXI.
National Instruments

16-1

LabVIEW

16. LabVIEW

VISA ,
.
,
,
.

16.1.1.
Instrument Driver Network
ni.com/idnet.
,
:
.
, ,
.
NI-VISA VI,
.
VI Instrument I/O Assistant
Express.
.
National Instruments
Instrument Driver Network ni.com/idnet.



labview\instr.lib. , HP34401A,
LabVIEW,
labview\instr.lib\hp34401a.
VI,
. VI
VI , VI
Finctions.

LabVIEW

16-2

ni.com

16. LabVIEW

16.1.2.
. 16-1 ,
.

. 16-1.
Application Programs ;
Getting Started VI VI ; Functional Body
; Application VIs VI ;
Initialize ; Configure ; Action&Status
; Data ; Utility ; Close ;
Component VIs VI ; Support VIs VI ;
VISA - Virtual Instrument Software Architecture

VI Getting Started,
VI subVI: Initialize, Application Close.
VI Application

. VI Application
VI

,
, .
VI Application VI
,

. VI
Application VI ,
. Application VI
HP34401A App. Example VI.
National Instruments

16-3

LabVIEW

16. LabVIEW

VI Initialize ,
,

. VI Initialize
.
VI Configuration
.
VI
Configuration. VI
.
VI Action ,
. VI Action
VI Configuration ,
, ,
. VI Status
.
VI Data .
VI
, VI
.
VI Utility ,
VI . VI
VI, , , ,
, . ,
VI VI, ,
.
VI Close
. Close VI
.
,
Close VI VI Initialize.
. VI (VI Application) VI Initialize VI
Close. VI
Initialize. VI Getting Started VI Initialize Close.

LabVIEW

16-4

ni.com

16. LabVIEW

16.1.3.
LabVIEW
. ,
. :
LabVIEW Plug and Play
IVI
,

LabVIEW Plug and Play


LabVIEW Plug and Play VI
.
VI ,
, , , .
,
, -,
(online Help). LabVIEW Plug and Play

,
, ,

.

IVI
IVI ,
.

,
. , VI
,
. IVI Foundation,
IVI ,

: , ,
/ ,
, , ,
, .
IVI National Instruments
:

National Instruments

16-5

LabVIEW

16. LabVIEW

,
" "
,
. NI
,
.

16.2. VISA LabVIEW


VISA API -
. VISA
, GPIB,
RS-232, Ethernet,
PXI VXI ,
.

16.2.1. ASCII

, GPIB,
, Ehternet,
VXI, ,
, ASCII .
,

.
(Standard Commands for Programmable
Instruments SCPI) , ASCII ,
.
.

.
, , VISA
Read, VISA Write, VISA Assert Trigger, VISA Clear VISA Read STB.
, PXI,
VXI, .

,
.
,
LabVIEW

16-6

ni.com

16. LabVIEW


.

.
VISA In, VISA Out, VISA Move In VISA Move
Out.
VISA . VISA
.

16.3.

.
:

.
NI-VISA.
LabVIEW, , ,
LabVIEW
, NI-VISA.
. VI Getting Started
. ,
MAX VISA Find Resource.
.

16.3.1. Instrument I/O Assistant


(Windows) Instrument I/O Assistant
, GPIB,
Ethernet, .
Instrument I/O Assistant
. Instrument I/O
Assistant .
Instrument I/O Assistant
Instrument I/O Assistant Express VI -.
Query and Parse,
(
*IDN?). , ,
. ,
, ,
National Instruments

16-7

LabVIEW

16. LabVIEW

, .

.

16.3.2. VISA
VISA VI LabVIEW
, VISA Find Resource.
- VISA VI
-. VISA Find Resource ,
, VISA
VISA . VISA Find Resource
, , LabVIEW
VISA.
VI,
LabVIEW.
,

VISA Interactive
Control (VISAIC). (Windows)
StartNational
InstrumentsVISAVISA Interactive Control MAX
ToolsVISAVISA Interactive Control.
VISAIC ,
LabVIEW ,
, LabVIEW VISA
.
, VISAIC, ,
- VISA .

16.3.3. Getting Started VI


Getting Started VI
.
VI
.
,
, . (Windows)
, MAX.

LabVIEW

16-8

ni.com

16. LabVIEW

VI , ,
,
.

Getting Started VI

Getting Started VI
, VI
.
VI,
FileSave As.
, ,
OperateMake Current Values Default.
- ,
VI Application subVI.

16.4. VI

,
.

/
Initialize Instrument
Driver VI, .
VISA IVI.
.
:
Interface Type[board index]::Address::INSTR
, GPIB0::2::INSTR
2,
() GPIB.
(Windows)
MAX.
VISA
VISA IVI 3
.

National Instruments

16-9

LabVIEW

16. LabVIEW

Error In/Error Out


VI
VI - LabVIEW. VI
error in error out
VI .
Boolean,
, VI,
.

16.5. VISA
,
, VISA : VISA Write
VISA Read (. 16-2).

. 16-2. VISA
VISA ,
. VISA Write ,
. ,
VI VISA Write
MEAS:DC?
VISA resource name VISA Write
VISA Read, ,
. VISA Read

. VI Simple Error Handler
,
VISA.

16.5.1. VISA
VISA (),

Property Node.
-
VISA Session reference Property Node.
LabVIEW

16-10

ni.com

16. LabVIEW

VISA Session Session Property Node,


LabVIEW VISA Class ,
.
VISA
Property Node
Select ClassVISAI/O Session.
INSTR,
VISA.
,
.
VISA :
. ,
. ,
.
.
,
Context Help.
VISA
LabVIEW Help, HelpVI,
Function, & How-To Help.

16.5.2. VISA
VISA ,
,
,
- .

GPIB SRQ
- . 16-3 VISA
,
GPIB Service Request (SRQ).

. 16-3. GPIB
National Instruments

16-11

LabVIEW

16. LabVIEW

VI . 16-3 ,

.
,
. VI Wait for RQS 10
SRQ. SRQ VISA
Read . VI
GPIB SRQ,
().

16.5.3. VISA VI

VISA VI
VI Advanced VISA. VISA VI
\examples\instr\visa.llb.

16.6.

.

,
. ,
VI
.

, ,
,
.
,
, .
-
.

.
,
.
, ,
LabVIEW, ,
VI, .

LabVIEW

16-12

ni.com

16. LabVIEW

16.6.1. Instrument
I/O Assistant
(Windows) ,
, Instrument I/O Assistant,
-.

16.6.2.
, ,
Format Into String.
,
.
- . 16-4
.

. 16-4.
Format Into String SET 5.50 VOLTS,
VI VISA Write ,
5.5 . SET , VOLTS
().

16.6.3. ,
, ,
,
/ .
,
.

. ,

National Instruments

16-13

LabVIEW

16. LabVIEW

. ,
LabVIEW,
.
- . 16-5
. VISA Read
. ,
VOLTS:DC 12.3456789 .
String Subset
.
Scan From String () .
9, offset Scan
From String, . . . 16-5
.

. 16-5. ,

Waveform
,
ASCII, 1- 2- .

.

ASCII
ASCII,
. ,
LabVIEW

16-14

ni.com

16. LabVIEW


,
. 1024 ,
0 255. ASCII
4
( 3 1
, , ).
ASCII 4096 (4 1024)
.
- . 16-6 ASCII ,
VISA Read,
VI Extract Numbers. VI
. VI Extract Numbers
() ,
.

. 16-6. ASCII

1-
ASCII

.
, ,
, .
1-
.
8- ,
.
1-
,
.
, ..
ASCII . ,
National Instruments

16-15

LabVIEW

16. LabVIEW

65, ,
. , 13
ASCII ,
() .


'\'Codes Display.
, \r.
,
ASCII, VI ,
, ,
. 1024-
, 1024
.
1
, , 8 .

String Subset
.
String To Byte Array,
. 16-7,
.

. 16-7. 1-

.

,
, .

LabVIEW

16-16

ni.com

16. LabVIEW

2-
2-
ASCII 1-
.
16- 2- ASCII . ,
1 , ,
ASCII .
,
. , 1024 ,
2-
. , 2048
5- 2 .
5- Type Cast
16 .


, 2-
, . 2-
qH 29000,
( Hq) 18545.
. ,
, ,
.
.
,
.

National Instruments

16-17

LabVIEW

1.

1
17. 1.


.
, ,
, ,
, GPIB PXI.
,
, :
()
(-, ,

- /)
( ,

, )
(ASCII ,

, )


. ,
, ,
, Ethernet, CAMAC, CAN, FieldBus .,
.

GPIB
,
, ,
GPIB,

. GPIB
.

National Instruments

17-1

LabVIEW

1.

,
, , GPIB
,
.
0 30. ,
, GPIB ,
.
.

.
,
.


GPIB 24-
, 8 (DIO 1-8), 5
(EOI, IFC, SRQ, ATN, REN), 3
() (DAV, NRFD, NDAC) 8
"". GPIB 8- , .
,
, .
(8 ),
ASCII
.
GPIB
1 /
:
4 ,

2 .
() 20 .
15 ,

.


.

LabVIEW

17-2

ni.com

1.


HS488, ,
GPIB,
NI.



,
, ,
.

.
,
- ,

.

: ,
,
-.
-,
.
,
.
,
.
, "1"
, "0" .

. .
,
,
.
,
, ,
, , .
1, 1.5 2 -,
. ,
(MARK).
National Instruments

17-3

LabVIEW

1.


-,
(SPACE).



/,
.




:
RS-232 ( ANSI/EIA-232) , ,

, ,
.


.
RS-232 "" .
RS-422 ( AIA RS-422A) RS-232,

()
,
. ,
,
,
.
RS-485 ( EIA-485) RS-422,

32 ,

.
,
, RS485. RS-485
,
,
, -
.

LabVIEW

17-4

ni.com

1.



, ,
.
,
(DCE) (DTE), :
, , -,
().

PXI

PXI .
PXI CompactPCI,
PXI
. PXI, Windows,
PCI CompactPCI,

VXI GPIB.
PXI
( Embedded Pentium
), . PXI
- -
, -,
- ,
, , ,
.



, PCMCIA (), PCI (
) PXI.
,
,
,
.
,
,
, ,
National Instruments

17-5

LabVIEW

1.

.

,
..
.


. ,
, ,
,
.

LabVIEW

17-6

ni.com

2.

2
18. 2.


ni.com
National Instruments:
Support (Online):

o Self-Help Resources ( " ")




ni.com/support, ,
.

, ,
, ,
, ,
, ,
..
o Assisted Support Options ( )

,
ni.com/support. Online

, E-mail.
Training () ni.com/custed

, CD.

(Hands-On)
.
System Integration ( )

,
, NI
Alliance Program. ,
NI
ni.com/alliance.
National Instruments

18-1

LabVIEW

2.

ni.com,
-
National Instruments.
LabVIEW
Measurements Manual. , Worldwide
Offices ni.com/niglobal
,
, , E-mail
.

LabVIEW

18-2

ni.com

19.

(nano)

10-9

(micro)

10-6

(milli)

10-3

(kilo)

103

(mega)

106

A
A/D (Analog-to-digital)

-; /.

ADC (Analog-to-digital
converter)

- ()
, , ,
().

AI (Analog input)

() .

AIGND

alias

,

,
.

amplification

analog trigger

.
() .

ANSI

(American National
Standards Institute)
AO (Analog output)

() .

Application
Programming Interface
(API)

,
VI ( ),
, .

National Instruments

19-1

LabVIEW

B
Butterworth filter

1. ,
.
,
,
8 . ,
,
,
.
channel

clock

2. ,
, ,
, ,
. NI-DAQmx
()
().
Traditional NI-DAQ ,
NIDAQmx. Traditional NI-DAQ
MAX.
,
.

1.
.

cold-junction
compensation

common-mode voltage

LabVIEW

2. ,

.

c , /.
, 10 /
250 25 . ,


("x" 50 "y" 0 ).

"" .

19-2

ni.com

configuration utility

-: Windows Measurement &


Automation Explorer, Macintosh NI-DAQ Configuration Utility.

coupling

CMRR


,
. ,

. ,
,
CMRR ,
:

(Common-mode
rejection ratio)

CMRR = 20 log (
) / ( )

.
CMRR
. CMRR:
CMRR = 20 Log ( ) /
(C , )

counter

,
.
16 48 ( ).
, 2N, N
.
, ,

.

curve fitting


,
.

D
D/A (Digital-to-analog)

DAC (Digital-to-analog
converter)

- ()
, , ,
()
.

DAQ

. data acquisition

DAQ Assistant

()

, .

National Instruments

19-3

LabVIEW

DAQ device

(),
.
, PCMCIA,
DAQPad, USB 1394
(FireWire).
SCXI.

data acquisition
(DAQ)

1.
, ,
.
2. .

dB

device

,
,
.
. .
DAQ device measurement device.

device number

,
.

DFT

. Discrete Fourier Transform.

differential
measurement system

. ,
,
,
, .

digital trigger

,

.

Discrete Fourier
Transform
DMA
(Direct Memory
Access)

().
()
,
.
DMA
.

driver


,
, .

duty cycle

LabVIEW

19-4

ni.com

E
EEPROM
(Electrically erased
programmable readonly Memory)


()
(),
()
.

F
fall time

,
90% 10 %.

Fast Fourier Transform

()
,
.

FFT

. Fast Fourier Transform.

FieldPoint

-
National Instruments.

filtering

()
,
.

floating signal sources

,

.
, .

(nonreferenced signal sources).

Fourier Transform

,

.

.

frequency

f ,

. ,
.

frequency response

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

.

National Instruments

19-5

LabVIEW

G
gain

GATE input pin

,
.

General Purpose
Interface Bus

GPIB ( HP-IB) ,

. IEEE 488,
ANSI/IEEE 488-1978,
488.1-1987, 488.2-1992.

GPIB

. General Purpose Interface Bus.

grounded signal sources

,
, ,
.
.

H
handshaking

() ,
.

Hz

I

,

.
, .
.
10 +10
0, +5 -5.
Input range

instrument driver

LabVIEW

,

.
,
.
.
, SCXI

.
,

.

19-6

ni.com

interrupt

I/O
(Input/Output)

isolation

,

.
- ,
,
/ .
,

.


.

()

(Interchangeable Virtual API, -
Instruments)
.
IVI

IVI driver

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

K
kH

L
Legacy MIO device

MIO , AT-MIO-16

Plug and Play.
/ 9513.

limit settings

linearization

.
LabVIEW,
,

.

LSB

().

(Least Significant Bit)

National Instruments

19-7

LabVIEW

low-pass filter

() ,

.

().

M
mA

MAX


National Instruments.

(Measurement &
Automation Explorer)
MB

. 1 = 1024 .

measurement device

, ,
- (MIO) E ,
SCXI .

MHz

module

,
, , ..
,
. PXI SCXI.

multithreading

,

().

NI-DAQ

,
NI. NI-DAQ
VI ,
, , LabVIEW,
,
, ,
.

NI-DAQ 7.0

NI-DAQ Traditional NI-DAQ NIDAQmx


API,
.

LabVIEW

19-8

ni.com

NI-DAQmx

NIST
(National Institute of
Standards and
Technology)

NI-DAQ VI,

. NI-DAQmx
NI-DAQ: DAQ Assistant
,
LabVIEW,
LabWindows/CVI Measurement Studio;
-;
API
VI,
NI-DAQ.

, ,
.

Non-referenced singleended (NRSE)


measurement system


,

.

ns

Nyquist frequency

.
,
,
.
.

Nyquist Theorem

,
,

, .
,
.

O
OUT output pin

,
.

P
PCI
(Peripheral Component
Interconnect)

National Instruments

19-9

LabVIEW

period


. ,
(), T.

physical channel

. channel.

Poisson's Ratio


, .

Property Node

VI .

pulse

,
.

pulse train

pulse width


(
50% ).

PXI

(PCI eXtensions for


Instrumentation)

quantization error


-
.
,
, .

R
R

referenced single-ended
(RSE) measurement
system

rise time

10% 90%
.

RMS

(Root Mean Square)


RTD
(Resistance temperature
detector)

LabVIEW

,
,
.

19-10

ni.com

RTSI
(Real-Time System
Integration bus)

National Instruments,
.
,
.

S
S

(Sample)
sampling period

scan


.
. ,

.

scan clock


Traditional NI-DAQ.
(, E-)
.
(, S-),
.

scan rate

,
LabVIEW . ,
10 LabVIEW 10
.

SCPI
(Standard Commands
for Programmable
Instruments)

IEEE 488.2,

- .

(Signal Conditioning
eXtensions for
Instrumentation)

National Instruments
. SCXI
.
, ,
.

sec

sensor

() ,
,
, , , .

setting time

,
.

SCXI

National Instruments

19-11

LabVIEW

signal conditioning

signal-to-noise ratio

/ (), : 20log
( / ).
, .
,
.

SOURCE input pin

,
.

SNR

. signal-to-noise ratio.

strain gage

,

.

T
task

,
, NI-DAQmx.

.

ticks

, .

Traditional NI-DAQ

NI-DAQ. Traditional NI-DAQ VI


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

transducer excitation


,
()
.

trigger

,
.

TTL
(Transistor-Transistor
Logic)

- ()
.

update

LabVIEW


.
. ,

.

19-12

ni.com

update rate

V
V

VAC

, .

(Volts, Alternating
Current)
VDC

, .

(Volts, Direct Current)


virtual channel

. channel.

Virtual Instrument
Software Architecture


, GPIB,
VXI, RS-232 . .

virtual instrumentation


/ ,
, .

.

VISA

. Virtual Instrument Software Architecture.

VXI
(VME eXtensions for
Instrumentation)

VME .

W
waveform

,
.

Wheatstone bridge


.
.
( ),
.

,
, . ,
,
.

National Instruments

19-13

LabVIEW

window

LabVIEW


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

19-14

ni.com

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