音频信号发生器毕业设计论文 翻译 英文--.doc

上传人:椰子壳 文档编号:3977293 上传时间:2019-10-11 格式:DOC 页数:17 大小:419.52KB
返回 下载 相关 举报
音频信号发生器毕业设计论文 翻译 英文--.doc_第1页
第1页 / 共17页
音频信号发生器毕业设计论文 翻译 英文--.doc_第2页
第2页 / 共17页
音频信号发生器毕业设计论文 翻译 英文--.doc_第3页
第3页 / 共17页
音频信号发生器毕业设计论文 翻译 英文--.doc_第4页
第4页 / 共17页
音频信号发生器毕业设计论文 翻译 英文--.doc_第5页
第5页 / 共17页
点击查看更多>>
资源描述

《音频信号发生器毕业设计论文 翻译 英文--.doc》由会员分享,可在线阅读,更多相关《音频信号发生器毕业设计论文 翻译 英文--.doc(17页珍藏版)》请在三一文库上搜索。

1、本科毕业设计(论文)外文翻译原文Expanding the Features of a VIYou 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 f

2、rom a Blank TemplateIn 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.

3、When you complete the exercises, the front panel of the VI will look similar to the front panel in Figure 3-1.You can complete the exercises in approximately 30 minutes. Figure 3-1. Front Panel for the Reduce Samples VI Opening a Blank VIIf no template is available for the task you want to create, y

4、ou can start with a blank VI and add Express VIs to accomplish 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 keys to open a blank VI. Notice that a blank front

5、 panel and block diagram appear. 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 FileNew VI from the front panel or block diagram menu bar.2. If the Functions palette is not visible, right-click any blank space on the block diagr

6、am 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 right-click on a blank space on the block diagram or the front panel to bring up the Functions or Contr

7、ols palettes.Adding an Express VI that Simulates a SignalComplete 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 keys to open the Context Help window. You also can press the Show Context Help Win

8、dow 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 palette.Notice that the Context Help window displays information about the function of each Express VI.3. From the information provide

9、d 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

10、(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 10.7 and amplitude of 2.7. Notice how the signal displayed in the Result Preview window changes to reflec

11、t 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 appears in the Context Help window.Notice that the Context Help window now displays the configuration of the Simulate Signal Express VI.10

12、. Save this VI as Reduce Samples.vi to an easily accessible location.Modifying the SignalComplete 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 HelpVI, Function, & How-To Help to open the LabVIEW Help.2. Click the Se

13、arch tab and type sample compression 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 docompress, or reduce, the number of samples in a signal.3. Select the Sample Compression Express VI topic to display the topic that describes

14、 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 th

15、e 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

16、 the Sine output in the Simulate Signal Express VI to the Signals input in the Sample Compression Express VI.Customizing the Front PanelIn 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

17、diagram. Complete the following steps to create controls and indicators. 1. Right-click the Mean output in the Sample Compression Express VI and select CreateNumeric Indicator to create a numeric indicator.2. Right-click the Mean output of the Sample Compression Express VI and select Insert Input/Ou

18、tput from the shortcut menu to insert the Enable input.3. Right-click the Enable input and select CreateControl to create the Enable switch.4. Right-click the wire linking the Sine output in the Simulate Signal Express VI to the Signals input in the Signal Compression Express VI and select CreateGra

19、ph Indicator.Notice that you can create controls and indicators from the block diagram. When you reate controls and indicators using this method, LabVIEW automatically creates terminals that are labeled and formatted correctly.5. Using the Wiring tool, wire the Mean output in the Sample Compression

20、Express VI to the Sine terminal. Notice that the Merge Signals function appears.6. Arrange the objects on the block diagram so that they appear similar to Figure 3-2.Tip You can right-click any wire and select Clean Up Wire from the shortcut menu to have LabVIEW automatically arrange the wires for y

21、ou.Figure 3-2. Block Diagram for the Reduce Samples VI7. Display the front panel.Notice that the controls and indicators you added automatically appear on the front panel with labels that correspond to their function.8. Save this VI.4Configuring the VI to Run Continuously Until the User Stops ItIn t

22、he current state, the VI runs once, generates one signal, then stops executing. To run the VI until a condition is met, you can add a While Loop to the block diagram. Complete the following steps to add a While Loop.1. Display the front panel and run the VI.Notice how the VI runs once and then stops

23、. Also notice how there is no STOP button.2. Display the block diagram and select the While Loop on the Execution Control palette.3. Move the cursor to the upper left corner of the block diagram. Place the top left corner of the While Loop here.4. Click and drag the cursor diagonally to enclose all

24、the Express VIs and wires, as shown in Figure3-3.Figure 3-3. Placing the While Loop around the Express VIsNotice that the While Loop, shown at left, appears with a STOP button wired to the condition terminal. This While Loop is configured to stop when the user clicks the STOP button.5. Display the f

25、ront panel and run the VI.Notice that the VI now runs until you click the STOP button. A While Loop executes the functions inside the loop until the user presses the STOP button.Controlling the Speed of ExecutionTo plot the points on the waveform graph more slowly, you can add a time delay to the bl

26、ock diagram. Complete the following steps to control the speed at which the VI executes.1. On the block diagram, select the Time Delay Express VI on the Execution Control palette and place it inside the loop.2. Type .250 in the Time delay (seconds) text box.This time delay specifies how fast the loo

27、p runs. With a .250 second time delay, the loop iterates once every quarter of a second.3. Close the Configure Time Delay dialog box.4. Save this VI.5. Display the front panel and run the VI.6. Click the Enable switch and notice the change on the graph.Notice how if the Enable switch is on, the grap

28、h displays the reduced signal. If the Enable switch is off, the graph does not display the reduced signal.7. Click the STOP button to stop the VI.Using a Table to Display DataComplete the following steps to display a collection of mean values in a table on the front panel.1. On the front panel, sele

29、ct the Express Table indicator on the Text Indicators palette and place it on the front panel to the right of the waveform graph.2. Display the block diagram.Notice that the Table terminal appears wired to the Build Table Express VI automatically.3. If the Build Table Express VI and the Table termin

30、al are not selected already, click an open area on the block diagram to the left of the Build Table Express VI and the Table terminal. Drag the cursor diagonally until the selection rectangle encloses the Build Table Express VI and the Table terminal, shown at left. A moving dashed outline called a

31、marquee highlights the Build Table Express VI, the Table terminal, and the wire joining the two.4. Drag the objects into the While Loop to the right of the Mean terminal.Notice that the While Loop automatically resizes to enclose the Build Table Express VI and the Table termial.5. Using the Wiring t

32、ool, wire the Mean terminal of the Sample Compression Express VI to the Signals input of the Build Table Express VI.The block diagram should appear similar to Figure 3-4.Figure 3-4. Block Diagram of the Reduce Samples VI6. Display the front panel and run the VI.7. Click the Enable switch.The table d

33、isplays the mean values of every 25 samples of the sine wave. Notice if the Enable switch is off, the table does not record the mean values.8. Stop the VI.9. Experiment with properties of the table by using the Table Properties dialog box. For example, try changing the number of columns to one.10. S

34、ave and close this VI.SummaryThe following topics are a summary of the main concepts you learned in this chapter.Using the LabVIEW Help ResourcesYou can use the Context Help window and the LabVIEW Help to learn more about Express VIs. Both provide information that describe the functionality of the E

35、xpress VI and how to configure the Express VI.The following is a summary of the different ways you learned to use the help resources in this chapter. The Context Help window displays basic information about LabVIEW objects when you move the cursor over each object. Objects with context help informat

36、ion include VIs, structures, palettes, and dialog box components. When you place an Express VI on the block diagram, the Context Help window displays a brief description of the Express VI and information about how you configured the Express VI. You can find and select an Express VI and other block d

37、iagram objects in the LabVIEW Help. Click the Place on the block diagram button to select a block diagram object and place it on the block diagram. To navigate the LabVIEW Help, use the Contents, Index, and Search tabs. Use the Contents tab to get an overview of the topics and structure of the help.

38、 Use the Index tab to find a topic by keyword. Use the Search tab to search the help for a word or phrase.Customizing the Block Diagram CodeThere are many controls, indicators, Express VIs, and structures that you can use to customize a VI. To customize a VI, you can create controls and indicators,

39、control when a VI stops running, and display generated data in a table.Creating Controls and IndicatorsCreate controls and indicators that are wired to Express VIs from the block diagram by right-clicking the Express VI input, output, or wire, and selecting an option from the Create shortcut menu.Co

40、ntrolling When a VI Stops RunningUse the While Loop to continually run the code enclosed within the loop. The While Loop stops running when a stop condition is met. When you place or move an object in a While Loop near the border, the loop automatically resizes to add space for that object.The Execu

41、tion Control palette includes objects that let you control the number of times a VI runs, as well as the speed at which the VI runs.Displaying Data in a TableThe table indicator displays collected data. Use the Build Table Express VI to build a table of collected data.8Acquiring Data and Communicati

42、on with InstrumentsThis chapter introduces you to the Express VIs you use for data acquisition and instrument communication on a PC running Windows.Refer to the LabVIEW Measurements Manual for information about data acquisition and instrument communication on all platforms.Acquiring a SignalIn the f

43、ollowing exercises, you will use the DAQ Assistant Express VI to create an NI-DAQmx task. Refer to the Taking an NI-DAQmx Measurement in LabVIEW help tutorial for information about additional methods you can use to create NI-DAQmx tasks. To launch this help tutorial, select HelpTaking an NI-DAQmx Me

44、asurement in LabVIEW.Note The following exercises require that you have installed NI-DAQmx and anNI-DAQmx-supported device. Refer to the National Instruments Web site at for the list of NI-DAQmx-supported devices. If you do not have NI-DAQmx installed or an NI-DAQmx-supported device, refer to the L

45、abVIEW Measurements Manual for information about using Traditional NI-DAQ for data acquisition.Complete the following exercises to create an NI-DAQmx task that continuously takes a voltage reading and plots the data on a waveform graph.You can complete the exercises in approximately 30 minutes.Creat

46、ing an NI-DAQmx TaskIn NI-DAQmx, a task is a collection of one or more channels, timing, triggering, and other properties that apply to the task itself. Conceptually, a task represents ameasurement or generation you want to perform. For example, you can create a task to measure temperature from one

47、or more channels on a DAQ device. Complete the following steps to create and configure a task that reads a voltage level from a DAQ device.1. Open a new VI.2. Select the DAQ Assistant Express VI, shown at left, on the Input palette and place it on the block diagram. The DAQ Assistant launches and a Create New dialog box appears.3. Click the Analog Input button to display the Analog Input options.4. Select Voltage to create a new voltage analog input task.The dialog box displays a list of channels on each DAQ device installed. The n

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 其他


经营许可证编号:宁ICP备18001539号-1