NI官方labview培训教材Lesson 9-11
NI官方labview培训教材Lesson 9-11

TOPICS Plug-in DAQ devices Data Acquisition in LabVIEW Analog Input Data Logging Analog Output Counters Digital I/O
Configures the start and reference triggers for the task
15
Counters
A counter is a digital timing device Typical uses of a counter: Gate Output • Event counting • Frequency measurement Count Register • Period measurement Source • Position measurement • Pulse generation
Channel names Signals ai 0 ai 1 ai 2
Sine Wave 1 Sine Wave 2 Sine Wave 3
Tasks
Timing and Triggering
5
The DAQ Signal Accessory
NI-DAQmx versus Traditional NI-DAQ
Summary
• MAX is the primary configuration and testing utility that is available for the DAQ device. • The DAQ Assistant is used to configure the DAQ device and perform data acquisition. • Most application can use the DAQ Assistant. For applications that require advanced timing and synchronization use the VIs that come with NI-DAQmx. • The DAQ Assistant can perform Analog Input, Analog Output, Digital I/O, and Counter operations.
LabVIEW经典PPT课件

13
.
第3章 LabVIEW的程序运行结构
3.1 两种不同的循环结构 3.2 定时结构 3.3 独特的条件结构 3.4 不和谐的顺序结构 3.5 禁用部分程序框图结构 3.6 局部变量、内置全局变量和函数全局变量 3.7事件结构
14
.
3.1 两种不同的循环结构
3.1.1 For循环的组成和特点 3.1.2 For循环与数组 3.1.3 For循环与移位寄存器 3.1.4 For循环中的continue和break 3.1.5 While循环不仅仅是循环 3.1.6 While循环与定时 3.1.7 反馈节点
28
.
4.8 几种常用的内存分析工具和方法
4.8.1 内存的重要性 4.8.2 内存和性能查看工具 4.8.3 VI 使用的内存 4.8.4 优化内存的一般注意事项 4.8.5 数组处理与内存优化 4.8.6 避免循环中不必要的计算、读写控件或者变量
29
.
4.9 影响VI运行速度的因素
口 第九章:MathScript 第十章:基于组件的程序结
构 第十一章:人机交互与编程
风格
3
.
应用篇
第十二章:VI模板、设计模 式、状态图
第十三章:串并口通讯、网 络与DSC
第十四章:数据库、报表工 具
第十五章:LabVIEW与RT系 统
第十六章:LabVIEW与数据 采集
第十七章:FPGA工具包
44
.
5.2.6 读写二进制文件
二进制文件是计算机文件中最常见的文件。它占用空间 最小,适合于连续存储大量数据。同时,它的存储格式 与数据在内存中的存储格式一致或者类似,很多情况下 甚至是内存的映射。因此,无论是存储还是读取都是速 度最快的,而且还具有非常高的安全性。如果不知道数 据的格式,很难分析出文件的格式。
LabView 培训 课件

连续运行
断开
警告
VI 调试方法
高亮显示
单步执行
当前运行vi图标
VI 调试方法
断点
探针和监视窗口
错误簇
控件和函数
• • • • • • • 数值型控件及函数 布尔型控件及函数 字符串控件及函数 数组控件及函数 簇数控件及函数 数据类型转换 时间函数
程序运行结构及高级控件应用
1.程序结构 2.变量/节点/引用 3.图形显示控件以函数 4.文件 I/O 5.串口通信 6.访问第三方接口
布)
Labview菜单栏和工具栏常用工具
即时帮助窗口 控件自定义菜单
函数和控件选板菜单 (返回、搜
索、自定义)
前面板对象设计基础
新式
银色
系统
经典
程序面板对象设计基础
?Function?
程序面板对象设计基础
多态VI 和函数
程序面板对象设计基础
设计程序框图
VI 调试方法
运行
• 生成exe • 生成dll以及dll调用
• 生成installer
LabVIEW 功能模块
bVIEW 发送 Email 邮件
bVIEW 生成 PDF bVIEW 生成 WORD 日常巡检报表
bVIEW 生成 EXCEL 日常巡检报表
bview 生成条形码/二维码
Switch语句
Case语句列表
Case语句
引用
图形显示控件
Chart
Waveform(波形) XY Intensity(强度图) Digital(数字图) 3D Surface(三维曲面) 3D Parametric(三维参变量) 3D Curve(三维曲线) * *
LabVIEW基础培训

LabVIEW基础培训课程学习导读第一课 配置硬件•数据采集设备•仪器控制•使用仪器控制软件A. 数据采集设备1.信号2.接线盒3.线缆4.DAQ设备5.计算机•使用Measurement & Automation Explorer (MAX)配置和测试DAQ设备•虚拟DAQ设备:•使用NI-DAQmx虚拟设备,在不具备硬件的应用程序中实现NI产品功能•使用NI-DAQmx虚拟设备,可导出物理设备配置至未安装物理设备的系统B. 仪器控制•通过仪器控制总线,使用计算机上的软件控制仪器•合理搭配各类总线和仪器•了解仪器属性,例如:所用的通信协议•仪器控制的优势◆过程自动化◆节省时间◆在一个平台上执行多个任务◆简单易用◆多种可选仪器GPIB(通用接口总线)是用于不同厂商的仪器和控制器通信的标准接口。
•此类总线支持一个系统控制器(通常为计算机)和最多14台仪器•控制器:◆串口通信定义通信链接◆响应发出请求的设备◆发送GPIB命令◆传送/接收总线控制权串口通信•在计算机和外设(例如,可编程仪器或其它计算机)之间传输数据•使用发送器经通信数据线向接收器发送数据,每次发送一位数据•如数据传输速率较低或长距离传输时,上述方法为最佳方案•绝大多数计算机具有一个或多个串口,因此除线缆外无需其它硬件设备C. 使用仪器控制软件•接口驱动:仪器接口(例如,GPIB)包含一组驱动程序 •配置:使用MAX配置接口第二课 LabVIEW导航•虚拟仪器(VI)•VI的构成•打开VI•项目浏览器•前面板•程序框图•搜索选板•选择工具•数据流•创建一个简单VIA. 虚拟仪器(VI)什么是虚拟仪器?(把仪器放进计算里)软件程序——LabVIEW程序外观及性能均类似于物理仪器(如示波器和数字万用表)B. VI的构成●前面板:VI的用户界面,使用输入控件和显示控件创建前面●程序框图:包含图形化编程的源代码●图标:VI的图形化表示&连线板:VI的输入和输出连线图C. 打开VID. 项目浏览器LabVIEW项目用于:•集中管理LabVIEW文件和非LabVIEW文件•创建程序生成规范•部署或下载文件至终端E. 前面板-控件选板•包含用户搭建前面板所需的输入控件和显示控件•在前面板单击查看»控件选板F. 程序框图-函数选板包含创建程序框图所需的VI、函数和常量G. 搜索控件、VI、函数在控件和函数选板上通过搜索按钮查找控件、函数和VIH. 选择工具•使用LabVIEW提供的工具创建、修改和调试VI•工具是对应于鼠标动作的特定操作模式•鼠标动作取决于所选择的工具图标•如开启自动选择工具功能,LabVIEW将根据当前鼠标位置判断要使用的工具I. 数据流LabVIEW按照数据流模型运行VI•仅当所有输入数据都准备好时,节点才能执行功能•节点执行完后才能向输出端提供数据J. 创建简单VI第三课 疑难解答和VI调试•LabVIEW帮助工具•修正断开的VI•调试技术•未定义或预期外的数据•错误检查和处理A. LabVIEW帮助工具即时帮助•鼠标悬停于对象上方时,显示LabVIEW对象的基本信息•点击帮助»显示即时帮助、按下<Ctrl-H>或点击工具栏上的显示即时帮助窗口按钮LabVIEW帮助•多数选板、菜单、工具、VI和函数的详细介绍及LabVIEW使用说明•打开LabVIEW帮助:−点击帮助》搜索LabVIEW帮助−使用即时帮助窗口的详细帮助信息链接或−右键单击对象,选择快捷菜单中的帮助项B. 修正断开的VIB. 修正断开的VI常见问题•断线−将布尔型输入控件与字符串型显示控件相连−将数值型输入控件与数值型输入控件相连•必须连接的程序框图接线端断开•子VI断开或将子VI图标放置在VI程序框图上之后,对连线板进行了编辑C. 调试技术VI未断开,但产生某些未预期数据或事件•是否存在未连线或隐藏的子VI?•是否使用了不正确的默认数据?•是否传递了未定义数据?•是否使用了正确的数值表示法?•节点执行顺序是否正确?关键词:单步执行探针断点D. 未定义或预期外的数据•∞ (Inf)−无穷大−用零做除数,执行除法操作•NaN−非法数字−由无效操作产生,例如,对负数执行求平方根操作•执行数学运算时检查是否有非预期的Inf或NaN数据E. 错误检查和处理•虽然开发人员在创建VI时,努力确保VI的完善性。
labview第九章

9. Documentation9. 文档资料Documentation is any description of the structure, components, or operation of a system, application, or source code. Documentation includes specifications, design documents, source code documentation, user manuals, and online help. Specifications and design documents are discussed in Chapter 2, "Prepare for Good Style." Source code documentation consists of comments, descriptions, and text that are useful for the developers to understand the source code. A user manual is a document describing how to operate the software from the end user's perspective. Online help is documentation that is electronically integrated with the application.文件是是结构、元件、系统操作、应用程序或者源代码的一些描述。
文件包括规格、文档设计、源代码文件、用户手册和在线帮助。
规格和设计文档在第二章“prepare for Good Style”中已经讨论过。
源代码文件包括评论、说明和用于开发者理解源代码的文字。
用户手册文档从用户的角度介绍了如何操作软件,在线帮助文档被电子集成到应用程序中。
NILabVIEW官方入门教程(中文pdf)

目录
关于本用户手册 行文规范.....................................................................................................................................................ix 相关文档.....................................................................................................................................................x
免责条款,见 USICopyrights.chm。
Xerces C++. 本产品包括由 Apache Software Foundation (/) 开发的软件。 Copyright 1999 The Apache Software Foundation. 版权所有。 ICU. Copyright 1995–2003 International Business Machines Corporation and others. 版权所有。 HDF5. NCSA HDF5 (Hierarchical Data Format 5) 软件库和工具。 Copyright 1998, 1999, 2000, 2001, 2003, by the Board of Trustees of the University of Illinois. 版权所有。 Citadel 5. 使用 Citadel 5 的组件适用以下版权。 Copyright © 1994 Hewlett-Packard Company. b64 library. Copyright © 2004–2006, Matthew Wilson and Synesis Software. 版权所有。 Stingray. 本软件包括由 Rogue Wave Software division of Quovadx, Inc 开发的 Stingray 软件。 Copyright 1995–2006, Quovadx, Inc. 版权所有。
虚拟仪器labview课件PPT第十一章通信编程

第十一章 通信编程
11.2 DataSocket通信技术 DataSocket是NI企业提供旳一种网络测控
系统开发工具,以实现不同旳应用程序和数据 源之间旳数据共享。
DataSocket用类似于Web中旳统一资源定位 器(URL)定位数据,URL不同旳前缀表达了不同 旳数据类型:
从DataSocket读数据旳前面板:
第十一章 通信编程
第十一章 通信编程
注意:在上述程序运营前,必须先从 Windows程序菜单中打开DataSocket Sever。
第十一章 通信编程
11.2.6 基于DataSocket旳OPC数据传播
LabVIEW中DataSocket提供了OPC数据传播功 能。
该节点用于设置串标语、波特率、数据位、 停止位、奇偶校验、缓冲区大小及流量控制等 参数。
第十一章 通信编程
② 串口写(Serial Port Write.VI)
对串口进行写操作,端口设置为: VISA resource name:设置串标语; write buffer:写入串口缓冲区旳字符。 Return count:返回写入串口旳字符数。
OPC URL旳基本构造为: opc://主机名//OPC服务器名/数据项目
下面以SLC500 PLC为例,简介LabVIEW与PLC 基于DataSocket旳数据通信措施。
第十一章 通信编程
第十一章 通信编程
第十一章 通信编程
第十一章 通信编程
① RSLinx与其他软件旳通信 RSLinx通讯软件是用于A-B可编程控制器旳服 务器软件,为A-B旳PLC处理器与Rockwell企业及 其他企业(如微软)旳许多软件产品提供了通信 连接,如下图。
NI官方labview培训教材Lesson.ppt

Assistant Express VI
9
NI-DAQmx Data Acquisition Task Types
Lesson 9 Data Acquisition and Waveforms
TOPICS Plug-in DAQ devices Data Acquisition in LabVIEW Analog Input Data Logging Analog Output Counters Digital I/O
Channel names
Signals
Sine Wave 1
ai 0
ai 1
Sine Wave 2
ai 2
Sine Wave 3
Tasks
Timing and Triggering
5
The DAQ Signal Accessory
NI-DAQmx versus Traditional NI-DAQ
Analog Input Task Timing and Triggering
Configures the number of samples and sample rate for the task
Configures the start and reference triggers for the task
Feature Test Panels
Productivity DAQ Assistant with code generation On-line diagnostics Scaling to voltage and physical units
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Summary
• MAX is the primary configuration and testing utility that is available for the DAQ device.
• The DAQ Assistant is used to configure the DAQ device and perform data acquisition.
Analog Input Task Timing and Triggering
Configures the number of samples and sample rate for the task
Configures the start and reference triggers for the task
DAQ Assistant Express VI • Quickly and easily program the DAQ device • Creates a local task • Most applications can use the DAQ
Assistant Express VI
9
NI-DAQmx Data Acquisition Task Types
1965
HP designs HP-IB (Hewlett Packard Interface Bus)
1975
HP-IB becomes IEEE 488
1987
IEEE 488.2 adopted
IEEE 488 becomes IEEE 488.1
1990
SCPI (Standard Commands for Programmable
• Most application can use the DAQ Assistant. For applications that require advanced timing and synchronization use the VIs that come with NI-DAQmx.
• The DAQ Assistant can perform Analog Input, Analog Output, Digital I/O, and Counter operations.
Feature Test Panels
Productivity DAQ Assistant with code generation On-line diagnostics Scaling to voltage and physical units
Performance 50 kS/s with single point I/O Measurement multithreading Instant calibration Accuracy Automatic selection of optimal gains Guaranteed lossless data 650 Alliance members Quality Integration with LabVIEW Developer Exchange discussion forum
Diagnostics Tools: GPIB Diagnostic Tool
NI-Spy
Interface Board (GPIB, PXI,
VXI, computer based, etc.)
Driver Software (*.DLL)
NI-VISA
Instrument Driver VIs
LabVIEW
Configuration Tools: Measurement &
Automation Explorer
1
Overview and Configuration
Fundamental task of a DAQ system is to measure or generate real-world physical signals
DAQ system consists of: •Transducers •Signal Conditioning •Plug-in DAQ device •Driver •Software
13
Analog Output
Analog Output task is specific to the generation type
14Βιβλιοθήκη Analog Output Task Timing and Triggering
Configures the number of samples and sample rate for the task
Configures the start and reference triggers for the task
15
Counters
A counter is a digital timing device
Typical uses of a counter:
• Event counting
Gate
Output
task • One set of VIs for all
measurement types
8
NI-DAQmx Data Acquisition
Single set of VIs used to perform analog I/O, digital I/O, and counter operations
2
Measurement Software Framework
NI-DAQ contains: •Traditional NI-DAQ •NI-DAQmx
3
DAQ Hardware Configuration
Measurement & Automation Explorer (MAX)
4
Channels and Tasks
Lesson 9 Data Acquisition and Waveforms
TOPICS Plug-in DAQ devices Data Acquisition in LabVIEW Analog Input Data Logging Analog Output Counters Digital I/O
12
Data Logging
• It is often necessary to permanently store data that is acquired from the DAQ device • LabVIEW includes the ability to read and write a LabVIEW Measurement File • LabVIEW Measurement File is an ASCII text file
Channel names
Signals
Sine Wave 1
ai 0
ai 1
Sine Wave 2
ai 2
Sine Wave 3
Tasks
Timing and Triggering
5
The DAQ Signal Accessory
NI-DAQmx versus Traditional NI-DAQ
− Communication protocols used
– Software drivers available
Instruments
Computer
20
GPIB Communication
GPIB Interface
GPIB Instruments
GPIB Cable
Standards Introduction
16
Digital Input and Output
• Digital I/O can read from or write to a line or an entire digital port
• A digital port is a collection of digital lines
17
Instruments) added to IEEE 488.2
1992
IEEE 488.2 revised
1993
HS488 proposed
1999
HS488 approved
22
GPIB Hardware Specifications
DIO1 DIO2 DIO3 DIO4 EOI DAV NRFD NDAC
Compatibility Compatible with Legacy ISA Boards
NI-DAQmx no
Traditional NI-DAQ no
Best Good Fair
7
Data Acquisition in LabVIEW
DIO8 REN
GND (TW PAIR W/DAV)
GND (TW PAIR W/NRFD)
GND (TW PAIR W/NDAC)
GND (TW PAIR W/IFC)
GND (TW PAIR W/SRQ)
GND (TW PAIR W/ATN)
SIGNAL GROUND
23
GPIB Software Architecture — Windows
19
Instrument Control Overview
Control any instrument if you know the following:
– Type of connector on the instrument − Type of cables needed
– Electrical properties involved