LXI接口VISA設計
發(fā)布時間:2018-03-14 10:49
本文選題:LXI 切入點:虛擬儀器軟件架構 出處:《哈爾濱工業(yè)大學》2012年碩士論文 論文類型:學位論文
【摘要】:隨著計算機技術尤其是互聯(lián)網(wǎng)的發(fā)展,將以太網(wǎng)應用于測試測量系統(tǒng)的LXI總線已成為儀器界關注和研究的熱點。組建LXI接口的自動測試系統(tǒng),將傳統(tǒng)的GPIB、VXI、PXI儀器納入LXI系統(tǒng)中,充分利用傳統(tǒng)儀器的功能、實現(xiàn)遠程網(wǎng)絡化測量與控制等已成為一種新的趨勢。而LXI接口自動測試系統(tǒng)的關鍵在于虛擬儀器軟件架構(VISA庫)的設計上,為了控制標準LXI設備以及通過實驗室研制的LXI-VXI適配器和LXI-GPIB適配器控制VXI和GPIB設備,本文在Windows操作系統(tǒng)上采用標準C語言開發(fā)了一套LXI接口VISA庫,并以動態(tài)鏈接庫的形式進行發(fā)布。 VISA的整體架構設計,尤其是其內部各種數(shù)據(jù)結構的設計,是后續(xù)VISA接口函數(shù)實現(xiàn)的基礎,直接關系到VISA庫的運行效率。根據(jù)VISA的結構特點,本文設計了資源結構、會話結構、查找列表、事件結構等數(shù)據(jù)結構用于表征系統(tǒng)中的硬件資源及用戶層交互信息。資源結構表征實際的硬件資源信息,采用了數(shù)組形式表征以及共享內存方式存儲以便實現(xiàn)多進程的數(shù)據(jù)共享和交互。會話結構、查找列表、事件結構等數(shù)據(jù)結構用于應用程序與VISA庫進行數(shù)據(jù)互動,出于高效查找和節(jié)省內存空間等因素的考慮,選用了鏈表形式表征。 資源管理器在VISA庫扮演了極其重要的角色,負責組織和管理系統(tǒng)的各類軟硬件資源,其設計過程中主要有VXI-11網(wǎng)絡設備發(fā)現(xiàn)以及VXI A24/A32地址空間分配等關鍵技術。VXI-11網(wǎng)絡設備發(fā)現(xiàn)的實現(xiàn)基于開放源代碼的oncrpc庫,本文設計了VXI-11的RPC調用和回復網(wǎng)絡數(shù)據(jù)包格式,給出了具體的參數(shù)設置和開發(fā)流程。資源管理器對系統(tǒng)中存在的VXI A24/A32地址空間了進行分配,并將結果寫入VXI模塊相應的寄存器中,從而使該類設備可使用A24/A32地址空間進行大范圍尋址。 VISA接口函數(shù)是最終呈現(xiàn)給用戶的統(tǒng)一的標準函數(shù),本文根據(jù)VISA規(guī)范實現(xiàn)了其中的大部分并給出了相應的關鍵技術。本文實現(xiàn)的VISA接口函數(shù)包括基本的資源打開/關閉、資源查找、基本I/O操作、格式化I/O操作和存儲器I/O操作等,此外還設計了VISA庫的若干高級功能如屬性控制、資源鎖定以及事件機制。VISA事件機制是VISA庫設計過程中較為關鍵的部分,本文采用多線程的方法加以實現(xiàn),,方便簡潔而且運行效率較高。 為了驗證本文VISA庫的正確性和合理性,本文在Microsoft Visual Studio和NI LabWindows CVI等VISA應用程序常用的開發(fā)環(huán)境中對LXI、VXI、GPIB等設備進行了測試。首先測試了VISA庫主要函數(shù)的功能,而后針對三種不同總線接口儀器進行了儀器級的測試,最后將多個LXI、VXI、GPIB搭建了一個測試系統(tǒng)以考察VISA的整體性能。 測試結果表明,本文設計的LXI接口VISA庫可高效地控制LXI、VXI和GPIB設備,與其他廠商的VISA具有高度可互換性,實現(xiàn)了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.
【學位授予單位】:哈爾濱工業(yè)大學
【學位級別】:碩士
【學位授予年份】:2012
【分類號】:TP334.7;TP311.53
【參考文獻】
相關期刊論文 前10條
1 季曉亮;譚業(yè)雙;;測試總線的發(fā)展及性能比較[J];電測與儀表;2006年04期
2 陳國順;余達太;劉增良;;基于虛擬儀器的網(wǎng)絡化測試系統(tǒng)設計與應用[J];電子測量技術;2007年03期
3 杏運;呂幼新;姒強;;基于虛擬儀器的任意波形發(fā)生器[J];電子測量技術;2011年06期
4 鄭玲玲;許剛;韓瑋;;基于LXI總線的頻譜儀遠程控制方法的實現(xiàn)[J];電子測量技術;2012年01期
5 王學偉;張未未;趙勇;;USB-GPIB控制器及VISA函數(shù)庫的設計[J];電子測量與儀器學報;2008年03期
6 于寒;周明光;;測控總線技術的現(xiàn)狀與特點[J];大眾科技;2006年01期
7 張毅剛;;虛擬儀器技術介紹[J];國外電子測量技術;2006年06期
8 高連生;盛柏林;;動態(tài)鏈接庫在組態(tài)軟件中的應用[J];工業(yè)控制計算機;2010年06期
9 姜曉琳;王厚軍;馬敏;;LXI標準下的網(wǎng)絡VISA設計與實現(xiàn)[J];計算機測量與控制;2010年08期
10 康弘俊,劉強,何丕雁,秦開宇,李志強;VXI中斷實現(xiàn)高速數(shù)據(jù)傳輸?shù)难芯颗c設計[J];儀器儀表學報;2005年07期
本文編號:1610874
本文鏈接:http://sikaile.net/kejilunwen/jisuanjikexuelunwen/1610874.html
最近更新
教材專著