音频信号发生器毕业设计外文翻译_第1页
音频信号发生器毕业设计外文翻译_第2页
音频信号发生器毕业设计外文翻译_第3页
音频信号发生器毕业设计外文翻译_第4页
音频信号发生器毕业设计外文翻译_第5页
已阅读5页,还剩26页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、本科毕业设计(论文)外文翻译原文学生姓名: 何 晓 君 院 (系):电 子 工 程 学 院 专业班级: 测控0602班 指导教师: 薛 晓 书 完成日期:2010年4月20日 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

2、how to build and customize a vi without using a template.building a vi from 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

3、 signal, and displays the resulting data in a table on the front panel. 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

4、a blank viif no template is available for the task you want to create, you 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 short

5、cut menu or press the keys to open a blank vi. notice that a blank front 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 function

6、s palette is not visible, right-click 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 right-click on a blank space on

7、 the block diagram or the front panel to bring up the functions or controls 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 op

8、en 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 palette.notice that the context help window displays informati

9、on about the function of each express vi.3. from the information 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

10、 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 10.7 and amplitude of 2.7. notice

11、 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 appears in the context help window.notice that the context help wi

12、ndow now displays the configuration of the simulate signal express vi.10. 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

13、helpvi, function, & how-to help to open the labview help.2. click the search 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

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

15、iew 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 th

16、e 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 panelin the previous exercises, you added controls and indicators to the front panel using the co

17、ntrols palette. you also can add controls and indicators from the block 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 mea

18、n output of the sample compression express vi and select insert input/output 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

19、 signals input in the signal compression express vi and select creategraph 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

20、. using the wiring tool, wire the mean output in the sample compression 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

21、 the shortcut menu to have labview automatically arrange the wires for you.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 thi

22、s vi.configuring the vi to run continuously until the user stops itin the 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 th

23、e front panel and run the vi.notice how the vi runs once and then stops. 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

24、while loop here.4. click and drag the cursor diagonally to enclose all 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 c

25、onfigured to stop when the user clicks the stop button.5. display the front 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 point

26、s on the waveform graph more slowly, you can add a time delay to the block 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 t

27、ime delay (seconds) text box.this time delay specifies how fast the loop 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

28、the change on the graph.notice how if the enable switch is on, the graph 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 o

29、f mean values in a table on the front panel.1. on the front panel, select 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

30、 vi automatically.3. if the build table express vi and the table terminal 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 a

31、nd the table terminal, shown at left. a moving dashed outline called a 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

32、 the build table express vi and the table termial.5. using the wiring tool, 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. displa

33、y the front panel and run the vi.7. click the enable switch.the table displays 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 d

34、ialog box. for example, try changing the number of columns to one.10. save 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

35、 vis. both provide information that describe the functionality of the express 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 y

36、ou move the cursor over each object. objects with context help information 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

37、the express vi. you can find and select an express vi and other block diagram 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 c

38、ontents tab to get an overview of the topics and structure of the help. 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 cust

39、omize a vi. to customize a vi, you can create controls and indicators, 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, ou

40、tput, or wire, and selecting an option from the create shortcut menu.controlling 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

41、, the loop automatically resizes to add space for that object.the execution 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 expres

42、s vi to build a table of collected data.acquiring data and communication 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 an

43、d instrument communication on all platforms.acquiring a signalin the following 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

44、 tasks. to launch this help tutorial, select helptaking an ni-daqmx measurement 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 /daq for the list of ni-daqmx-supported devices. if yo

45、u do not have ni-daqmx installed or an ni-daqmx-supported device, refer to the labview 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

46、 waveform graph.you can complete the exercises in approximately 30 minutes.creating 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

47、 to perform. for example, you can create a task to measure temperature from one 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 in

48、put 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

49、 installed. the number of channels listed depends on the number of channels you have on the daq device.5. in the my physical channels listbox, select the physical channel to which the signal is connected, such as ai0, and then click the finish button. the daq assistant opens a new window, shown in f

50、igure 4-1, which displays options for configuring the channel you selected to complete a task. figure 4-1. configuring a task using the daq assistant6. in the input range section of the settings tab, enter 10 for the max value and enter -10 for the min value.7. in the task timing tab, select the acq

51、uire n samples option.8. enter a value of 1000 in the samples to read input box.testing the taskyou can test the task to verify that you correctly configured the channel. complete the following steps to confirm that you are acquiring data.1. click the test button, shown at left. an analog input test

52、 panel dialog box appears.2. click the start button once or twice to confirm that you are acquiring data, and then click the ok button to return to the daq assistant.3. click the ok button to return to the block diagram.4. save this vi as read voltage.vi to an easily accessible location.graphing dat

53、a from a daq deviceusing the task you created in the previous exercise, you can graph the data acquired from a daq device. complete the following steps to plot the data from the channel in a waveform graph and change the name of the signal.1. on the block diagram, right-click the data output and sel

54、ect create graph indicator.2. display the front panel.3. run the vi three or four times and observe the waveform graph.notice that voltage appears in the waveform graph plot legend.4. display the block diagram.5. right-click the daq assistant express vi and select properties to rename thechannel.6.

55、right-click voltage in the channel list listbox and select rename to display the rename a channel or channels dialog box.tip you also can select the name of the channel and press the key to access the rename a channel or channels dialog box.7. in the new name text box, enter first voltage reading, a

56、nd click the ok button.8. click the ok button to apply this configuration and return to the block diagram.9. display the front panel and run the vi.notice that first voltage reading appears in the waveform graph plot legend.10. save this vi.editing an ni-daqmx taskyou can add a channel to the task s

57、o that you can compare two separate voltage readings. you also can customize the task to acquire the voltage readings continuously. complete the following steps to add a new channel to the task and acquire data continuously.1. display the block diagram and double-click the daq assistant express vi to add a new channel.2. click the add step button,

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论