【正文】
Label it Frequency.c. Digital Control, available from the Controlsnumeric palette. Label it Square Duty Cycle (%).d. Enum control, available from the Controlsring amp。 Enum palette. Label it Signal Source.e. Digital Control, available from the Controlsnumeric palette. Label it Phase.f. Boolean Push button, available from the ControlsBoolean palette. Label it Reset Phase.g. Waveform Graph, available from the Controlsgraph palette. Leave its label as Waveform Graphh. Boolean Stop button, available from the ControlsBoolean palette. (Optional) Use the Coloring tool to color the button red.(3) Add elements to the Signal Source Enum control.a. Use the Operating tool or the Labeling tool to click in the text box of the Enum.b. Type Sine Wave and press ShiftEnter to add another element. c. Type Triangle Wave ShiftEnter, Square Wave ShiftEnter, and Sawtooth Wave.d. Click the Enter button on the toolbar or click anywhere on the background of the front panel to enter the elements.(4) Arrange the objects on the front panel to appear similar to the following illustration. The Signal Source control selects the type of waveform that you want to generate.The square duty cycle control is used only for setting the duty cycle of the square wave.Figure 3 Block Diagram(1) Open the block diagram by selecting Windowshow Diagram, pressing Ctrle, or clicking the block diagram window. Macintosh Press Commande.(2) Add a While Loop that fills up most of the visible area of the block diagram window. The While Loop causes the block diagram inside it, the subdiagram, to repeat until a TRUE or FALSE value is passed to the continuation terminal .a. Select the While Loop from the Functionsstructures palette, and drag it to one of the corners of the block diagram. DO NOT release the mouse button.b. While still pressing the mouse button, drag out a region to the opposite corner of the block diagram window.c. When the region fills most of the block diagram window, as indicated by the dotted rectangle, release the mouse button. LabVIEW creates the While Loop.(3) Because the Stop button will control the While Loop, wire the Stop terminal to the Continuation terminal.a. Move the Stop terminal next to the continuation terminal of the While Loop. As you drag the Boolean terminal close to the terminal, press the Spacebar to activate automatic wiring. When LabVIEW draws a wire connecting the two terminals, release the mouse button. You also can use the Wiring tool to wire the two terminals together.b. Rightclick the continuation terminal of the While Loop and select Stop if True from the shortcut menu. Notice the continuation terminal changes its appearance to the Stop if True state . When the user presses the Stop button, it passes a TRUE value to the continuation terminal, which stops the While Loop.(4) Because it is the indicator, move the Waveform Graph terminal to the right side of the While Loop. Arrange all the other terminals, which are controls, to the left side of the While Loop. (5) By default, the Case Structure has two cases. Because the Signal Source enum control contains four elements, you must add two more cases to the Case Structure. (6) Add the waveform generation VIs to their respective cases in the Case Structure. Click the increment or decrement arrow on each side of the subdiagram display to switch between cases.a. Add the Sine Wave VI, available from the Functionswaveformsignal Generation palette, to the Sine Wave case.b. Add the Triangle Wave VI, available from the Functionswaveformsignal Generation palette, to the Triangle Wave case.c. Add the Square Wave VI, available from the Functionswaveformsignal Generation palette, to the Square Wave case.d. Add the Sawtooth Wave VI, available from the Functionswaveformsignal Generation palette, to the Sawtooth Wave case. (7) The sampling info terminal of each VI allows you to control the sample rate and number of samples. Add a sampling info cluster to your VI.a. Use the Wiring tool to rightclick the sampling info terminal and select Create Control from the shortcut menu.b. Use the Positioning tool to drag the sampling info terminal outside the Case Structure. When you move the terminal outside the Case Structure, the wire connection is broken.c. Select EditRemove Broken Wires or select Ctrlb to remove the broken wire. Macintosh Press Commandb.d. Use the Wiring tool to wire the sampling info terminal outside the Case Structure to the sampling info terminal on each VI as you did in Step 9. (8) Arrange the objects on the block diagram. Your block diagram should be similar to the following illustration. Each case subdiagram is shown below the While Loop to illustrate the contents of each case. DO NOT create separate Case Structures.Figure 4Figure 5(12) Save the VI as function in the labview\activity directory. Running the VI(1) Set the Amplitude to 1, frequency to 10, reset phase to ON, and signal source to Sine Wave, Fs (the sampling rate) to , and s (the number of samples) to 100. Because Fs is 1000 () and the frequency is 10 Hz, every 100 samples corresponds to one cycle.(2) Run the VI and observe the resulting plot.(3) Change s to 200, 300, and 400. How many cycles of the waveform do you see? Why?(4) Reset the s control to 100 and change frequency to Hz. What happens? Why?(5) Change reset phase to ON. Now what happens? Why?(6) (Optional) Choose different waveforms from the Signal Source Enum and repeat Steps 1 through 5.附錄B 漢語翻譯2000年7月編輯, 版次序號370178A01歡迎進入LabVIEW教程,這個交互式幫助文件介紹您對基本的LabVIEW概念和通過一些活動指導(dǎo)您熟悉圖解編程。什么是LabVIEW? LabVIEW (實驗室虛擬儀器工程學工作室)是基于圖形編程的開發(fā)環(huán)境的。 LabVIEW使用術(shù)語,意象,想法,相似于技術(shù)員,科學家,和工程師,并且依靠圖解標志而不是通過原文語言描述編程行為。 LabVIEW與硬件充分的交互通信,例如GPIB, VXI, RS232, RS485,和插入式數(shù)據(jù)收集模板。 LabVIEW也有固定的庫作為軟件使用標準,例如TCP/IP網(wǎng)絡(luò)和ActiveX。虛擬儀器:你所創(chuàng)建的LabVIEW應(yīng)用您所創(chuàng)建的LabVIEW的基本文件叫虛擬儀器或VIs。 每VI包括二個主要部分:前面板和流程圖以及第三部分:圖標和