通信原理实验-FTPDirectoryListing.ppt

* LV的基本组成单位是VI,文件扩展名就是“.vi” 它的含义就是一个虚拟仪器,有前面板和组成框图。Icon/Connector Pane: 要使VI可以被调用,称为子VI,就需要产生一个该子VI的图标(Icon),就向一个元件或模块一样,对外有输入输出接口,或称为连接器(Connector). sub-vi: 子VI; terminal: 端口,指的是函数的输入输出接口。node:节点,表示一条路径上的各个子vi、函数等。 。 求总和(sigma)之前的子VI不需要,可能是版本的不同 * 簇控件:Error in 3D.ctl,包含三个元素:Boolean status, Code, Source。用捆绑(Bundle)或解除捆绑(unbundle)函数(即VI)来接触到簇中的成员。 应养成对程序做一些必要的说明文档的好习惯。对自已产生的子VI,可以为它产生一个简短的帮助文档(Context Help) 波形图是先将数据放在数组中,然后再进行绘制,非实时的。 * 放置探针在连线上时,会自动弹出一个“探针监视窗口”,观测连线在运行中的实时数据。 LabVIEW快速入门.pdf中的实例篇是关于myDAQ的应用,可以不用理会。 * Example –Add2_Nos.vi Construct a VI to add two nums. LabVIEW is graphical, so code is written graphically Step-wise procedure Step 1: Start LabVIEW Blank VI from “Getting Started” screen Step 2: On the Front Panel, add two “Numeric Controls” (inputs) and one “Numeric Indicator” (output) Step 3: Name them x, y and x+y Example –Add2_Nos.vi * Step 4: Switch to the Block Diagram –note the inputs and outputs (same names as Front Panel) Step 5: Right-click on the Block Diagram and choose Add? underNumeric Palette -- drag and drop on the Block Diagram Step 6: Connect the inputs and outputs using the mouse for wiring Example –Add2_Nos.vi (cont.) * Step 7: Save the VI as Add2_Nos.vi Step 8: Modify the icon (top right corner) by right clicking on the icon and choosing Edit icon Step 9: After editing the icon, right click on the icon again and choose Show connector and connect the inputs and output appropriately. Example –Add2_Nos.vi (cont.) * The final VI should look like this To run the VI enter x and y values in the Front Panel Click the icon in the top left corner of the Front Panel Example –Add2_Nos.vi (cont.) * Programming Structures can be found in Structures in the Programming Palette, by right clicking on the Block Diagram LabVIEW supports structures: If / Else For loop While loop * If / Else LabVIEW is graphical, so code of the form below is written graphically Example: Create a VI to add 5 to a number if it is greater than 10, el

文档评论(0)

1亿VIP精品文档

相关文档