# 虚拟仪器

虚拟仪器是一种基于软件的测试与测量方法，其中配备应用软件、插入式测量硬件和驱动软件的工业标准计算机执行传统独立仪器的功能。<sup>[1](https://www.ni.com/en/shop/labview/virtual-instrumentation.html)</sup> 一个广为使用的定义将其描述为模块化硬件与可定制软件的结合，专门用于构建用户自定义的测量、测试和控制仪器；由此产生的系统称为虚拟仪器（VI）。<sup>[2](https://www.intechopen.com/chapters/89005)</sup> 个人计算机是仪器系统不可分割的一部分，因此其计算和控制能力直接应用于测量任务。<sup>[3](https://www.globalspec.com/reference/14961/160210/chapter-2-virtual-instrumentation)</sup>

与箱式仪器的根本区别在于功能所在之处。工程师不再受限于功能固定、由厂商定义的仪器，而是构建用户自定义的系统，由软件定义数据如何采集、处理、存储和呈现。<sup>[1](https://www.ni.com/en/shop/labview/virtual-instrumentation.html)</sup> 购买后还可以通过升级PC或嵌入式系统（处理器、内存、存储、通信接口）或软件版本来提升性能，这是相对于传统仪器在性价比、维护、定制和灵活性方面的优势。<sup>[2](https://www.intechopen.com/chapters/89005)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义 | 标准计算机上的模块化硬件加可定制软件，执行传统仪器的功能<sup>[2](https://www.intechopen.com/chapters/89005)</sup> |
| 核心软件 | LabVIEW图形化编程环境，自1986年起提供<sup>[4](https://www.idc-online.com/technical_references/pdfs/electrical_engineering/Graphical%20Programming%20Tools%20for%20Electrical%20Engineering.pdf)</sup> |
| 术语提出 | “虚拟仪器”，1986年，用以说明仪器是虚拟的，而非实体的<sup>[5](https://www.controleng.com/virtual-instruments/)</sup> |
| 总线权衡 | PCI/PXI和GPIB延迟更低；PCI/PXI带宽更高<sup>[6](https://clara.nz/docs/research/GPIB/mccarthy2006.pdf)</sup> |
| 示例硬件 | PXIe-5108示波器：100 MHz带宽，250 MS/s，14位分辨率<sup>[7](https://www.ni.com/en/about-ni/newsroom/news-releases/new-ni-pxi-test-hardware-from-emerson-delivers-affordable--high-.html)</sup> |
| 互操作性标准 | VISA、IVI（成立于1998年）、VXI Plug&play、LXI<sup>[1](https://www.ni.com/en/shop/labview/virtual-instrumentation.html)</sup><sup> • </sup><sup>[5](https://www.controleng.com/virtual-instruments/)</sup> |
| 归属 | 国家仪器于2023年前后被艾默生收购；NI品牌延续<sup>[8](https://www.eetimes.com/emerson-leverages-ai-to-address-complexity-in-test-and-measurement/)</sup> |

## 工作原理

传统独立仪器和基于PC的虚拟仪器都包含微处理器、通信端口（串行和[GPIB](https://www.edgepedia.org/zh/gpib)）、显示器和[数据采集](https://www.edgepedia.org/zh/data-acquisition)模块。在虚拟仪器中，数据处理功能作为软件在PC处理器上运行，而非在箱式仪器内部的专用硬件中运行。<sup>[1](https://www.ni.com/en/shop/labview/virtual-instrumentation.html)</sup> 这一概念通常被描述为依次的三个组成部分：采集、处理和呈现，其中采集更偏硬件，处理和呈现更偏软件。<sup>[2](https://www.intechopen.com/chapters/89005)</sup>

应用层通常是图形化编程环境。在LabVIEW中，用户在屏幕上设计图形用户界面，以操作仪器程序、控制硬件、分析采集到的数据并显示结果，并可使用用于GPIB/IEEE 488、串行/RS-232、数据采集、运动控制、视觉和PLC的现成库。<sup>[1](https://www.ni.com/en/shop/labview/virtual-instrumentation.html)</sup>

底层硬件的两个关键因素是延迟——数据传输时间，通常以秒计——和带宽——数据穿越总线的速率，通常以MB/s计。较低延迟有利于数字万用表（DMM）测量、开关切换和仪器配置；较高带宽有利于波形生成与采集以及射频测量。在2006年的一项基准测试中，对于约500个样本的小样本量，PCI/PXI和GPIB因延迟较低而表现最佳；而对于约1 MS的大数据量传输，在受评估的总线中PCI/PXI最为适合，该评估未包括USB。<sup>[6](https://clara.nz/docs/research/GPIB/mccarthy2006.pdf)</sup>

## 实现方法

数据采集系统将来自传感器的经调理的电信号通过DAQ设备传送到计算机，以便进行软件分析和数据记录；设备通过PCI、PCI Express或PXI总线连接，或经由计算机的USB或[IEEE 1394](https://www.edgepedia.org/zh/ieee-1394)端口连接。<sup>[9](https://www.fer.unizg.hr/_download/repository/LabVIEW_osnove_vol1.pdf)</sup> 典型的DAQ系统有三种基本硬件类型：接线端子板、电缆和DAQ设备。<sup>[9](https://www.fer.unizg.hr/_download/repository/LabVIEW_osnove_vol1.pdf)</sup> 数据采集本身涉及从测量源收集信号并将其数字化，以便在PC上存储、分析和呈现。<sup>[10](https://www.bharathuniv.ac.in/colleges1/downloads/courseware_ece/notes/BEI704%20%20%20-%20virtual%20instrumentation.pdf)</sup>

硬件选择是第一步。选择A/D硬件时最重要的标准是输入通道数、单端或差分输入信号、以每秒采样数计的采样率，以及通常以位计的分辨率。<sup>[10](https://www.bharathuniv.ac.in/colleges1/downloads/courseware_ece/notes/BEI704%20%20%20-%20virtual%20instrumentation.pdf)</sup> [软件设计](https://www.edgepedia.org/zh/software-design)紧随其后：LabVIEW VI由前面板和程序框图组成，前面板在VI运行时对用户可见，用于收集按钮和参数等输入，程序框图则实现逻辑。<sup>[11](https://vbn.aau.dk/ws/files/293140203/Computer_Interfaces_for_Measurement_and_Automation_in_Experimental_Investigations_Introduction_to_LabVIEW_Programming_Language.pdf)</sup> 开发工作的最后阶段是在最终硬件平台上通过适当的适配和规模调整实现应用，然后在真实工作环境的刺激和约束下测试系统。<sup>[2](https://www.intechopen.com/chapters/89005)</sup>

## 起源

一篇学术记述称，虚拟仪器的概念在七十年代末被引入和使用，<sup>[2](https://www.intechopen.com/chapters/89005)</sup> LabVIEW则是在德克萨斯大学一间有学生研究员工作的校园办公室里历时两年多创建的。<sup>[12](https://web.archive.org/web/20070715124851/http:/www.ni.com/anniversary/chapter1.htm)</sup> 一个小团队将其构建为工程师用于自动化测量系统的工具，基于“图形化”、“结构化”和“数据流”的概念。<sup>[13](https://pldi21.sigplan.org/details/hopl-4-papers/2/LabVIEW)</sup>

LabVIEW 1.0面向苹果Macintosh；一位创始人的访谈称其发布于1986年4月。<sup>[14](https://web.archive.org/web/20070715124827/http:/www.ni.com/anniversary/chapter2.htm)</sup><sup> • </sup><sup>[15](https://www.electronicdesign.com/technologies/test-measurement/article/21801536/qa-after-40-years-nis-one-thing-still-going-stronger)</sup> 说软件里有一台仪器，这个想法在当时是很奇怪的。“虚拟仪器”一词帮助用户理解该设备是虚拟的，而非实体的。”<sup>[5](https://www.controleng.com/virtual-instruments/)</sup> 面向Macintosh和PC的插入式测量DAQ板在20世纪90年代通过PCI和PXI接口交付，使得客户迁移到新的PC总线时能够复用软件。<sup>[14](https://web.archive.org/web/20070715124827/http:/www.ni.com/anniversary/chapter2.htm)</sup>

## 变体

LabVIEW（实验室虚拟仪器工程工作台）是一种图形化编程语言，广泛用于测试、控制和测量应用。<sup>[4](https://www.idc-online.com/technical_references/pdfs/electrical_engineering/Graphical%20Programming%20Tools%20for%20Electrical%20Engineering.pdf)</sup> 是德科技VEE是一种可视化编程环境，用户从提供的组件中创建数据流图；仪器控制需要一个VEE驱动程序来桥接VEE与仪器命令集。<sup>[16](https://www.keysight.com/us/en/assets/9924-01637/installation-guides/5988-2790.pdf)</sup> VXI即插即用驱动程序可与VEE、C/C++、Visual Basic、LabVIEW和LabWindows/CVI配合使用。<sup>[16](https://www.keysight.com/us/en/assets/9924-01637/installation-guides/5988-2790.pdf)</sup>

互操作性建立在共享标准之上。LabVIEW集成了VISA——一种用于GPIB和串行仪器的互操作标准；PXI——基于PXI系统联盟的CompactPCI标准；以及IVI可互换虚拟仪器驱动程序。<sup>[1](https://www.ni.com/en/shop/labview/virtual-instrumentation.html)</sup> IVI基金会是一个成立于1998年的开放联盟，致力于解决可编程仪器的驱动程序互换性问题；LXI联盟则推广LXI，将GPIB风格的仪器通信扩展到基于以太网的局域网。<sup>[5](https://www.controleng.com/virtual-instruments/)</sup>

## 应用

《仪器仪表杂志》2026年的一篇经同行评审的文章描述了一个基于LabVIEW的全自动测量系统，集成了QEPro光谱仪、Lakeshore 335型温度控制器和Keithley 2604B源表，用于表征电阻等两端器件，以及测量晶体管和集成电路等多端器件的选定端子对或特性。分析时间和成本的降低源于无需专有仪器软件。<sup>[17](https://iopscience.iop.org/article/10.1088/1748-0221/21/07/T07003)</sup>

NI（艾默生测试与测量业务集团的一部分）在[伯明翰](https://www.edgepedia.org/zh/birmingham)举行的NI Days 2026英国站主题演讲中纪念了两个周年：NI对测试与测量产生影响的50周年和LabVIEW的40周年。<sup>[8](https://www.eetimes.com/emerson-leverages-ai-to-address-complexity-in-test-and-measurement/)</sup> NI继续开发模块化PXI平台，并在软件方面构建连接器，使LabVIEW能够将数据传递给基于Python的机器学习推理流水线，同时保留其硬件控制优势。<sup>[8](https://www.eetimes.com/emerson-leverages-ai-to-address-complexity-in-test-and-measurement/)</sup><sup> • </sup><sup>[18](https://m4snews.com/article/labview-refits-for-ai-workloads-ni-s-roadmap-for-test-architecture)</sup>

## 局限与替代方案

在硬实时系统中，必须满足规定的截止时间；而软实时系统可以容忍错过截止时间，通常表现为性能或效用的下降。<sup>[19](https://irkr.fei.tuke.sk/Meranie_ING/_materialy/Prednasky/Real%20time%20and%20FPGA.pdf)</sup> 多核处理器和用于虚拟仪器的实时操作系统已经减轻或克服了传统仪器中专用处理器曾经的优势。<sup>[2](https://www.intechopen.com/chapters/89005)</sup> 对于时间关键的功能，FPGA是一种替代方案：对FPGA编程会重新布线芯片本身来实现该功能，而不是在PC处理器上运行软件应用。<sup>[19](https://irkr.fei.tuke.sk/Meranie_ING/_materialy/Prednasky/Real%20time%20and%20FPGA.pdf)</sup>

与箱式仪器相比，虚拟仪器方法以厂商固定的功能换取用户自定义的软件，并以PC和软件的可升级性来抵消硬件的过时。<sup>[2](https://www.intechopen.com/chapters/89005)</sup> 与基于Python的方法相比，发送给仪器的SCPI命令是相同的；一个LabVIEW仪器控制序列使用一串带错误簇的VISA驱动VI（打开、写入、读取、解析、关闭），而使用PyVISA的Python则用四行代码实现同样功能，且PyVISA通过NI-VISA后端支持GPIB，并原生支持USB-TMC、以太网/LXI和串行。<sup>[20](https://www.tofupilot.com/guides/python-vs-labview-for-manufacturing-test-a-practical-comparison)</sup>

## References

1. [Virtual Instrumentation - NI](https://www.ni.com/en/shop/labview/virtual-instrumentation.html)
2. [Introductory Chapter: An Overview of Using Virtual Instrumentation (IntechOpen)](https://www.intechopen.com/chapters/89005)
3. [Chapter 2 - Virtual Instrumentation (GlobalSpec reference)](https://www.globalspec.com/reference/14961/160210/chapter-2-virtual-instrumentation)
4. [Graphical Programming Tools for Electrical Engineering](https://www.idc-online.com/technical_references/pdfs/electrical_engineering/Graphical%20Programming%20Tools%20for%20Electrical%20Engineering.pdf)
5. [Virtual Instruments - Control Engineering](https://www.controleng.com/virtual-instruments/)
6. [Comparing GPIB, LAN/LXI, PCI/PXI Measurement Performance in Hybrid Systems](https://clara.nz/docs/research/GPIB/mccarthy2006.pdf)
7. [New NI PXI Test Hardware from Emerson Delivers Affordable, High-Performance Automated Test Solutions - NI](https://www.ni.com/en/about-ni/newsroom/news-releases/new-ni-pxi-test-hardware-from-emerson-delivers-affordable--high-.html)
8. [Emerson Leverages AI to Address Complexity in Test and Measurement - EE Times](https://www.eetimes.com/emerson-leverages-ai-to-address-complexity-in-test-and-measurement/)
9. [LabVIEW Core 1 Course Manual](https://www.fer.unizg.hr/_download/repository/LabVIEW_osnove_vol1.pdf)
10. [UNIT-I INTRODUCTION (Virtual Instrumentation course notes, Bharath University)](https://www.bharathuniv.ac.in/colleges1/downloads/courseware_ece/notes/BEI704%20%20%20-%20virtual%20instrumentation.pdf)
11. [Computer Interfaces for Measurement and Automation in Experimental Investigations: Introduction to LabVIEW Programming Language (Aalborg University)](https://vbn.aau.dk/ws/files/293140203/Computer_Interfaces_for_Measurement_and_Automation_in_Experimental_Investigations_Introduction_to_LabVIEW_Programming_Language.pdf)
12. [Three Entrepreneurs Seed a Revolution - National Instruments: 30 Years of Excellence](https://web.archive.org/web/20070715124851/http:/www.ni.com/anniversary/chapter1.htm)
13. [LabVIEW (HOPL IV - Papers)](https://pldi21.sigplan.org/details/hopl-4-papers/2/LabVIEW)
14. [Building a Global Community - National Instruments: 30 Years of Excellence](https://web.archive.org/web/20070715124827/http:/www.ni.com/anniversary/chapter2.htm)
15. [Q&A: After 40 Years, NI's "One Thing" Still Going Stronger](https://www.electronicdesign.com/technologies/test-measurement/article/21801536/qa-after-40-years-nis-one-thing-still-going-stronger)
16. [How to use VXI Plug and Play Driver with VEE, C/C++, Visual Basic, LabView and LabWindows/CVI](https://www.keysight.com/us/en/assets/9924-01637/installation-guides/5988-2790.pdf)
17. [LabVIEW-based automation of I-V and spectral measurements using multi-instrument integration - IOPscience (JINST)](https://iopscience.iop.org/article/10.1088/1748-0221/21/07/T07003)
18. [LabVIEW Refits for AI Workloads: NI's Roadmap for Test Architecture - M4SNews](https://m4snews.com/article/labview-refits-for-ai-workloads-ni-s-roadmap-for-test-architecture)
19. [Reconfigurable measurement systems based on real time and FPGA (lecture slides, Technical University of Košice)](https://irkr.fei.tuke.sk/Meranie_ING/_materialy/Prednasky/Real%20time%20and%20FPGA.pdf)
20. [Python vs LabVIEW for Manufacturing Test - TofuPilot](https://www.tofupilot.com/guides/python-vs-labview-for-manufacturing-test-a-practical-comparison)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026; Oct 25, 2026*

Topic: 技术与人造世界 › 工程与制造 › 计量、质量与检验 › 校准与溯源

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/virtual-instrumentation

English original: https://www.edgepedia.org/virtual-instrumentation
