Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://www.ssau.ru/files/resources/sotrudniki/lv2003.pdf
Äàòà èçìåíåíèÿ: Mon Dec 5 00:00:00 2011
Äàòà èíäåêñèðîâàíèÿ: Tue Oct 2 15:30:52 2012
Êîäèðîâêà:

Ïîèñêîâûå ñëîâà: ï ï ï ï ï ï ï ï
..

.. _

_ _ LabVIEW_

2003


681.3.07 .. LabVIEW: . . . . . -. , 2003. 69 . ISBN 5-7883-0241-2 SCADA- LabVIEW National Instruments. , 220200 , . . . 4. . 58. .: 10 .

- .. . : .. , ..

ISBN 5-7883-0241-2

, 2002

2



1. LabVIEW 1.1. LabVIEW 1.2. LabVIEW 1.3. LabVIEW 2. 2.1. 2.2. 2.3. 2.4. , 3. 3.1. 3.2. 3.3. 3.4. 3.4.1. 3.4.2. 3.4.3. 3.4.4. 3.5. 4. - 4.1. 4.1.1. "CASE" ("") 4.1.2. 4.1.3. "SEQUENCE" ("") 4.2. 4.3. 4.4. - 4.5. - RS-232 4.6. 5. LabVIEW 5.1. 5.1.1. 5.1.2. 5.2. 5.3. «» - 6. LabVIEW 6.1. 6.2. 6.3. . .

3


..


. , - , , - , - , . . , Borland/Inprise Delphi "" , . , "" . National Instruments LabWindows/CVI LabVIEW. LabVIEW, . " ". LabVIEW. LabVIEW-. , LabVIEW-. LabVIEW, , . , LabVIEW ­ . , LabVIEW . .. (), 220200 " " " ", " ", " " " ". National Instruments, 1996-98 . LabVIEW, , .. , .
4


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

1.
1.1.

LabVIEW
LabVIEW
LabVIEW (Laboratory Virtual Instruments Engineering Workshop) ­ , National Instruments () , .. LabVIEW , Delphi. , . 1. LabVIEW . 2. LabVIEW - . 3. LabVIEW -; , , .

1.2.

LabVIEW
LabVIEW (), - - , . 1. ­ « » ­ , ­ .

1.1. ­ Fluke 8840A

5


1.1 , , "Measurement", , ­ "Function", "Range" "Trigger Mode". 2. ­ «-» .

1.2. - ­ Fluke 8840A

, , , , , . . 1.2 "Send DEMO" - , , , .. , " " , ­ . , . - ­ , LabVIEW . 7.0 LabVIEW ­ «-». , , , ­ National Instruments. , . , , , ­ - .

6


1.3. LabVIEW
, , , . , - . - , - , - , , ..

1.3. ,

, - , . , , (, , . 1.3) . , - , - , ., - (). , () , (, " ", .). " " - , . , LabVIEW, .

7


2.


, LabVIEW for Windows 3.x. ( National Instruments 7.1). , LabVIEW . : · "" ; · : LabVIEW, .

2.1. 1 ­ , . (, ) - , . , . 1. LabVIEW.
. LabVIEW for Windows 4.-6.x, -, "Eplore LabVIEW for your own applications" (" LabVIEW ").

2. (. 2.1). , "Controls" (" "). ­ LabVIEW.

8


2.1. LabVIEW

2.2. "" . LabVIEW 4.-7. , .

3. , "Numeric" (""), , (. 2.2). , . , "Thermometer" ("").

9


2.3.

4. "": · (. 2.1) (""); · , ; · "0.00" "70.0" . "10.0" "90.0". LabVIEW , 2.3.
. LabVIEW 4.-6. , . , , "Windows" ("") "Show Tools palette" (" ") Shift + .

5. "Show Diagram" (" -") "Windows", - . "DBL". , . : · - ; · - ; · - () ; · - ; · - " "; · - - " "; · - .

10


"DBL" , , "double". : · SGL - ; · DBL - ; · EXT - ; · I8 ­ ; · I16 ­ 16- ; · I32 ­ 32- ; · U8 ­ 8- ; · U16 - 16- ; · U32 - 32- ; · GSG - ; · GDB - ; · GXT - . 6. (""). "" , . , "" .
. , . , , , .

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

. : -. . (. "Edit"). , , . 7. -, , :

11


· "Tutorial" ("") "Voltage Read" (" ");
. LabVIEW "Demo Voltage Read" (" "), , , "Getting Started" (" ").

· "Structs & Constants" (" ") "Numeric constant" (" "); · "Arithmetic" ("") "Multiply" (""). : · " " 100.00; · "", , "Show" ("") "Label" (""), (, - "Temperature" - ""). : LabVIEW. : (. 2.4), LabVIEW . 8. (""). "" "Voltage Read". , , . "" .

2.4. -

12


"". , . "Multiply". , , . "" . " " "", "" "". : "" LabVIEW . 9. . " " (, ), 100 . 10. , .
. LabVIEW .

, , "Edit Icon" (" "). , .

2.5. C -

, MS Paint ( MS PaintBrush), "OK".

13


2.6.

11. . , , . , , . , , "Show Connector" (" "). ( ""), .

2.7.

"Patterns" (""). , (. 2.7). - .
14


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

"" ( "" ). , , , . : , . 11. 12. , "Save As..." (" ...") "File" ("").
. LabVIEW Mywork.LLB.

2.2.
, , . . 1. . (. 2.8): · , "Boolean" ("") "Controls" (" "); · "Waveform Chart" (" "), "Graph" (""). "Power" ("/") "Temperature History" (" ").

2.8.

15


, (""). , , , (. 2.9) .

2.9.

2. - , . , "VI..." ("...") " ". -. 3. ­ . , . "Structs & Constants" (" & ") "While Loop" (" While") -. "" . . , 2.10. , , , "", "/". 4. . , , .

2.10.

"Structs&Constants" (" ") "1000".
16


"Time & Dialog" (" ") "Wait Until Next ms Multiple" (", "). , 2.11. 5. , "", "" . , . , "".
. "Stop", . . LabVIEW, .

2.11. - " "

6. " " . .

2.12. " "

17


2.3.
"", . " " , . 1. " " "Save As..." (" ...") "File" (""). 2. - "3-point average" (" 3- ") "utorial" ("").
. LabVIEW "Getting Started" (" "). LabVIEW "3-point average" . , (. . 4.1.2).

3. , " " " ", "Insert" (""), . "" . , "Bundle" ("") "Array&Cluster" (" ").
. LabVIEW "Array&Cluster" (" ") : "Array" ("") "Cluster" (""). "Bundle" ("") .

"Bundle" ("") ( ) "". . "", , , , "" . "Bundle" ("") "" .

2.13. -

4. , 2.13.

18


5. . , . " " . "Show" (""), "Legend" (""). "", .
. LabVIEW "" ( ) , (). .

"" , , 3, "" . "" "" "Temperature" (""), - "3-point average" (" 3- "). "" "" (, ). "" , "Point style" (" "), - "". "Line style" (" ") . , .

2.14. " "

6. (. . 2.14). .

2.4. ,
, (""). , .

19


1. " " "Save As..." (" ...") "File" (""). 2. "Cnob" (" "), "Controls" (" "). "High Limit" (" "). , "70" "90". "" , , . , "" "", . , . 3. "Round LED" (" "), "Boolean" (""). "Warning" (""). "". "" . "" "" . 4. -, "Bundle" , . 5. "Greater?" ("?"), "Comparison" ("") " 3- ". "?" , , . , LabVIEW . , . .

2.15.

"Show Help" (" ") "Help" (""). - (, "?") . (. 2.15).
20


. LabVIEW "Windows" ("").

6. "" -, 2.16.

2.16. - ,

, "". - . , "", ! - "" , "Edit" ("") "Remove Bad Wires" (" ") Ctrl-B. 7. . . , "85". (. 2.17).

2.17. , 21


3.
3.1.
"Graph" ("") (. 3.1) , .

3.1. "Graph"

1. "Waveform Chart" (" ") . , -, : · ( ); · ; · N ( N ). 2. "Waveform Graph" (" ") , . , -, : · ( , 1); · ; · : ; · N ( N ). 3. "XY Graph" (" ") ( ) . , -, : · : ; · N ( N ). "Waveform chart" (" "), "Waveform graph" (" ") "XY Graph" (" ") 3.2.

22


4. "Intensity Chart" (" ") "Intensity Graph" (" ") "Waveform Chart" (" ") "Waveform Graph" (" "), , , .

3.2.

. , . (. 3.3): 1) Change to Control/Indicator - ; 2) Find Terminal - - , ; 3) Show - : · Label - ; · Legend - ( ); · Palette - ; · Digital Display - ; · Scrollbar - ; · X Scale - ; · Y Scale - ; 4) Data Operations - ; · Reinitialize to default - "" ; · Make Current Value Default - "-"; · Cut Data - "" , ; · Copy Data - ; · Description - ; · Clear Chart - ; · AutoScale X - ( ); · AutoScale Y - ( ); · Update Mode - (" ", "" " ");

23


3.3. " "

5) Create Attribute Node - - ; 6) Key Navigation - /; 7) Replace - ; 8) X Scale - ; · Formatting... - ; · AutoScale X - -; · Loose Fit... - ; 9) Y Scale - ; · Formatting... - ; · AutoScale Y - ; · Loose Fit... - ; 10) Transpose array - ; 11) Stack Plots - ; 12) Chart History Length - .
. " " .

3.2.
"Numeric" ("") , . , , : , , , .. (. 3.4.) "Numeric" ("") ; .

3.4. "Numeric" ("") 24


"Digital Indicator" (" "). , . , . "Digital Control" (" "). . , () , . , . "", - "". , . . 3.1 . , . 1. "Representation" ("") , . 3.5, . 2.1.

3.5.

2. "Data Range..." (" ") , . 3.6.

25


3. "Format & Precision" (" ") (. 3.7). 4. "Add Needle" (" ") , . 5. "Change to Control/Indicator" (" "). , , , "Meter" (" ") , "".

3.6. "Data Range..."

3.7. "Format & Precision"

26


" " " ", 3.8.

3.8. " "

3.3.
"Boolean" ("") , "" "". , , , , , , , .. (. 3.9)

3.9. "Booleans"

, "Mechanical Action" (" ") (. 3.10).

27


3.10. " "

1. Switch When Pressed ( ) . 2. Switch When Released ( ) . 3. Switch Until Released ( ) , . 4. Latch When Pressed ( ) , . 5. Latch When Released ( ) , , , . 6. Latch Until Released ( ) , , , . , , . , ( . 3.1 3.2). , , . "Stop", "On" "Off". "", .

3.11.

28


3.11 " ", . Latch Until Released (, ). «61» ­ 16-. - "Boolean Constant" (" "). "" "" "". "Out Port" (" ") , "?0:1" 0 1.

3.4.
LabVIEW , . 3.4.1. . "Array & Cluster" (" ") "Array" (""). , . , , (. 3.12). , , . . 3.2 .

3.12. ""

3.4.2. . "" ("struct"), "" ("record") "". "Array & Cluster" (" ") "Cluster" (""). , . , "" , , ( 3.13).

29


3.13. ""

3.4.3. . "String & Table" , .
. "File Path" (" "). -. .

3.4.4. . "List & Ring" (" ") , (. 3.14). , , .

3.14. "List & Ring"

"Menu Ring" ("-"). . " " () , , . "" . "Add Item After" (" "), "Add Item Before" (" ") "Remove Item" (" "), . "" , . "" - , ( 0) . , "".

30


3.5.
, , (. . 3.3, 3.6 3.7). .
. LabVIEW « » (Attribute Node) « » (Property Node).

, « » (Create Attribute Node) ­ . . 3.3. «» , (. . 3.15).

. 3.15.

. 3.16. « »

« » (Write Mode) « » (Read Mode). . 3.1.5 , . , . , , ­ , , , , .. (. . 3.15). . 3.1.6. « » - 0.1 .
. 32- , 24 , 8 R, G B. , «Color constant», «».

4. -
- , . :

31


· · · · · ·

; ; ; ; -; .

, -.
. , LabVIEW .

"Arithmetic" ("") , , "". "Trig & Log" (" ") , , " ". "Comparison" ("") , , " ". "Conversion" ("") , , " {0,1}". "String" ("") , , " ". "Array & Cluster" (" ") , , " ". "File I/O" (" -") , , " ". "Time & Dialog" (" ") , (, " "), , . "Miscellaneous" ("") , LabVIEW, , , , .

32


LabVIEW . . "Analysis" ("") , , , " ". "DAQ" ("C ") , "" National Instruments. "Instrument I/O" (" -") , - GPIB 488.2, RS-232-C ., , " COM-". "Network" ("") , TCP/IP, UDP . "Tutorial" ("") , National Instruments. "Utility" ("") , "" ( ) , , " - PC".

4.1.
LabVIEW , , . "Structs & Constants" (" "). 4.1.1. "CASE" (""). "" - -, . . -, "" . , "" , "CASE" "IF" . , "case" "switch" . "" , , , "?", . , "TRUE" ("") "FALSE" (""), - .

33


: · Add Case After (" "), ; · Add Case Before (" "), ; · Duplicate Case (" "), -; ·Remove Case (" "), . - "" , . -, "CASE", , . "" . , "" . "" "Del".
. "CASE" , .

4.1 "CASE" - -, (X Y) " ".

4.1. "CASE"

4.1.2. . "WHILE" ("") "FOR" ("") () -, . "". "WHILE" - . - . "TRUE" ("") "FALSE" ("") : - , "TRUE" ("").
34


( "i" ) - -, . "FOR" , ( "N" ). , , - , . -, "WHILE" "FOR", , . "" . , () () . , . "Add Shift Register" (" "). . , , . , , . " " . "Add Element" (" "). , "" "" "", , . "Remove Element" (" ") . "Remove ALL" (" "). 4.2 3- .

4.2. "WHILE" " 3- "

35


4.1.2. "SEQUENCE" (""). LabVIEW , . , , - , . , , , . -, LabVIEW "SEQUENCE" (""). (). -, , , .. : · Add Frame After (" "), ; · Add Frame Before (" "), ; · Duplicate Frame (" "), , -; · Make This Frame (" "), ; · Remove Frame (" "), . - "" , . "SEQUENCE" . Add Sequence Local (" "). ( ) . , , .
. , .

"SEQUENCE" Remove ("").

36


4.3. "SEQUENCE"

4.3 "SEQUENCE" , . - ( ­ ) .

4.2.
- LabVIEW . " " . . 1. "Structs & Constants" (" ") "Local Variable" (" "). 2. "Select Item" (" "). . , .
. , , "".

- "", "" .

37


4.4. . "Change To Read/Write Local" (" /"), .

(. 4.4), n : n! 2 n (n / e ) . , "Open Front Panel" (" ") , . , .

4.3.
LabVIEW -, . 1. "Structs & Constants" (" ") "Formula Node" (" "). "". 2. , "Add () "Add Output" (" "). Input" (" ") "".

3. "" , .

38


: · "=" - ; · "? :" - (, y=x>0?1:0); · "||" - ""; · "&&" - ""; · "!=" "==" - ; · "<", ">", "<=" ">=" - : "", "", " ", " "; · "+" "-" - ; · "*" "/" - ; · "+", "-", "!" - : , , ""; · "^" - . , ";" ( ). : · abs(x) x; · acos(x) x ; · acosh(x) ; · asin(x) ; · asinh(x) ; · atan(x,y) x/y ; · atanh(x) ; · ceil(x) , x; · cos(x) ; · cosh(x) ; · cot(x) ; · csc(x) ; · exp(x) , ; · explm(x) , ; · floor(x) , x; · getexp(x) ; · getman(x) ; · intrz(x) x , 0 ; · ln(x) ; · lnpl(x) (+1); · log(x) ; · log2(x) ;

39


· · · · 1; · · · · · · · · · ·

max(x,y) ; min(x,y) ; mod(x,y) ; rand() , 0 rem(x,y) x y; sec(x) ; sign(x) x; sin(x) ; sinc(x) , ; sinh(x) ; sqrt(x) ; tan(x) ; tanh(x) ; x^y .

4.5.

4.5 (. . 4.3).

4.4. -
LabVIEW : · - -, ; · , ASCII; · datalog - , National Instruments .

4.6. - 40


"File I/O" (" -"). 4.6. LabVIEW . "Open File" (" ") "New File" (" "). ("file path"), " " ("Path"), "" ("String"). " " ("open mode") : 0 - ( , ); 1 - ; 2 - ; 3 - . " " ("datalog type") - (, ), datalog-. ("refnum") . - "Read File" (" ") "Write File" (" "), ("refnum"). , "data". " " ("byte stream type") , . "" ("dup refnum") . - "Seek" (" "). " " ("pos offset") , " " ("pos mode") - : 0 - ; 1 ­ ; 2 - . "Close File" (" "). ("error"), : 0 - ; 1 - ; 4 - ; 5 - ; 6 - -; 7- ; 8 - ; 9 - .. "Simple Error Handler" (" "), . - , , 4.7.

41


4.7.

"Utility/File" (" ") , . , "Write Characters To File" (" ") -- . "File Path" (" ") , , .

4.8.

"Concatenate Strings" Data/Time String" (" " :", (" ") "LF" (" ").

4.8. (" "), "Get "), "CR"

4.5. - RS-232
RS-232 ( "COM-", " AUX", "-2" .) 110 /c 115 / 15 . , 25 . (, COM- ) , 9 . 3 "-". LabVIEW RS-232 , "Serial" (" ") "Instrument I/O" (" -"). 4.9.

42


4.9. RS-232

("port number"): 0 COM1, 1-COM2 ..
. , 10, , . , 10 LPT1, 11 - LPT2 .. .

. COM- "Serial Port Init" (" "). : · ("baud rate"), : 110, 150, 300, 600, 1200, 2400, 4800, 9600 ( ), 19200, 38400, 57600, 115200 /c.; · , ("data bits"): 5, 6, 7 8 ( ); · ("stop bits") : 1 ( ) 2; · ("parity"): 0 1. "Serial Port Init" ("buffer size") ( - 1024 ). "Serial Port Write" (" "), - "Serial Port Read" (" "). "Bytes At Serial Port" (" "), , . 4.10.

43


4.10. COM-2

4.6.
"TCP/IP" , : · TCP - Transmission Control Protocol ( ), "" (datagrams) ; · IP - Internet Protocol ( ), , . (, ..) 4 IP-, AAA.BBB.CCC.DDD. "-", , ( ). : 7 - Echo, 80 - HTTP, 110 - POP3 .., 4097-65535. LabVIEW, TCP/IP, "TCP" "Network" (""). 4.11.

4.11. TCP/IP

44


" Open Connection" (" -") TCP. : IP- ("address") , ; ("remote port") , ; - ("time out ms"), ( 60000 =1 ). ("connection ID"). "TCP Listen" (" TCP") TCP-, - . : ("port") , ; - ("time out ms"), ( ). ("connection ID") TCP- , ("remote address"). TCP- "TCP-read" (" -") "TCP-write" (" -"). - ("time out ms"), 25 . "data in" "data out" , .. . "Type Cast" (" "), "Miscellaneous" (""). TCP- "TCP Close". (" TCP-") : 1) ; 2) ; 3) . , , 4.12.

4.12.

: 1) ; 2) ; 3) . , , 4.13.

45


4.13. . , , , "error out".

5. LabVIEW
5.1
5.1.1 . "" . , "", - , . , , . "Error List" (" ") , . , , , - . . 5.1.2 . LabVIEW -. " " LabVIEW (. 2.1 4.6). 1. , "" "". "" "", ; LabVIEW "" , .

46


4.6. " "

2. - . . , - . " ". -. - .
. 4.0, LabVIEW . , . -, - ( -, - ).

3. , , . , "". "", . "", "", (. 4.7).

4.7.

47


4. , , . , "" " ". 5. , , , . ("").
. "". , 4.0 LabVIEW "".

5.2.
, , , . LabVIEW "Code Interface Node" (" "). - CIN, CIN-.
. , (DLL).

CIN- . , , . . 1. . "Path" (" "). 2. - "Code Interface Node" (" "), "Miscellaneous" (""). . "" , (. 4.8).

4.8. CIN- . CIN- "". , .

3. "" .
48


"). example.c)

4. CIN- "Create .c file" (" (, (, c:\example).

. LabVIEW 3.0 "Create .h file" (" "). .

5. . ( ):
/* CIN- */ #include "extcode.h" /* "" */ UseDefaultCINInit UseDefaultCINDispose UseDefaultCINAbort UseDefaultCINLoad UseDefaultCINUnload UseDefaultCINSave CIN MgErr CINRun(Path _, Path _); CIN MgErr CINRun(Path _, Path _) { /* */ return noErr; }

"" CIN- CINRun(). , . 6. , CIN-, . , . CINRun() :
CIN MgErr CINRun(Path s1, Path s2) { File int32 uInt8 uInt8 f1, f2; /* */ q; /* */ *b; /* */ i,j,tmp;

49


b = (uInt8 *) DSNewPtr(BUFSIZE); FMOpen(&f1,s1,openReadOnly,denyReadWrite); FcreateAlways(&f2,s2,0x80,openReadWrite,denyReadWrite,""); FMRead (f1, BUFSIZE, &q, b); for (i=2;i1)&&(b[j-1]>b[j])) tmp=b[j]; b[j]=b[j-1]; b[j-1]=tmp; j--; } } FMWrite (f2, BUFSIZE, &q, b); FMClose (f1); FMClose (f2); DSDisposePtr(b); return noErr; }

{

7. example.c. 16- CIN- LabVIEW 3.x 4.x Watcom. , c:\watcom, LabVIEW - c:\labview. c example.lvm :
name=EXAMPLE type=CIN codeDir=C:\EXAMPLE wcDir=C:\WATCOM cinToolsDir=C:\LABVIEW\CINTOOLS !include $(cinToolsDir)\generic.mak

wmake /f example.lvm. 32- CIN- LabVIEW 5.x 6.x Visual C/C++ Microsoft. , c:\vc, LabVIEW - c:\labview. , CINTOOLSDIR=C:\LABVIEW\CINTOOLS. example.lvm :
name=EXAMPLE type=CIN !include $(CINTOOLSDIR) \ntlvsb.mak

nmake /f example.lvm.

50


8. .lsb, example.lsb. CIN-, "Load Code Resource" (" ") example.lsb. .
. "", CIN- LabVIEW .

5.3. «» -
7.0, LabVIEW ­ «»-. , , , : , - National Instruments, . , «» LabView, : , , - .. «»- : ( ) 1 -1..1 , , ­0.5 +0.5 . « » . 4.9.

. 4.9. «» . Windows «», N+1 .. ,

«»- «Simulate signal» (« ») . 4.10. , .

51


. 4.10. «»-.

«» - ( , , ..) , (. . 4.11).

. 4.11. «»-

: · Signal type - (Sine ­ , Square ­ , Triangle ­ , Sawtooth ­ , D - ); · Frequency - ; · Amplitude ­ ; · Noise type ­ (Uniform White Noise ­ , Gaussian White Noise ­ ..);

52


· · · · · · ·

Noise amplitude - ; Samples per second ­ , 1 ; Number of samples ­ , «»; Simulate acquisition timing ­ ; Run as fast as possible ­ , . Integer number of cycles ­ «» «» ; .

«»- « », «» . LabVIEW ­ «» «»-.

6. LabVIEW
, LabVIEW , . 5 , 0-2 . . LabVIEW 1 , 1 . , .

6.1.
( 5-25 ) ( AC97) , 16-24 ) ( (. 6.1).

53


6.1.

: "LINE IN" - , "MIC" - , "LINE OUT" - , "SPKR" - , "" - , "" - , "DSP" - . DSP - - , , . , DSP Creative Soundblaster , 8- -. DSP - (. 6.1) (. 6.2). - BASE=220h.
6.1

- BASE+6 BASE+0Ah BASE+0Ch BASE+0Eh DSP 1. 2. ( 7 , ) ( 7 , ) 6.2 DSP 10h 20h 0D1h 0D3h - -

54


DSP : · 1 BASE+6; · ; · 0 BASE+6.

6.2. DSP

DSP , : · DSP ( 7- BASE + 0Eh); · BASE+0Ah.

6.3. DSP

DSP: · DSP ( 7- BASE +0Ch); · BASE+0Ch.

6.4. DSP

- DSP 0D1h, - - 0D3h. : · DSP 20h; · DSP. , , : · DSP 10h; · DSP .
55


6.2.
- , , : · - ; · . "", (. 6.4). , 1,193180 .

6.5.

. 3. (. 6.6): · 1..65535 ( ); · 2; · 0 "OUT", ; · "OUT" (.. ) "".

56


6.6. 3

"" 0 , Irq0 , , 8. 8 Windows . "" 1 , . "" 2 , . 61h: 0 , 1 - . : , , . 43h (. 6.3). 6.3 0 1..2 4..5 : 0 - , 1- - : 011 - 3. : 00 - ; 01 / ; 10 - / ; 11 - / . : 00 - , 01-, 10-.

6..7

57


40h ( ), 41h ( ), 42h ( ). , 2 , () . (. 6.6.): · 43h 0B6h; · 42h , (0.0002*1193180*2 1/c = 478); · ( ) 61h 1.

6.7.

: · , 43h 86h; · 42h , .

6.8.

6.3.
, (. 6.9-6.11).
. , , , .

58


. 1. (, ). . 2. . , . , , , "".
. , 100 .

6.9.

6.10. -

59


6.11. "" " " ""


1. .., .., .., .. LabVIEW. - .:-, 1999. - 268 . 2. .., .. // . - 1997, 10.- . 40-47. 3. .. // . - 1998, 1. - . 55-63. 4. / .., .., .. - .: , 1991. - 352 . 5. .., .. IBM PC: 2- .- .: , 1992. - 208 . 6. Wells Lisa K., Travis Jeffrey. LabVIEW For Everyone: graphical programming made even easier. - Prentice-Hall, 1997. - 586 p. 7. LabVIEW Code Interface Reference Manual. - National Instruments Corp., 1993. 8. LabVIEW User Manual. - National Instruments Corp., 1993. 9. LabVIEW Tutorial. - National Instruments Corp., 1993. 10. LabVIEW for Windows. Demonstration Guide. - National Instruments Corp., 1992.

.
: contains unwired or bad terminal. (< >: ). . . : object code not loaded. (< >: ). CIN- . . : control does not match its type definition. (< >: ). , , . Enumeration has duplicate entries. ( ). . More Errors... ( ...). LabVIEW 100 . , .

60


For Loop: N is unwired and there are no input indexing tunnels. ( FOR : N , ). N , . Global or Local Variable: named component doesn't exist. ( : ). , . . Global Variable: subVI is missing. ( : ). LabVIEW , , . . : A subroutine priority VI cannot contain an asynchronous node. (<>: ). (, Wait) , , . : Object is hidden. (<>: ). , . Right Shift Register: type is undefined. ( c : ). .

Right Shift Register: some but not all left sides are wired. ( c : ). , . Sequence: One or more sequence locals were never assigned. ( SEQUENCE : ). Sequence . . : bad linkade to subVI. (< >: ). , , . Relink ( ) . : recursive references (dispose it). (< >: ( )). , , , LabVIEW , . ( , , ). LabVIEW , - -. : LV Subroutine link error>. (< >: ). , . : A Subroutine priority VI cannot call a non-subroutine priority subVI. (< >:
61


-). - , . : subVI is already running. (< >: ). , . : subVI is in either panel order or cluster order mode. (< > : ). . : subVI is in interactive retrieval mode. (< >: ). , . : subVi is missing. (< >: ). LabVIEW , , . , LabVIEW , . : subVI is not executable. (< >: ). . . Terminal: The associated array or cluster on the front paneel has no elements; its type is underined. ( : ; ). . Type Definition: Can't find valid type definition. ( : ). LabVIEW , , . , , . (Un) Bundle By Name: Empty cluster, or some components are unnamed. ( : ). , Bundle By Name, , . Unit : bad unit syntax. ( : ). . .

62


.
LVLIB.LIB EXTCODE.H CIN- - , , . , , .

1.
.1 LabVIEW Bool32 LVBoolean int8 int16 int32 uInt8 uInt16 uInt32 float32 float64 floatExt cmplx64 cmplx128 cmplxExt uChar CStr PStr LStr CPStr Path Uptr MgErr File 4 2 1 2 4 1 2 4 4 8 10 8 16 20 1 4 : 1 - "", 0 - "" : <0 - "", 0 - "" - "- " - "- " - "- " re im - "- " , 0 , 0 , PStr ,

2.
UPtr DSNewPtr(int32 size) size . UPtr DSNewPClr(int32 size) DSNewPtr, . MgErrDSDisposePtr(Uptr p) p.

63


3.
MgErrFCreate(File *fdp, Path path, int32 permissions, int32 openMode, int32 denyMode, PStr group) - path, permissions ( 7 , " "), openMode (openReadOnly - , openWriteOnly - , openReadWrite - ), denyMode (denyReadWrite - , denyWriteOnly - , denyNeither - ), UNUX- group ( Windows ) fdp. MgErrFCreateAlways(File *fdp, Path path, int32 permissions, int32 openMode, int32 denyMode, PStr group) - MgErrFCreate, , . MgErrFMOpen(File *fdp, Path path, int32 openMode, int32 denyMode) - path, openMode, denyMode fdp. MgErrFMClose(File *fd) - fd. MgErrFMRead(File *fd, int32 inCount, int32 *outCountp, uPtr buffer) - inCount fd buffer, outCountp. MgErrFMWrite(File *fd, int32 inCount, int32 *outCountp, uPtr buffer) - inCount fd buffer, outCountp. MgErrFMSeek(File fd, int32 ofst, int32 mode) - / fd ofst mode (fStart , fCurrent - , fEnd - ). MgErr FMTell(File fd, int32 *ofstp) - fd / ofstp. MgErrFGetEOF(File fd, int32 *sizep) - sizep fd. MgErrFSetEOF(File fd, int32 size) - fd size. MgErrFMove(Path oldPath, Path newPath) - oldPath newPath (, ). MgErrFRemove(Path path) - path. int32 FExists(Path path) - path.

64


4.
uInt32 MilliSecs() - . uInt32 TimeInSecs() - , 0 0 0 1.1.1904 . CStr DateString(uInt32 secs, int32 fmt) - , , secs, 0 0 0 1.1.1904 ., fmt: 0 - "mm/dd/yy", 1 - ; 2 - . CStr TimeString(uInt32 secs, int32 fmt) - , , secs, 0 0 0 1.1.1904 ., fmt: 0 - "hh:mm", 1- "hh:mm:ss". CStr ASCIITime(uInt32 secs) - , , secs, 0 0 0 1.1.1904 .

5.
boolean IsDigit(uChar c) - c . boolean IsAlpha(uChar c) - c . boolean IsUpper(uChar c) - c . boolean IsLower(uChar c) - c . uChar ToUpper(uChar c) - . uChar ToLower(uChar c) - . int32 HexChar(int32 n) - 16- , n.

6.
int32 StrLen(CStr s) - s . int32 StrCat(CStr s1, CStr s2) - s2 s1, s1.

65


int32 StrNCmp(CStr s1, CStr s2, int32 n) - n s1 s2 (, , 0). int32 StrNCaseCmp(CStr s1, CStr s2, uInt32 n) - StrNCmp, .
. StrLen, StrCat, StrNCmp StrNCase , . , PStrLen PStr, LStrLen - LStr, CPStrLen - CPStr.

PtoCStr(PStr pstr, CStr cstr) - PStr CStr. CToPStr(CStr cstr, PStr pstr) - CStr PStr. PToLStr(PStr pstr, LStrPtr lstrp) - PStr LStr. LToPStr(LStrPtr lstrp, PStr pstr) - LStr PStr.

7.
int32 Max(int32 n, int32 m) - n m. int32 Min(int32 n, int32 m) - n m.

int32 Pin(int32 i, int32 low, int32 high) - low ihigh, i . void RandomGen(float64 *xp) - xp , [0,1].
. : atan(), cos(), exp(), fabs(), log(), sin(), sqrt(), tan(), acos(), asin(), atan2(), ceil(), cosh(), floor(), fmod(), frexp(), ldexp(), log10(), modf(), pow(), sinh(), tanh().

8.
int16 HiWord(int32 x) - 32- x. int16 LoWord(int32 x) - 32- x. int8 HiByte(int16 x) - 16- x. int8 LoByte(int16 x) - 16- x. uInt8 HiNibble(uInt8 x) - 4 8- x. uInt8 LoNibble(uInt8 x) - 4 8- x. int16 Word(int8 hi, int8 lo) - 16- hi lo. Int32 Long(int16 hi, int16 lo) - 32- 16- hi lo.
66


int32 Cat4Chrs(uInt8 a, uInt8 b, uInt8 c, uInt8 d) - 32- a, b, c d. int16 Offset(type, field) - field type.

9.
int32 BinSearch(arrayp, n, elmtSize, key, compareProcP()) - key arrayp, n elmtSize , compareProcP. void QSort(arrayp, n, elmtSize, compareProcP()) - () arrayp, n elmtSize , compareProcP. DbgPrintf(uChar *formats, ...) - , printf.

67