版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、本科畢業(yè)設(shè)計(jì)(論文)外文翻譯原文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 <ctrl-n> keys to open a blank vi. notice tha
5、t 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 file»new vi from the front panel or block diagram menu bar.2. if the functions palette is not visible, right-click any blank spa
6、ce 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 the block diagram or the front panel to bring up t
7、he 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 <ctrl-h> keys to open the context help window. you also
8、 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 information about the function of each expres
9、s 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 options in the configure simulate s
10、ignal 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 how the signal displayed in the res
11、ult 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 window now displays the configuration
12、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 help»vi, function, & how-to
13、 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 sample compression expres
14、s 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 co
15、mpression 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 compres
16、sion 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 controls palette. you also c
17、an 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 create»numeric indicator to create a numeric indicator.2. right-click the mean output of the samp
18、le 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 create»control to create the enable switch.4. right-click the wire linking the sine output in the simulate signal express vi to the signals input
19、 in the signal compression express vi and select create»graph 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
20、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 the sho
21、rtcut 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 this vi.con
22、figuring 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 the front
23、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 while lo
24、op 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 configure
25、d 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 points on the
26、 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 time dela
27、y (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 the chan
28、ge 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 of mean v
29、alues 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 vi auto
30、matically.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 and the t
31、able 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 the bui
32、ld 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. display the fr
33、ont 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 dialog bo
34、x. 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 vis. bo
35、th 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 you move
36、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 the expr
37、ess 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 contents
38、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 customize a
39、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, output, or
40、 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, the lo
41、op 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 express vi to
42、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 and instru
43、ment 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 tasks.
44、to launch this help tutorial, select help»taking 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 for the list of ni-daqmx-supported devices. if you do not have
45、 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 waveform gra
46、ph.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 to perform.
47、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 input palette a
48、nd 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. t
49、he 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 figure 4-1, wh
50、ich 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 acquire n sample
51、s 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 panel dialog
52、 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 data from a daq
53、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 select create
54、87; 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. right-c
55、lick 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 <f2> key to access the rename a channel or channels dialog box.7. in the new name text box, enter first voltage readin
56、g, and 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 ta
57、sk so 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, shown at left, to open the add channels to task dialog box.3. select any unused physical channel in the my
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 廣州企業(yè)章程范本
- 臨床路徑持續(xù)改進(jìn)
- 2025關(guān)于藥店轉(zhuǎn)讓合同協(xié)議書
- 2025手機(jī)買賣合同的范本
- 【七年級(jí)下冊(cè)地理中圖版】4.3 工業(yè) 同步練習(xí)
- 2025集體土地房屋轉(zhuǎn)讓合同
- 2025入職登記表不等同于勞動(dòng)合同
- 紡織行業(yè)美工的面料設(shè)計(jì)
- 物業(yè)管理保安工作總結(jié)
- 航空器制造與維護(hù)投資合同三篇
- 蘇教版六年級(jí)上冊(cè)分?jǐn)?shù)四則混合運(yùn)算100題帶答案
- 2024年考研英語(yǔ)(一)真題及參考答案
- 醫(yī)療組長(zhǎng)競(jìng)聘
- 2024年業(yè)績(jī)換取股權(quán)的協(xié)議書模板
- 顳下頜關(guān)節(jié)疾病(口腔頜面外科學(xué)課件)
- 工業(yè)自動(dòng)化設(shè)備維護(hù)保養(yǎng)指南
- 2024人教新版七年級(jí)上冊(cè)英語(yǔ)單詞英譯漢默寫表
- 《向心力》參考課件4
- 定制柜子保修合同協(xié)議書
- 2024至2030年中國(guó)膨潤(rùn)土行業(yè)投資戰(zhàn)略分析及發(fā)展前景研究報(bào)告
- 2024年深圳中考數(shù)學(xué)真題及答案
評(píng)論
0/150
提交評(píng)論