【正文】
本科畢業(yè)設(shè)計(論文) 外文翻譯原文 學(xué)生姓名: 何 曉 君 院 (系): 電 子 工 程 學(xué) 院 專業(yè)班級 : 測控 0602 班 指導(dǎo)教師 : 薛 曉 書 完成日期 : 2021 年 4 月 20 日 1 Expanding the Features of a VI You can choose one of many LabVIEW VI templates to use as a starting point. However, sometimes you need to build a VI for which a template is not available. This chapter teaches you how to build and customize a VI without using a template. Building a VI from a Blank Template In the following exercises, you will open a blank VI and add Express VIs and structures to theblock diagram to build a new VI. You will build a VI that generates a signal, reduces the number of samples in the signal, and displays the resulting data in a table on the front panel. When you plete the exercises, the front panel of the VI will look similar to the front panel in Figure 31. You can plete the exercises in approximately 30 minutes. Figure 31. Front Panel for the Reduce Samples VI Opening a Blank VI If no template is available for the task you want to create, you can start with a blank VI and add Express VIs to acplish the specific task. Complete the following steps to open a blank VI. 1. In the LabVIEW dialog box, click the arrow on the New button and select BlankVI from the shortcut menu or press the CtrlN keys to open a blank VI. Notice that a blank front panel and block diagram appear. 2 Note You also can open a blank VI by selecting Blank VI from the Create new list in The New dialog box or by selecting File187。New VI from the front panel or block diagram menu bar. 2. If the Functions palette is not visible, rightclick any blank space on the block diagram to bring up the temporary version of the Functions palette. Click the thumbtack, shown at left, in the upper left corner of the Functions palette to place the palette on the screen. Note You can rightclick on a blank space on the block diagram or the front panel to bring up the Functions or Controls palettes. Adding an Express VI that Simulates a Signal Complete the following steps to find the Express VI you want to use and then add it to the block diagram. 1. If the Context Help window is not visible, press the CtrlH keys to open the Context Help window. You also can press the Show Context Help Window button, shown at left, to open the Context Help window. 2. Select the Input palette on the Functions palette and move the cursor over the Express VIs on the Input that the Context Help window displays information about the function of each Express VI. 3. From the informa tion provided in the Context Help window, find theExpress VI that can output a sine wave signal. 4. Select the Express VI and place it on the block diagram. The Configure Simulate Signal dialog box appears. 5. Idle the cursor over the various options in the Configure Simulate Signal dialog box, such as Frequency (Hz), Amplitude, and Samples per second (Hz). Read the information that appears in the Context Help window. 6. Configure the Simulate Signal Express VI to generate a sine wave with a frequency of and amplitude of 2. 7. Notice how the signal displayed in the Result Preview window changes to reflect the configured sine wave. 8. Close the Configure Simulate Signal dialog box. 9. Move the cursor over the Simulate Signal Express VI and read the information that 3 appears in the Context Help that the Context Help window now displays the configuration of the Simulate Signal Express VI. 10. Save this VI as Reduce to an easily accessible location. Modifying the Signal Complete the following steps to use the LabVIEW Help to search for the Express VI that reduces the number of samples in a signal. 1. Select Help187。VI, Function, amp。 HowTo Help to open the LabVIEW Help. 2. Click the Search tab and type sample pression in the Type in the word(s) to search for text box. Notice that this word choice reflects what you want this Express VI to do— press, or reduce, the number of samples in a signal. 3. Select the Sample Compression Express VI topic to display the topic that describes the Sample Compression Express VI. 4. After you read the description of the Express VI, click the Place on the block diagram button, shown at left, to select the Express VI. 5. Move the cursor to the block diagram. Notice how LabVIEW attaches the Sample Compression Express VI to the cursor. 6. Place the Sample Compression Express VI on the block diagram to the right of the Simulate Signal Express VI. 7. Configure the Sample Compression Express VI to reduce the signal by a factor of 25 using the mean of these values. 8. Close the Configure Sample Compression dialog box. 9. Using the Wiring tool, wire the Sine output in the Simulate Signal Express VI to the Signals input in the Sample Compression Express VI. Customizing the Front Panel In the previous exercises, you added controls and indicators to the front panel using the Controls palette. You also can add controls and indicators from the block diagram. Complete the following steps to create controls and indicators. 4 1. Rightclick the Mean output in the Sample Compression Express VI and select Create187。Numeric Indicator to create a numeric indicator. 2. Rightclick the Mean output of the Sample Compression Express VI and select Insert Input/Output from the shortcut menu to insert the Enable input. 3. Rightclick the Enable input and select Create187。Control to create the Enable switch. 4. Rightclick the wire linking the Sine output in the Simulate Signal Express VI to the Signals input in the Signa