資料介紹
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工具包WebSocket-API主機下載 69次下載
- LABVIEW NPOI庫文件下載 203次下載
- 計算器labview實現(xiàn)的課程實驗報告 29次下載
- labview定時器實現(xiàn)實例分享 26次下載
- LabVIEW Vision圖像處理開發(fā)寶典.PDF 160次下載
- labview的按鈕控件匯總 384次下載
- 如何創(chuàng)建和使用LabVIEW中的LLB文件 0次下載
- LabVIEW常用設(shè)計模式電子版資源下載 0次下載
- 串口通信之讀取與發(fā)送及LabView文件下載 184次下載
- Labview Excel例子文件下載 148次下載
- LabVIEW實現(xiàn)數(shù)字調(diào)制解調(diào)及編程軟件操作 52次下載
- LabView相機采集圖像指南 102次下載
- 使用TestStand仿真LabView教程資料分享 267次下載
- LabVIEW Features
- Proximity Detector Features Ul
- labview生成應(yīng)用程序怎么包括userlist 548次閱讀
- labview怎么記錄時間和數(shù)據(jù) 4206次閱讀
- LabVIEW串口示波器設(shè)計 1995次閱讀
- 使用LabView控制DS3900串程通信模塊 1315次閱讀
- 基于labview信號發(fā)生器的設(shè)計方案 2998次閱讀
- Labview創(chuàng)建數(shù)組函數(shù)的方法分享 1w次閱讀
- dfrobotArduino與LabVIEW互動設(shè)計簡介 1985次閱讀
- 盤點LabVIEW新手5大容易犯的錯誤 4821次閱讀
- labview和485串口通信 2.5w次閱讀
- labview怎么調(diào)試?基于labview的USB調(diào)試教程案例分析 1.3w次閱讀
- labview讀取串口數(shù)據(jù) 2.6w次閱讀
- labview串口數(shù)據(jù)處理_labview串口通信 3w次閱讀
- FAST特征點檢測features2D 3542次閱讀
- 適用于每個LabVIEW開發(fā)者的巧妙調(diào)試技巧 5325次閱讀
- 不得不看的LabVIEW新手5大錯誤 1.5w次閱讀
下載排行
本周
- 1電子電路原理第七版PDF電子教材免費下載
- 0.00 MB | 1489次下載 | 免費
- 2單片機典型實例介紹
- 18.19 MB | 91次下載 | 1 積分
- 3S7-200PLC編程實例詳細資料
- 1.17 MB | 27次下載 | 1 積分
- 4筆記本電腦主板的元件識別和講解說明
- 4.28 MB | 18次下載 | 4 積分
- 5開關(guān)電源原理及各功能電路詳解
- 0.38 MB | 9次下載 | 免費
- 6基于AT89C2051/4051單片機編程器的實驗
- 0.11 MB | 4次下載 | 免費
- 7基于單片機和 SG3525的程控開關(guān)電源設(shè)計
- 0.23 MB | 3次下載 | 免費
- 8基于單片機的紅外風(fēng)扇遙控
- 0.23 MB | 3次下載 | 免費
本月
- 1OrCAD10.5下載OrCAD10.5中文版軟件
- 0.00 MB | 234313次下載 | 免費
- 2PADS 9.0 2009最新版 -下載
- 0.00 MB | 66304次下載 | 免費
- 3protel99下載protel99軟件下載(中文版)
- 0.00 MB | 51209次下載 | 免費
- 4LabView 8.0 專業(yè)版下載 (3CD完整版)
- 0.00 MB | 51043次下載 | 免費
- 5555集成電路應(yīng)用800例(新編版)
- 0.00 MB | 33562次下載 | 免費
- 6接口電路圖大全
- 未知 | 30319次下載 | 免費
- 7Multisim 10下載Multisim 10 中文版
- 0.00 MB | 28588次下載 | 免費
- 8開關(guān)電源設(shè)計實例指南
- 未知 | 21539次下載 | 免費
總榜
- 1matlab軟件下載入口
- 未知 | 935053次下載 | 免費
- 2protel99se軟件下載(可英文版轉(zhuǎn)中文版)
- 78.1 MB | 537791次下載 | 免費
- 3MATLAB 7.1 下載 (含軟件介紹)
- 未知 | 420026次下載 | 免費
- 4OrCAD10.5下載OrCAD10.5中文版軟件
- 0.00 MB | 234313次下載 | 免費
- 5Altium DXP2002下載入口
- 未知 | 233045次下載 | 免費
- 6電路仿真軟件multisim 10.0免費下載
- 340992 | 191183次下載 | 免費
- 7十天學(xué)會AVR單片機與C語言視頻教程 下載
- 158M | 183277次下載 | 免費
- 8proe5.0野火版下載(中文版免費下載)
- 未知 | 138039次下載 | 免費
評論