LXI接口VISA设计
发布时间:2018-03-14 10:49
本文选题:LXI 切入点:虚拟仪器软件架构 出处:《哈尔滨工业大学》2012年硕士论文 论文类型:学位论文
【摘要】:随着计算机技术尤其是互联网的发展,将以太网应用于测试测量系统的LXI总线已成为仪器界关注和研究的热点。组建LXI接口的自动测试系统,将传统的GPIB、VXI、PXI仪器纳入LXI系统中,充分利用传统仪器的功能、实现远程网络化测量与控制等已成为一种新的趋势。而LXI接口自动测试系统的关键在于虚拟仪器软件架构(VISA库)的设计上,为了控制标准LXI设备以及通过实验室研制的LXI-VXI适配器和LXI-GPIB适配器控制VXI和GPIB设备,本文在Windows操作系统上采用标准C语言开发了一套LXI接口VISA库,并以动态链接库的形式进行发布。 VISA的整体架构设计,尤其是其内部各种数据结构的设计,是后续VISA接口函数实现的基础,直接关系到VISA库的运行效率。根据VISA的结构特点,本文设计了资源结构、会话结构、查找列表、事件结构等数据结构用于表征系统中的硬件资源及用户层交互信息。资源结构表征实际的硬件资源信息,采用了数组形式表征以及共享内存方式存储以便实现多进程的数据共享和交互。会话结构、查找列表、事件结构等数据结构用于应用程序与VISA库进行数据互动,出于高效查找和节省内存空间等因素的考虑,选用了链表形式表征。 资源管理器在VISA库扮演了极其重要的角色,负责组织和管理系统的各类软硬件资源,其设计过程中主要有VXI-11网络设备发现以及VXI A24/A32地址空间分配等关键技术。VXI-11网络设备发现的实现基于开放源代码的oncrpc库,本文设计了VXI-11的RPC调用和回复网络数据包格式,给出了具体的参数设置和开发流程。资源管理器对系统中存在的VXI A24/A32地址空间了进行分配,并将结果写入VXI模块相应的寄存器中,从而使该类设备可使用A24/A32地址空间进行大范围寻址。 VISA接口函数是最终呈现给用户的统一的标准函数,本文根据VISA规范实现了其中的大部分并给出了相应的关键技术。本文实现的VISA接口函数包括基本的资源打开/关闭、资源查找、基本I/O操作、格式化I/O操作和存储器I/O操作等,此外还设计了VISA库的若干高级功能如属性控制、资源锁定以及事件机制。VISA事件机制是VISA库设计过程中较为关键的部分,本文采用多线程的方法加以实现,,方便简洁而且运行效率较高。 为了验证本文VISA库的正确性和合理性,本文在Microsoft Visual Studio和NI LabWindows CVI等VISA应用程序常用的开发环境中对LXI、VXI、GPIB等设备进行了测试。首先测试了VISA库主要函数的功能,而后针对三种不同总线接口仪器进行了仪器级的测试,最后将多个LXI、VXI、GPIB搭建了一个测试系统以考察VISA的整体性能。 测试结果表明,本文设计的LXI接口VISA库可高效地控制LXI、VXI和GPIB设备,与其他厂商的VISA具有高度可互换性,实现了VISA应用程序的无缝移植,符合VPP标准,达到设计目的与要求。
[Abstract]:With the development of computer technology, especially the Internet, the application of Ethernet to the LXI bus of testing and measuring system has become a hot topic in instrument field. The automatic test system of LXI interface is constructed, and the traditional LXI VXI PXI instrument is incorporated into LXI system. It has become a new trend to make full use of the functions of traditional instruments to realize remote networked measurement and control. The key of LXI interface automatic test system lies in the design of virtual instrument software architecture (visa library). In order to control the standard LXI devices and the LXI-VXI adapters and LXI-GPIB adapters developed in the laboratory to control the VXI and GPIB devices, a LXI interface VISA library is developed in the Windows operating system with the standard C language. And the form of dynamic link library to publish. The overall architecture design of VISA, especially the design of its internal data structure, is the basis of the implementation of subsequent VISA interface functions, and has a direct bearing on the running efficiency of VISA library. According to the structural characteristics of VISA, this paper designs the resource structure and session structure. Lookup lists, event structures and other data structures are used to represent hardware resources and user-level interactive information in the system. Data structures such as session structure, lookup list and event structure are used for data interaction between application and VISA library. In order to find efficiently and save memory space, the linked list form is chosen. The resource manager plays an extremely important role in the VISA library and is responsible for organizing and managing all kinds of software and hardware resources in the system. In the design process, there are some key technologies, such as VXI-11 network device discovery and VXI A24 / A32 address space allocation. The realization of VXI-11 network device discovery is based on open source oncrpc library. This paper designs the RPC call and reply network packet format of VXI-11. The resource manager allocates the VXI A24 / A32 address space that exists in the system, and writes the result to the register of the VXI module. So that the device can use A 24 / A 32 address space for a wide range of addressing. The VISA interface function is a unified standard function that is presented to the user finally. This paper implements most of them according to the VISA specification and gives the corresponding key technology. The VISA interface function realized in this paper includes the basic resource open / close. Resource lookup, basic I / O operation, formatted I / O operation and memory I / O operation, etc. In addition, some advanced functions of VISA library such as attribute control are designed. Resource locking and event mechanism. Visa event mechanism is a key part in the process of VISA library design. In this paper, the method of multithreading is used to realize it, which is convenient, concise and efficient. In order to verify the correctness and reasonableness of the VISA library in this paper, the main functions of the VISA library are tested in the common development environment of VISA applications such as Microsoft Visual Studio and NI LabWindows CVI. Then, three kinds of instruments with different bus interfaces are tested at the instrument level. Finally, a testing system is set up to evaluate the overall performance of VISA by using several LXI / VXIGPIb. The test results show that the LXI interface VISA library designed in this paper can efficiently control the LXI VXI and GPIB devices, and has a high interchangeability with the VISA of other manufacturers. It realizes the seamless transplantation of VISA applications, conforms to the VPP standard, and achieves the design objectives and requirements.
【学位授予单位】:哈尔滨工业大学
【学位级别】:硕士
【学位授予年份】:2012
【分类号】:TP334.7;TP311.53
【参考文献】
相关期刊论文 前10条
1 季晓亮;谭业双;;测试总线的发展及性能比较[J];电测与仪表;2006年04期
2 陈国顺;余达太;刘增良;;基于虚拟仪器的网络化测试系统设计与应用[J];电子测量技术;2007年03期
3 杏运;吕幼新;姒强;;基于虚拟仪器的任意波形发生器[J];电子测量技术;2011年06期
4 郑玲玲;许刚;韩玮;;基于LXI总线的频谱仪远程控制方法的实现[J];电子测量技术;2012年01期
5 王学伟;张未未;赵勇;;USB-GPIB控制器及VISA函数库的设计[J];电子测量与仪器学报;2008年03期
6 于寒;周明光;;测控总线技术的现状与特点[J];大众科技;2006年01期
7 张毅刚;;虚拟仪器技术介绍[J];国外电子测量技术;2006年06期
8 高连生;盛柏林;;动态链接库在组态软件中的应用[J];工业控制计算机;2010年06期
9 姜晓琳;王厚军;马敏;;LXI标准下的网络VISA设计与实现[J];计算机测量与控制;2010年08期
10 康弘俊,刘强,何丕雁,秦开宇,李志强;VXI中断实现高速数据传输的研究与设计[J];仪器仪表学报;2005年07期
本文编号:1610874
本文链接:https://www.wllwen.com/kejilunwen/jisuanjikexuelunwen/1610874.html