+

CN108259549A - A kind of implementation method of Networked Instrument instrument front-end proxy agent - Google Patents

A kind of implementation method of Networked Instrument instrument front-end proxy agent Download PDF

Info

Publication number
CN108259549A
CN108259549A CN201710353554.3A CN201710353554A CN108259549A CN 108259549 A CN108259549 A CN 108259549A CN 201710353554 A CN201710353554 A CN 201710353554A CN 108259549 A CN108259549 A CN 108259549A
Authority
CN
China
Prior art keywords
instrument
lxi
management platform
agent
protocol
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710353554.3A
Other languages
Chinese (zh)
Inventor
李哲
李宥谋
高晓艳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian University of Posts and Telecommunications
Original Assignee
Xian University of Posts and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian University of Posts and Telecommunications filed Critical Xian University of Posts and Telecommunications
Priority to CN201710353554.3A priority Critical patent/CN108259549A/en
Publication of CN108259549A publication Critical patent/CN108259549A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/562Brokering proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明公开了一种网络化仪器仪表前端仪器代理和网络化仪器仪表代理的实现方法。所述网络化仪器仪表前端仪器代理(简称仪器代理)包括:ARM中央处理器、RJ45有线和Wifi无线的以太网接口、USB总线接口、UART/RS232串行接口等。处理器运行Linux/uCOS操作系统,通过以太网接口接入互联网,与仪器管理平台连接,接受其管理;通过USB总线接口和RS232总线接口连接非LXI仪器,其它接口连接各类传感器或控制单元。仪器代理支持DHCP协议、LXI协议、仪器自动发现协议、SNMP协议、HiSLIP协议、SCPI命令。仪器管理平台能够对仪器代理和其下连接的各类非LXI仪器、多种传感器和控制单元有效管理;同时,非LXI仪器驱动可以从仪器管理平台自动加载。

The invention discloses a front-end instrument proxy of networked instruments and a realization method of the proxy of networked instruments and meters. The front-end instrument agent of the networked instrumentation (instrument agent for short) includes: ARM central processing unit, RJ45 wired and Wifi wireless Ethernet interface, USB bus interface, UART/RS232 serial interface, etc. The processor runs the Linux/uCOS operating system, connects to the Internet through the Ethernet interface, connects with the instrument management platform, and accepts its management; connects non-LXI instruments through the USB bus interface and RS232 bus interface, and connects various sensors or control units through other interfaces. The instrument agent supports DHCP protocol, LXI protocol, instrument automatic discovery protocol, SNMP protocol, HiSLIP protocol, and SCPI commands. The instrument management platform can effectively manage the instrument agent and various non-LXI instruments connected to it, various sensors and control units; at the same time, the non-LXI instrument driver can be automatically loaded from the instrument management platform.

Description

一种网络化仪器仪表前端代理的实现方法A realization method of front-end proxy of networked instrumentation

技术领域technical field

本发明属于网络化管理技术领域,涉及非LXI仪器仪表与远端仪器管理平台的通信,该方法屏蔽了标准LXI仪器和非标准LXI仪器之间的差别,通过仪器代理的转接实现了仪器管理平台对仪器仪表的统一管理。The invention belongs to the technical field of network management, and relates to the communication between non-LXI instruments and meters and remote instrument management platforms. The method shields the difference between standard LXI instruments and non-standard LXI instruments, and realizes instrument management through the transfer of instrument agents Unified management of instruments and meters by the platform.

背景技术Background technique

近年来,传统测量技术已悄然走向网络化,测量仪器在测控仪器设备中成为主流。在网络化的测控系统中,数据通过网络传输到用户终端,而用户可不受时间和空间的限制对系统内的测量仪器进行远程操控、获取测量信息。现如今大部分厂商直接生产支持LXI协议的仪器仪表,LXI联盟提出的LXI(LAN-based Extensions for Instrumentation)总线协议,为仪器仪表进入网络化时代奠定了基础,基于LXI协议的仪器设备具有强大的网络通信功能和传统仪器的测量测试功能。但是,针对仪器设备的测量和通信,仍存在以下的不足:In recent years, traditional measurement technology has quietly moved towards networking, and measuring instruments have become the mainstream in measurement and control equipment. In the networked measurement and control system, the data is transmitted to the user terminal through the network, and the user can remotely control the measuring instruments in the system and obtain measurement information without being limited by time and space. Nowadays, most manufacturers directly produce instruments and meters that support the LXI protocol. The LXI (LAN-based Extensions for Instrumentation) bus protocol proposed by the LXI Alliance has laid the foundation for instruments and meters to enter the network era. Instruments and equipment based on the LXI protocol have powerful Network communication function and measurement test function of traditional instruments. However, for the measurement and communication of instruments and equipment, there are still the following deficiencies:

1.目前大部分仪器仪表等测量设备都是基于USB、RS232接口,还有很多测量单元基于UART、SPI、CAN、I2C等总线接口以及ADC/DAC数模模数转换接口、IO控制接口等。不能直接将其通过以太网连接,接受仪器管理平台的管理。因此,将不同类型的接口总线设备转换成统一的LXI仪器设备,实现多厂商仪器接受仪器管理平台的管理成具有现实意义。1. At present, most instruments and meters and other measuring equipment are based on USB and RS232 interfaces, and many measuring units are based on bus interfaces such as UART, SPI, CAN, and I2C, as well as ADC/DAC digital-to-analog conversion interfaces, IO control interfaces, etc. It cannot be directly connected via Ethernet to accept the management of the instrument management platform. Therefore, it is of practical significance to convert different types of interface bus devices into unified LXI instruments and equipment, and to realize multi-vendor instruments accepting the management of the instrument management platform.

2.测量系统中的网络和资源共享为主的通信网存在不同目的。网络仪器测量系统中的网络通常都要满足以下几个特点:实时性、安全性、智能性、可靠性和低成本,才能够促进网络测量系统在实际应用中的功能完善,因此对测量系统中的网络要求是比较高的。在网络仪器测量系统中智能性、实时性则是衡量测控系统优劣的主要标准。2. The network in the measurement system and the communication network based on resource sharing have different purposes. The network in the network instrument measurement system usually has to meet the following characteristics: real-time, security, intelligence, reliability and low cost, in order to promote the perfect function of the network measurement system in practical applications, so it is important for the measurement system The network requirements are relatively high. In the network instrument measurement system, intelligence and real-time performance are the main criteria to measure the pros and cons of the measurement and control system.

3.IVI联盟提出制定的HiSLIP协议,该协议以TCP/IP为基础,网络化测量系统可以借助HiSLIP协议的高效性、实时性和可靠性,减少网络时延突发异常等对测控系统的影响,借助HiSLIP协议双方的通信通道,实现网络化仪器间通信,使仪器间协同工作,提高网络化仪器测量系统的测量效率。另外,HiSLIP协议既支持IPv4也支持IPv6,具有良好的向后兼容型,为以后的网络化测量系统扩展更加便捷。SNMP简单网管协议用于网络管理,在仪器仪表实现网络化时,也可以扩展SNMP中MIB库,使其用于网络中仪器仪表的管理。3. The HiSLIP protocol proposed by the IVI Alliance is based on TCP/IP. The networked measurement system can use the high efficiency, real-time and reliability of the HiSLIP protocol to reduce the impact of sudden abnormal network delays on the measurement and control system. , with the help of the communication channel between the two sides of the HiSLIP protocol, the communication between the networked instruments is realized, so that the instruments work together, and the measurement efficiency of the networked instrument measurement system is improved. In addition, the HiSLIP protocol supports both IPv4 and IPv6, has good backward compatibility, and is more convenient for future networked measurement system expansion. The SNMP simple network management protocol is used for network management. When the instruments and meters are networked, the MIB library in SNMP can also be expanded to be used for the management of instruments and meters in the network.

发明内容Contents of the invention

本发明目的在保证仪器仪表测量系统中网络实时性和智能性的情况下,充分发挥HiSLIP协议和SNMP协议的优点,实现非标准LXI仪器与仪器管理平台之间的通信。The purpose of the present invention is to fully utilize the advantages of the HiSLIP protocol and the SNMP protocol under the condition of ensuring the real-time and intelligence of the network in the instrument measuring system, and realize the communication between the non-standard LXI instrument and the instrument management platform.

实现本发明的技术路线是:引入嵌入式转接设备作为仪器代理,通过代理可以将不同类型接口的非LXI仪器仪表设备连接到以太网中,仪器代理识别仪器管理平台发送的标准的SCPI命令,并转换成可被非LXI仪器仪表识别的命令,再通过HiSLIP协议实现非LXI仪器设备与仪器管理平台的数据交互;通过建立非LXI仪器的MIB库,采用简单网关协议SNMP实现仪器管理平台对非LXI仪器的管理。本发明目的是以下述方式实现的:The technical route for realizing the present invention is: introducing an embedded switching device as an instrument proxy, through which non-LXI instrumentation devices with different types of interfaces can be connected to the Ethernet, and the instrument proxy recognizes the standard SCPI commands sent by the instrument management platform, And convert it into commands that can be recognized by non-LXI instruments, and then realize the data interaction between non-LXI instruments and instrument management platforms through the HiSLIP protocol; through the establishment of MIB libraries for non-LXI instruments, the simple gateway protocol SNMP is used to realize the instrument management platform. Management of LXI instruments. The object of the invention is achieved in the following manner:

实现仪器管理平台与非LXI仪器设备之间的通信系统包括:一个仪器管理平台(1),多个仪器代理(2),和多个被管理的非LXI仪器仪表设备(24)、(25),如图1所示。每个仪器代理基于ARM处理器(4),能够运行Linux或uC/OS操作系统(16),支持TCP/IP协议(17)、支持HiSLIP协议(18)、支持DHCP协议(19)、支持LXI协议(20)、能够识别SCPI命令(21)、支持SNMP协议(22)、支持MIB库(23)的扩展,支持USB接口(7)、RS232接口(8)类型的仪器,支持I2C总线接口(9)、SPI总线接口(10)、以及CAN总线接口(11)、UART接口(12)、ADC/DAC数模模数转换接口(13)、IO控制接口(14)等接口的各类传感器、控制单元,如图2所示。实现仪器代理与仪器管理平台通信的具体步骤如下:The communication system between the instrument management platform and non-LXI instruments includes: an instrument management platform (1), multiple instrument agents (2), and multiple managed non-LXI instrumentation devices (24), (25) ,As shown in Figure 1. Each instrument agent is based on ARM processor (4), can run Linux or uC/OS operating system (16), supports TCP/IP protocol (17), supports HiSLIP protocol (18), supports DHCP protocol (19), supports LXI protocol (20), can identify SCPI commands (21), support SNMP protocol (22), support the expansion of MIB library (23), support USB interface (7), RS232 interface (8) types of instruments, support I2C bus interface ( 9), SPI bus interface (10), CAN bus interface (11), UART interface (12), ADC/DAC digital-to-analog conversion interface (13), IO control interface (14) and other interfaces of various sensors, Control unit, as shown in Figure 2. The specific steps to realize the communication between the instrument agent and the instrument management platform are as follows:

1.支持运行LinuxOS或uC/OS(16)的ARM处理器(4)作为仪器代理主体(2),两种操作系统具有支持TCP/IP(17)、HiSLIP(18)、DHCP(19)、LXI(20)、SCPI(21)、SNMP(22)协议以及特定接口的数据采集协议,支持以太网(5、6)、RS232(8)、I2C(9)等接口驱动的共有功能。根据软件支持程度不同和差异功能,最大程度的发挥各操作系统的优势。运行LinuxOS(16)的仪器代理具有USB(7)、RS232(8)和I2C(9)等总线接口的驱动,该类接口的仪器仪表与仪器代理相连时,仪器代理接收并识别仪器管理平台发送的获取仪器仪表的配置、控制、数据等标准SCPI命令(21),并给仪器管理平台(1)相应的响应信息;仪器代理(2)接收到仪器管理平台的数据请求时,将基于HiSLIP(18)协议把仪器管理平台要求的数据信息发送给仪器管理平台。运行uC/OS操作系统(16)的仪器代理,支持RS232(8)、I2C(9)、SPI(10)、CAN(11)、UART(12)等总线接口的驱动,以及ADC/DAC数模模数转换接口(13)、IO控制接口(14)等接口的驱动,该类接口的仪器仪表与设备相连时,操作过程与LinuxOS下的操作过程相同。1. Support the ARM processor (4) running LinuxOS or uC/OS (16) as the instrument agent (2), the two operating systems support TCP/IP (17), HiSLIP (18), DHCP (19), LXI (20), SCPI (21), SNMP (22) protocols and specific interface data acquisition protocols support common functions driven by interfaces such as Ethernet (5, 6), RS232 (8), and I2C (9). According to different software support levels and different functions, the advantages of each operating system can be maximized. The instrument agent running LinuxOS (16) has drivers for bus interfaces such as USB (7), RS232 (8) and I2C (9). When an instrument of this type of interface is connected to the instrument agent, the instrument agent receives and recognizes the Obtain standard SCPI commands (21) such as instrument configuration, control, and data, and give corresponding response information to the instrument management platform (1); when the instrument agent (2) receives the data request from the instrument management platform, it will use HiSLIP ( 18) The agreement sends the data information required by the instrument management platform to the instrument management platform. An instrument agent running the uC/OS operating system (16), supporting bus interface drivers such as RS232 (8), I2C (9), SPI (10), CAN (11), UART (12), and ADC/DAC digital-analog The drive of interfaces such as the analog-to-digital conversion interface (13) and the IO control interface (14). When the instrumentation of this type of interface is connected to the device, the operation process is the same as that under LinuxOS.

2.为了让仪器管理平台(1)对非LXI仪器仪表进行实时监测、分析、控制、管理。SNMP协议(22)使用对象来表示每一个被管理的设备资源,MIB库(23)是这些对象的集合。根据非LXI仪器仪表(24)、(25)的配置信息等,创建添加仪器仪表的MIB库,作为SNMP管理设备资源的基础,记录仪器仪表等被管理资源的工作状态,实现对仪器设备进行高效的管理。2. In order for the instrument management platform (1) to monitor, analyze, control and manage non-LXI instruments in real time. The SNMP protocol (22) uses objects to represent each managed device resource, and the MIB library (23) is a collection of these objects. According to the configuration information of non-LXI instruments (24) and (25), create a MIB library for adding instruments and meters as the basis for SNMP management of device resources, record the working status of managed resources such as instruments and meters, and achieve efficient instrumentation management.

3.仪器管理平台与仪器代理之间通信时,代理支持DHCP协议(19),能够获取仪器管理平台(1)分配的IP地址、域名服务器和网关地址;非LXI仪器与仪器代理之间进行通信时,代理通过轮询监测的方式可以实现对非LXI仪器的自动发现。3. When communicating between the instrument management platform and the instrument agent, the agent supports the DHCP protocol (19), and can obtain the IP address, domain name server and gateway address assigned by the instrument management platform (1); communication between non-LXI instruments and instrument agents At this time, the agent can automatically discover non-LXI instruments by means of polling and monitoring.

4.仪器管理平台与仪器代理之间通信时,仪器管理平台采用SNMP协议(22)对仪器代理进行配置,同时接收仪器代理和非LXI仪器设备(24)、(25)的告警信息;仪器管理平台基于HiSLIP协议(18),使用SCPI命令(21)方式请求数据,仪器代理经仪器数据处理(26)和传感器采集处理(27),获取非LXI仪器设备各种测量数据传给仪器管理平台。4. When communicating between the instrument management platform and the instrument agent, the instrument management platform uses the SNMP protocol (22) to configure the instrument agent, and simultaneously receives alarm information from the instrument agent and non-LXI instrument equipment (24), (25); instrument management The platform is based on the HiSLIP protocol (18) and uses SCPI commands (21) to request data. The instrument agent obtains various measurement data of non-LXI instruments and equipment and transmits them to the instrument management platform through instrument data processing (26) and sensor acquisition and processing (27).

本发明与现有技术相比本发明的优点:The present invention has the advantage of the present invention compared with prior art:

1.仪器代理(2)通过以太网(5、6)连接仪器管理平台(1),支持非LXI仪器仪表(24)、(25)的接入和对非LXI仪器的管理。1. The instrument agent (2) connects to the instrument management platform (1) through Ethernet (5, 6), supports the access of non-LXI instruments (24), (25) and the management of non-LXI instruments.

2.根据应用不同,仪器代理二种操作系统模式:LinuxOS和uC/OS(16),同时,分别选用支持相应操作系统的硬件平台: 支持LinuxOS的三星ARM处理器S3C6440的开发板和支持uC/OS的恩智浦LPC1700开发板。2. According to different applications, the instrument acts as an agent for two operating system modes: LinuxOS and uC/OS (16). At the same time, hardware platforms that support the corresponding operating systems are selected respectively: Samsung ARM processor S3C6440 development board that supports LinuxOS and uC/OS OS for the NXP LPC1700 development board.

3.仪器代理实现自动发现功能:仪器代理和非LXI仪器仪表接入仪器管理平台,仪器管理平台能够即时发现。3. The instrument agent realizes the automatic discovery function: the instrument agent and non-LXI instruments are connected to the instrument management platform, and the instrument management platform can be discovered immediately.

4.动态/静态IP地址分配功能,仪器代理支持DHCP协议(19):代理可以自动获取仪器管理平台分配的IP地址、域名服务器和网关地址;也可以手动配置IP地址、域名服务器和网关地址。4. Dynamic/static IP address allocation function, the instrument agent supports DHCP protocol (19): the agent can automatically obtain the IP address, domain name server and gateway address assigned by the instrument management platform; it can also manually configure the IP address, domain name server and gateway address.

5.仪器代理支持SNMP协议(22)接受仪器管理平台管理:非LXI仪器被动接受仪器管理平台GET/SET命令访问,支持Trap指令主动发送告警信息给仪器管理平台。5. The instrument agent supports the SNMP protocol (22) to accept the management of the instrument management platform: non-LXI instruments passively accept the GET/SET command access of the instrument management platform, and support the Trap command to actively send alarm information to the instrument management platform.

6.仪器代理支持MIB库(23)扩展:仪器代理根据所连接的非LXI仪器接口类型,构造相应的MIB库,将非LXI仪器仪表作为SNMP设备,接受仪器管理平台管理。6. The instrument agent supports MIB library (23) expansion: the instrument agent constructs the corresponding MIB library according to the interface type of the connected non-LXI instrument, and uses the non-LXI instrument as an SNMP device to accept the management of the instrument management platform.

7.仪器代理支持HiSLP协议(18):通过仪器代理使得非LXI 仪器接受仪器管理平台访问,通过HiSLIP协议实现仪器管理平台和非LXI仪器之间的数据交互。7. The instrument agent supports the HiSLP protocol (18): through the instrument agent, the non-LXI instrument can be accessed by the instrument management platform, and the data interaction between the instrument management platform and the non-LXI instrument can be realized through the HiSLIP protocol.

8.仪器代理支持SCPI规范(21):仪器代理连接非LXI仪器,需将标准SCPI命令转换成能被非LXI仪器识别的命令。8. The instrument agent supports the SCPI specification (21): When the instrument agent connects to non-LXI instruments, it needs to convert standard SCPI commands into commands that can be recognized by non-LXI instruments.

9.仪器代理支持非LXI仪器(24)、(25)的接入:仪器代理可以连接具有USB(7)、RS232(8)、I2C(9)、SPI(10)、CAN(11)、UART(12)等总线接口以及ADC/DAC数模模数转换接口(13)、IO控制接口(14)等接口的仪器仪表测量单元,具有USB、RS232接口的类如示波器、数字发生器,具有I2C、SPI、CAN等总线接口以及ADC/DAC数模模数转换接口、IO控制接口的类如温度传感器模块、湿度传感器模块、二氧化碳模块、光照模块等。9. The instrument agent supports the access of non-LXI instruments (24), (25): the instrument agent can connect with USB (7), RS232 (8), I2C (9), SPI (10), CAN (11), UART (12) Instrument measurement units with bus interfaces such as ADC/DAC digital-to-analog conversion interfaces (13), IO control interfaces (14), and other interfaces, such as oscilloscopes and digital generators with USB and RS232 interfaces, and I2C , SPI, CAN and other bus interfaces, ADC/DAC digital-to-analog conversion interfaces, and IO control interfaces such as temperature sensor modules, humidity sensor modules, carbon dioxide modules, and lighting modules.

附图说明Description of drawings

借助于附图可以详细描述并理解本发明。The present invention can be described and understood in detail with the aid of the accompanying drawings.

图1为仪器代理在仪器管理系统中作用和地位示意图;Figure 1 is a schematic diagram of the role and status of the instrument agent in the instrument management system;

图2为仪器代理组成示意图;Figure 2 is a schematic diagram of the composition of instrument agents;

图3为仪器管理系统示意图;Figure 3 is a schematic diagram of the instrument management system;

图4为仪器代理建立socket链接的工作流程;Figure 4 is the workflow of establishing a socket link for the instrument agent;

图5为仪器管理对象标识符OID;Figure 5 is the instrument management object identifier OID;

图6为仪器代理工作原理示意图;Figure 6 is a schematic diagram of the working principle of the instrument agent;

本发明中的其他方面和特点,将在随后的说明中阐述,或者从说明描述中显而易见,或者通过对本发明的实践中被认知。Other aspects and features of the invention will be set forth in the description which follows, or will be apparent from the description, or can be learned by practice of the invention.

具体实施方式Detailed ways

下面参照附图详细描述仪器仪表代理的实现方法。本发明在仪器仪表管理系统如图3所示。The implementation method of the instrument proxy will be described in detail below with reference to the accompanying drawings. The present invention is shown in Figure 3 in the instrumentation management system.

通过以太网可以连接多个仪器代理,每个仪器代理可以与多种类型接口的、具有不同功能的最多4个非LXI仪器连接。仪器代理支持DHCP协议,可以支持仪器管理平台自动分配的IP地址、域名服务器和网关地址。仪器代理通过专用的通信协议,如RS232,I2C,USB等通信协议等与非LXI仪器(测控单元)之间通信。仪器代理接收仪器管理平台发送的标准SCPI命令并转换成可被非LXI仪器识别的命令,执行相应的查询、控制命令。仪器代理接收仪器管理平台的请求数据命令,仪器代理进行非LXI仪器数据处理、传感器的数据采集后将数据通过以太网发送给远端仪器管理平台,同时非LXI仪器主动发送告警信息经过仪器代理转发给仪器管理平台,仪器管理平台接收仪器代理的响应信息,以及处理告警信息。Multiple instrument agents can be connected via Ethernet, and each instrument agent can be connected to up to 4 non-LXI instruments with various types of interfaces and different functions. The instrument agent supports the DHCP protocol, and can support the IP address, domain name server and gateway address automatically assigned by the instrument management platform. The instrument agent communicates with non-LXI instruments (measurement and control units) through dedicated communication protocols, such as RS232, I2C, USB and other communication protocols. The instrument agent receives the standard SCPI commands sent by the instrument management platform and converts them into commands that can be recognized by non-LXI instruments, and executes corresponding query and control commands. The instrument agent receives the request data command from the instrument management platform, and the instrument agent performs non-LXI instrument data processing and sensor data collection, and then sends the data to the remote instrument management platform through Ethernet, and at the same time, the non-LXI instrument actively sends alarm information and is forwarded by the instrument agent To the instrument management platform, the instrument management platform receives the response information from the instrument agent and processes the alarm information.

本发明根据仪器代理的应用不同分成两种:仪器代理可以分别运行在LinuxOS和uC/OS(16)二种操作系统下,分别选用支持相应操作系统的ARM处理器。支持LinuxOS的三星S3C6440处理器和支持uC/OS的恩智浦LPC1700系列处理器。分析两种系统各自的特点,两种操作系统均支持TCP/IP、HiSLIP、DHCP、LXI、SCPI、SNMP等协议以及以太网、RS232、I2C总线、IO等接口。根据不同操作系统下软件支持程度不同和差异功能,为了最大程度的发挥各操作系统的优势,作如下安排。The present invention is divided into two types according to the application of the instrument agent: the instrument agent can run under the two operating systems of LinuxOS and uC/OS (16) respectively, and select the ARM processor supporting the corresponding operating system respectively. Samsung S3C6440 processor supporting LinuxOS and NXP LPC1700 series processor supporting uC/OS. Analyzing the characteristics of the two systems, both operating systems support protocols such as TCP/IP, HiSLIP, DHCP, LXI, SCPI, and SNMP, and interfaces such as Ethernet, RS232, I2C bus, and IO. According to different software support levels and different functions under different operating systems, in order to maximize the advantages of each operating system, the following arrangements are made.

运行LinuxOS的仪器代理连接具有USB、RS232和I2C等总线接口仪器仪表时,仪器代理接收并识别仪器管理平台发送的获取仪器仪表的配置、控制、数据等标准SCPI命令,仪器代理将SCPI命令转换成可以被非LXI仪器识别的命令,将基于HiSLIP协议实现与仪器管理平台之间的数据交互。运行uC/OS的仪器代理,连接具有UART、SPI、I2C、CAN等总线接口以及ADC/DAC转换接口、IO控制接口等接口类的仪器仪表时,该类接口的仪器仪表与仪器代理相连时,操作过程与运行LinuxOS下的仪器代理操作过程相同。When an instrument agent running LinuxOS is connected to an instrument with bus interfaces such as USB, RS232, and I2C, the instrument agent receives and recognizes standard SCPI commands sent by the instrument management platform to acquire configuration, control, and data of the instrument, and the instrument agent converts the SCPI commands into Commands that can be recognized by non-LXI instruments will implement data interaction with the instrument management platform based on the HiSLIP protocol. When an instrument agent running uC/OS is connected to an instrument with bus interfaces such as UART, SPI, I2C, CAN, ADC/DAC conversion interface, and IO control interface, when the instrument of this type of interface is connected to the instrument agent, The operation process is the same as that of the instrument agent running under LinuxOS.

本发明实现仪器仪表代理的方法,仪器代理建立socket链接的工作流程如图4所示。The present invention realizes the method for instrument agency, and the workflow of establishing socket link by the instrument agent is shown in FIG. 4 .

仪器仪表代理(2)需要同时与仪器管理平台通信(1)与非LXI仪器(24)、(25)交互,且与仪器管理平台之间存在同步通道和异步通道。同步通道用于传输对仪器仪表的普通控制命令和测量数据的传输,异步通道用于特殊通道和仪器仪表特殊状态的传输。两个通道之间有共享的数据,为保证链接的可靠性,仪器代理基于HiSLIP协议与仪器管理平台通信时还需要有一套错误处理和锁的机制来应对突发的错误和实现对资源的安全共享,当出现仪器读写错误或读写延时的时候需要及时通知仪器管理平台,否则仪器管理平台会继续发送命令而导致阻塞出现同步错误,此时需要重新同步代理与仪器管理平台。The instrumentation agent (2) needs to communicate with the instrument management platform (1) and interact with non-LXI instruments (24) and (25) at the same time, and there are synchronous channels and asynchronous channels with the instrument management platform. The synchronous channel is used to transmit common control commands and measurement data to the instrumentation, and the asynchronous channel is used to transmit special channels and special states of the instrumentation. There is shared data between the two channels. In order to ensure the reliability of the link, when the instrument agent communicates with the instrument management platform based on the HiSLIP protocol, a set of error handling and locking mechanisms are required to deal with sudden errors and achieve resource security. Sharing, when there is an instrument reading and writing error or reading and writing delay, it is necessary to notify the instrument management platform in time, otherwise the instrument management platform will continue to send commands, resulting in blocking and synchronization errors. At this time, it is necessary to resynchronize the agent and the instrument management platform.

仪器代理在初始化时,会在同一个端口(默认4880)上创建两个TCP连接,一个为同步通道,一个为异步通道。在同步通道上可双向发送命令,仪器代理将数据按照HiSLIP数据报的格式包装后交给下层TCP(17)封装,建立仪器仪表代理的socket链接。程序启动时会申请套接接口并绑定4880接口,然后侦听端口,若有连接请求则查询是否超过最大连接数,如果超过则拒绝请求,没有则建立连接。建立连接后,创建子进程将父进程的链接信息复制一份,然后进行数据的传输。主进程会查询是否有连接的请求,如果有则关闭连接,如果没有则继续侦听端口。When the instrument agent is initialized, it will create two TCP connections on the same port (4880 by default), one is a synchronous channel and the other is an asynchronous channel. Commands can be sent bidirectionally on the synchronous channel, and the instrument agent packs the data according to the HiSLIP datagram format and hands it to the lower layer TCP (17) for encapsulation, and establishes the socket link of the instrument agent. When the program starts, it will apply for a socket interface and bind the 4880 interface, and then listen to the port. If there is a connection request, it will check whether the maximum number of connections is exceeded. If it exceeds, the request will be rejected, and if there is no connection, the connection will be established. After the connection is established, create a child process to copy the link information of the parent process, and then perform data transmission. The main process will query whether there is a connection request, if there is a connection request, it will close the connection, if not, it will continue to listen to the port.

本发明实现仪器代理的方法,连接非LXI仪器,仪器代理MIB库的初始化部分按如下步骤进行。The invention realizes the instrument agent method, connects the non-LXI instrument, and performs the initialization part of the instrument agent MIB library according to the following steps.

仪器代理中连接的非LXI仪器用一个对象标识符来标识,而MIB库就是这些非LXI仪器的集合,在每个仪器代理中都维持了一个MIB库,记录代理的非LXI仪器的工作状态。而仪器管理平台通过读取MIB中被管对象的值来获取系统相关设备的使用情况,同时也可以通过修改MIB中被管对象到的值来管理和控制系统设备。The non-LXI instruments connected in the instrument agent are identified by an object identifier, and the MIB library is a collection of these non-LXI instruments. A MIB library is maintained in each instrument agent to record the working status of the agent's non-LXI instruments. The instrument management platform obtains the usage of system-related equipment by reading the value of the managed object in the MIB, and can also manage and control the system equipment by modifying the value of the managed object in the MIB.

本发明实现仪器仪表代理的方法,仪器代理的仪器管理对象标识符OID按如图5所示。The present invention realizes the method of instrument proxy, and the instrument management object identifier OID of the instrument proxy is as shown in FIG. 5 .

仪器代理上都装有相应仪器的MIB库,接入仪器代理的仪器接口类型、属性用MIB树中的唯一的节点(OID号)来表示。在运行Linux系统的仪器代理下,根据所连仪器仪表的接口类型,建立USB、RS232、I2C等总线接口的MIB库,在运行uC/OS系统的仪器代理下,建立I2C、SPI、CAN、UART等总线接口的MIB库,以及ADC/DAC转换接口、IO控制接口的MIB库。从而为同一仪器代理下,不同接口类型同一功能的仪器仪表、同一接口类型不同功能的仪器仪表、分配不同的仪器仪表OID。The MIB library of the corresponding instrument is installed on the instrument agent, and the interface type and attribute of the instrument connected to the instrument agent are represented by a unique node (OID number) in the MIB tree. Under the agent of the instrument running the Linux system, according to the interface type of the connected instrument, establish the MIB library of the bus interface such as USB, RS232, I2C, and under the agent of the instrument running the uC/OS system, establish I2C, SPI, CAN, UART The MIB library of bus interface, as well as the MIB library of ADC/DAC conversion interface and IO control interface. In this way, different instrumentation OIDs are assigned to instruments with different interface types and the same function, and instruments with the same interface type and different functions under the agent of the same instrument.

非LXI仪器仪表OID按如下方式标识。由于一个仪器代理可以同时连接多台仪器仪表设备,因此用如下OID来区分不同的设备:1.3.6.1.4.1.1199.x.y。其中x表示不同的仪器接口(假设一台仪器可以最多可以连接16台仪器或者仪表),y表示不同类型的仪器仪表。根据IVI规范,仪器的类别如下:1.示波器,2.任意波形发生器、3.万用表、4.直流电源、5.开关、6.功率计、7.计数器、8.升频变换器。Non-LXI instrumentation OIDs are identified as follows. Since an instrument agent can connect to multiple instrumentation devices at the same time, the following OID is used to distinguish different devices: 1.3.6.1.4.1.1199.x.y. Among them, x represents different instrument interfaces (assuming that one instrument can connect up to 16 instruments or meters), and y represents different types of instruments. According to the IVI specification, the categories of instruments are as follows: 1. Oscilloscope, 2. Arbitrary waveform generator, 3. Multimeter, 4. DC power supply, 5. Switch, 6. Power meter, 7. Counter, 8. Up-converter.

本发明实现仪器仪表代理的方法,仪器工作流程如下所述。The present invention realizes the method for instrumentation agency, and the working process of the instrument is as follows.

仪器正常工作情况下,当仪器管理平台需要获取或修改仪器的属性时,只需要向连接该仪器的仪器代理发出SNMPGet或SNMPSet消息,仪器代理解析接收到的SNMPGet或SNMPSet消息后在MIB库中找到OID,然后向仪器发送可以被仪器识别的命令,修改该OID表示的仪器的特定属性。代理对仪器的操作完成后,向控制台发回SNMP消息,控制台收到消息后就完成了整个操作。仪器异常情况下,仪器出现故障时告知仪器代理,仪器代理根据故障类型向控制台发送SNMPTrap消息,控制台接收后做出相应的处理。When the instrument is working normally, when the instrument management platform needs to obtain or modify the properties of the instrument, it only needs to send an SNMPGet or SNMPSet message to the instrument agent connected to the instrument, and the instrument agent parses the received SNMPGet or SNMPSet message and finds it in the MIB library. OID, and then send commands that can be recognized by the instrument to modify the specific properties of the instrument represented by the OID. After the agent completes the operation on the instrument, it sends back an SNMP message to the console, and the console completes the entire operation after receiving the message. When the instrument is abnormal, the instrument agent will be notified when the instrument fails, and the instrument agent will send SNMPTrap messages to the console according to the fault type, and the console will make corresponding processing after receiving it.

本发明实现仪器仪表代理的方法,仪器代理设置仪器参数按如下步骤。The present invention realizes the method for instrument agent, and the instrument agent sets instrument parameters according to the following steps.

1.仪器管理平台通过SNMP协议,向仪器代理发送设置参数的Set请求,运行于仪器代理中的进程接收设置请求。1. The instrument management platform sends a Set request for setting parameters to the instrument agent through the SNMP protocol, and the process running in the instrument agent receives the setting request.

2.仪器代理收到设置请求后,采用专用通信协议如RS232,把设置请求传送到非LXI仪器仪表中。非LXI仪器完成设置操作后,向仪器代理做出回应。2. After receiving the setting request, the instrument agent uses a dedicated communication protocol such as RS232 to transmit the setting request to non-LXI instruments. After the non-LXI instrument completes the setup operation, it responds to the instrument agent.

3.仪器代理向管理站回应完成设置信息。3. The instrument agent responds to the management station with a setting completion message.

本发明实现仪器仪表代理的方法,仪器代理查询仪器信息按如下步骤进行。The present invention realizes the method for instrument agency, and the instrument agent inquires about instrument information according to the following steps.

1.仪器管理平台运行仪器管理软件,通过SNMP协议,向仪器代理发送查询信息的Get请求,运行于仪器代理中的代理进程接收查询请求。1. The instrument management platform runs the instrument management software, sends a Get request for query information to the instrument agent through the SNMP protocol, and the agent process running in the instrument agent receives the query request.

2代理读取仪器代理中保存的非LXI仪器的信息文件,并通过SNMP协议向仪器管理平台做出回应。为了保证仪器代理保存信息的实时性,非LXI仪器设备定期(如1s)通过专用接口(如RS232)向仪器代理发送自身各种参数。2. The agent reads the information files of non-LXI instruments saved in the instrument agent, and responds to the instrument management platform through the SNMP protocol. In order to ensure the real-time performance of the information stored by the instrument agent, non-LXI instrument equipment periodically (such as 1s) sends its various parameters to the instrument agent through a dedicated interface (such as RS232).

本发明实现仪器仪表代理的方法,仪器代理处理仪器告警信息按如下步骤进行。The present invention realizes the method of instrument proxy, and the instrument proxy processes the alarm information of the instrument according to the following steps.

1.仪器代理的监测程序发现非LXI仪器有告警产生时,通过USB、RS232、I2C、SPI、CAN、UART、ADC/DAC转换接口、IO控制接口等专用接口把告警信息主动发送到仪器代理。1. When the monitoring program of the instrument agent finds that a non-LXI instrument has an alarm, it will actively send the alarm information to the instrument agent through special interfaces such as USB, RS232, I2C, SPI, CAN, UART, ADC/DAC conversion interface, and IO control interface.

2.运行于仪器代理上的进程发现有仪器有告警产生时,通过SNMP Trap 报文把告警信息发送至仪器管理平台。2. When the process running on the instrument agent finds that an instrument has an alarm, it sends the alarm information to the instrument management platform through the SNMP Trap message.

3.仪器管理平台收到仪器代理发送的告警信息后,做相应的处理。3. After receiving the alarm information sent by the instrument agent, the instrument management platform will deal with it accordingly.

Claims (9)

1. end instrument is acted on behalf of before Networked Instrument instrument(Abbreviation instrument is acted on behalf of), it is characterised in that:Including arm processor(4)、 RJ45 Ethernet interfaces(5), wireless WiFi Ethernet interfaces(6), usb bus interface(7), RS232 interface(8), I2C buses connect Mouthful(9), spi bus interface(10), CAN interface(11), UART interface(12), ADC/DAC digital-to-analogue analog-to-digital conversion interfaces (13), IO control interfaces(14)Deng;Support Liunx/ μ COS operating systems(16), support ICP/IP protocol(17), HiSLIP association View(18), DHCP protocol(19), LXI agreements(20), SCPI orders(21), snmp protocol(22), MIB libraries extension(23), non-LXI Instrument communication agreement(26), data collection and control processing(27).
2. the implementation method of Networked Instrument instrument front-end proxy agent, it is characterised in that:Including an instrument management platform(1), it is more A instrument agency(2), multiple non-LXI instrumentation devices(24)、(25).
3. realize that this method step is as follows:
(1)Instrument agency as described in claim 1, which is characterized in that pass through DHCP protocol(19)It is obtained from instrument management platform Dynamic IP addressing, while found instrument agency access automatically or closed by instrument management platform.
4.(2)Instrument agency as described in claim 1, which is characterized in that support snmp protocol(22)And MIB libraries extension(8), instrument Device management platform(1)As network endpoint monitoring management.
5.(3)Instrument agency as described in claim 1, which is characterized in that support LXI agreements(20), HiSLIP agreements(18)、 SCPI orders(21), instrument management platform measures, controls and manages as standard LXI instrument and equipments.
6.(4)Instrument agency as described in claim 1, which is characterized in that there is SCPI instructions(21)With non-LXI instruments(24)、 (25)Conversion function is instructed, runs non-LXI instrument communications agreement(26), support instrument management platform(1)To non-LXI instruments(24) Observing and controlling.
7.(5)Instrument agency as described in claim 1, which is characterized in that instrument management platform(1)To common interfaces I2C(9)、 SPI(10)、CAN(11)、UART(12)The sensor of interface connection passes through ADC/DAC(13), I/O interface(14)Carry out mould Analog quantity or switch acquisition/control.
8.(6)Instrument agency as described in claim 1, which is characterized in that when there is non-LXI instrument and meters(24)Access disconnects When, instrument management platform(1)It can find automatically.
9.(7)Instrument agency as described in claim 1, which is characterized in that when finding to there are non-LXI instrument and equipments to access, then open The instrument MIB libraries of dynamic loading network management protocol MIB libraries extension(23);If there is the driving of correlation type instrument and meter in instrument agency (28), then into normal operating conditions;When there is no correlation type driving, to instrument management platform(1)Application obtains driving.
CN201710353554.3A 2017-05-18 2017-05-18 A kind of implementation method of Networked Instrument instrument front-end proxy agent Pending CN108259549A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710353554.3A CN108259549A (en) 2017-05-18 2017-05-18 A kind of implementation method of Networked Instrument instrument front-end proxy agent

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710353554.3A CN108259549A (en) 2017-05-18 2017-05-18 A kind of implementation method of Networked Instrument instrument front-end proxy agent

Publications (1)

Publication Number Publication Date
CN108259549A true CN108259549A (en) 2018-07-06

Family

ID=62721730

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710353554.3A Pending CN108259549A (en) 2017-05-18 2017-05-18 A kind of implementation method of Networked Instrument instrument front-end proxy agent

Country Status (1)

Country Link
CN (1) CN108259549A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113934186A (en) * 2021-10-10 2022-01-14 苏州大学 Multi-pass control instrument control method based on SCPI (System configuration and interface) command

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102088384A (en) * 2010-12-01 2011-06-08 哈尔滨工业大学 Standardized multifunctional LXI (LAN based extensions for instrumentation) equipment
EP2682108A2 (en) * 2012-07-05 2014-01-08 Arven Ilac Sanayi Ve Ticaret A.S. Dry Powder Inhalers Comprising a Carrier Other Than Lactose and a Ternary Component
CN103905429A (en) * 2014-03-03 2014-07-02 福建升腾资讯有限公司 Method for achieving automatic discovery through network device on basis of DHCP extension label
CN105337766A (en) * 2015-10-12 2016-02-17 安徽皖通邮电股份有限公司 Network element automatic discovery method and system based on DHCP

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102088384A (en) * 2010-12-01 2011-06-08 哈尔滨工业大学 Standardized multifunctional LXI (LAN based extensions for instrumentation) equipment
EP2682108A2 (en) * 2012-07-05 2014-01-08 Arven Ilac Sanayi Ve Ticaret A.S. Dry Powder Inhalers Comprising a Carrier Other Than Lactose and a Ternary Component
CN103905429A (en) * 2014-03-03 2014-07-02 福建升腾资讯有限公司 Method for achieving automatic discovery through network device on basis of DHCP extension label
CN105337766A (en) * 2015-10-12 2016-02-17 安徽皖通邮电股份有限公司 Network element automatic discovery method and system based on DHCP

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
J. YIN, Y. LI, Q. WANG, B. JI AND J. WANG: "SNMP-based network topology discovery algorithm and implementation", 《2012 9TH INTERNATIONAL CONFERENCE ON FUZZY SYSTEMS AND KNOWLEDGE DISCOVERY》 *
李小锋,李宥谋,郭猛,张姣: "HiSLIP协议的研究与应用", 《测控技术》 *
郭猛;李宥谋;李小锋: "嵌入式仪器仪表网络代理设计与实现", 《自动化仪表》 *
钱璐,李哲,杨芳: "基于嵌入式LXI代理模块SCPI命令转换设计", 《电子技术应用》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113934186A (en) * 2021-10-10 2022-01-14 苏州大学 Multi-pass control instrument control method based on SCPI (System configuration and interface) command
CN113934186B (en) * 2021-10-10 2023-08-11 苏州大学 Multi-program-controlled instrument control method based on SCPI command

Similar Documents

Publication Publication Date Title
KR100942480B1 (en) Communication devices, systems, and methods for remotely managing local network devices
EP1850563A1 (en) Method for configuring IP addresses in a windfarm network
WO2005114926A1 (en) Server for routing connection to client device
JP2014534692A (en) Providing virtualized visibility through routers
JP2006060515A (en) Wireless communication system
CN104348903A (en) A communication system and device for establishing point-to-point connection
Lee et al. A home cloud-based home network auto-configuration using SDN
CN112542888A (en) Method for realizing plug and play of power distribution and utilization intelligent equipment
US20090022151A1 (en) Packet structure and packet transmission method of network control protocol
WO2022095628A1 (en) Vehicle data transmission method, apparatus and system, and device and storage medium
CN103138978A (en) Network management method and network management system
CN111949456A (en) A serial port protocol automatic test system and method based on configuration update
Evensen et al. SenseWrap: A service oriented middleware with sensor virtualization and self-configuration
CN101212454A (en) Protocol bridging method and device
Dürkop et al. Service-oriented architecture for the autoconfiguration of real-time Ethernet systems
CN106533934B (en) A border gateway for fully interconnected manufacturing networks
CN100433645C (en) Network device management method and network management system
CN108259549A (en) A kind of implementation method of Networked Instrument instrument front-end proxy agent
CN107484227B (en) Wifi networking multi-hot-spot control communication method
Aguilar et al. Interpretation and Emulation for Telegrams of the KNX Standard on MATLAB Simulink
CN106301942B (en) Data processing method for WiFi remote control client of set top box
EP2770672A2 (en) System of wireless communication, and method of management
CN212463256U (en) Wireless terminal equipment of Internet of things and communication module
CN107465716A (en) Structure of network instrument system and method based on LXI buses
Tanaka et al. Implementation of Secure End-to-End Remote Control System for Smart Home Appliances on Android

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20180706

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载