資料介紹
The previous chapter covered many of LabVIEWs basic functions. The functions
give a programmer the ability to produce a wide range of applications in a relatively
short time. While the previously discussed functions provide enough of a basis to
build an application, there are a number of LabVIEW features that can make an
application more flexible and easier to use, and can give your application a professional
appearance. Some of these features will be discussed in this chapter.
2.1 GLOBAL AND LOCAL VARIABLES
Global variables are used when a data value needs to be manipulated in several VIs.
The advantage of using a global variable is that you only have to define that data
type once. It can then be read from or written to in multiple VIs. The use of global
variables is considered poor programming practice; they hide the data flow of your
application and create more overhead. National Instruments suggests that you structure
your application to transfer data using a different approach when possible.
However, there are instances when global variables are necessary and are the best
approach for an application. One example would be updating a display from data
being generated in a subVI. The application could have two While loops running in
parallel. Data could be generated in a subVI in the top loop while the bottom loop
reads the data from the global and writes the information to the user interface. There
is no other method for obtaining data from a subVI while it is still running.
The global variable must be created and its data types defined before it can be
used. To create a global, first drag the icon from the Structures palette and drop it
onto a block diagram. Figure 2.1 shows the global as it appears on the diagram. The
question mark and black border indicate that it cannot be used programmatically.
The global has a front panel to which you can add controls, identical to a VI. Globals
do not have a block diagram associated with them. To open the front panel of the
global variable, simply double-click on the icon. The front panel of the global is
shown in the bottom window of Figure 2.1.
Two controls have been created on the global front panel. A global variable can
contain multiple controls on the front panel. Try to logically group related controls
and tie them to a single global variable. Once the data types have been defined, save
the global as a regular VI. The global can then be accessed in any VI by using the
same method you normally follow to place a subVI on the code diagram. If you
have more than one control associated with the global variable, pop up on the icon
once you have dropped it onto a block diagram and use the Select Item submenu to
select the appropriate one.
give a programmer the ability to produce a wide range of applications in a relatively
short time. While the previously discussed functions provide enough of a basis to
build an application, there are a number of LabVIEW features that can make an
application more flexible and easier to use, and can give your application a professional
appearance. Some of these features will be discussed in this chapter.
2.1 GLOBAL AND LOCAL VARIABLES
Global variables are used when a data value needs to be manipulated in several VIs.
The advantage of using a global variable is that you only have to define that data
type once. It can then be read from or written to in multiple VIs. The use of global
variables is considered poor programming practice; they hide the data flow of your
application and create more overhead. National Instruments suggests that you structure
your application to transfer data using a different approach when possible.
However, there are instances when global variables are necessary and are the best
approach for an application. One example would be updating a display from data
being generated in a subVI. The application could have two While loops running in
parallel. Data could be generated in a subVI in the top loop while the bottom loop
reads the data from the global and writes the information to the user interface. There
is no other method for obtaining data from a subVI while it is still running.
The global variable must be created and its data types defined before it can be
used. To create a global, first drag the icon from the Structures palette and drop it
onto a block diagram. Figure 2.1 shows the global as it appears on the diagram. The
question mark and black border indicate that it cannot be used programmatically.
The global has a front panel to which you can add controls, identical to a VI. Globals
do not have a block diagram associated with them. To open the front panel of the
global variable, simply double-click on the icon. The front panel of the global is
shown in the bottom window of Figure 2.1.
Two controls have been created on the global front panel. A global variable can
contain multiple controls on the front panel. Try to logically group related controls
and tie them to a single global variable. Once the data types have been defined, save
the global as a regular VI. The global can then be accessed in any VI by using the
same method you normally follow to place a subVI on the code diagram. If you
have more than one control associated with the global variable, pop up on the icon
once you have dropped it onto a block diagram and use the Select Item submenu to
select the appropriate one.
LabVIEW
加入交流群
掃碼添加小助手
加入工程師交流群
下載該資料的人也在下載
下載該資料的人還在閱讀
更多 >
- LabView工具包WebSocket-API主機下載 77次下載
- LABVIEW NPOI庫文件下載 212次下載
- 計算器labview實現的課程實驗報告 30次下載
- labview定時器實現實例分享 30次下載
- labview的按鈕控件匯總 413次下載
- 如何創建和使用LabVIEW中的LLB文件 0次下載
- LabVIEW常用設計模式電子版資源下載 0次下載
- 串口通信之讀取與發送及LabView文件下載 190次下載
- Labview Excel例子文件下載 157次下載
- LabVIEW實現數字調制解調及編程軟件操作 52次下載
- LabView相機采集圖像指南 104次下載
- 使用TestStand仿真LabView教程資料分享 275次下載
- iPod nano Features Guide
- LabVIEW Features
- Proximity Detector Features Ul
- labview怎么記錄時間和數據 6.9k次閱讀
- LabVIEW串口示波器設計 2.8k次閱讀
- 使用LabView控制DS3900串程通信模塊 2k次閱讀
- 基于labview信號發生器的設計方案 3.6k次閱讀
- Labview創建數組函數的方法分享 1.2w次閱讀
- dfrobotArduino與LabVIEW互動設計簡介 2.5k次閱讀
- 盤點LabVIEW新手5大容易犯的錯誤 5.4k次閱讀
- 空氣質量傳感器的labview程序 3k次閱讀
- labview和485串口通信 2.7w次閱讀
- labview怎么調試?基于labview的USB調試教程案例分析 1.5w次閱讀
- labview讀取串口數據 2.7w次閱讀
- labview串口數據處理_labview串口通信 3.2w次閱讀
- FAST特征點檢測features2D 3.8k次閱讀
- 適用于每個LabVIEW開發者的巧妙調試技巧 5.6k次閱讀
- 不得不看的LabVIEW新手5大錯誤 1.6w次閱讀
下載排行
本周
- 1MDD品牌三極管BC807數據手冊
- 3.00 MB | 次下載 | 免費
- 2MDD品牌三極管BC817數據手冊
- 2.51 MB | 次下載 | 免費
- 3MDD品牌三極管D882數據手冊
- 3.49 MB | 次下載 | 免費
- 4MDD品牌三極管MMBT2222A數據手冊
- 3.26 MB | 次下載 | 免費
- 5MDD品牌三極管MMBTA56數據手冊
- 3.09 MB | 次下載 | 免費
- 6MDD品牌三極管MMBTA92數據手冊
- 2.32 MB | 次下載 | 免費
- 7STM32G474 HRTIME PWM 丟波問題分析與解決
- 1.00 MB | 次下載 | 3 積分
- 8新能源電動汽車高壓線束的銅鋁連接解決方案
- 2.71 MB | 次下載 | 2 積分
本月
- 1愛華AIWA HS-J202維修手冊
- 3.34 MB | 37次下載 | 免費
- 2NB-IoT芯片廠商的資料說明
- 0.31 MB | 22次下載 | 1 積分
- 3PC5502負載均流控制電路數據手冊
- 1.63 MB | 22次下載 | 免費
- 4H110主板CPU PWM芯片ISL95858HRZ-T核心供電電路圖資料
- 0.63 MB | 6次下載 | 1 積分
- 5UWB653Pro USB口測距通信定位模塊規格書
- 838.47 KB | 5次下載 | 免費
- 6技嘉H110主板IT8628E_BX IO電路圖資料
- 2.61 MB | 4次下載 | 1 積分
- 7蘇泊爾DCL6907(即CHK-S007)單芯片電磁爐原理圖資料
- 0.04 MB | 4次下載 | 1 積分
- 8蘇泊爾DCL6909(即CHK-S009)單芯片電磁爐原理圖資料
- 0.08 MB | 2次下載 | 1 積分
總榜
- 1matlab軟件下載入口
- 未知 | 935137次下載 | 10 積分
- 2開源硬件-PMP21529.1-4 開關降壓/升壓雙向直流/直流轉換器 PCB layout 設計
- 1.48MB | 420064次下載 | 10 積分
- 3Altium DXP2002下載入口
- 未知 | 233089次下載 | 10 積分
- 4電路仿真軟件multisim 10.0免費下載
- 340992 | 191439次下載 | 10 積分
- 5十天學會AVR單片機與C語言視頻教程 下載
- 158M | 183353次下載 | 10 積分
- 6labview8.5下載
- 未知 | 81602次下載 | 10 積分
- 7Keil工具MDK-Arm免費下載
- 0.02 MB | 73822次下載 | 10 積分
- 8LabVIEW 8.6下載
- 未知 | 65991次下載 | 10 積分
電子發燒友App





創作
發文章
發帖
提問
發資料
發視頻
上傳資料賺積分
評論