真空热试验测控仪器驱动器通用化设计_孙兴华

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

航天器环境工程第27卷第4期452 SPACECRAFT ENVIRONMENT ENGINEERING 2010年8月真空热试验测控仪器驱动器通用化设计
孙兴华,裴一飞
(北京卫星环境工程研究所,北京 100094)
摘要:航天器真空热试验中温度的测量和外热流的模拟使用到多种不同型号的测控仪器,这些仪器驱动方式也大不相同,这给测控系统应用软件的开发带来很多不便。

文章基于VISA(虚拟仪器软件结构)标准针对目前使用的各种仪器编写了通用的驱动函数,并以动态链接库的形式进行封装,可以供调用进行二次开发,有利于仪器驱动配置过程的简化和测控软件的通用化设计。

关键词:真空热试验;测控系统;仪器驱动;通用化设计
中图分类号:V416.8 文献标识码:B 文章编号:1673-1379(2010)04-0452-04 DOI:10.3969/j.issn.1673-1379.2010.04.010
0 引言
真空热试验是航天器研制过程中必不可缺的试验项目,它利用空间模拟器模拟航天器在轨运行时所处的真空、冷黑及太阳辐照环境,验证并考验航天器各项设计是否满足要求。

其中,外热流的模拟和温度数据的获取是真空热试验的两项关键技术,二者的实现都离不开各种测控仪器,主要包括各种型号的数字万用表和程控电源等。

由于不同型号的测控仪器的通讯接口和总线方式不同,使得它们的驱动方式也大不相同,造成了测控应用软件版本复杂、通用性和继承性较差等问题。

本文尝试针对真空热试验测控系统中所使用的几种测控仪器,建立通用的仪器模型,并设计驱动函数库,以简化各类仪器的驱动方式,有利于测控系统应用软件的通用化设计。

1 真空热试验测控仪器介绍
目前,航天器真空热试验测控系统所使用的仪器主要分为程控电源和数字万用表两大类。

程控电源主要用于温度控制和外热流模拟;包括安捷伦公司的N5750、Sorensen公司的DLM150-4以及惠普公司的6655A和6644A等型号;数字万用表主要用于温度和热流等参数的直接与间接测量,包括Mobrey公司的3595EA和3595EH、惠普公司的E1411B和吉时利公司的K2750等型号(见表1)。

表1 真空热试验测控仪器
Table 1 Measurement & control instruments for vacuum
thermal tests
仪器类型厂家接口类型
Sorensen LAN(主电源)+RS485(子电源)
惠普 GPIB(主电源)+485(子电源) 程控电源
安捷伦LAN
Mobrey S-NET
吉时利GPIB
数字万用表
惠普 GPIB 在上述测控仪器中,除了Mobrey公司的3595EA和3595EH数字万用表需要专门的接口卡
与控制计算机相连,通过一种特殊的S-NET网络
进行数据交换外,其他测控仪器都可以直接或经过
E5810(GPIB/LAN)网关与控制计算机相连,通
过以太网进行数据交换。

实现测控仪器的统一驱动,首先需要建立一个通
用的仪器模型,下面介绍的是基于VISA(Virtual Instrument Software Architecture,虚拟仪器软件结构)和SCPI(Standard Commands for Programmable Instruments,程控仪器标准指令)标准的通用仪器模型。

2 测控仪器的通用模型
真空热试验测控系统中应用的仪器虽然来自
————————————
收稿日期:2009-08-19; 修回日期:2009-09-01
基金项目:航天科技基金资助项目
作者简介:孙兴华(1982—),男,硕士学位,研究方向为真空热环境试验测控系统设计。

E-mail: sandflying@。

第4期 孙兴华等:真空热试验测控仪器驱动器通用化设计453
不同的厂家,并且从功能和通讯方式上存在差异,但是它们都支持SCPI标准命令格式和VISA仪器驱动标准。

2.1 SCPI命令规范
SCPI是架构在IEEE 488.2上的仪器控制语言,它提供了一套明确定义的代码、格式、协议和公用命令,加强了不同厂家仪器互连使用的兼容性。

它的命令字符串不仅可以通过各种仪器接口(例如LAN、GPIB、USB等)发送,而且可以使用各种编程语言把SCPI命令传送给仪器,这就有利于程序的编制和移植[1],给仪器驱动通用化设计提供了极大的方便。

程序开发人员只要根据需求找到要完成功能的指令,通过读写操作就可以实现对各类程控仪器的程序控制。

例如指令“MEAS:VOLT?”表示测量程控电源的实际输出,无论对于何种程控电源或者用户使用何种编程语言,只要把该字符串写入仪器就可以实现实际输出电压的测量功能。

2.2 基于VISA的仪器驱动器
仪器驱动器是指使用标准化的I/O函数与一台或几台仪器设备进行通信的一套或一组程序,主要用于对仪器的程控操作,如设置参数和工作方式、读/写数据、触发及读回仪器工作状态等。

它相当于一个位于用户和仪器之间的解析器,把用户能够理解的高层函数翻译成仪器能够识别的底层命令[2]。

对一台仪器的操作,用户只需通过初始化、配置和获取数据等高层命令就可以实现对仪器的控制,节省了从底层命令来写仪器驱动的时间,从而使得整个开发过程更加方便快捷。

VISA是由著名的泰克、惠普、美国国家仪器等35家仪器仪表公司为确保不同厂商、不同接口标准的仪器能相互兼容,彼此之间可以进行通讯和数据交换,并且能够给用户提供方便易用的驱动程序而研制出的一种仪器驱动标准。

图1为基于VISA的仪器设备的通用驱动流程。

利用VISA标准接口函数开发的仪器驱动器继承了VISA标准的特点,其控制功能适用于各种类型的仪器而与接口类型无关,无论是LAN、GPIB 或USB接口,只需正确设置仪器的VISA地址,就可以实现对仪器的各种操作。

表2给出了不同通讯接口的VISA地址格式。


1 基于VISA的仪器驱动流程
Fig. 1 Instrument driving flow based on VISA
表2 不同通讯接口仪器的VISA地址
Table 2 VISA address for different communication interface of different instruments
通讯接口VISA地址
LAN TCPIP0:xxx.xxx.xxx.xxx::INSTR GPIB TCPIP0:xxx.xxx.xxx.xxx::GPIB0,xx,xx::INSTR
RS485 TCPIP0:xxx.xxx.xxx.xxx::COM1,485::INSTR USB TCPIP0:xxx.xxx.xxx.xxx:USB0,xx::INSTR 2.3 基于SCPI和VISA的通用仪器模型
基于SCPI和VISA标准,可以用统一的方式
来描述各种各样的测控仪器,而与仪器的硬件组成、面板控制等无关,构造通用模型如图2所示。

图2 通用仪器模型示意图
Fig. 2 Universal model for instruments
由图2可以看出,任何一种测控仪器都可以被
看作是一个可以用VISA地址进行直接访问、用标
准SCPI指令进行控制的执行器。

要实现对该执行
454 航 天 器 环 境 工 程 第27卷
器的控制,就必须设计一个通用的驱动器,用于把指令正确地下达到仪器中。

3 仪器驱动器通用化设计
实现多种测控仪器的通用化驱动就要建立一个统一的驱动函数库。

根据应用范围和实现功能,驱动函数可分为通用功能函数和特定功能函数。

通用功能函数适用于所有仪器,主要用于建立或中止驱动程序与仪器的通信联系、仪器设备的状态配置和各类信息查询等;特定功能函数主要包括测量类的功能函数和电源类的功能函数,用于实现测控仪器的特有功能。

本文利用Visual Basic 语言编写了相关的驱动函数,并用动态链接库技术将其进行统一封装,可供调用进行二次开发。

图3为测控仪器通用驱动器结构。

特定功能函数
基本读写操作
通用功能函数
在线仪器查询仪器状态检查数字万用表
读序列号
电阻测量
电流输出
电压输出
功率输出

阻测量
电压测量电流测量

控电源函数库(InstrumentDriver .dll)
应用程序
VISA 输入/输出
仪器设备
图3 测控仪器通用驱动器
Fig. 3 Universal drivers for measurement & control
instruments
3.1 仪器驱动函数的定义
实现测控仪器程序控制是为建立控制计算机与仪器的连接并不断完成二者之间读写操作的过程,仪器驱动函数就是要完成以上功能。

下面以具体的通用功能函数和特定功能函数为例,介绍驱动函数的实现过程。

3.1.1 通用功能函数
1)仪器初始化函数
主要用于VISA 资源检查和测控仪器通讯状态检查,该函数返回字符串来表征检查和测试结果,详细代码及注释如下:
Public Function Instrument_Initialization (VISAaddress
as String )as String
定义初始化VISA 的必要参数,并建立VISA 与仪器的连接
VISAaddress="TCPIP0::xxx.xxx.xxx.xxx::INSTR " '仪器VISA 地址如表2所示
status=viOpenDefaultRM(viDefaultRM) '打开一个VISA 资源对话通道
status=viOpen(viDefaultRM,VISAaddress,0,0, Instrument) '建立与仪器连接
If status < 0 Then '进行仪器通讯状态检查 MsgBox "仪器通讯错误,请检查!" Instrument_Initialization=ConnectionError Exit Function End If
status=viClose(Instrument) '关闭仪器与VISA 连接 status= viClose(viDefaultRM) '关闭VISA 系统,释放
所占用资源
Instrument_Initializtion=Success
End Function
2)仪器通用读写函数
主要用于与测控仪器的指令发送和数据交换,并分别返回一个布尔数,表示读写操作是否成功完成,代码如下:
Public Function Instrument_Write (VISAaddress as String ,SCPIcmd as String )as Boolean
定义初始化VISA 的必要参数,并建立VISA 与仪器的
连接
Call viWrite(Instrument, SCPIcmd, Len(SCPIcmd) + 1, actual) '上条指令对测控仪器执行写操作
If Len(SCPIcmd) + 1=actual Then '判断写指令是否成功,并返回布尔数 Instrument_Write =1 Else :Instrument_Write =0 End If
关闭仪器与VISA 连接,释放占用资源 End Function
Public Function Instrument_Read (VISAaddress as String, strTemp as String ,strNumber as Integer )as Boolean
定义初始化VISA 的必要参数,并建立VISA 与仪器的连接 Call viRead(Instrument, strTemp, strNumber, actual) '对测控仪器执行读操作
If actual =strNumber Then '判断对仪器进行读操作是否
第4期 孙兴华等:真空热试验测控仪器驱动器通用化设计
455
成功,并返回布尔数
Instrument_Read =1 Else :Instrument_Read =0
关闭仪器与VISA 连接,释放占用资源 End Function
3.1.2 特定功能函数
特定功能函数主要是针对不同测控仪器在真空热试验过程中实现某种特定功能(如数字万用表进行电压、电阻测量,程控电源进行回路电阻测量等)的函数。

特定功能函数库的建立为测控软件的开发提供了很大便利。

例如在某些试验中对测量周期或者对程控电源的输出有特殊要求,都可以编写相应的特定功能函数,将其添加到驱动函数库中以供调用。

3.2 仪器驱动函数的封装
动态链接库(即DLL )是Windows 操作系统提供的共享可执行代码数据的基本手段,是一种过程库,可以被多个程序共享调用,大大节省了
对系统资源的占用[3]。

使用Visual Basic 将前面所编写的通用功能函数和特定功能函数统一封装生成一个名为“InstrumentDriver.dll ”的动态链接库文件,这样用户只需载入这个函数库并声明函数,就可以实现对测控仪器程序控制。

另外,这是一个开放的函数库,随着以后测控仪器种类的增加以及对各种功能的进一步需求,可以不断加入新的函数。

3.3 仪器驱动函数的调用
为验证前面所建立的函数库可以实现对真空热试验测控流程中应用的各类仪器的驱动,利用Excel VBA 引用“InstrumentDriver.dll ”动态链接库中的相关函数实现程控电源和数字万用表测量电阻的功能,如图4所示为调用结果。

可以看出,只要正确设置各类仪器的VISA 地址,不论仪器的种类、厂家和型号,通过调用该函数库的相关函数都可以实现对仪器的驱动;并且通过编写特定功能函数,用户可以轻松调用,有利于测控软件的二次开发。

(a)
(b)
图4 驱动函数调用结果
Fig. 4 Calling result of the drivers function
4 结束语
本文针对目前真空热试验测控系统应用的各种测控仪器,建立了通用的仪器模型,基于VISA 和SCPI 标准编写了通用驱动函数,并以动态链接库的形式进行封装,用户只需要进行简单的函数调用就可以实现不同厂家、不同型号测控仪器的各类功能,简化了仪器驱动的配置过程,缩减了测控应
用软件开发的工作量。

参考文献(References )
[1] 王学伟, 相艳, 陈小容. 数据采集模块SCPI 解释器的
研究与实现[J]. 电测与仪表, 2008, 45(1): 31
[2] 李扬, 赵葛霄, 汪仁煌. 基于VISA 标准的仪器驱动器
设计[J]. 工业仪表与自动化装置, 2001, 6: 59 [3] 伊翠香, 孙玲玲, 张富强. 动态链接库DLL 编程的相关
应用技术与探讨[J]. 试验技术与试验机, 2008, 48(1): 56
Ⅱ ABSTRACTS OF THE PRESENT ISSUE
Key words: atomic oxygen; solar array; erosion; electrical performance
Li Tao, Jiang Lixiang, Guo Liang, Liu Xiangpeng, Feng Weiquan, Zhai Ruiqiong (Beijing Institute of Spacecraft Environment Engineering, Beijing 100094, China)
Article ID: 1673-1379(2010)04-0434-03
DOI: 10.3969/j.issn.1673-1379.2010.04.006
The effects of 60keV proton irradiation on aluminum film reflector
Abstract: Under the environment of vacuum and heat sink, the effects of the irradiation of protons with an energy of 60keV on the optical specular reflectance of Al reflector are studied. The experimental results show that the specular reflectance of the Al film reflector is significantly affected by the irradiation. With increasing fluence, the specular reflectance decreases monotonously. At a low radiation fluence of 1×1016 cm-2, the specular reflectance is decreased but slightly, and the change firstly occurs in the ultraviolet region. With a further increase of fluence, a significant decrease of the specular reflectance occurs particularly in the wavelength range of 250~800nm. The reason for the decrease could be attributed to the appearance of ripples and hillocks on the surface of the Al mirror after the proton irradiation.
Key words: proton irradiation; aluminum film reflector; specular reflectance; ripple; hillock
Wei Qiang1, Wang Dan1, Liu Shengxian1, Liu Hai2 (1. School of Materials Science and Engineering, Tianjin University, Tianjin 300072, China; 2. Space Mateirals and Environment Engineering Laboratory, Harbin Institute of Technology, Harbin 150001, China)
Article ID:1673-1379(2010)04-0437-07
DOI:10.3969/j.issn.1673-1379.2010.04.007
Radiation protection for human missions to Mars
Abstract: Mars exploration is an important part of human outer space activities and the human exploration of the Mars will be a next major target. The most critical issue of these missions is the safety and health of the crew. The damaging effect of ionizing space radiation is a major health concern. This paper reviews the development of Mars exploration technology in the USA and Russia. Radiation environment, radiation effect, and radiation measurements obtained onboard US spacecraft are presented and discussed. Radiation dose is predicted during the long-duration manned missions and some guidance is given for the radiation protection for future advanced manned Mars missions.
Key words: Mars exploration; manned spaceflight; radiation environment; radiation dose; radiation protection Xue Yuxiong, Ma Yali, Yang Shengsheng, Zhang Hongpeng, Tian Kai, Gao Xin (National key Lab of Science and Technology on Vacuum & Cryogenics Technology and Physics, Lanzhou Institute of Physics, Lanzhou 730000, China)
Article ID: 1673-1379(2010)04-0444-03
DOI: 10.3969/j.issn.1673-1379.2010.04.008
Effects of complex electromagnetic environments on the perception of satellite reconnaissance system
Abstract: As the satellite reconnaissance equipment is relied on the electromagnetic wave transmission, its accuracy is affected by the impact of electromagnetic interference (EMI) in various degrees. This paper analyzes the complicated electromagnetic environment, focusing on the effects of several types of artificial electromagnetic interferences on satellite electrical reconnaissance, optical and SAR imaging, and satellite navigation. Some propositions for anti-jamming are given.
Key words: satellite reconnaissance; GPS; electromagnetic interference (EMI); anti-jamming
Yao Yuesong (A Certain Army Unit of PLA, Beijing 100094, China)
Article ID: 1673-1379(2010)04-0447-05
DOI: 10.3969/j.issn.1673-1379.2010.04.009
Review of integrated ECLSS/TCS tests for ISS
Abstract: The integrated ECLSS/TCS (Environmental Control and Life Support System/Thermal Control System) tests of the International Space Station (ISS) are system-level tests in ambient pressure for verification and acceptance of the overall performance of a single cabin or multiple cabins. This paper gives firstly a description of the environmental test requirements of the ISS, and the developments of integrated ECLSS/TCS tests for the US, European and Japanese cabins under the frame of the ISS program, including the test items, test functions, and test facilities. The characteristics of the integrated ECLSS/TCS tests are summarized and some suggestions are made for China to conduct this kind of tests.
Key words: space station; environmental test; environmental control and life support system; thermal control system Fu Shiming, Pei Yifei, Qie Dianfu (Beijing Institute of Spacecraft Environment Engineering, Beijing 100094, China)
Article ID: 1673-1379(2010)04-0452-04
DOI: 10.3969/j.issn.1673-1379.2010.04.010
General design of instrument drivers for the measurement and control system in vacuum thermal tests
Abstract: In the vacuum thermal tests for spacecraft, various kinds of programmable instrument are used, with different communication interfaces, bus types and driving modes, and it is often difficult to develop the application software for measurement and control with universality and inheritance. This paper develops universal instrument driver
ABSTRACTS OF THE PRESENT ISSUE Ⅲ
functions based on VISA, which are encapsulated with the dynamic link library technology to be easily called by users in secondary developments. These functions could simplify the configuration of the instrument driving process and the general design of the measurement and control software.
Key words: vacuum thermal tests; measurement and control system; instrument driver; general design
Sun Xinghua, Pei Yifei (Beijing Institute of Spacecraft Environment Engineering, Beijing 100094, China)
Article ID: 1673-1379(2010)04-0456-06
DOI: 10.3969/j.issn.1673-1379.2010.04.011
Random vibration specification for spacecraft components based on the hybrid FE-SEA method
Abstract: It is very difficult to specify appropriate random vibration test inputs for spacecraft components, which are usually given in terms of test results or experiences. In this paper, a new technique based on the hybrid FE-SEA method is applied to the prediction of the random vibration environment, and the random vibration as specified by the predictive results is studied. Firstly, the formulation of the hybrid FE-SEA method is briefly discussed. Then, the acceleration power spectral densities for components are computed by the FE-SEA method under the combined loads of the external acoustic loads and the direct mechanical vibration inputs from the interface between the launch vehicle and the spacecraft. Finally, an approach is proposed to specify random vibration test inputs for components in consideration of the predictive results and the technical inspection requirements. It is concluded that FE-SEA is efficient in the modeling work, is especially suitable for the prediction of component responses under combined loads, and is convenient to be applied in specifying the random vibration inputs.
Key words: spacecraft component; FE-SEA method; combined loads; random vibration
Zou Yuanjie, Zhang Jin, Han Zengyao (Beijing Institute
of Spacecraft System Engineering, Beijing 100094, China)
Article ID: 1673-1379(2010)04-0462-05
DOI: 10.3969/j.issn.1673-1379.2010.04.012 Characterization of nonlinear vibration systems under random excitation
Abstract: From the solution of the Lyapunov equation, the stationary random vibration response covariance of a structure can be directly obtained. The nonlinear system is linearized by the equivalent linearization method, and the Lyapunov equation is solved by iterations and the stationary equivalent linear parameter of the nonlinear system is obtained. This is a characterization method for the nonlinear vibration system of multiple degrees of freedom (DOFs). The proposed method provides a theoretical basis to choose the model of the nonlinear dynamic system. A simulation is carried out to analyze an examples of the nonlinear system, and the results show that this method is valid.
Key words: random vibration; random analysis; equivalent linearization method; equivalent nonlinear FRF Kong Xianren, Liao Jun, Yang Zhengxian, Xu Dafu (Research Center of Satellite Technology, Harbin Institute of Technology, Harbin 150001, China)
Article ID: 1673-1379(2010)04-0467-05
DOI: 10.3969/j.issn.1673-1379.2010.04.013
Stiffness equivalent method for the hinge mechanism of solar cell array
Abstract:The hinges in a hinge mechanism are movable components,which make the modeling and analysis of the solar cell array very difficult. This paper proposes a method to solve this problem, which uses the stiffness of the hinge mechanism measured from tests in the finite element model of a solar cell array. The stiffness of the solar cell array obtained from the model is compared with that of the test,to obtain the equivalent stiffness of the hinge mechanism. By using this method, the precision of the modeling and analysis of the solar cell array are greatly improved.
Key words: hinge mechanism; stiffness; solar cell array; modal validation
Wu Yuanbo1,2, Du Jianghua2 (1. School of Mechanical Engineering, Shanghai Jiaotong University, Shanghai 200030, China; 2. Shanghai Institute of Satellite Engineering, Shanghai 200240, China)
Article ID: 1673-1379(2010)04-0472-05
DOI: 10.3969/j.issn.1673-1379.2010.04.014
A method to update FEA analytical model by using the shaker vibration test data
Abstract:This paper presents a new model updating method to update aerospace structures by using measured response function data under the base excitation directly. The updating equation is derived and a structural updating software system is developed based on the commercial FEA software NASTRAN. Through simulated numerical case studies based on two models, it is shown that the proposed method is feasible and effective, and the method can be used in virtual tests.
Key words:model updating; shaker vibration test; base excitation; NASTRAN software
Wang Zeyu, Liu Chuang, Feng Yaoqi (Beijing Institute of Spacecraft Environment Engineering, Beijing 100094, China)
Article ID: 1673-1379(2010)04-0477-04
DOI: 10.3969/j.issn.1673-1379.2010.04.015
Numerical simulation of accelerometer sensor characteristics of an impact testing system
Abstract: The impact on a spacecraft depends directly on the buffer ability of the spacecraft’s docking mechanism,。

相关文档
最新文档