通用測試儀器VISA引擎及常見接口驅動設計
發(fā)布時間:2018-05-22 17:19
本文選題:通用測試儀器 + VISA。 參考:《電子科技大學》2013年碩士論文
【摘要】:虛擬儀器在自動化測試領域中帶來的技術革新,使得儀器軟件的開發(fā)占據(jù)越來越重要的地位。VISA(Virtual Instrument Software Architecture),即虛擬儀器軟件結構,實現(xiàn)控制計算機與儀器的軟件層連接,用于與不同總線接口的儀器進行通訊,被廣泛應用于測量工業(yè)中測試儀器與上位機的交互。 VISA作為標準I/O庫,將對儀器硬件接口的操作進行封裝,只向用戶開放其可操作的接口函數(shù)原型,,且獨立于儀器類型、計算機操作系統(tǒng)和具體的編程語言,實現(xiàn)虛擬儀器軟件的可互換性及靈活性。本課題研究虛擬儀器軟件架構,為通用測試儀器開發(fā)具有自主知識產(chǎn)權的VISA庫,主要內(nèi)容有: (1) VISA整體架構的設計。采用分層架構思想,結合經(jīng)典設計模式,設計VISA平臺整體架構,其分層架構將VISA系統(tǒng)按不同功能職責有序組織,以實現(xiàn)低耦合高內(nèi)聚,提高軟件系統(tǒng)的效率及可維護性。采用動態(tài)鏈接庫實現(xiàn)VISA的封裝,使VISA支持多語言、跨平臺使用。 (2) VISA引擎各部分詳細設計。包括屬性機制、資源管理器和資源解析器的設計與實現(xiàn)。采用靜態(tài)存儲屬性不變參數(shù)與動態(tài)添加屬性可變參數(shù)相結合的方式完成屬性的存儲。資源管理器設計鏈表管理資源,便于擴充接口種類,實現(xiàn)VISA庫的向后兼容性。資源解析器結合編譯原理,分別實現(xiàn)詞法分析、語法分析和正則表達式匹配三個模塊,模塊間協(xié)同合作共同完成資源解析的任務,實現(xiàn)高效、準確的資源查找字符串解析。 (3)常見接口驅動的設計。采用機制與策略分離的思想分層設計驅動,具體驅動分離實現(xiàn)并隱藏,只向用戶提供統(tǒng)一接口。按消息基器件和寄存器基器件分類設計接口驅動,包括PXI接口驅動、以太網(wǎng)接口驅動及本地總線接口驅動的實現(xiàn)。 (4)軟件的測試。按照不同的通信環(huán)境,搭建兩種不同的測試平臺,根據(jù)各模塊的用途,綜合使用不同軟件測試方法制定測試方案,分別完成各模塊的測試,再結合VISA整體架構進行綜合測試,分析并解決測試中出現(xiàn)的問題。 經(jīng)過測試,本課題開發(fā)的VISA支持跨平臺、可重入、多語言和多線程安全,滿足設計需求。
[Abstract]:Because of the technological innovation brought by virtual instrument in the field of automatic testing, the development of instrument software occupies a more and more important position. VISAN Virtual Instrument Software Architecture, that is, the structure of virtual instrument software, realizes the software layer connection between computer and instrument. It is used to communicate with instruments with different bus interfaces and is widely used in measuring industry. As the standard I / O library, VISA encapsulates the operation of the hardware interface of the instrument, and only opens its operable interface function prototype to the user, independent of the instrument type, the computer operating system and the specific programming language. The interchangeability and flexibility of virtual instrument software are realized. This paper studies the software architecture of virtual instrument and develops VISA library with independent intellectual property for universal test instrument. The main contents are as follows: 1) the design of the overall VISA architecture. The overall architecture of VISA platform is designed by adopting the idea of layered architecture and the classical design pattern. The layered architecture organizes the VISA system according to different functions and responsibilities in order to achieve low coupling and high cohesion and improve the efficiency and maintainability of the software system. Dynamic Link Library (DLL) is used to encapsulate VISA, which enables VISA to support multi-language and cross-platform use. 2) the detailed design of each part of VISA engine. Including the property mechanism, resource manager and resource parser design and implementation. Static storage of attribute invariant parameters and dynamic addition of variable attribute parameters are used to store attributes. The resource manager designs the linked list to manage the resource, which is convenient to expand the type of interface and realize the backward compatibility of VISA library. Based on the compiling principle, the resource parser implements three modules: lexical analysis, syntax analysis and regular expression matching. The modules cooperate to accomplish the task of resource parsing, and the efficient and accurate resource search string parsing is realized. Design of common interface drivers. The idea of separation of mechanism and policy is used to design the driver, which is implemented and hidden separately, and only provides the user with a unified interface. Interface drivers are designed according to message based devices and register based devices, including PXI interface drivers, Ethernet interface drivers and local bus interface drivers. Software testing. According to different communication environment, two different test platforms are built. According to the use of each module, different software test methods are used to make the test plan. The test of each module is completed separately, and then combined with the overall structure of VISA to conduct comprehensive test. Analyze and resolve the test problems. After testing, the VISA developed in this paper supports cross-platform, reentrant, multi-language and multi-thread security to meet the design requirements.
【學位授予單位】:電子科技大學
【學位級別】:碩士
【學位授予年份】:2013
【分類號】:TP311.53
【參考文獻】
相關期刊論文 前8條
1 熊偉,戴果;基于flex和bison的編譯器開發(fā)[J];兵工自動化;2004年01期
2 劉浩,萬昆;基于動態(tài)鏈接庫DLL的實時數(shù)據(jù)庫系統(tǒng)研究與開發(fā)[J];東北電力學院學報;2005年01期
3 王學偉;張未未;;USB—GPIB控制器VISA函數(shù)庫的開發(fā)及在Visual C++中的應用[J];電測與儀表;2006年11期
4 邊海龍;顧亞平;陳光
本文編號:1922952
本文鏈接:http://sikaile.net/falvlunwen/zhishichanquanfa/1922952.html
最近更新
教材專著