文档详情

labview 编程与虚拟仪器设计(2-labview基础知识).ppt

发布:2018-01-24约3.87万字共60页下载文档
文本预览下载声明
用控制(输入)和指示器(输出)建立前面板 数值 控制 数值 指示器 标签 增量 按钮 布尔 控制 布尔 指示器 (2).生成一个VI前面板 1. LabVIEW程序创建和编辑 五、LabVIEW创建、编辑和调试技术 (2).生成一个VI前面板,续 五、LabVIEW创建、编辑和调试技术 属性页面 右键在前面板上的控制或指示器,从快捷菜单上选择属性进入属性对话框 五、LabVIEW创建、编辑和调试技术 (3).创建框图程序 五、LabVIEW创建、编辑和调试技术 1. LabVIEW程序创建和编辑 (3).创建框图程序,续(添加除法和加法运算函数) 五、LabVIEW创建、编辑和调试技术 (3).创建框图程序,续(建立连线、完成程序) 五、LabVIEW创建、编辑和调试技术 连线技术 Hot Spot 自动连线 连线时使用帮助窗口 右键选择整理连线( Clean Up Wire) 提示条 自动连线路线 右键端口选择 显示项? 接线端 View the terminal connections to a function 五、LabVIEW创建、编辑和调试技术 练习:创建一个温度计 2. 子VI的建立 五、LabVIEW创建、编辑和调试技术 LabVIEW 层次 子VI 五、LabVIEW创建、编辑和调试技术 子VIs 函数伪代码 function average (in1, in2, out) { out = (in1 + in2)/2.0; } 子VI 框图程序 调用程序伪代码 main { average (point1, point2, pointavg) } 调用VI 框图程序 五、LabVIEW创建、编辑和调试技术 图标/连接端口 Icon Connector terminals 端口 图标代表subVI中的所有框图程序 连接端口表示subVI与调用它的VI间进行数据交换的输入输出端口 五、LabVIEW创建、编辑和调试技术 SubVI Example – 计算斜率 在另一个VI中的VI叫 subVI 使用 VI作为subVI,在建立前面板和框图程序后创建一个图标和连接端口 五、LabVIEW创建、编辑和调试技术 创建图标 图标: VI的图形化表示 右键图标,选择编辑图标(Edit Icon) Default Icon 创建一个定制图标 五、LabVIEW创建、编辑和调试技术 * Probe: Used to view values in arrays and clusters. Click on wires with the Probe tool or right-click on the wire to set probes. Create a probe when you want to have more control over how LabVIEW probes the data that flow through a wire. When you create a new probe, the data type of the probe matches the data type of the wire you right-click. Custom probes are also available - show if time permits. Breakpoint: Set pauses at different locations on the diagram. Click on wires or objects with the Breakpoint tool to set breakpoints. Conditional probe: a probe on which conditions can be set for when to break at the probe. It is VERY easy to place additional breakpoints on a VI. Teach students that if their program is not running correctly and they think they may have a breakpoint…somewhere…that they can use the Edit Find, Other – Breakpoints search tool to locate all breakpoints placed on their block diagrams! * Single stepping: executes the diagram node by
显示全部
相似文档