【正文】
Blank VI 或快捷鍵 CtrlN,來打開一個空 VI。當你完成練習時, VI 程序的前面板如圖 31 所示。然而 ,在某些情況下模板并不適用于你需要創(chuàng)建的 VI 程序。按中文翻譯在上,外文原文在下的順序裝訂。 本科畢業(yè)設計(論文)外文翻譯譯文 學生姓名 : 院 (系): 電子工程學院 專業(yè)班級 : 測控 0703 指導教師 : 完成日期 : 2020 年 3 月 5 日 9 要 求 外文翻譯是畢業(yè)設計(論文)的主要內(nèi)容之一,必須學生獨立完成。 文章標題用 3 號宋體,章節(jié)標題用 4 號宋體,正文用小 4 號宋體, 20 磅行距 ;頁邊距上、下、左、右均為 , 左側(cè)裝訂,裝訂線。 VI 的使用 起止頁碼: 31— 47 出版日 期(期刊號): 2020 年 4 月 出版單位: National Instruments 外文翻譯譯文: 擴展 VI 的特性 你可以選擇多個 LabVIEW VI 模板中的一個來創(chuàng)建你的 VI。新的 VI 程序?qū)崿F(xiàn)產(chǎn)生信號、減少信號的采樣點,并在前面 板的表格中顯示最終數(shù)據(jù)。完成下面的步驟來打開一個空 VI。 2. 如果 Functions 選板不可見,在程序框圖內(nèi)的任何空白區(qū)右擊,即會跳出 Functions 選板。 1. 如果 Context Help 窗口沒有出現(xiàn),可以按 CtrlH 鍵打開它。 3. 通過 Context Help 窗口提供的信息 , 找到可以輸出一個正弦波信號的 Express VI。 7. 注意 Result Preview 窗口內(nèi)顯示的信號,自動改變來反映您配置的正弦波。 10. 保存此 VI 到容易找到的位置,命名為 Reduce 。 2. 點擊 Search 標簽,在 Type in the word(s) to search for 文本框內(nèi)鍵入 sample pression。 5. 移動光標到程序框圖。 8. 關閉 Configure Sample Compression 對話框。完成下面的步驟在程序框圖中創(chuàng)建控制件和顯示件。 4. 右擊 Simulate Signal Express VI 的 Sine 輸出和 Signal Compression Express VI 的 Signals 輸入之間的連線,單擊 CreateGraph Indicator。 注意,合并信號函數(shù) (Merge Signal Function)出現(xiàn)。 13 注意,你 添加的控制件和顯示件自動在前面板上顯示,且有與它們的功能對應的標 8. 保存此 VI 程序。 注意 VI 運行后就停止,且沒有 STOP 按鈕。 圖 33 放置環(huán)繞 Express VIs 的 While Loop 注意, While Loop,如左圖所示,顯示有一個 STOP 按鈕,與條件(Condition Terminal)相連線。 While Loop 執(zhí)行循環(huán)內(nèi)的函數(shù),直到用戶按 STOP 按鈕。 2. 在 Time Delay(Seconds)文本框內(nèi)鍵入 4. 保存此 VI。 7. 點擊 STOP 停止運行 VI。 注意, Table 連線終端自動連線到 Build Table Express VI。 4. 拖 拉這些對象進入 While Loop 區(qū)域,處于 Mean 連線終端的右邊。 圖 34 Reduce Samples VI 的程序框圖 15 6. 顯示前面板,運行 VI。 8. 保存此 VI。 小結(jié) 利用 LabVIEW 的幫助資源 你 可以利用 Context Help 窗口和 LabVIEW Help 學到更多關于 Express VI 的東西??梢蕴峁? Context Help 信息的對象包括 VIs、結(jié)構(gòu) (structures) 、選板和對話框組件。 ? 瀏覽 LabVIEW Help 時,利用 Contents、 Index 和 Search 標簽 。 定制程序框圖代碼 LabVIEW 有許多控制件、顯示件、 Express VIs 和結(jié)構(gòu) (structures) , 你 可以使用它們來定制 VI 程序。當停止條件滿足時, While Loop 停止運行。使用 Build Table Express VI 可以將采 集到的數(shù)據(jù)制成表格。參考 Taking an NIDAQmx Measurement in LabVIEW 的幫助指南,以了解更多有關 NIDAQmx 工作方法的信息。 如果你 沒有安裝 NIDAQmx 或支持 NIDAQmx 的設備,請參見 LabVIEW 測量手冊中關于使用傳統(tǒng) NIDAQ 進行數(shù)據(jù)采集的信息。從概念上講,任務代表你 想執(zhí)行的測量或產(chǎn)生的功能。 2. 在 Input 選板中選中 DAQ Assistant Express VI,如左圖所示,并將其放置 alog Input 以顯示 Analog Input 選項 。列出的通道數(shù)取決于 DAQ 設備中的通道個數(shù)。 圖 41 利用 DAQ Assistant 配置任務 6. 在 Settings 標簽中的 Input Range 區(qū)域,輸入 10 為最大值, 10為最小值。按照以下的步驟確認數(shù)據(jù)正在被采集 。 3. 點擊 OK 鍵返回程序框圖。 1. 在程序框圖中,用右鍵單擊 data 輸出端并選擇 CreateGraph Indicator。 4. 顯示程序框圖。 7. 在 New Name 文本框中,輸入 First Voltage Reading,并點擊 OK 鍵。 10. 保存該 VI。 1. 顯示程序框圖并雙擊 DAQ Assistant Express VI 來添加新通道。 5. 重新命名通道為 Second Voltage Reading。 8. 將 DAQ Assistant Express VI 放置在一個 While Loop 中并將曲線圖顯示件連接 11 到 data 輸出端。 1. 在前面板中,擴展圖表圖例為兩個圖表。使用取色器,選擇一種顏色,比如黃色,這樣曲線就變得更容易分辨。開發(fā)人員應該盡可能的使用驅(qū)動程序控制儀器。完成下面與儀器進行通信的練習。只有在開啟的狀態(tài)下才能使用 Instrument I/O Assistant Express VI。在幫助窗口頂端包含關于使用 Instrument I/O Assistant 的流程信息。 6. 點擊 Hide Help 鍵,如左邊圖標,在 Instrument I/O Assistant 對 話框的右上角,最小化幫助窗口。 2. 在 Enter a mand 文本框中輸入 *IDN?。 3. 點擊 Run Sequence 按鈕 , 儀器 I/O 助手向儀器發(fā)送指令,儀器返回識別信息。 6. 在 Token name 文本框中給標號起個名字。 小結(jié) DAQ Assistant Express VI 使用 DAQ Assistant Express VI 圖形化地設置通道或常用的測量任務。 對 NIDAQmx 支持的設備,可以使用 DAQ Assistant Express VI 對儀器進 行控制。如果 NIDAQmx 不支持您所使用的設備,請在 LabVIEW 測量手冊中查詢有關使用 Traditional NIDAQ 進行數(shù)據(jù)采集的信息。在創(chuàng)建一個任務以后,您不需要對每條通道進行設置以實現(xiàn)模擬信號輸入功能,而只需使用一個任務。每個程序協(xié)調(diào)一項程 序化的功能,例如設置,讀取,寫入和觸發(fā)儀器??梢允褂? Instrument I/O Assistant 與串口,以太網(wǎng)或 GPIB 進行通信并 圖形化地分析返回的結(jié)果。 15 本科畢業(yè)設計(論文)外文翻譯原文 學生姓名: 王大虎 院 (系): 電 子 工 程 學 院 專業(yè)班級 : 測控 0703 班 指導教師 : 賈惠芹 完成日期 : 2020 年 3 月 5 日 16 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. 17 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。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 Create18