当前位置:主页 > 科技论文 > 计算机论文 >

GPIB-RS232控制器设计与实现

发布时间:2018-01-11 19:43

  本文关键词:GPIB-RS232控制器设计与实现 出处:《武汉理工大学》2014年硕士论文 论文类型:学位论文


  更多相关文章: GPIB总线 GPIB协议 NAT9914 SCPI


【摘要】:目前,国内的仪器大多带有RS232接口,这就使得只有一台仪器能与计算机相连,不利于将多台仪器通过GPIB总线进行扩展连接。针对这一问题,通常是在现有仪器的基础上,进行硬件添加或者软件辅助来实现GPIB协议转换。基于此,本文采用可编程专用接口芯片并配合软件控制程序,设计并实现了GPIB-RS232控制器。 首先,在硬件上,GPIB-RS232控制器主要分为三个部分:控制电路、RS232接口端以及最重要的GPIB接口端。为确保目标板线路连接可靠,在确认STM32F单片机最小系统正常工作的前提下,还需要注意NAT9914芯片的数据线、中断线以及DMA功能线的连接,以方便后续软件设计中对接口专用芯片内部寄存器的操作以及接口功能的开发。 其次,在软件上,,也是主要分为三个部分:RS232接口通信、GPIB总线协议实现以及SCPI指令封装、解析,其中后面两者是本文设计的重难点。 第一,在GPIB总线协议实现部分,本文在传统查询法的基础上进行改进创新,在完成NAT9914初始化之后,采用中断方式来实现GPIB六种接口功能,即,T/SH功能、L/AH功能、SR功能、PP功能,从而完成GPIB系统中主从机之间的基本收发操作、服务请求与响应。 第二,在SCPI指令封装、解析部分,本文结合具体仪器功能,建立SCPI通用指令和部分特定控制指令的指令二叉树,并采用链式结构存储;然后,采用自顶向下的方式来遍历指令树,完成对接收到的程控消息的匹配查询。 最后,为了检测开发的接口功能和SCPI指令解析是否可行,本文结合公司的数字光衰DOA,组建一个简单的测试系统,并采用两种方式进行测试:①基于Agilent Connection Expert软件环境,在其IO交互界面发送SCPI指令,完成对仪器的操控;②在Visual Studio2010软件平台下调用VISA函数编写C语言测试程序,来控制仪器工作。 上述测试方法得到的结果表明,本文设计的GPIB-RS232控制器能可靠稳定地完成数据传输、及时响应设备服务要求,并且通过SCPI指令解析后,仪器能按照指令要求完成相应操作。
[Abstract]:At present , most domestic instruments have RS232 interface , which makes only one instrument can be connected to the computer , which is not beneficial to the extension connection of multiple instruments through the interface . In order to ensure the reliable connection of the target board , we also need to pay attention to the connection between the data line , the interrupt wire and the DMA function line of NAT9914 chip , so as to facilitate the operation of the internal register of the interface special chip and the development of the interface function in the subsequent software design . Secondly , on the software , it is mainly divided into three parts : RS232 interface communication , bus protocol implementation and SCPI instruction encapsulation , analysis , the latter two are the key difficulties in this paper . First , on the basis of the traditional inquiry method , this paper carries out the improvement and innovation on the basis of the traditional inquiry method . After the initialization of NAT9914 , the functions of the six kinds of interface functions , i.e . , the T / SH function , the L / AH function , the SR function and the PP function , are realized by the interrupt mode , so that the basic transmitting - receiving operation , the service request and the response between the master and slave machines in the gI system are completed . secondly , an instruction binary tree of SCPI general instruction and part of a specific control instruction is established in the SCPI instruction package and the analysis part , and a chain type structure storage is adopted ; and then , a self - top down mode is adopted to traverse the instruction tree to finish matching query on the received program control message . Finally , in order to detect whether the interface function and SCPI instruction parse are feasible , this paper combines the digital light attenuation DOA of the company to form a simple test system , and the test is carried out in two ways : ( 1 ) based on the Agilent Connection Expert software environment , sending the SCPI instruction in the IO interactive interface , completing the manipulation of the instrument ; and 2 ) calling the Visa function under the Visual Studio 2010 software platform to write the C language test program to control the operation of the instrument . The results of the above test method show that the interface designed by this paper can reliably and stably complete the data transmission , respond to the equipment service requirement in time , and the instrument can complete the corresponding operation according to the instruction requirement after the SCPI instruction is resolved .

【学位授予单位】:武汉理工大学
【学位级别】:硕士
【学位授予年份】:2014
【分类号】:TP332

【参考文献】

相关期刊论文 前10条

1 季晓亮;谭业双;;测试总线的发展及性能比较[J];电测与仪表;2006年04期

2 陈冠玲;;基于GPIB接口的功率测试系统开发与设计[J];电测与仪表;2008年09期

3 周琴;;GPIB总线及应用技术[J];低压电器;2008年01期

4 黄君凯;吴延军;;RS232-GPIB控制器的设计[J];电子技术应用;2006年03期

5 黄崧,储飞黄;GPIB总线及接口设计[J];国外电子测量技术;2004年S1期

6 聂军培;;单片机的GPIB接口电路设计[J];信息通信;2012年02期

7 袁海英,陈光

本文编号:1410970


资料下载
论文发表

本文链接:https://www.wllwen.com/kejilunwen/jisuanjikexuelunwen/1410970.html


Copyright(c)文论论文网All Rights Reserved | 网站地图 |

版权申明:资料由用户60ed0***提供,本站仅收录摘要或目录,作者需要删除请E-mail邮箱bigeng88@qq.com