CN102467369B - Measurement resource control system and measurement resource control method - Google Patents
Measurement resource control system and measurement resource control method Download PDFInfo
- Publication number
- CN102467369B CN102467369B CN201010534838.0A CN201010534838A CN102467369B CN 102467369 B CN102467369 B CN 102467369B CN 201010534838 A CN201010534838 A CN 201010534838A CN 102467369 B CN102467369 B CN 102467369B
- Authority
- CN
- China
- Prior art keywords
- measuring instrument
- instrument
- resource
- measuring
- application
- 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.)
- Active
Links
Landscapes
- Testing Or Calibration Of Command Recording Devices (AREA)
- Stored Programmes (AREA)
Abstract
Description
技术领域technical field
本发明涉及一种测量资源控制系统和测量资源控制方法,特别是涉及一种运行于计算机的、用于管理多个测量仪器和多个应用程序的测量资源控制系统及其采用的测量资源控制方法。The present invention relates to a measurement resource control system and a measurement resource control method, in particular to a measurement resource control system running on a computer and used to manage multiple measuring instruments and multiple application programs and the measurement resource control method adopted therefor .
背景技术Background technique
在工业工程和科学教育领域,测量测试仪器都是实验、制造生产、测试等环节中不可或缺的基本工具,例如示波器、万用表、频谱仪、信号源都是常用的通用测量仪器。随着科学技术的不断发展,测量仪器也由模拟测量仪器向数字测量仪器转化。数字化的测量仪器具有很多模拟测量仪器所不具备的优点,例如便于存储、方便进行数据分析和计算,抗干扰性强等等。除此之外,数字化测量仪器还具有一个独特的优点就是,其可以方便的与计算机连接,组成一个测量系统,利用计算机丰富的资源和强大的功能来对测量仪器进行控制以及对测量结果进行更为复杂的处理。In the fields of industrial engineering and scientific education, measuring and testing instruments are indispensable basic tools in experiments, manufacturing, testing, etc., such as oscilloscopes, multimeters, spectrum analyzers, and signal sources are commonly used general-purpose measuring instruments. With the continuous development of science and technology, measuring instruments are also transformed from analog measuring instruments to digital measuring instruments. Digital measuring instruments have many advantages that analog measuring instruments do not have, such as convenient storage, convenient data analysis and calculation, strong anti-interference and so on. In addition, the digital measuring instrument also has a unique advantage that it can be easily connected with a computer to form a measuring system, using the rich resources and powerful functions of the computer to control the measuring instrument and update the measurement results. for complex processing.
由于上述优点,由计算机和测量仪器组成的测量系统被广泛的研究和发展。值得一提的是,由于计算机具备强大的数据处理和显示功能,使得示波器等测量仪器在测量系统中仅仅起到了数据采集的作用,而其本身的数据处理和显示功能成为一种浪费。因此,测量板卡由此而生。测量板卡也被视为是一种测量仪器,与示波器等不同的是,它只具备数据采集的作用,它本身并不进行数据的处理或显示。在使用时,测量板卡一般需要插接到计算机的IO接口上,例如,测量板卡可以通过VXI(VME extensions for Instrumentation)总线、PXI(PCI extensions for Instrumentation)总线、GPIB(General Purpose InterfaceBus)、以及计算机的串口(serial port)或并口(parallel port)来与计算机连接。Due to the above-mentioned advantages, measurement systems composed of computers and measuring instruments have been extensively researched and developed. It is worth mentioning that due to the powerful data processing and display functions of computers, measuring instruments such as oscilloscopes only play the role of data acquisition in the measurement system, and their own data processing and display functions become a waste. Therefore, the measurement board was born. The measurement board is also regarded as a kind of measuring instrument. Unlike an oscilloscope, it only has the function of data acquisition, and it does not process or display data itself. When in use, the measurement board generally needs to be plugged into the IO interface of the computer. For example, the measurement board can pass through the VXI (VME extensions for Instrumentation) bus, PXI (PCI extensions for Instrumentation) bus, GPIB (General Purpose Interface Bus), And the serial port (serial port) or parallel port (parallel port) of the computer to connect with the computer.
根据上述介绍可知,请参照图1,目前的测量系统1包括一个计算机11和至少一个测量仪器12,每一个测量仪器12通过一个接口13与计算机11连接。计算机11可以是个人电脑(PC)、服务器(server)或者连接至服务器的客户端(client)等具有数据运算和处理功能的设备。测量仪器12是具有数据采集功能的设备,可以是测量仪器,例如是示波器、万用表、频谱仪、信号源,也可以是测量板卡,甚至还可以是传感器等。接口13可以是VXI总线、PXI总线、GPIB、串口、并口、或者是LAN口,串口包括USB接口、RS232等。According to the above introduction, please refer to FIG. 1 , the current measuring system 1 includes a computer 11 and at least one measuring instrument 12 , and each measuring instrument 12 is connected to the computer 11 through an interface 13 . The computer 11 may be a personal computer (PC), a server (server), or a client (client) connected to the server, etc., which has data calculation and processing functions. The measuring instrument 12 is a device with a data acquisition function, which may be a measuring instrument such as an oscilloscope, a multimeter, a spectrum analyzer, a signal source, a measuring board, or even a sensor. The interface 13 can be VXI bus, PXI bus, GPIB, serial port, parallel port, or LAN port, and the serial port includes USB interface, RS232 and so on.
由于接口13的多样性,计算机11一般都会安装接口驱动程序111,例如VISA驱动,用于屏蔽不同的接口13所带来的差异。计算机11基于接口驱动程序111,可以通过规范化的SCPI命令集112来对测量仪器12传达各种命令来进行对应的操作。SCPI命令集112包括多条SCPI命令,不同的SCPI命令用于对测量仪器12进行不同的操作,该操作包括对测量仪器12的控制、对测量仪器12的参数进行配置、从测量仪器12读取数据等。Due to the diversity of the interfaces 13 , the computer 11 generally installs an interface driver 111 , such as a VISA driver, for shielding differences caused by different interfaces 13 . Based on the interface driver 111 , the computer 11 can communicate various commands to the measuring instrument 12 through the standardized SCPI command set 112 to perform corresponding operations. The SCPI command set 112 includes a plurality of SCPI commands. Different SCPI commands are used to perform different operations on the measuring instrument 12. The operations include controlling the measuring instrument 12, configuring the parameters of the measuring instrument 12, and reading from the measuring instrument 12. data etc.
SCPI命令繁多,为了方便用户对不同的测量仪器12进行控制、对测量结果进行各种运算,计算机11还包括至少一个应用程序14。应用程序14可以基于接口驱动程序111和SCPI命令集112,使用编程语言工具如VC、VB、LabVIEW等,由开发商、用户自己、或者其他人开发完成,用于控制计算机11对测量仪器12进行各种操作和对测量数据进行处理等。例如,请参照图2,图2示出的便是应用于一种现有技术所公开的频谱仪的应用程序的显示界面1490。显示界面1490具有多个输入窗口1491,用户可以方便的通过输入窗口1491来输入对测量仪器12的各种操作,而代替直接向测量仪器12发送SCPI命令;显示界面1490还具有一个波形显示窗口1492,用于以图线的形式将计算机11从测量仪器12获取的测量数据显示出来。There are many SCPI commands. In order to facilitate users to control different measuring instruments 12 and perform various calculations on measurement results, the computer 11 also includes at least one application program 14 . The application program 14 can be based on the interface driver program 111 and the SCPI command set 112, using programming language tools such as VC, VB, LabVIEW, etc., developed by developers, users themselves, or others, and used to control the computer 11 to measure the measuring instrument 12. Various operations and processing of measurement data, etc. For example, please refer to FIG. 2 . FIG. 2 shows a display interface 1490 applied to an application program of a spectrum analyzer disclosed in the prior art. The display interface 1490 has a plurality of input windows 1491, and the user can conveniently input various operations on the measuring instrument 12 through the input windows 1491, instead of directly sending SCPI commands to the measuring instrument 12; the display interface 1490 also has a waveform display window 1492 , used to display the measurement data acquired by the computer 11 from the measuring instrument 12 in the form of graphs.
由于测量仪器12的多样性,每个测量仪器12的规格、参数或功能等都不尽相同。对于不同的测量仪器12一般需要开发不同的应用程序14。请参照图3,例如,一台型号为DP1308A的电源121对应着应用程序141;一台型号为DSA1030A的频谱仪122对应着应用程序142。除此之外,即便同一种类的测量仪器12由于其型号、版本不同,导致其规格、参数或功能等可能不同,因此有时也需要开发不同的应用程序14。Due to the variety of measuring instruments 12 , the specifications, parameters or functions of each measuring instrument 12 are different. Different application programs 14 generally need to be developed for different measuring instruments 12 . Please refer to FIG. 3 , for example, a power supply 121 whose model is DP1308A corresponds to an application program 141 ; a spectrum analyzer 122 whose model is DSA1030A corresponds to an application program 142 . In addition, even the same type of measuring instrument 12 may have different specifications, parameters, or functions due to different models and versions, so sometimes it is necessary to develop different application programs 14 .
另外,对于一些特殊的应用场合,需要多个相同或者不同的测量仪器12协同工作来实现某项测量任务,因此,多个测量仪器123可以对应着一个应用程序143,该应用程序143运行时需要该多个测量仪器123同时工作才能完成测量任务。In addition, for some special applications, multiple same or different measuring instruments 12 need to work together to achieve a certain measuring task. Therefore, multiple measuring instruments 123 can correspond to an application program 143, and the application program 143 requires Only when the multiple measuring instruments 123 work simultaneously can the measuring task be completed.
再另,对于一个测量仪器124也可以开发多个应用程序144用于分别实现不同的功能;对于某些测量仪器125,例如同一类型但型号不同的测量仪器,也可以具有一个应用程序145可以兼容多个测量仪器125的情况,此时该应用程序145可以单独与每一个测量仪器125配合工作。例如,应用程序145同时兼容型号为DSA1030A的频谱仪125和DSA1000A的频谱仪125′。In addition, multiple application programs 144 can also be developed for one measuring instrument 124 to be used to realize different functions respectively; In the case of multiple measuring instruments 125 , the application program 145 can work independently with each measuring instrument 125 . For example, the application program 145 is compatible with both the spectrum analyzer 125 of model DSA1030A and the spectrum analyzer 125' of DSA1000A.
请参照图4,计算机11包括CPU114、内存115、硬盘116和总线117。CPU114、内存115、硬盘116分别与总线117相连接,并通过总线117完成通信。应用程序14是一种可执行程序,通常在没有被运行时是存储在硬盘116中。被调用而运行时,用户通过计算机11的操作系统输入打开该应用程序14的指令后,该应用程序14被载入到内存115当中,便可以由CPU114执行。Referring to FIG. 4 , the computer 11 includes a CPU 114 , a memory 115 , a hard disk 116 and a bus 117 . The CPU 114 , the memory 115 , and the hard disk 116 are respectively connected to the bus 117 and communicate through the bus 117 . Application 14 is an executable program that is typically stored on hard disk 116 when not being executed. When called to run, after the user inputs an instruction to open the application program 14 through the operating system of the computer 11 , the application program 14 is loaded into the memory 115 and can be executed by the CPU 114 .
请一起参照图1和图5,应用程序14执行时,计算机11在应用程序14的控制下依序执行以下步骤:Please refer to FIG. 1 and FIG. 5 together. When the application program 14 is executed, the computer 11 executes the following steps in sequence under the control of the application program 14:
步骤S1、仪器查找步骤;Step S1, instrument search step;
虽然根据前述,测量仪器12已经通过一个接口13与计算机11连接,这种连接只是将测量仪器12与接口13插接起来,还并没有对测量仪器12进行配置,例如接口配置,来获得测量仪器12的地址,此时计算机11无法与测量仪器12建立通讯。因此,仪器查找步骤主要完成对测量仪器12的配置,来获得一个对应测量仪器12的原始地址。应当指出的是,即便获得了该原始地址,但是这种连接仅仅是物理级别上的连接,也就是说计算机11可以利用该原始地址与该测量仪器12通信了。而根据上文所述,由于应用程序14与测量仪器12存在着多种多样的对应关系,完成仪器查找步骤还并不意味着应用程序14可以控制着计算机11对该测量仪器12进行操作和控制了,还需要进一步识别所连接的测量仪器12的基本信息,来判断所连接的测量仪器12是否与应用程序14匹配,抑或所连接的多台测量仪器12中哪一台测量仪器12是与应用程序14相匹配的。Although according to the foregoing, the measuring instrument 12 has been connected to the computer 11 through an interface 13, this connection only connects the measuring instrument 12 to the interface 13, and does not configure the measuring instrument 12, such as interface configuration, to obtain the measuring instrument. 12, the computer 11 cannot establish communication with the measuring instrument 12 at this time. Therefore, the instrument search step mainly completes the configuration of the measuring instrument 12 to obtain an original address corresponding to the measuring instrument 12 . It should be noted that even if the original address is obtained, the connection is only on a physical level, that is to say, the computer 11 can use the original address to communicate with the measuring instrument 12 . According to the above, since there are various correspondences between the application program 14 and the measuring instrument 12, completing the instrument search step does not mean that the application program 14 can control the computer 11 to operate and control the measuring instrument 12 Therefore, it is necessary to further identify the basic information of the connected measuring instrument 12 to determine whether the connected measuring instrument 12 matches the application program 14, or which measuring instrument 12 among the connected multiple measuring instruments 12 is compatible with the application program. Program 14 matches.
步骤S2、仪器连接步骤;Step S2, instrument connection step;
步骤S2主要完成测量仪器12与计算机11的逻辑连接,在应用层面上建立测量仪器12与计算机11的通讯渠道。即,需要完成仪器型号的识别,以保证该仪器是应用程序14所对应的测量仪器12,亦即判断后续的仪器应用步骤是否可以控制该测量仪器12。Step S2 mainly completes the logical connection between the measuring instrument 12 and the computer 11, and establishes a communication channel between the measuring instrument 12 and the computer 11 at the application level. That is, the identification of the instrument model needs to be completed to ensure that the instrument is the measuring instrument 12 corresponding to the application program 14 , that is, to determine whether the subsequent instrument application steps can control the measuring instrument 12 .
步骤S2的具体所作的工作是:接收该原始地址,利用该原始地址向测量仪器12发送命令,查询仪器基本信息,对测量仪器12返回的该仪器基本信息进行解析,根据该仪器基本信息解析出厂商名称、仪器型号、仪器序列号、仪器版本号等,根据该解析出厂商名称、仪器型号、仪器序列号、仪器版本号等判断该测量仪器12是否是应用程序14对应的测量仪器12。The specific work of step S2 is: receive the original address, use the original address to send a command to the measuring instrument 12, query the basic information of the instrument, analyze the basic information of the instrument returned by the measuring instrument 12, and analyze the basic information of the instrument according to the basic information of the instrument. Manufacturer name, instrument model, instrument serial number, instrument version number, etc., determine whether the measuring instrument 12 is the measuring instrument 12 corresponding to the application program 14 according to the analyzed manufacturer name, instrument model, instrument serial number, instrument version number, etc.
步骤S3、仪器应用步骤;Step S3, instrument application steps;
步骤S3的工作包括:一、利用该原始地址控制计算机11与测量仪器12进行通信,通信内容包括接收测量仪器12的测量数据、向测量仪器12发送SCPI命令来对测量仪器12进行控制等;二、提供一个显示界面,请参照图2,例如是该频谱仪的应用程序的显示界面,通过波形显示窗口1492将接收到的测量数据以曲线等形式显示出来、通过输入窗口1491等方式接收用户输入的指令并将其转换为对应的SCPI命令发送至测量仪器12。The work of step S3 includes: 1. Utilize the original address to control the computer 11 to communicate with the measuring instrument 12. The communication content includes receiving the measurement data of the measuring instrument 12, sending SCPI commands to the measuring instrument 12 to control the measuring instrument 12, etc.; 1. Provide a display interface, please refer to FIG. 2, for example, it is the display interface of the application program of the spectrum analyzer, the received measurement data is displayed in the form of curves through the waveform display window 1492, and user input is received through the input window 1491 and other modes command and convert it into a corresponding SCPI command and send it to the measuring instrument 12.
请参照图6,应用程序14包括一个用于控制计算机11实现步骤S1的仪器查找模块147、一个用于控制计算机11实现步骤S2的仪器连接模块148和一个用于控制计算机11实现步骤S3的仪器应用模块149。Please refer to Fig. 6, application program 14 comprises an instrument search module 147 for controlling computer 11 to realize step S1, an instrument connection module 148 for controlling computer 11 to realize step S2 and an instrument for controlling computer 11 to realize step S3 Application module 149.
国家仪器(NI)公司推出的一种可用于验证计算机与测量仪器之间通讯的软件(Measurement & Automation Explorer,MAX)也可以通过步骤S1获得测量仪器的原始地址,但是软件只是产生该原始地址,并没有后续的步骤S2和步骤S3。A software (Measurement & Automation Explorer, MAX) released by National Instruments (NI) that can be used to verify the communication between the computer and the measuring instrument can also obtain the original address of the measuring instrument through step S1, but the software only generates the original address. There are no subsequent steps S2 and S3.
安捷伦(Agilent)公司也推出了一种可用于验证计算机与测量仪器之间通讯的软件(Agilent Connection Expert),该软件也可以通过步骤S1和S2产生原始地址和获得仪器基本信息,但是该软件也只是产生该原始地址和仪器基本信息,也并没有后续步骤S3。Agilent (Agilent) has also released a software (Agilent Connection Expert) that can be used to verify the communication between the computer and the measuring instrument. This software can also generate the original address and obtain the basic information of the instrument through steps S1 and S2. Only the original address and the basic information of the instrument are generated, and there is no subsequent step S3.
根据前面的介绍可知,随着测量仪器12种类和型号的不断增加,以及各种应用需求的不断增加,应用程序14的不断的被大量的开发,数量显著增加。这导致如下问题:测量仪器12的型号稍有改变就可能导致需要重新开发应用程序14,而在开发应用程序14时仍然需要重新开发仪器查找模块147、仪器连接模块148和仪器应用模块149,使得应用程序14的开发和维护过程复杂,成本较高。According to the previous introduction, it can be seen that with the continuous increase of the types and models of the measuring instruments 12 and the continuous increase of various application requirements, the application programs 14 are constantly being developed in large quantities, and the number increases significantly. This causes the following problems: a slight change in the model of the measuring instrument 12 may cause the application program 14 to be redeveloped, and the instrument search module 147, the instrument connection module 148 and the instrument application module 149 still need to be redeveloped when the application program 14 is developed, so that The development and maintenance process of the application program 14 is complex and costly.
发明内容Contents of the invention
为了解决现有技术应用程序开发和维护过程复杂、成本较高的问题,本发明提供一种可以使应用程序开发和维护过程简化、成本降低的测量资源控制系统。In order to solve the problem of complex application program development and maintenance process and high cost in the prior art, the present invention provides a measurement resource control system that can simplify application program development and maintenance process and reduce cost.
同时,本发明还提供所述测量资源控制系统所采用的测量资源控制方法。Meanwhile, the present invention also provides a measurement resource control method adopted by the measurement resource control system.
一种测量资源控制系统,用于控制多个测量仪器和多个应用资源,所述控制系统包括:一个资源调用部件,用于依据选择出的一组配对的测量仪器和应用资源,使所述应用资源调用所述测量仪器,并使所述测量仪器处于禁止再次调用状态。A measurement resource control system, used to control a plurality of measuring instruments and a plurality of application resources, the control system includes: a resource invoking component, used to make the described The application resource calls the measuring instrument, and puts the measuring instrument in a state of prohibiting calling again.
在本发明的一个实施方式中,所述禁止再次调用状态是将所述测量仪器突出显示。In one embodiment of the present invention, the state of prohibiting recalling again is highlighting the measuring instrument.
在本发明的一个实施方式中,所述资源匹配部件包括:一个测量资源列表产生部件,用于根据所述测量仪器,产生一个包括多个测量仪器标识的测量仪器列表,其中,所述测量仪器标识与所述测量仪器对应,所述测量仪器列表中的所述测量仪器标识以第一显示属性显示;一个资源调用建立部件,用于将从所述测量仪器中的选择一个被选测量仪器与从所述应用资源中选择的一个被选应用资源建立调用;一个显示控制部件,用于根据所述调用的建立将所述测量仪器列表中所述被选测量仪器所对应的测量仪器标识以第二显示属性显示。In one embodiment of the present invention, the resource matching component includes: a measurement resource list generation component, configured to generate a measurement instrument list including a plurality of measurement instrument identifiers according to the measurement instrument, wherein the measurement instrument The identifier corresponds to the measuring instrument, and the measuring instrument identifier in the measuring instrument list is displayed with a first display attribute; a resource call establishment component is used to select a selected measuring instrument from the measuring instruments and A selected application resource selected from the application resources establishes a call; a display control component is used to identify the measuring instrument corresponding to the selected measuring instrument in the measuring instrument list as the first one according to the establishment of the calling. Two display properties are displayed.
一种测量资源控制系统,用于控制多个测量仪器和多个应用资源,所述控制系统包括:一个资源匹配部件,用于依据选择出的一组配对的测量仪器和应用资源,使所述应用资源调用所述测量仪器,并使所述测量仪器处于禁止再次调用状态,依据所述调用的解除,使所述测量仪器处于允许调用状态。A measurement resource control system, used to control a plurality of measuring instruments and a plurality of application resources, the control system includes: a resource matching component, configured to make the The application resource calls the measuring instrument, and puts the measuring instrument in a state of prohibiting re-calling, and makes the measuring instrument in a state of allowing calling according to the release of the calling.
在本发明的一个实施方式中,所述资源匹配部件包括:一个测量资源列表产生部件,用于根据所述测量仪器,产生一个包括多个测量仪器标识的测量仪器列表,其中,所述测量仪器标识与所述测量仪器对应,所述测量仪器列表中的所述测量仪器标识以第一显示属性显示;一个资源调用建立部件,用于将从所述测量仪器中的选择一个被选测量仪器与从所述应用资源中选择的一个被选应用资源建立调用;一个资源调用解除部件,用于将所述被选测量仪器和所述被选应用资源之间的调用解除;一个显示控制部件,用于根据所述调用的建立将所述测量仪器列表中所述被选测量仪器所对应的测量仪器标识以第二显示属性显示,而根据所述调用的解除将所述测量仪器列表中所述被选测量仪器所对应的测量仪器标识以第一显示属性显示。In one embodiment of the present invention, the resource matching component includes: a measurement resource list generation component, configured to generate a measurement instrument list including a plurality of measurement instrument identifiers according to the measurement instrument, wherein the measurement instrument The identifier corresponds to the measuring instrument, and the measuring instrument identifier in the measuring instrument list is displayed with a first display attribute; a resource call establishment component is used to select a selected measuring instrument from the measuring instruments and A selected application resource selected from the application resources establishes a call; a resource call release part is used to release the call between the selected measuring instrument and the selected application resource; a display control part is used for Displaying the identification of the measuring instrument corresponding to the selected measuring instrument in the measuring instrument list in the second display attribute according to the establishment of the calling, and displaying the selected measuring instrument in the measuring instrument list according to the canceling of the calling The identification of the measuring instrument corresponding to the selected measuring instrument is displayed in the first display attribute.
一种测量资源控制方法,用于控制多个测量仪器和多个应用资源,所述控制方法包括:一个资源调用步骤,依据选择出的一组配对的测量仪器和应用资源,使所述应用资源调用所述测量仪器,并使所述测量仪器处于禁止再次调用状态。A measurement resource control method, used to control multiple measuring instruments and multiple application resources, the control method includes: a resource calling step, according to a selected group of paired measuring instruments and application resources, make the application resources calling the measuring instrument, and putting the measuring instrument in a state of prohibiting calling again.
在本发明的一个实施方式中,所述禁止再次调用状态是将所述测量仪器突出显示。In one embodiment of the present invention, the state of prohibiting recalling again is highlighting the measuring instrument.
在本发明的一个实施方式中,所述资源匹配步骤包括:一个测量资源列表产生步骤,根据所述测量仪器,产生一个包括多个测量仪器标识的测量仪器列表,其中,所述测量仪器标识与所述测量仪器对应,所述测量仪器列表中的所述测量仪器标识以第一显示属性显示;一个资源调用建立步骤,将从所述测量仪器中的选择一个被选测量仪器与从所述应用资源中选择的一个被选应用资源建立调用;一个显示控制步骤,根据所述调用的建立将所述测量仪器列表中所述被选测量仪器所对应的测量仪器标识以第二显示属性显示。In one embodiment of the present invention, the resource matching step includes: a measurement resource list generation step, generating a measurement instrument list including a plurality of measurement instrument identifications according to the measurement instruments, wherein the measurement instrument identifications are the same as Corresponding to the measuring instrument, the measuring instrument identifier in the measuring instrument list is displayed with a first display attribute; a resource call establishment step is to select a selected measuring instrument from among the measuring instruments and from the application A selected application resource selected among the resources is called to establish; a display control step, according to the establishment of the call, to display the identification of the measuring instrument corresponding to the selected measuring instrument in the list of measuring instruments with a second display attribute.
一种测量资源控制方法,用于控制多个测量仪器和多个应用资源,所述控制方法包括:一个资源匹配步骤,依据选择出的一组配对的测量仪器和应用资源,使所述应用资源调用所述测量仪器,并使所述测量仪器处于禁止再次调用状态,依据所述调用的解除,使所述测量仪器处于允许调用状态。A measurement resource control method, used to control multiple measuring instruments and multiple application resources, the control method includes: a resource matching step, according to a selected group of paired measuring instruments and application resources, make the application resources Calling the measuring instrument, and making the measuring instrument in a state of prohibiting re-calling, and making the measuring instrument in a state of allowing calling according to the canceling of the calling.
在本发明的一个实施方式中,所述资源匹配步骤包括:一个测量资源列表产生步骤,根据所述测量仪器,产生一个包括多个测量仪器标识的测量仪器列表,其中,所述测量仪器标识与所述测量仪器对应,所述测量仪器列表中的所述测量仪器标识以第一显示属性显示;一个资源调用建立步骤,将从所述测量仪器中的选择一个被选测量仪器与从所述应用资源中选择的一个被选应用资源建立调用;一个资源调用解除步骤,将所述被选测量仪器和所述被选应用资源之间的调用解除;一个显示控制步骤,根据所述调用的建立将所述测量仪器列表中所述被选测量仪器所对应的测量仪器标识以第二显示属性显示,而根据所述调用的解除将所述测量仪器列表中所述被选测量仪器所对应的测量仪器标识以第一显示属性显示。本发明的测量资源控制系统和测量资源控制方法至少具有如下有益效果:In one embodiment of the present invention, the resource matching step includes: a measurement resource list generation step, generating a measurement instrument list including a plurality of measurement instrument identifications according to the measurement instruments, wherein the measurement instrument identifications are the same as Corresponding to the measuring instrument, the measuring instrument identifier in the measuring instrument list is displayed with a first display attribute; a resource call establishment step is to select a selected measuring instrument from among the measuring instruments and from the application A selected application resource selected among the resources is set up and called; a resource call release step is used to release the call between the selected measuring instrument and the selected application resource; a display control step is based on the establishment of the call. The measuring instrument identification corresponding to the selected measuring instrument in the measuring instrument list is displayed with the second display attribute, and the measuring instrument corresponding to the selected measuring instrument in the measuring instrument list is displayed according to the cancellation of the call The logo is displayed with the first display attribute. The measurement resource control system and measurement resource control method of the present invention have at least the following beneficial effects:
由于一些测量仪器与应用程序建立调用后,不能再被其他应用程序所调用,否则将会出现通讯错误等问题,因此,本发明测量资源控制系统和测量资源控制方法使已经与被选应用程序建立调用的被选测量仪器处于一个禁止再次调用状态。这样不仅可以防止用户利用其它应用程序再次调用该被选测量仪器,造成通讯错误等问题,而且在在线仪器列表中有多少个测量仪器处于被调用状态可以一目了然,使用起来非常方便。Since some measuring instruments and application programs are established and called, they cannot be called by other application programs, otherwise problems such as communication errors will occur. The recalled selected measuring instrument is in a state that prohibits recalling it again. This can not only prevent the user from using other applications to call the selected measuring instrument again, causing communication errors and other problems, but also can see at a glance how many measuring instruments are being called in the online instrument list, which is very convenient to use.
附图说明Description of drawings
图1是一种传统的测量系统的模块结构示意图。Fig. 1 is a schematic diagram of the module structure of a traditional measurement system.
图2是一种现有的应用程序的显示界面示意图。FIG. 2 is a schematic diagram of a display interface of an existing application program.
图3是测量仪器与应用程序匹配关系的示意图。Fig. 3 is a schematic diagram of the matching relationship between the measuring instrument and the application program.
图4是一种传统的计算机的模块结构示意图。FIG. 4 is a schematic diagram of a conventional computer module structure.
图5是一种传统的应用程序运行是所执行的步骤流程图。Fig. 5 is a flow chart of the steps executed when running a traditional application program.
图6是图5所示应用程序的软件模块结构示意图。FIG. 6 is a schematic diagram of the software module structure of the application shown in FIG. 5 .
图7是本发明测量资源控制系统第一实施方式应用于一个测量系统的模块结构示意图。Fig. 7 is a schematic diagram of the module structure of the first embodiment of the measurement resource control system of the present invention applied to a measurement system.
图8是图7中测量系统所采用的计算机的结构示意图。FIG. 8 is a schematic structural diagram of a computer used in the measuring system in FIG. 7 .
图9是测量仪器与应用程序匹配关系的示意图。FIG. 9 is a schematic diagram of a matching relationship between a measuring instrument and an application program.
图10是本发明测量资源控制系统第一实施方式所管理的应用程序的软件模块结构示意图。Fig. 10 is a schematic diagram of the software module structure of the application program managed by the measurement resource control system according to the first embodiment of the present invention.
图11是本发明测量资源控制系统第一实施方式工作时所执行的步骤流程图。Fig. 11 is a flow chart of steps executed when the first embodiment of the measurement resource control system of the present invention works.
图12是本发明测量资源控制系统第一实施方式的显示界面图。Fig. 12 is a display interface diagram of the first embodiment of the measurement resource control system of the present invention.
图13是本发明测量资源控制系统第一实施方式的GPIB接口参数设置的界面图。Fig. 13 is an interface diagram of GPIB interface parameter setting in the first embodiment of the measurement resource control system of the present invention.
图14是本发明测量资源控制系统第一实施方式的RS232接口参数设置的界面图.Fig. 14 is an interface diagram of RS232 interface parameter setting of the first embodiment of the measurement resource control system of the present invention.
图15是本发明测量资源控制系统第一实施方式的在线仪器列表的显示界面图。Fig. 15 is a display interface diagram of the online instrument list of the first embodiment of the measurement resource control system of the present invention.
图16是本发明测量资源控制系统第一实施方式中动态应用列表产生步骤的具体步骤流程图。Fig. 16 is a specific flow chart of the steps of generating a dynamic application list in the first embodiment of the measurement resource control system of the present invention.
图17是本发明测量资源控制系统第一实施方式的动态应用列表的显示界面图。Fig. 17 is a diagram of a display interface of a dynamic application list in the first embodiment of the measurement resource control system of the present invention.
图18是本发明测量资源控制系统第一实施方式的应用程序存放文件夹的示意图。Fig. 18 is a schematic diagram of an application storage folder in the first embodiment of the measurement resource control system of the present invention.
图19是本发明测量资源控制系统第一实施方式的启动应用程序以后的界面示意图。Fig. 19 is a schematic diagram of the interface after starting the application program in the first embodiment of the measurement resource control system of the present invention.
图20是本发明测量资源控制系统第一实施方式的LabVIEW树形列表控件的示意图。Fig. 20 is a schematic diagram of the LabVIEW tree list control of the first embodiment of the measurement resource control system of the present invention.
图21是发明测量资源控制系统第一实施方式的在线仪器列表将被应用程序调用的测量仪器的仪器标识的显示属性改变后的显示界面图。Fig. 21 is a diagram of the display interface after changing the display attribute of the instrument identifier of the measuring instrument called by the application program in the online instrument list of the first embodiment of the measurement resource control system of the invention.
图22是图21中调用解除后在线仪器列表将仪器标识恢复后的显示界面图。Fig. 22 is a display interface diagram of the online instrument list in Fig. 21 after the instrument identification is restored after the call is released.
图23是本发明测量资源控制系统第一实施方式实现图11流程步骤的模块示意图。FIG. 23 is a schematic diagram of modules implementing the steps of the flow shown in FIG. 11 in the first embodiment of the measurement resource control system of the present invention.
图24是图20中动态应用列表产生不见M123的模块示意图。FIG. 24 is a schematic diagram of a module of the dynamic application list generation M123 in FIG. 20 .
图25是本发明测量资源控制系统第二实施方式工作时所执行的步骤流程图。Fig. 25 is a flow chart of steps executed when the second embodiment of the measurement resource control system of the present invention works.
图26是本发明测量资源控制系统第二实施方式的应用列表的显示界面图。Fig. 26 is a display interface diagram of the application list of the second embodiment of the measurement resource control system of the present invention.
图27是本发明测量资源控制系统第二实施方式的应用列表中用户选择一个应用程序的显示界面图。Fig. 27 is a display interface diagram of a user selecting an application program in the application list of the second embodiment of the measurement resource control system of the present invention.
图28是本发明测量资源控制系统第二实施方式的动态在线仪器列表的显示界面图。Fig. 28 is a display interface diagram of the dynamic online instrument list of the second embodiment of the measurement resource control system of the present invention.
图29是本发明测量资源控制系统第二实施方式的动态在线仪器列表中用户选择一个测量仪器的显示界面图。Fig. 29 is a display interface diagram of a user selecting a measuring instrument in the dynamic online instrument list of the second embodiment of the measuring resource control system of the present invention.
图30是本发明测量资源控制系统第二实施方式实现图25流程步骤的模块示意图。Fig. 30 is a schematic diagram of modules implementing the steps of the flow in Fig. 25 according to the second embodiment of the measurement resource control system of the present invention.
图31是本发明测量资源控制系统第三实施方式工作时所执行的步骤流程图。Fig. 31 is a flow chart of steps executed when the third embodiment of the measurement resource control system of the present invention works.
图32是本发明测量资源控制系统第三实施方式的应用列表和在线仪器列表的显示界面图。Fig. 32 is a display interface diagram of the application list and the online instrument list of the third embodiment of the measurement resource control system of the present invention.
图33是本发明测量资源控制系统第三实施方式的用户在图32中在线仪器列表中选择一个测量仪器的显示界面图。FIG. 33 is a display interface diagram of a user selecting a measuring instrument from the online instrument list in FIG. 32 according to the third embodiment of the measurement resource control system of the present invention.
图34是本发明测量资源控制系统第三实施方式的用户在图32中应用列表中选择一个应用程序的显示界面图。FIG. 34 is a display interface diagram of a user selecting an application program from the application list in FIG. 32 according to the third embodiment of the measurement resource control system of the present invention.
图35是本发明测量资源控制系统第三实施方式的动态应用列表的显示界面图。Fig. 35 is a diagram of a display interface of a dynamic application list in the third embodiment of the measurement resource control system of the present invention.
图36是本发明测量资源控制系统第三实施方式的动态在线仪器列表的显示界面图。Fig. 36 is a display interface diagram of the dynamic online instrument list of the third embodiment of the measurement resource control system of the present invention.
图37是用户在图32中的动态应用列表中选择一个应用程序的显示界面图。FIG. 37 is a display interface diagram of the user selecting an application program in the dynamic application list in FIG. 32 .
图38是用户在图33中的动态在线仪器列表中选择一个测量仪器的显示界面图。Fig. 38 is a display interface diagram for the user to select a measuring instrument from the dynamic online instrument list in Fig. 33 .
图39是本发明测量资源控制系统第三实施方式实现图31流程步骤的模块示意图。FIG. 39 is a schematic diagram of modules implementing the steps of the flow in FIG. 31 according to the third embodiment of the measurement resource control system of the present invention.
具体实施方式detailed description
下面介绍本发明测量资源控制系统的第一实施方式。The first implementation manner of the measurement resource control system of the present invention is introduced below.
请参考图7,测量资源控制系统4应用于一个测量系统2中。测量系统2包括多个测量资源20和用于管理和控制该多个测量资源20的测量资源控制系统4。该多个测量资源20包括多个测量仪器22和多个应用资源,在本实施方式中,该应用资源是应用程序24。Please refer to FIG. 7 , the measurement resource control system 4 is applied in a measurement system 2 . The measurement system 2 includes a plurality of measurement resources 20 and a measurement resource control system 4 for managing and controlling the plurality of measurement resources 20 . The plurality of measurement resources 20 includes a plurality of measurement instruments 22 and a plurality of application resources. In this embodiment, the application resources are application programs 24 .
测量仪器22是具有数据采集功能的设备,可以是测量仪器,例如是示波器、万用表、频谱仪、信号源,也可以是测量板卡,甚至还可以是传感器等。测量资源控制系统4由计算机和运行在计算机上的测量资源控制系统软件来实现。计算机可以是个人电脑、平板电脑、服务器或者连接至服务器的客户端等具有数据运算和处理功能的设备。测量仪器22通过接口与测量资源控制系统4连接,接口可以是VXI总线、PXI总线、GPIB、串口、并口、或者是LAN口。The measuring instrument 22 is a device with a data acquisition function, and may be a measuring instrument, such as an oscilloscope, a multimeter, a spectrum analyzer, a signal source, a measuring board, or even a sensor. The measurement resource control system 4 is realized by a computer and measurement resource control system software running on the computer. The computer may be a personal computer, a tablet computer, a server or a client connected to the server, and other devices with data calculation and processing functions. The measuring instrument 22 is connected to the measurement resource control system 4 through an interface, and the interface may be a VXI bus, a PXI bus, GPIB, a serial port, a parallel port, or a LAN port.
请参照图8,在本实施方式当中,测量资源控制系统4所采用的计算机41包括CPU414、内存415、存储器416、总线417、显示屏418和外设419。CPU414、内存415、存储器416分别与总线417相连接,显示屏418通过显卡419与总线417连接,外设419通过各种接口与总线417相连,CPU414、内存415、存储器416、显示屏418和外设419通过总线417完成通信。存储器416由硬盘构成,当然还可以是闪存、光盘、磁盘等。外设419包括鼠标、键盘等。Please refer to FIG. 8 , in this embodiment, the computer 41 used by the measurement resource control system 4 includes a CPU 414 , a memory 415 , a storage 416 , a bus 417 , a display screen 418 and peripherals 419 . CPU414, memory 415, memory 416 are connected with bus 417 respectively, display screen 418 is connected with bus 417 through graphics card 419, peripheral hardware 419 is connected with bus 417 through various interfaces, CPU414, memory 415, memory 416, display screen 418 and external Set 419 to communicate via bus 417 . The memory 416 is composed of a hard disk, and of course it can also be a flash memory, an optical disk, a magnetic disk, and the like. Peripherals 419 include mouse, keyboard and so on.
由于测量仪器22的多样性,每个测量仪器22的规格、参数或功能等都不尽相同。对于不同的测量仪器22一般需要开发不同的应用程序24,即每个测量仪器22有其对应的应用程序24。请参照图9,例如,一台型号为DP1308A的电源221对应着应用程序241;一台型号为DSA1030A的频谱仪222对应着应用程序242。除此之外,即便同一种类的测量仪器22由于其型号、版本不同,导致其规格、参数或功能等可能不同,因此有时也需要开发不同的应用程序24。Due to the variety of measuring instruments 22 , the specifications, parameters or functions of each measuring instrument 22 are different. Generally, different application programs 24 need to be developed for different measuring instruments 22 , that is, each measuring instrument 22 has its corresponding application program 24 . Please refer to FIG. 9 , for example, a power supply 221 whose model is DP1308A corresponds to an application program 241 ; a spectrum analyzer 222 whose model is DSA1030A corresponds to an application program 242 . In addition, even the same type of measuring instrument 22 may have different specifications, parameters, or functions due to different models and versions, so sometimes it is necessary to develop different application programs 24 .
另外,对于一些特殊的应用场合,需要多个相同或者不同的测量仪器22协同工作来实现某项测量任务,因此,多个测量仪器223可以对应着一个应用程序243,该应用程序243运行时需要该多个测量仪器223同时工作才能完成测量任务。In addition, for some special applications, multiple same or different measuring instruments 22 need to work together to achieve a certain measuring task. Therefore, multiple measuring instruments 223 can correspond to an application program 243, and the application program 243 requires Only when the multiple measuring instruments 223 work simultaneously can the measuring task be completed.
再另,对于一个测量仪器224也可以开发多个应用程序244用于分别实现不同的功能;对于某些测量仪器225,例如同一类型但型号不同的测量仪器,也可以具有一个应用程序245可以兼容多个测量仪器225的情况,此时该应用程序245可以单独与每一个测量仪器225配合工作。例如,应用程序245同时兼容型号为DSA1030A的频谱仪225和DSA1000A的频谱仪225′。In addition, multiple application programs 244 can also be developed for one measuring instrument 224 to realize different functions respectively; for some measuring instruments 225, such as the same type but different types of measuring instruments, there can also be one application program 245 that can be compatible In the case of multiple measuring instruments 225, the application program 245 can work with each measuring instrument 225 independently. For example, the application program 245 is compatible with both the spectrum analyzer 225 of model DSA1030A and the spectrum analyzer 225' of DSA1000A.
应用程序24是一种可执行程序,在没有被运行时是存储在计算机41的存储器416中。请参照图10,应用程序24包括仪器应用模块249。由于应用程序24不再包括仪器查找模块和仪器连接模块,因此仅通过执行应用程序24并不能控制计算机41获得测量仪器22的原始地址,而需要等待测量资源控制系统4将原始地址传递给应用程序24,即不能仅仅通过运行应用程序24来控制计算机41与测量仪器22建立通信。因此用户直接运行应用程序24并不能实现对测量仪器22的控制。The application program 24 is an executable program that is stored in the memory 416 of the computer 41 when not being executed. Referring to FIG. 10 , the application program 24 includes an instrument application module 249 . Since the application program 24 no longer includes an instrument search module and an instrument connection module, the computer 41 cannot be controlled to obtain the original address of the measuring instrument 22 only by executing the application program 24, but it is necessary to wait for the measurement resource control system 4 to deliver the original address to the application program 24, that is, the computer 41 cannot be controlled to establish communication with the measuring instrument 22 only by running the application program 24 . Therefore, the user cannot control the measuring instrument 22 by directly running the application program 24 .
下面介绍测量资源控制系统4是如何完成对测量资源20的管理和控制的。The following describes how the measurement resource control system 4 manages and controls the measurement resources 20 .
请参照图11,测量资源控制系统4执行以下步骤:Referring to FIG. 11, the measurement resource control system 4 performs the following steps:
步骤S11、仪器资源管理步骤:与所述测量仪器建立连接,产生与所述测量仪器对应的一个原始地址和一个仪器标识。其中,步骤S11包括步骤S111和步骤S112:Step S11, instrument resource management step: establish a connection with the measuring instrument, and generate an original address and an instrument identifier corresponding to the measuring instrument. Wherein, step S11 includes step S111 and step S112:
步骤S111、仪器查找步骤:产生所述测量仪器的所述原始地址;Step S111, instrument search step: generating the original address of the measuring instrument;
步骤S111的工作包括完成仪器资源的原始查找工作,即查找到与计算机41相连接的、处在开机状态下(也称为在线状态)的测量仪器22,并获取一个原始地址。由于测量仪器22可以通过不同的接口与计算机41相连,因此针对不同的接口,其查找方式和原始地址的获取方式也不尽相同。The work of step S111 includes completing the original search of instrument resources, that is, finding the measuring instrument 22 connected to the computer 41 and in the power-on state (also called online state), and obtaining an original address. Since the measuring instrument 22 can be connected to the computer 41 through different interfaces, the search method and the original address acquisition method are also different for different interfaces.
根据接口的使用形式将查找方式分为三类:第一类:自动查找,即插即用方式触发查找步骤,例如USB-TMC接口;第二类:半自动查找,需要手动触发查找步骤或配置触发条件来触发查找步骤,例如LAN-VX-11接口;第三类:手动查找,通过输入配置数据连接仪器的方式来实现查找,例如RS232接口。According to the use form of the interface, the search methods are divided into three categories: the first type: automatic search, the plug-and-play method triggers the search step, such as the USB-TMC interface; the second type: semi-automatic search, which needs to manually trigger the search step or configure the trigger Conditions to trigger the search step, such as LAN-VX-11 interface; the third type: manual search, the search is realized by inputting configuration data to connect the instrument, such as RS232 interface.
对于自动查找,以USB-TMC接口为例说明,是基于Universal Serial Bus TestandMeasurement Class Specification(USBTMC)和Universal Serial Bus Test andMeasurement Class,Subclass USB488 Specification(USBTMC-USB488)。测量仪器22连接计算机41后操作系统(例如Windows)会为其安装驱动(Windows Vista和7会自动安装,其他版本需要手动安装)。完成驱动安装后,测量资源控制系统4会被测量仪器22连接计算机41的动作触发,测量资源控制系统4调用VISA的USB-TMC查找函数获取USB-TMC接口的地址信息,该地址信息就是该原始地址。For automatic search, take the USB-TMC interface as an example, which is based on the Universal Serial Bus Test and Measurement Class Specification (USBTMC) and Universal Serial Bus Test and Measurement Class, Subclass USB488 Specification (USBTMC-USB488). After the measuring instrument 22 is connected to the computer 41, the operating system (such as Windows) will install the driver for it (Windows Vista and 7 will be automatically installed, and other versions need to be manually installed). After the driver installation is completed, the measurement resource control system 4 will be triggered by the action of connecting the measuring instrument 22 to the computer 41, and the measurement resource control system 4 will call the USB-TMC lookup function of VISA to obtain the address information of the USB-TMC interface, which is the original address.
对于半自动查找,以LAN接口为例说明,是基于VX-11协议以及mDNS协议完成的LAN接口仪器的查找。由于现有LAN接口上层有两套协议并存(VX-11与mDNS)所以对其查找方式有两套。For the semi-automatic search, take the LAN interface as an example to illustrate, it is based on the VX-11 protocol and the mDNS protocol to complete the search of the LAN interface instrument. Since there are two sets of protocols coexisting on the upper layer of the existing LAN interface (VX-11 and mDNS), there are two sets of search methods for it.
对于VX-11接口仪器,查找方式为向局域网内部发送查找报文,在一定时间内接受该报文的响应,响应的IP视为待确定的测量仪器,该响应的IP构成该原始地址。请参照图12,测量资源控制系统4的显示界面上具有一个“LAN”按钮140,用户通过点击该按“LAN”按钮140来触发步骤S11。For the VX-11 interface instrument, the search method is to send a search message to the LAN, and accept the response of the message within a certain period of time. The IP of the response is regarded as the measuring instrument to be determined, and the IP of the response constitutes the original address. Referring to FIG. 12 , there is a “LAN” button 140 on the display interface of the measurement resource control system 4 , and the user triggers step S11 by clicking the “LAN” button 140 .
对与mDNS接口仪器(满足该协议亦满足VX-11协议),mDNS接口的仪器在支持上述查找方式的基础上还支持基于mDNS的查找方式,即当满足mDNS协议的设备接入网络时测量资源控制系统4会收到该设备的连接请求报告,测量资源控制系统4通过该报告获取该资源信息,该资源信息构成该原始地址。测量资源控制系统4还包括一个定时资源在线情况验证功能,如果有mDNS设备断开连接测量资源控制系统4会自动清除该测量仪器22。For devices with mDNS interface (meeting this protocol and VX-11 protocol), the mDNS interface instrument also supports the mDNS-based search method on the basis of the above-mentioned search method, that is, when the device that meets the mDNS protocol is connected to the network, the resource is measured The control system 4 will receive the connection request report of the device, and the measurement resource control system 4 obtains the resource information through the report, and the resource information constitutes the original address. The measurement resource control system 4 also includes a timing resource online status verification function. If an mDNS device is disconnected, the measurement resource control system 4 will automatically clear the measurement instrument 22 .
对于手动查找,以GPIB接口为例说明,是基于IEEE488.1和IEEE488.2协议完成的查找。请参照图13,用户通过在窗口150中输入GPIB参数连接仪器,输入的参数构成该原始地址151。For the manual search, the GPIB interface is used as an example to illustrate that the search is completed based on the IEEE488.1 and IEEE488.2 protocols. Please refer to FIG. 13 , the user connects the instrument by inputting GPIB parameters in the window 150 , and the inputted parameters constitute the original address 151 .
对于手动查找,以RS232接口为例说明,是基于EIA 232标准来完成的查找。请参照图14,用户通过在窗口160中输入RS232参数连接仪器,输入的参数构成该原始地址。For the manual search, the RS232 interface is used as an example to illustrate that the search is completed based on the EIA 232 standard. Referring to FIG. 14, the user connects the instrument by inputting RS232 parameters in window 160, and the input parameters constitute the original address.
步骤S112、仪器连接步骤:根据所述原始地址向所述测量仪器发送命令,获取所述测量仪器的仪器基本信息,根据所述仪器基本信息产生所述仪器标识。Step S112, the instrument connection step: sending a command to the measuring instrument according to the original address, obtaining the basic instrument information of the measuring instrument, and generating the instrument identification according to the basic instrument information.
测量资源控制系统4根据该原始地址来连接仪器,与该仪器进行通讯,通讯的内容是向测量仪器22发送SCPI命令,即“*IDN?”命令。该命令是SCPI标准中的基本命令,向某个原始地址发送“*IDN?”命令而不能响应该命令的,即认为该原始地址异常,则不被识别为测量仪器22因而不予记录,反之即被记录。在“*IDN?”命令的返回数据中会获得仪器基本信息,该仪器基本信息具有SCPI标准定义的格式,解析该仪器基本信息即可获得相应的厂商名称为、仪器型号、仪器序列号、仪器版本号等,并将该仪器基本信息的至少一部分作为该测量仪器22的仪器标识。The measurement resource control system 4 connects the instrument according to the original address, and communicates with the instrument. The content of the communication is to send an SCPI command to the measuring instrument 22, that is, the "*IDN?" command. This command is a basic command in the SCPI standard. If you send an "*IDN?" is recorded. The basic information of the instrument will be obtained in the returned data of the "*IDN?" version number, etc., and use at least a part of the basic information of the instrument as the instrument identification of the measuring instrument 22.
例如:步骤S11产生的原始地址为:USB0::0x0400::0x09C4::DSA1A113600019::INSTR,步骤S12则向原始地址USB0::0x0400::0x09C4::DSA1A113600019::INSTR发送:“*IDN?”,得到响应的仪器基本信息:“XXXX,DSA1030A,DSA1A113600019,00.01.03.01.01”。通过解析该仪器基本信息得到“厂商信息:“XXXX”、“型号信息:DSA1030A”等。For example: the original address generated in step S11 is: USB0::0x0400::0x09C4::DSA1A113600019::INSTR, and step S12 sends: "*IDN?" , get the basic information of the responding instrument: "XXXX, DSA1030A, DSA1A113600019, 00.01.03.01.01". By analyzing the basic information of the instrument, "manufacturer information: "XXXX", "model information: DSA1030A" and so on are obtained.
请参照图15,在本实施方式中,测量资源控制系统4将该型号信息作为该测量仪器22的仪器标识220。例如,上面例子中的原始地址为:USB0::0x0400::0x09C4::DSA1A113600019::INSTR的测量仪器22的仪器标识为“DSA1030A”。再例如,另一台测量仪器的仪器标识220为“DS1204B”。在其他实施方式中,该仪器标识还可以包含该仪器基本信息中的厂商名称、仪器序列号、仪器版本号等,或者还可以包含该原始地址。Please refer to FIG. 15 , in this embodiment, the measurement resource control system 4 uses the model information as the instrument identifier 220 of the measuring instrument 22 . For example, the original address in the above example is: USB0::0x0400::0x09C4::DSA1A113600019::INSTR and the instrument ID of the measuring instrument 22 is “DSA1030A”. For another example, the instrument identifier 220 of another measuring instrument is "DS1204B". In other implementation manners, the instrument identification may also include the manufacturer's name, instrument serial number, instrument version number, etc. in the basic information of the instrument, or may also include the original address.
步骤S12、输入步骤:通过所述仪器标识来从所述测量仪器中选择一个被选测量仪器,和从所述应用资源中选择一个被选应用资源;其中,步骤S12包括步骤S121~S124:Step S12, input step: select a selected measuring instrument from the measuring instruments through the instrument identification, and select a selected application resource from the application resources; wherein, step S12 includes steps S121-S124:
步骤S121、仪器列表产生步骤:根据所述仪器标识,产生一个与所述仪器标识相对应的在线仪器列表;Step S121, an instrument list generating step: according to the instrument identification, generate an online instrument list corresponding to the instrument identification;
请参照图15,测量资源控制系统4在显示界面上产生一个在线仪器列表410,在线仪器列表410包括步骤S11产生的全部仪器标识220,之所以采用仪器标识220来代表一个测量仪器的优点在于:仅仅用原始地址来代表测量仪器非常不直观,用户很难记住哪一个原始地址代表什么测量仪器。例如图15中的仪器标识“DS1204B”、“DSA1030A”非常直观的显示出与计算机41相连接的都有哪些测量仪器22。每一个仪器标识220唯一的对应着一个已经连接的测量仪器22,而每一个仪器标识220同时也唯一的对应着一个原始地址。Please refer to FIG. 15 , the measurement resource control system 4 generates an online instrument list 410 on the display interface, and the online instrument list 410 includes all the instrument identifiers 220 generated in step S11. The advantage of using the instrument identifier 220 to represent a measuring instrument is that: It is very unintuitive to use only the original address to represent the measuring instrument, and it is difficult for the user to remember which original address represents which measuring instrument. For example, the instrument identifiers "DS1204B" and "DSA1030A" in FIG. 15 intuitively show which measuring instruments 22 are connected to the computer 41 . Each instrument identifier 220 uniquely corresponds to a connected measuring instrument 22, and each instrument identifier 220 also uniquely corresponds to an original address.
该在线仪器列表410中的全部仪器标识220都以第一显示属性显示,例如以白色非加粗字体来显示。以第一显示属性显示的全部仪器标识220表示该测量仪器处于允许调用状态。允许调用状态是指该测量仪器22与应用程序24建立一个新的调用关系,而被该应用程序24调用。在本实施方式中,该允许调用状态是利用第一显示属性来指示的,在另外的实施方式中,还可以采用增加额外的提示信息来表示该测量仪器22处于允许调用状态。All instrument identifiers 220 in the online instrument list 410 are displayed with the first display attribute, for example, displayed in white non-bold font. All instrument identifiers 220 displayed in the first display attribute indicate that the measuring instrument is in a call-allowed state. The call-allowed state means that the measuring instrument 22 establishes a new calling relationship with the application program 24 and is called by the application program 24 . In this embodiment, the call-allowed state is indicated by the first display attribute. In other embodiments, additional prompt information may also be added to indicate that the measuring instrument 22 is in the call-allowed state.
步骤S122、仪器选择步骤:从所述在线仪器列表中选择一个所述测量仪器作为所述被选测量仪器;Step S122, instrument selection step: selecting one of the measuring instruments from the online instrument list as the selected measuring instrument;
请参照图15,测量资源控制系统4接收用户输入的一个仪器选择指令,来从在线仪器列表410中选择一个仪器标识220。用户选择了仪器标识220,也就是选择了对应的测量仪器22作为被选测量仪器。本实施方式中,用户是通过鼠标点击在线仪器列表中410的仪器标识220的方式输入该仪器选择指令,选择了仪器标识2201为DSA1030A的测量仪器。当然,用户还可以通过键盘等外设来输入该仪器选择指令。Referring to FIG. 15 , the measurement resource control system 4 receives an instrument selection instruction input by the user to select an instrument identifier 220 from the online instrument list 410 . The user selects the instrument identification 220, that is, selects the corresponding measuring instrument 22 as the selected measuring instrument. In this embodiment, the user inputs the instrument selection instruction by clicking the instrument identifier 220 in the online instrument list 410 with the mouse, and selects the measuring instrument whose instrument identifier 2201 is DSA1030A. Of course, the user can also input the instrument selection command through peripheral devices such as a keyboard.
步骤S123、动态应用列表产生步骤:根据所述被选测量仪器和所述应用资源产生一个包含与所述被选测量仪器相匹配的应用资源的动态应用列表;请参照图16,在本实施方式中,步骤S123具体包括:匹配信息获取步骤S1231、应用资源检索步骤S1232、和动态列表生成步骤S1233。Step S123, dynamic application list generating step: generate a dynamic application list containing application resources matching the selected measuring instrument according to the selected measuring instrument and the application resource; please refer to FIG. 16 , in this embodiment Among them, step S123 specifically includes: matching information acquisition step S1231, application resource retrieval step S1232, and dynamic list generation step S1233.
匹配信息获取步骤S1231:根据所述被选测量仪器的所述仪器基本信息产生一个匹配信息。匹配信息获取步骤S1231包括一个系列名获取步骤S12311和一个型号名获取步骤S12312。系列名获取步骤S12311:根据所述被选测量仪器的仪器基本信息产生所述被选测量仪器的所属系列名。一个型号名获取步骤:根据所述被选测量仪器的仪器基本信息产生所述被选测量仪器的所属型号名。Matching information acquisition step S1231: Generate matching information according to the basic instrument information of the selected measuring instrument. The matching information obtaining step S1231 includes a series name obtaining step S12311 and a model name obtaining step S12312. Series name acquisition step S12311: Generate the series name of the selected measuring instrument according to the basic instrument information of the selected measuring instrument. A model name acquiring step: generating the model name of the selected measuring instrument according to the basic instrument information of the selected measuring instrument.
在本实施方式中,前已详述,仪器基本信息包括厂商名称、仪器型号、仪器序列号、仪器版本号等,测量资源控制系统4根据该仪器型号产生所述匹配信息。本实施方式中的匹配信息包括所述被选测量仪器的所属系列名和所属型号名。例如,请参照图17,用户选择了仪器标识220为DAS1030A的测量仪器作为被选测量仪器,通过该被选测量仪器可知其仪器基本信息中的仪器型号为“DSA1030A”,该仪器型号“DSA1030A”不仅说明该被选测量仪器的仪器型号为DAS1030A,而且可知该被选测量仪器属于DAS1000A系列,因此可以确定该被选测量仪器的所属系列名为“DSA1000A”,所属型号名为“DSA1030A”。应当指出的是,系列名获取步骤S12311和型号名获取步骤S12312的执行顺序可以相互颠倒,也可以同时并行执行。In this embodiment, as described in detail above, the basic information of the instrument includes the manufacturer name, instrument model, instrument serial number, instrument version number, etc., and the measurement resource control system 4 generates the matching information according to the instrument model. The matching information in this embodiment includes the series name and model name of the selected measuring instrument. For example, please refer to Fig. 17, the user selects the measuring instrument whose instrument identification 220 is DAS1030A as the selected measuring instrument, it can be seen from the selected measuring instrument that the instrument model in the basic information of the instrument is "DSA1030A", and the instrument model "DSA1030A" It not only shows that the instrument model of the selected measuring instrument is DAS1030A, but also shows that the selected measuring instrument belongs to the DAS1000A series, so it can be determined that the series name of the selected measuring instrument is "DSA1000A" and the model name is "DSA1030A". It should be noted that the execution sequence of the series name acquisition step S12311 and the model name acquisition step S12312 may be reversed, or may be executed in parallel.
作为另外的实施方式,仪器基本信息包括仪器型号和仪器系列号,因此可以通过被选测量仪器的仪器基本信息中的仪器型号确定所属型号名,通过被选测量仪器的仪器基本信息中的仪器系列号所属系列号名。As another implementation, the basic information of the instrument includes the instrument model and the serial number of the instrument, so the model name can be determined through the instrument model in the basic information of the selected measuring instrument, and the instrument series in the basic information of the selected measuring instrument The name of the serial number to which the number belongs.
请参照图16,应用资源检索步骤S1232:根据所述匹配信息查找与所述被选测量仪器相匹配的应用程序。应用资源检索步骤S1232具体包括一个通用资源查找步骤S12321、一个系列名查找步骤S12322、和一个型号名查找步骤S12323。通用资源查找步骤S12321:根据应用基本信息中的一个通用名查找与全部所述测量仪器匹配的应用程序;系列名查找步骤S12322:根据所述所属系列名查找与所述被选测量仪器所属系列匹配的应用程序;型号名查找步骤S12323:根据所述所属型号名查找与所述被选测量仪器所属型号匹配的应用程序。Please refer to FIG. 16 , application resource retrieval step S1232: search for an application program matching the selected measuring instrument according to the matching information. The application resource search step S1232 specifically includes a general resource search step S12321, a series name search step S12322, and a model name search step S12323. General resource search step S12321: search for an application that matches all the measuring instruments according to a common name in the basic application information; step S12322 for series name search: search for a match with the series of the selected measuring instrument according to the name of the series to which it belongs application program; model name search step S12323: Search for an application program that matches the model of the selected measuring instrument according to the model name.
在本实施方式中,应用程序24具有一个应用基本信息,该应用基本信息包括系列名、型号名、和通用名。该应用程序24的文件名称当中包含系列名、型号名、和通用名其中之一。该应用程序24的文件名称当中包含通用名的,表示该应用程序24可以匹配任意的测量仪器22。该应用程序24的文件名称当中包含系列名的,表示该应用程序24可以匹配同一系列名的测量仪器22,即可以匹配该系列名下所有型号的测量仪器22。该应用程序24的文件名称当中包含型号名的,表示该应用程序24只匹配同一型号名的测量仪器22。为了举例说明,请参照图18,计算机41的存储器416中存储着多个应用程序24,每个应用程序24存放在与其同名的文件夹下。其中,名称为“Instrument_Common_XXXX_SCPI ControlPanel”的应用程序2401的名称里包含通用名“Instrument_Common”,因此表示该应用程序2401可以匹配任意一个测量仪器22。名称为“XXXX_DSA1000A_Tools”的应用程序2402的名称里包含系列名“DSA1000A”,因此表示该应用程序2402可以匹配同属于DSA1000A系列的测量仪器22。名称为“XXXX_DSA1030A_Tools”的应用程序2403的名称里包含型号名“DSA1030A”,因此表示该应用程序2403只匹配型号名同为DSA1030A的测量仪器22。In this embodiment, the application program 24 has a piece of basic application information including a series name, a model name, and a common name. The file name of the application program 24 includes one of a series name, a model name, and a generic name. If the file name of the application program 24 contains a common name, it means that the application program 24 can match any measuring instrument 22 . If the file name of the application program 24 contains a series name, it means that the application program 24 can match the measuring instruments 22 with the same series name, that is, it can match all models of the measuring instruments 22 under the series name. If the file name of the application program 24 contains the model name, it means that the application program 24 only matches the measuring instruments 22 with the same model name. For example, referring to FIG. 18 , a plurality of application programs 24 are stored in the memory 416 of the computer 41 , and each application program 24 is stored in a folder with the same name as it. Wherein, the name of the application 2401 named “Instrument_Common_XXXX_SCPI ControlPanel” includes the common name “Instrument_Common”, which means that the application 2401 can match any measuring instrument 22 . The name of the application program 2402 named "XXXX_DSA1000A_Tools" includes the series name "DSA1000A", which means that the application program 2402 can match the measuring instruments 22 belonging to the DSA1000A series. The name of the application program 2403 named "XXXX_DSA1030A_Tools" contains the model name "DSA1030A", which means that the application program 2403 only matches the measuring instruments 22 with the same model name as DSA1030A.
因此,通用资源查找步骤S12321通过查找包含通用名“Instrument_Common”的应用程序,可以找到应用程序2401;系列名查找步骤S12322根据所属系列名“DSA1000A”,可以找到应用程序2402;型号名查找步骤S12323根据所属型号名“DSA1030A”,可以找到应用程序2403。Therefore, the general resource search step S12321 can find the application program 2401 by searching the application program containing the common name "Instrument_Common"; the series name search step S12322 can find the application program 2402 according to the series name "DSA1000A" to which it belongs; the model name search step S12323 according to The model name is "DSA1030A", and the application program 2403 can be found.
作为另外的实施方式,还可以在应用程序24的文件名中记录所匹配的仪器基本信息的部分或全部。As another implementation manner, part or all of the matched basic instrument information may also be recorded in the file name of the application program 24 .
作为另外的实施方式,还可以在应用程序24的说明文件中记录所匹配的仪器基本信息的部分或全部。As another implementation manner, part or all of the matched basic information of the instrument may also be recorded in the description file of the application program 24 .
作为另外的实施方式,还可以在操作系统的注册表中记录该应用程序24和所匹配的仪器基本信息的部分或全部。As another implementation manner, part or all of the basic information of the application program 24 and the matched instrument may also be recorded in the registry of the operating system.
动态列表生成步骤S1233:根据查找到的所述相匹配的应用程序产生所述动态应用列表。Dynamic list generation step S1233: Generate the dynamic application list according to the found matching application programs.
请参照图17,根据步骤S1232找到的应用程序2401、2402、2403,生成该动态应用列表240。该动态应用列表240包含的是与被选测量仪器匹配的应用程序,来供用户进一步选择。动态应用列表240排除了与所选择的测量仪器不匹配的应用程序,使用户选择时避免受到干扰,便于快速准确的选择。Referring to FIG. 17 , the dynamic application list 240 is generated according to the application programs 2401 , 2402 , and 2403 found in step S1232 . The dynamic application list 240 includes application programs matching the selected measuring instrument for further selection by the user. The dynamic application list 240 excludes application programs that do not match the selected measuring instrument, so that the user can avoid being disturbed when selecting, and is convenient for fast and accurate selection.
步骤S124、应用选择步骤:从所述动态应用列表中选择所述被选应用资源;Step S124, application selection step: selecting the selected application resource from the dynamic application list;
请参照图17,测量资源控制系统4接收用户输入的一个应用选择指令,用于在动态应用列表240中选择一个应用程序,作为一个被选应用程序。该应用选择指令可以是鼠标点击应用程序2401。即,用户选择名称为“Instrument_Common_XXXX_SCPI Control Panel”的应用程序。Referring to FIG. 17 , the measurement resource control system 4 receives an application selection instruction input by the user for selecting an application in the dynamic application list 240 as a selected application. The application selection instruction may be a mouse click on the application program 2401 . That is, the user selects the application named "Instrument_Common_XXXX_SCPI Control Panel".
步骤S13、资源调用建立步骤:将从该测量仪器中的选择一个被选测量仪器与从该应用资源中选择的一个被选应用资源建立调用。Step S13 , resource call establishment step: establish a call between a selected measuring instrument selected from the measuring instruments and a selected application resource selected from the application resources.
请参照图19,测量资源控制系统4根据用于选择出来的该被选测量仪器和被选应用程序2401,将被选测量仪器的原始地址传递给被选应用程序2401,使该被选应用程序2401有了确定的通信对象,使用该原始地址与被选测量仪器通信。至此,完成了该应用程序2401对该被选测量仪器调用的建立,使用户可以正常的使用该被选应用程序2401来控制被选测量仪器了。Please refer to FIG. 19 , the measurement resource control system 4 transmits the original address of the selected measuring instrument to the selected application program 2401 according to the selected measuring instrument and the selected application program 2401 for selection, so that the selected application program 2401 With a confirmed communication object, use the original address to communicate with the selected measuring instrument. So far, the establishment of calling the selected measuring instrument by the application program 2401 is completed, so that the user can normally use the selected application program 2401 to control the selected measuring instrument.
在本实施方式中,对于扩展名为.exe的应用程序24,测量资源控制系统4使用Windows带参数的命令行方式在启动该应用程序24的同时完成将原始地址向应用程序24传递;对于VI形式的应用程序24,测量资源控制系统4使用VI的动态加载方式来完成原始地址传递。In this embodiment, for the application program 24 whose extension is .exe, the measurement resource control system 4 uses the Windows command line mode with parameters to complete the transfer of the original address to the application program 24 while starting the application program 24; In the form of application program 24, the measurement resource control system 4 uses the dynamic loading method of VI to complete the original address transfer.
在本实施方式中,测量资源控制系统4具有一个调用列表,用于记录当前建立的调用。当该调用建立之后,该被选应用程序2401的窗口标题信息和对应的被选测量仪器都被记录在该调用列表内。In this embodiment, the measurement resource control system 4 has an invocation list for recording currently established invocations. After the call is established, the window title information of the selected application program 2401 and the corresponding selected measuring instrument are recorded in the call list.
步骤S14、资源调用解除步骤:将该被选测量仪器和该被选应用资源之间的调用解除。Step S14, the step of canceling the resource call: cancel the call between the selected measuring instrument and the selected application resource.
在本实施方式中,当用户关闭被选应用程序2401后,被选测量仪器和所述被选应用资源之间的调用即解除。In this embodiment, when the user closes the selected application program 2401, the call between the selected measuring instrument and the selected application resource is released.
测量资源控制系统4根据该调用列表内记录的该被选应用程序2401的窗口标题信息,循环调用Windows API函数“FindWindowA”,将该被选应用程序2401的窗口标题信息作为输入参数,FindWindowA函数返回窗口的状态,若窗口已关闭,则函数返回0值。According to the window title information of the selected application program 2401 recorded in the call list, the measurement resource control system 4 circularly calls the Windows API function "FindWindowA", takes the window title information of the selected application program 2401 as an input parameter, and the FindWindowA function returns The state of the window, if the window is closed, the function returns a value of 0.
在另外的实施方式中,应用程序2401或测量资源控制系统4预设有一个调用解除条件,例如是定时条件,当满足该调用解除条件时,被选测量仪器和所述被选应用资源之间的调用自动解除,而不必关闭被选应用程序2401。In another embodiment, the application program 2401 or the measurement resource control system 4 presets a call release condition, such as a timing condition. When the call release condition is met, the selected measuring instrument and the selected application resource The call is automatically released without closing the selected application 2401.
步骤S15、显示控制步骤:根据所述调用的建立将所述测量仪器列表中所述被选测量仪器所对应的测量仪器标识以第二显示属性显示,而根据所述调用的解除将所述测量仪器列表中所述被选测量仪器所对应的测量仪器标识以第一显示属性显示。Step S15, display control step: display the identification of the measuring instrument corresponding to the selected measuring instrument in the measuring instrument list with the second display attribute according to the establishment of the call, and display the measurement The identification of the measuring instrument corresponding to the selected measuring instrument in the instrument list is displayed with the first display attribute.
由于一些测量仪器22与应用程序24建立调用后,不能再被其他应用程序24所调用,否则将会出现通讯错误等问题,因此已经与被选应用程序2401建立调用的被选测量仪器则处于一个禁止再次调用状态。在本实施方式中,该禁止再次调用状态是将该被选测量仪器突出显示,具体是将该被选测量仪器所对应的测量仪器标识以第二显示属性显示,例如以红色加粗字体显示,来起到提示用户该测量仪器已经被应用程序所调用的目的。而当该调用解除后,与被选应用程序2401建立调用的被选测量仪器恢复到允许调用状态,例如是白色非加粗字体。在另外的实施方式中,该禁止再次调用状态还可以是在用户使用其他应用程序再次调用该被选测量仪器时,弹出禁止调用的提示信息。Since some measuring instruments 22 and application programs 24 have established calls, they cannot be called by other application programs 24, otherwise problems such as communication errors will occur. Therefore, the selected measuring instruments that have established calls with the selected application program 2401 are in a It is forbidden to call the state again. In this embodiment, the state of prohibiting recalling again is to highlight the selected measuring instrument, specifically, to display the identification of the measuring instrument corresponding to the selected measuring instrument with the second display attribute, for example, displaying it in red bold font, To serve the purpose of prompting the user that the measuring instrument has been called by the application program. And when the call is canceled, the selected measuring instrument that established the call with the selected application program 2401 returns to the state of allowing the call, for example, it is in white non-bold font. In another embodiment, the state of prohibiting re-calling may also be that when the user uses other application programs to call the selected measuring instrument again, a prompt message of prohibiting calling is popped up.
在本实施方式中,步骤S15包括步骤S151~S152。In this embodiment, step S15 includes steps S151 to S152.
步骤S151、资源定位步骤:根据所述被选测量仪器定位到所述测量仪器列表中与所述被选测量仪器对应的所述测量仪器标识,作为待修改测量仪器标识;Step S151, resource locating step: locate the measuring instrument identifier corresponding to the selected measuring instrument in the measuring instrument list according to the selected measuring instrument, as the measuring instrument identifier to be modified;
请参照图20,在本实施方式中,测量资源控制系统4根据步骤S13建立调用的被选测量仪器的名称,通过调用LabVIEW树形列表控件的属性节点中的“ActiveltemTag”属性节点,定位到对应的测量仪器标识在测量仪器列表中的位置。Please refer to FIG. 20, in this embodiment, the measurement resource control system 4 establishes the name of the selected measuring instrument called according to step S13, and locates the corresponding The position of the gauge ID in the gauge list.
同样,测量资源控制系统4还可以根据FindWindowA函数返回值为0的被选应用程序所对应的被选测量仪器的名称,通过调用LabVIEW树形列表控件的属性节点中的“ActiveltemTag”属性节点,定位到对应的测量仪器标识在测量仪器列表中的位置。Similarly, the measurement resource control system 4 can also locate the selected measuring instrument according to the name of the selected measuring instrument corresponding to the selected application whose value returned by the FindWindowA function is 0, by calling the "ActiveltemTag" property node in the property node of the LabVIEW tree list control. to the position of the corresponding measuring instrument ID in the measuring instrument list.
步骤S152、显示属性修改步骤:根据所述调用的建立将所述待修改测量仪器标识的显示属性修改为第二显示属性;根据所述调用的解除将所述待修改测量仪器标识的显示属性修改为第一显示属性。Step S152, display attribute modification step: modify the display attribute of the to-be-modified measuring instrument ID to the second display attribute according to the establishment of the call; modify the display attribute of the to-be-modified measuring instrument ID according to the cancellation of the call is the first display attribute.
请一并参照图20和图21,在本实施方式中,测量资源控制系统4根据所述调用的建立,通过调用LabVIEW树形列表控件的属性节点中的“CellFontBold”属性节点,来将步骤S151定位的测量仪器标识的字体加粗,通过调用LabVIEW树形列表控件的属性节点中的“CellFontColor”属性节点,来将步骤S151定位的测量仪器标识的字体修改为红色。Please refer to FIG. 20 and FIG. 21 together. In this embodiment, the measurement resource control system 4 calls the "CellFontBold" attribute node in the attribute node of the LabVIEW tree list control according to the establishment of the call, and performs step S151 The font of the located measuring instrument identification is bold, and the font of the located measuring instrument identification in step S151 is changed to red by calling the "CellFontColor" property node in the property node of the LabVIEW tree list control.
请一并参照图20和图22,测量资源控制系统4根据所述调用的解除,通过调用LabVIEW树形列表控件的属性节点中的“CellFontBold”属性节点,来将通过步骤S151定位的测量仪器标识的字体恢复非加粗字体,通过调用LabVIEW树形列表控件的属性节点中的“CellFontColor”属性节点,来将通过步骤S151定位的测量仪器标识的字体修改为白色。Please refer to FIG. 20 and FIG. 22 together. The measurement resource control system 4 identifies the measuring instrument positioned through step S151 by calling the "CellFontBold" property node in the property node of the LabVIEW tree list control according to the cancellation of the call. To restore the non-bold font, modify the font of the measuring instrument logo located in step S151 to white by calling the "CellFontColor" property node in the property node of the LabVIEW tree list control.
请参照图23,为了实现上述各个步骤,测量资源控制系统4包括一个仪器资源控制部件M11、一个输入部件M12、一个资源调用建立部件M13、一个资源调用接触部件M14和一个显示控制部件M15。该仪器资源控制部件M11用于与所述测量仪器建立连接,产生与所述测量仪器对应的一个原始地址和一个仪器标识;该输入部件M12用于通过所述仪器标识来从所述测量仪器中选择一个被选测量仪器,和从所述应用资源中选择一个被选应用资源;资源调用建立部件M13用于将从该测量仪器中的选择一个被选测量仪器与从该应用资源中选择的一个被选应用资源建立调用;资源调用接触部件M14用于将该被选测量仪器和该被选应用资源之间的调用解除;显示控制部件M15用于根据所述调用的建立将所述测量仪器列表中所述被选测量仪器所对应的测量仪器标识以第二显示属性显示,而根据所述调用的解除将所述测量仪器列表中所述被选测量仪器所对应的测量仪器标识以第一显示属性显示。Please refer to FIG. 23 , in order to realize the above steps, the measurement resource control system 4 includes an instrument resource control part M11, an input part M12, a resource call establishment part M13, a resource call contact part M14 and a display control part M15. The instrument resource control part M11 is used to establish a connection with the measuring instrument, and generate an original address and an instrument identification corresponding to the measuring instrument; Select a selected measuring instrument, and select a selected application resource from the application resources; the resource call establishment component M13 is used to select a selected measuring instrument from the measuring instruments and a selected application resource from the application resources The selected application resource establishes a call; the resource call contact part M14 is used to cancel the call between the selected measuring instrument and the selected application resource; the display control part M15 is used to list the measuring instrument according to the establishment of the call The measuring instrument identification corresponding to the selected measuring instrument is displayed in the second display attribute, and the measuring instrument identification corresponding to the selected measuring instrument in the measuring instrument list is displayed in the first display according to the cancellation of the call The properties are displayed.
仪器资源控制部件M11包括一个仪器资源查找部件M111和一个仪器资源连接部件M112。该仪器资源查找部件M111用于产生所述测量仪器的所述原始地址;该仪器资源连接部件M112用于根据所述原始地址向所述测量仪器发送命令,获取所述测量仪器的仪器基本信息,根据所述仪器基本信息产生所述仪器标识。The instrument resource control part M11 includes an instrument resource search part M111 and an instrument resource connection part M112. The instrument resource searching part M111 is used to generate the original address of the measuring instrument; the instrument resource connecting part M112 is used to send a command to the measuring instrument according to the original address to acquire basic instrument information of the measuring instrument, The instrument identification is generated according to the basic information of the instrument.
输入部件M12包括一个仪器列表产生部件M121、一个仪器选择部件M122、一个动态应用列表产生部件M123和一个应用选择部件M124。仪器列表产生部件M121用于根据所述仪器标识,产生一个与所述仪器标识相对应的在线仪器列表;仪器选择部件M122用于从所述在线仪器列表中选择一个所述测量仪器作为所述被选测量仪器;动态应用列表产生部件M123用于根据所述被选测量仪器和所述应用资源产生一个包含与所述被选测量仪器相匹配的应用资源的动态应用列表;应用选择部件M124用于从所述动态应用列表中选择所述被选应用资源。The input part M12 includes an instrument list generating part M121, an instrument selecting part M122, a dynamic application list generating part M123 and an application selecting part M124. The instrument list generation part M121 is used to generate an online instrument list corresponding to the instrument ID according to the instrument ID; the instrument selection part M122 is used to select one of the measuring instruments from the online instrument list as the selected instrument. Select a measuring instrument; the dynamic application list generation component M123 is used to generate a dynamic application list containing application resources matching the selected measuring instrument according to the selected measuring instrument and the application resource; the application selection component M124 is used to The selected application resource is selected from the dynamic application list.
请参照图24,动态应用列表产生部件M123包括匹配信息获取部件M1231、应用资源检索部件M1232、和动态列表生成部件M1233。匹配信息获取部件M1231用于根据所述被选测量仪器的所述仪器基本信息产生一个匹配信息。应用资源检索部件M1232用于根据所述匹配信息查找与所述被选测量仪器相匹配的应用程序。动态列表生成部件M1233用于根据查找到的所述相匹配的应用程序产生所述动态应用列表。Referring to FIG. 24, the dynamic application list generation component M123 includes a matching information acquisition component M1231, an application resource retrieval component M1232, and a dynamic list generation component M1233. The matching information acquisition component M1231 is used to generate matching information according to the basic instrument information of the selected measuring instrument. The application resource retrieval component M1232 is configured to search for an application program matching the selected measuring instrument according to the matching information. The dynamic list generating component M1233 is configured to generate the dynamic application list according to the found matching application programs.
匹配信息获取部件M1231包括一个系列名获取部件M12311和一个型号名获取部件M12312。系列名获取部件M12311用于根据所述被选测量仪器的仪器基本信息产生所述被选测量仪器的所属系列名。型号名获取部件M12312用于根据所述被选测量仪器的仪器基本信息产生所述被选测量仪器的所属型号名。The matching information acquisition part M1231 includes a series name acquisition part M12311 and a model name acquisition part M12312. The series name acquisition component M12311 is used to generate the series name of the selected measuring instrument according to the basic instrument information of the selected measuring instrument. The model name acquisition component M12312 is used to generate the model name of the selected measuring instrument according to the basic instrument information of the selected measuring instrument.
应用资源检索部件M1232具体包括一个通用资源查找部件M12321、一个系列名查找部件M12322、和一个型号名查找部件M12323。通用资源查找部件M12321用于根据应用基本信息中的一个通用名查找与全部所述测量仪器匹配的应用程序;系列名查找部件M12322用于根据所述所属系列名查找与所述被选测量仪器所属系列匹配的应用程序;型号名查找部件M12323用于根据所述所属型号名查找与所述被选测量仪器所属型号匹配的应用程序。The application resource retrieval part M1232 specifically includes a general resource search part M12321, a series name search part M12322, and a model name search part M12323. The general resource search component M12321 is used to search for application programs that match all of the measuring instruments according to a common name in the application basic information; the series name search component M12322 is used to search for the application program that the selected measuring instrument belongs to according to the series name to which it belongs. Series matching applications; model name search component M12323 is used to search for application programs that match the model of the selected measuring instrument according to the model name.
请再参照图23,显示控制部件M15包括一个资源定位部件M151和一个显示属性修改部件M152,资源定位部件M151用于根据所述被选测量仪器定位到所述测量仪器列表中与所述被选测量仪器对应的所述测量仪器标识,作为待修改测量仪器标识;显示属性修改部件M152用于根据所述调用的建立将所述待修改测量仪器标识的显示属性修改为第二显示属性;根据所述调用的解除将所述待修改测量仪器标识的显示属性修改为第一显示属性。Please refer to Fig. 23 again, the display control part M15 includes a resource locating part M151 and a display property modifying part M152, the resource locating part M151 is used for locating to the said measuring instrument list according to said selected measuring instrument The measuring instrument identification corresponding to the measuring instrument is used as the measuring instrument identification to be modified; the display attribute modifying component M152 is used to modify the display attribute of the measuring instrument identification to be modified to the second display attribute according to the establishment of the call; The cancellation of the call modifies the display attribute of the identifier of the measuring instrument to be modified to the first display attribute.
下面介绍本发明测量资源控制系统的第二实施方式。The second implementation manner of the measurement resource control system of the present invention is introduced below.
请参照图25,第二实施方式的测量资源控制系统5与第一实施方式的测量资源控制系统4的主要区别在于工作时执行步骤有所不同。其中,测量资源控制系统5执行的步骤S21与步骤S11相同,步骤S23与步骤S13相同,步骤S24与步骤S14相同,步骤S25与步骤S15相同,步骤S22所包括的步骤与步骤S12所包括的步骤不同。Please refer to FIG. 25 , the main difference between the measurement resource control system 5 of the second embodiment and the measurement resource control system 4 of the first embodiment is that the execution steps are different during operation. Wherein, step S21 executed by the measurement resource control system 5 is the same as step S11, step S23 is the same as step S13, step S24 is the same as step S14, step S25 is the same as step S15, and the steps included in step S22 are the same as those included in step S12. different.
步骤S21、仪器资源管理步骤:与所述测量仪器建立连接,产生与所述测量仪器对应的一个原始地址和一个仪器标识。Step S21, instrument resource management step: establish a connection with the measuring instrument, and generate an original address and an instrument identifier corresponding to the measuring instrument.
与第一实施方式的测量资源控制系统4的步骤S11相同,步骤S21也包括步骤S211和S212,以同样的方式与测量仪器22连接,产生与每一个测量仪器22的原始地址,并获得每一个测量仪器22所对应的仪器基本信息,并根据该仪器基本信息产生一个对应的仪器标识。Same as step S11 of the measurement resource control system 4 of the first embodiment, step S21 also includes steps S211 and S212, connect to the measuring instrument 22 in the same way, generate the original address with each measuring instrument 22, and obtain each The instrument basic information corresponding to the instrument 22 is measured, and a corresponding instrument identification is generated according to the instrument basic information.
步骤S22、输入步骤:接收用户输入的一个仪器选择指令和一个应用选择指令,所述仪器选择指令用于从所述仪器标识中选择一个被选测量仪器,所述应用选择指令用于从所述应用程序中选择一个被选应用程序;其中,步骤S22包括步骤S221~S224:Step S22, input step: receiving an instrument selection instruction and an application selection instruction input by the user, the instrument selection instruction is used to select a selected measuring instrument from the instrument identification, and the application selection instruction is used to select from the Select a selected application program in the application program; wherein, step S22 includes steps S221-S224:
步骤S221、应用列表产生步骤:根据所述应用资源,产生一个与所述应用资源相对应的应用列表;Step S221, application list generating step: according to the application resource, generate an application list corresponding to the application resource;
请参照图26,测量资源控制系统5在显示界面58上产生一个应用列表540,应用列表540包括全部的应用程序所对应的应用程序名541,用来供用户选择被选应用程序。Referring to FIG. 26 , the measurement resource control system 5 generates an application list 540 on the display interface 58 , and the application list 540 includes application names 541 corresponding to all applications for the user to select the selected application.
步骤S222、应用选择步骤:从所述应用列表中选择所述一个所述应用资源作为所述被选应用资源;Step S222, application selection step: selecting the one application resource from the application list as the selected application resource;
请参照图27,测量资源控制系统5接收用户输入的一个应用选择指令,来从应用列表540中选择一个应用程序名541,进而选择该应用程序名541所对应的应用程序。在本实施方式中,该应用程序的应用程序名541中包含着匹配信息,即仪器基本信息中的厂商信息和型号信息,通过该厂商信息和型号信息就可以确定与该应用程序对应的测量仪器。Referring to FIG. 27 , the measurement resource control system 5 receives an application selection instruction input by the user to select an application program name 541 from the application list 540 , and then selects the application program corresponding to the application program name 541 . In this embodiment, the application program name 541 of the application program contains matching information, that is, the manufacturer information and model information in the basic information of the instrument, and the measuring instrument corresponding to the application program can be determined through the manufacturer information and model information. .
步骤S223、动态仪器列表产生步骤:根据所述被选应用资源和所述测量仪器产生一个包含与所述被选应用资源相匹配的测量仪器的动态在线仪器列表;Step S223, a dynamic instrument list generating step: generate a dynamic online instrument list including measuring instruments matching the selected application resource according to the selected application resource and the measuring instrument;
请参照图28,测量资源控制系统5根据用户选择的应用程序名541所包含的匹配信息对全部连接的测量仪器进行检索,找到与该应用程序名541匹配的测量仪器,并将这些匹配的测量仪器的仪器标识521显示,这些仪器标识521构成一个动态在线仪器列表520。Please refer to FIG. 28 , the measurement resource control system 5 retrieves all connected measuring instruments according to the matching information included in the application program name 541 selected by the user, finds the measuring instruments matching the application program name 541, and stores the matching measurement instruments The device identifiers 521 of the devices are displayed, and these device identifiers 521 form a dynamic online device list 520 .
步骤S224、仪器选择部件:从所述动态在线仪器列表中选择所述被选测量仪器。Step S224, instrument selection component: select the selected measuring instrument from the dynamic online instrument list.
请参照图29,测量资源控制系统5接收用户输入的一个仪器选择指令,来从动态在线仪器列表520中选择一个仪器标识521,进而选择了该仪器标识521所对应的测量仪器作为被选测量仪器。Please refer to FIG. 29 , the measurement resource control system 5 receives an instrument selection instruction input by the user to select an instrument identifier 521 from the dynamic online instrument list 520, and then selects the measuring instrument corresponding to the instrument identifier 521 as the selected measuring instrument .
步骤S23、资源匹配步骤:将所述被选测量仪器所对应的原始地址发送给所述被选应用资源。Step S23, resource matching step: sending the original address corresponding to the selected measuring instrument to the selected application resource.
测量资源控制系统5将用户选择的仪器标识521所对应的测量仪器的原始地址传递给用户选择的应用程序。使应用程序有了确定的通信对象,使用该原始地址与测量仪器通信。至此,完成了该应用程序对该被选测量仪器调用的建立,使用户可以正常的使用该被选应用程序来控制被选测量仪器了。The measurement resource control system 5 transmits the original address of the measuring instrument corresponding to the instrument identifier 521 selected by the user to the application program selected by the user. The application program has a definite communication object, and uses the original address to communicate with the measuring instrument. So far, the establishment of calling the selected measuring instrument by the application program is completed, so that the user can normally use the selected application program to control the selected measuring instrument.
步骤S24、资源调用解除步骤:将该被选测量仪器和该被选应用资源之间的调用解除。Step S24, the step of canceling the resource call: cancel the call between the selected measuring instrument and the selected application resource.
步骤S25、显示控制步骤:根据所述调用的建立将所述测量仪器列表中所述被选测量仪器所对应的测量仪器标识以第二显示属性显示,而根据所述调用的解除将所述测量仪器列表中所述被选测量仪器所对应的测量仪器标识以第一显示属性显示。Step S25, display control step: according to the establishment of the call, display the identification of the measuring instrument corresponding to the selected measuring instrument in the list of measuring instruments with the second display attribute, and according to the cancellation of the call, display the The identification of the measuring instrument corresponding to the selected measuring instrument in the instrument list is displayed with the first display attribute.
在本实施方式中,步骤S25包括步骤S251~S252。In this embodiment, step S25 includes steps S251-S252.
步骤S251、资源定位步骤:根据所述被选测量仪器定位到所述测量仪器列表中与所述被选测量仪器对应的所述测量仪器标识,作为待修改测量仪器标识;Step S251, resource locating step: locate the measuring instrument identifier corresponding to the selected measuring instrument in the measuring instrument list according to the selected measuring instrument, as the measuring instrument identifier to be modified;
步骤S252、显示属性修改步骤:根据所述调用的建立将所述待修改测量仪器标识的显示属性修改为第二显示属性;根据所述调用的解除将所述待修改测量仪器标识的显示属性修改为第一显示属性。Step S252, display attribute modification step: modify the display attribute of the identifier of the measuring instrument to be modified to the second display attribute according to the establishment of the call; modify the display attribute of the identifier of the measuring instrument to be modified according to the cancellation of the call is the first display attribute.
请参照图30,为了实现上述各个步骤,测量资源控制系统5包括一个仪器资源控制部件M21、一个输入部件M22、一个资源调用建立部件M23、一个资源调用接触部件M24和一个显示控制部件M25。该仪器资源控制部件M21用于与所述测量仪器建立连接,产生与所述测量仪器对应的一个原始地址和一个仪器标识;该输入部件M22用于通过所述仪器标识来从所述测量仪器中选择一个被选测量仪器,和从所述应用资源中选择一个被选应用资源;资源调用建立部件M23用于将从该测量仪器中的选择一个被选测量仪器与从该应用资源中选择的一个被选应用资源建立调用;资源调用接触部件M24用于将该被选测量仪器和该被选应用资源之间的调用解除;显示控制部件M25用于根据所述调用的建立将所述测量仪器列表中所述被选测量仪器所对应的测量仪器标识以第二显示属性显示,而根据所述调用的解除将所述测量仪器列表中所述被选测量仪器所对应的测量仪器标识以第一显示属性显示。Please refer to FIG. 30 , in order to realize the above steps, the measurement resource control system 5 includes an instrument resource control part M21, an input part M22, a resource call establishment part M23, a resource call contact part M24 and a display control part M25. The instrument resource control part M21 is used to establish a connection with the measuring instrument, and generate an original address and an instrument identification corresponding to the measuring instrument; Select a selected measuring instrument, and select a selected application resource from the application resources; the resource call establishment component M23 is used to select a selected measuring instrument from the measuring instruments and a selected application resource from the application resources The selected application resource establishes a call; the resource call contact part M24 is used to release the call between the selected measuring instrument and the selected application resource; the display control part M25 is used to list the measuring instrument according to the establishment of the call The measuring instrument identification corresponding to the selected measuring instrument is displayed in the second display attribute, and the measuring instrument identification corresponding to the selected measuring instrument in the measuring instrument list is displayed in the first display according to the cancellation of the call The properties are displayed.
仪器资源控制部件M21包括一个仪器资源查找部件M211和一个仪器资源连接部件M212。该仪器资源查找部件M211用于产生所述测量仪器的所述原始地址;该仪器资源连接部件M212用于根据所述原始地址向所述测量仪器发送命令,获取所述测量仪器的仪器基本信息,根据所述仪器基本信息产生所述仪器标识。The instrument resource control part M21 includes an instrument resource search part M211 and an instrument resource connection part M212. The instrument resource searching part M211 is used to generate the original address of the measuring instrument; the instrument resource connecting part M212 is used to send a command to the measuring instrument according to the original address to obtain the basic instrument information of the measuring instrument, The instrument identification is generated according to the basic information of the instrument.
输入部件M22包括一个应用列表产生部件M221、一个应用选择部件M222、一个动态仪器列表产生部件M223和一个仪器选择部件M224。一个应用列表产生部件M221,用于根据所述应用资源,产生一个与所述应用资源相对应的应用列表;应用选择部件M222,用于从所述应用列表中选择所述一个所述应用资源作为所述被选应用资源;动态仪器列表产生部件M223,用于根据所述被选应用资源和所述测量仪器产生一个包含与所述被选应用资源相匹配的测量仪器的动态在线仪器列表;仪器选择部件M224,用于从所述动态在线仪器列表中选择所述被选测量仪器。The input part M22 includes an application list generation part M221, an application selection part M222, a dynamic instrument list generation part M223 and an instrument selection part M224. An application list generation component M221, configured to generate an application list corresponding to the application resource according to the application resource; an application selection component M222, configured to select the one of the application resources from the application list as The selected application resource; the dynamic instrument list generating component M223, configured to generate a dynamic online instrument list containing the measuring instrument matching the selected application resource according to the selected application resource and the measuring instrument; instrument A selection component M224, used to select the selected measuring instrument from the dynamic online instrument list.
下面介绍本发明测量资源控制系统的第三实施方式。The third implementation manner of the measurement resource control system of the present invention is introduced below.
请参照图31,第三实施方式的测量资源控制系统6与第一实施方式的测量资源控制系统4的主要区别在于工作时执行步骤有所不同。其中,测量资源控制系统6执行的步骤S31与步骤S11相同,步骤S33与步骤S13相同,步骤S34与步骤S14相同,步骤S35与步骤S15相同,步骤S32所包括的步骤与步骤S12所包括的步骤不同。Please refer to FIG. 31 , the main difference between the measurement resource control system 6 of the third embodiment and the measurement resource control system 4 of the first embodiment is that the execution steps are different during operation. Wherein, the step S31 executed by the measurement resource control system 6 is the same as the step S11, the step S33 is the same as the step S13, the step S34 is the same as the step S14, the step S35 is the same as the step S15, and the steps included in the step S32 are the same as those included in the step S12. different.
步骤S31、仪器资源管理步骤:与所述测量仪器建立连接,产生与所述测量仪器对应的一个原始地址和一个仪器标识。Step S31, instrument resource management step: establish a connection with the measuring instrument, and generate an original address and an instrument identifier corresponding to the measuring instrument.
与第一实施方式的测量资源控制系统4的步骤S11相同,步骤S31也以同样的方式与测量仪器22连接,产生与每一个测量仪器22的原始地址,并获得每一个测量仪器22所对应的仪器基本信息,并根据该仪器基本信息产生一个对应的仪器标识。Same as step S11 of the measurement resource control system 4 of the first embodiment, step S31 is also connected to the measuring instrument 22 in the same manner, generates the original address of each measuring instrument 22, and obtains the corresponding address of each measuring instrument 22 The basic information of the instrument, and a corresponding instrument identification is generated according to the basic information of the instrument.
步骤S32、输入步骤:接收用户输入的一个仪器选择指令和一个应用选择指令,所述仪器选择指令用于从所述仪器标识中选择一个被选测量仪器,所述应用选择指令用于从所述应用程序中选择一个被选应用程序;其中,步骤S32包括步骤S321~S324:Step S32, input step: receiving an instrument selection instruction and an application selection instruction input by the user, the instrument selection instruction is used to select a selected measuring instrument from the instrument identification, and the application selection instruction is used to select from the Select a selected application program in the application program; wherein, step S32 includes steps S321-S324:
步骤S321、测量资源列表产生步骤:根据所述仪器标识,产生一个与所述仪器标识相对应的在线仪器列表,和用于根据所述应用资源,产生一个与所述应用资源相对应的应用列表;Step S321, measurement resource list generating step: according to the instrument identifier, generate an online instrument list corresponding to the instrument identifier, and generate an application list corresponding to the application resource according to the application resource ;
请参照图32,测量资源控制系统6在显示界面68上产生一个在线仪器列表620和一个应用列表640,在线仪器列表620包含着全部已经连接的测量仪器22所对应的仪器标识621,应用列表640则包含着全部的应用程序24的应用程序名641。Please refer to FIG. 32 , the measurement resource control system 6 generates an online instrument list 620 and an application list 640 on the display interface 68, the online instrument list 620 includes the instrument identifiers 621 corresponding to all connected measuring instruments 22, and the application list 640 Then, the application program names 641 of all the application programs 24 are included.
步骤S322、第一资源选择步骤:从所述在线仪器列表和所述应用列表中选择一个被选第一资源,所述被选第一资源是所述被选测量仪器和所述被选应用资源中的一个;Step S322, first resource selection step: select a selected first resource from the online instrument list and the application list, and the selected first resource is the selected measuring instrument and the selected application resource one of the;
请参照图33,测量资源控制系统6接收用户输入的一个指令,用户可以输入一个仪器选择指令,从在线仪器列表620中选择一个仪器标识621,进而选择该仪器标识621所对应的测量仪器;请参照图34,也可以输入一个应用选择指令,从应用列表640中选择一个应用程序名641,进而选择该应用程序名641所对应的应用程序。Please refer to FIG. 33 , the measurement resource control system 6 receives an instruction input by the user, the user can input an instrument selection instruction, select an instrument identifier 621 from the online instrument list 620, and then select the measuring instrument corresponding to the instrument identifier 621; please Referring to FIG. 34 , it is also possible to input an application selection instruction, select an application program name 641 from the application list 640 , and then select the application program corresponding to the application program name 641 .
步骤S323、动态第二资源列表产生步骤:如果所述被选第一资源是所述被选应用资源,则根据所述被选应用资源和所述测量仪器产生一个包含与所述被选应用资源相匹配的测量仪器的动态在线仪器列表,所述动态在线仪器列表是所述在线仪器列表的至少一部分;如果所述被选被选第一资源是所述被选测量仪器,则根据所述被选测量仪器和所述应用资源产生一个包含与所述被选测量仪器相匹配的应用资源的动态应用列表,所述动态应用列表是所述应用列表的至少一部分;Step S323, step of generating a dynamic second resource list: if the selected first resource is the selected application resource, generate a list containing the selected application resource according to the selected application resource and the measuring instrument A dynamic online instrument list of a matching measuring instrument, the dynamic online instrument list being at least a part of the online instrument list; if the selected first resource is the selected measuring instrument, according to the selected selecting the measuring instrument and the application resource to generate a dynamic application list including application resources matching the selected measuring instrument, the dynamic application list being at least a part of the application list;
请参照图35,如果第一选择指令是应用选择指令,测量资源控制系统6根据用户选择的应用程序名641所包含的仪器基本信息对全部连接的测量仪器进行检索,找到与该应用程序名641匹配的测量仪器,并将这些匹配的测量仪器的仪器标识621显示,这些仪器标识621构成一个动态在线仪器列表660。请参照图36,如果第一选择指令是仪器选择指令,测量资源控制系统6则根据该仪器选择指令所选择的仪器标识621的仪器基本信息,对应用程序进行检索,来得到与测量仪器匹配的应用程序,并由这些匹配的应用程序的应用程序名641构成一个动态应用列表670。Please refer to FIG. 35, if the first selection instruction is an application selection instruction, the measurement resource control system 6 searches all connected measuring instruments according to the basic information of the instrument included in the application name 641 selected by the user, and finds the application name 641. The matching measuring instruments are displayed, and the instrument identifiers 621 of these matching measuring instruments are displayed, and these instrument identifiers 621 constitute a dynamic online instrument list 660 . Please refer to FIG. 36, if the first selection instruction is an instrument selection instruction, the measurement resource control system 6 searches the application program according to the instrument basic information of the instrument identification 621 selected by the instrument selection instruction to obtain a matching measurement instrument. application programs, and form a dynamic application list 670 by the application program names 641 of these matching application programs.
步骤S324、第二资源选择步骤:如果所述被选第一资源是所述被选应用资源,则从所述动态在线仪器列表中选择所述被选测量仪器;如果所述被选第一资源是所述被选测量仪器,则从所述动态应用列表中选择所述被选应用资源。Step S324, second resource selection step: if the selected first resource is the selected application resource, select the selected measuring instrument from the dynamic online instrument list; if the selected first resource is the selected measuring instrument, then select the selected application resource from the dynamic application list.
请参照图37,如果产生的是动态在线仪器列表660,测量资源控制系统6接收用户输入的一个仪器选择指令,来从动态在线仪器列表660中选择一个仪器标识621,进而选择了该仪器标识621所对应的测量仪器作为被选测量仪器。请参照图38,如果产生的是动态应用列表670,测量资源控制系统6接收用户输入的一个应用选择指令,用于在动态应用列表670中选择一个应用程序名641,来表示选择该应用程序名641所对应的应用程序,作为一个被选应用程序。Please refer to FIG. 37, if a dynamic online instrument list 660 is generated, the measurement resource control system 6 receives an instrument selection instruction input by the user to select an instrument identifier 621 from the dynamic online instrument list 660, and then selects the instrument identifier 621 The corresponding measuring instrument is used as the selected measuring instrument. Please refer to FIG. 38, if a dynamic application list 670 is generated, the measurement resource control system 6 receives an application selection instruction input by the user, and is used to select an application program name 641 in the dynamic application list 670 to indicate that the application program name is selected. The application program corresponding to 641 is used as a selected application program.
步骤S33、资源匹配步骤:将所述被选测量仪器所对应的原始地址发送给所述被选应用资源。Step S33, resource matching step: sending the original address corresponding to the selected measuring instrument to the selected application resource.
测量资源控制系统6将用户选择的仪器标识621所对应的测量仪器的原始地址传递给用户选择的应用程序。使应用程序有了确定的通信对象,使用该原始地址与测量仪器通信。至此,完成了该应用程序对该被选测量仪器调用的建立,使用户可以正常的使用该被选应用程序来控制被选测量仪器了。The measurement resource control system 6 transmits the original address of the measuring instrument corresponding to the instrument identifier 621 selected by the user to the application program selected by the user. The application program has a definite communication object, and uses the original address to communicate with the measuring instrument. So far, the establishment of calling the selected measuring instrument by the application program is completed, so that the user can normally use the selected application program to control the selected measuring instrument.
步骤S34、资源调用解除步骤:将该被选测量仪器和该被选应用资源之间的调用解除。Step S34 , the step of canceling the resource call: cancel the call between the selected measuring instrument and the selected application resource.
步骤S35、显示控制步骤:根据所述调用的建立将所述测量仪器列表中所述被选测量仪器所对应的测量仪器标识以第二显示属性显示,而根据所述调用的解除将所述测量仪器列表中所述被选测量仪器所对应的测量仪器标识以第一显示属性显示。Step S35, display control step: according to the establishment of the call, display the identification of the measuring instrument corresponding to the selected measuring instrument in the list of measuring instruments with the second display attribute, and according to the cancellation of the call, display the The identification of the measuring instrument corresponding to the selected measuring instrument in the instrument list is displayed with the first display attribute.
在本实施方式中,步骤S35包括步骤S351~S352。In this embodiment, step S35 includes steps S351-S352.
步骤S351、资源定位步骤:根据所述被选测量仪器定位到所述测量仪器列表中与所述被选测量仪器对应的所述测量仪器标识,作为待修改测量仪器标识;Step S351, resource locating step: locate the measuring instrument identifier corresponding to the selected measuring instrument in the measuring instrument list according to the selected measuring instrument, as the measuring instrument identifier to be modified;
步骤S352、显示属性修改步骤:根据所述调用的建立将所述待修改测量仪器标识的显示属性修改为第二显示属性;根据所述调用的解除将所述待修改测量仪器标识的显示属性修改为第一显示属性。Step S352, display attribute modification step: modify the display attribute of the to-be-modified measuring instrument ID to the second display attribute according to the establishment of the call; modify the display attribute of the to-be-modified measuring instrument ID according to the cancellation of the call is the first display attribute.
请参照图39,为了实现上述各个步骤,测量资源控制系统5包括一个仪器资源控制部件M31、一个输入部件M32、一个资源调用建立部件M33、一个资源调用接触部件M34和一个显示控制部件M35。该仪器资源控制部件M31用于与所述测量仪器建立连接,产生与所述测量仪器对应的一个原始地址和一个仪器标识;该输入部件M32用于通过所述仪器标识来从所述测量仪器中选择一个被选测量仪器,和从所述应用资源中选择一个被选应用资源;资源调用建立部件M33用于将从该测量仪器中的选择一个被选测量仪器与从该应用资源中选择的一个被选应用资源建立调用;资源调用接触部件M34用于将该被选测量仪器和该被选应用资源之间的调用解除;显示控制部件M35用于根据所述调用的建立将所述测量仪器列表中所述被选测量仪器所对应的测量仪器标识以第二显示属性显示,而根据所述调用的解除将所述测量仪器列表中所述被选测量仪器所对应的测量仪器标识以第一显示属性显示。Please refer to FIG. 39 , in order to realize the above steps, the measurement resource control system 5 includes an instrument resource control part M31, an input part M32, a resource call establishment part M33, a resource call contact part M34 and a display control part M35. The instrument resource control part M31 is used to establish a connection with the measuring instrument, and generate an original address and an instrument identification corresponding to the measuring instrument; Select a selected measuring instrument, and select a selected application resource from the application resources; the resource call establishment part M33 is used to select a selected measuring instrument from the measuring instruments and a selected application resource from the application resources. The selected application resource establishes a call; the resource call contact part M34 is used to release the call between the selected measuring instrument and the selected application resource; the display control part M35 is used to list the measuring instrument according to the establishment of the call The measuring instrument identification corresponding to the selected measuring instrument is displayed in the second display attribute, and the measuring instrument identification corresponding to the selected measuring instrument in the measuring instrument list is displayed in the first display according to the cancellation of the call The properties are displayed.
仪器资源控制部件M31包括一个仪器资源查找部件M311和一个仪器资源连接部件M312。该仪器资源查找部件M311用于产生所述测量仪器的所述原始地址;该仪器资源连接部件M312用于根据所述原始地址向所述测量仪器发送命令,获取所述测量仪器的仪器基本信息,根据所述仪器基本信息产生所述仪器标识。The instrument resource control part M31 includes an instrument resource search part M311 and an instrument resource connection part M312. The instrument resource searching part M311 is used to generate the original address of the measuring instrument; the instrument resource connecting part M312 is used to send a command to the measuring instrument according to the original address to obtain the basic instrument information of the measuring instrument, The instrument identification is generated according to the basic information of the instrument.
输入部件M32包括一个测量资源列表产生部件M321、一个第一资源选择部件M322、一个动态第二资源列表产生部件M223和一个第二资源选择部件M224。The input part M32 includes a measurement resource list generation part M321, a first resource selection part M322, a dynamic second resource list generation part M223 and a second resource selection part M224.
测量资源列表产生部件M321,用于根据所述仪器标识,产生一个与所述仪器标识相对应的在线仪器列表,和用于根据所述应用资源,产生一个与所述应用资源相对应的应用列表;A measurement resource list generation component M321, configured to generate an online instrument list corresponding to the instrument identifier according to the instrument identifier, and to generate an application list corresponding to the application resource according to the application resource ;
第一资源选择部件M322,用于从所述在线仪器列表和所述应用列表中选择一个被选第一资源,所述被选第一资源是所述被选测量仪器和所述被选应用资源中的一个;The first resource selection component M322 is configured to select a selected first resource from the online instrument list and the application list, and the selected first resource is the selected measuring instrument and the selected application resource one of the;
动态第二资源列表产生部件M323,用于如果所述被选第一资源是所述被选应用资源,则根据所述被选应用资源和所述测量仪器产生一个包含与所述被选应用资源相匹配的测量仪器的动态在线仪器列表,所述动态在线仪器列表是所述在线仪器列表的至少一部分;如果所述被选被选第一资源是所述被选测量仪器,则根据所述被选测量仪器和所述应用资源产生一个包含与所述被选测量仪器相匹配的应用资源的动态应用列表,所述动态应用列表是所述应用列表的至少一部分;A dynamic second resource list generating component M323, configured to generate a list containing the selected application resource according to the selected application resource and the measuring instrument if the selected first resource is the selected application resource. A dynamic online instrument list of a matching measuring instrument, the dynamic online instrument list being at least a part of the online instrument list; if the selected first resource is the selected measuring instrument, according to the selected selecting the measuring instrument and the application resource to generate a dynamic application list including application resources matching the selected measuring instrument, the dynamic application list being at least a part of the application list;
第二资源选择部件M324,用于如果所述被选第一资源是所述被选应用资源,则从所述动态在线仪器列表中选择所述被选测量仪器;如果所述被选第一资源是所述被选测量仪器,则从所述动态应用列表中选择所述被选应用资源。The second resource selection component M324 is configured to select the selected measuring instrument from the dynamic online instrument list if the selected first resource is the selected application resource; if the selected first resource is the selected measuring instrument, then select the selected application resource from the dynamic application list.
本发明的测量资源控制系统和测量资源控制方法至少具有如下有益效果:The measurement resource control system and measurement resource control method of the present invention have at least the following beneficial effects:
1.由于本发明的测量资源控制系统和测量资源控制方法可以为应用程序提供测量仪器的原始地址,不再需要每一个应用程序自己去产生原始地址,因此原始程序的开发过程中可以省去仪器查找模块147、仪器连接模块148的开发,使得应用程序开发、维护较为简单。1. Since the measurement resource control system and measurement resource control method of the present invention can provide the original address of the measuring instrument for the application program, it is no longer necessary for each application program to generate the original address itself, so the instrument can be omitted in the development process of the original program The development of the search module 147 and the instrument connection module 148 makes application program development and maintenance relatively simple.
2.当测量仪器和应用程序的数量庞大的时候,用户选择了被选测量仪器或被选应用程序后,本发明的测量资源控制系统和测量资源控制方法将自动找到匹配的应用程序和测量仪器,排除了不匹配的选项的干扰,使得将测量仪器与应用程序的匹配非常方便。2. When the number of measuring instruments and application programs is huge, after the user selects the selected measuring instrument or the selected application program, the measurement resource control system and measurement resource control method of the present invention will automatically find matching application programs and measurement instruments , eliminates the interference of unmatched options, making it very convenient to match the measuring instrument to the application.
3.由于一些测量仪器22与应用程序24建立调用后,不能再被其他应用程序24所调用,否则将会出现通讯错误等问题,因此,本发明测量资源控制系统和测量资源控制方法使已经与被选应用程序2401建立调用的被选测量仪器处于一个禁止再次调用状态。这样不仅可以防止用户利用其它应用程序再次调用该被选测量仪器,造成通讯错误等问题,而且在在线仪器列表中有多少个测量仪器处于被调用状态可以一目了然,使用起来非常方便。3. Since some measuring instruments 22 and application programs 24 are established and called, they cannot be called by other application programs 24, otherwise problems such as communication errors will occur. Therefore, the measurement resource control system and measurement resource control method of the present invention have been used with The selected measuring instrument that the selected application program 2401 calls is in a state of prohibiting re-calling. This can not only prevent the user from using other applications to call the selected measuring instrument again, causing communication errors and other problems, but also can see at a glance how many measuring instruments are being called in the online instrument list, which is very convenient to use.
Claims (6)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201010534838.0A CN102467369B (en) | 2010-11-03 | 2010-11-03 | Measurement resource control system and measurement resource control method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201010534838.0A CN102467369B (en) | 2010-11-03 | 2010-11-03 | Measurement resource control system and measurement resource control method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN102467369A CN102467369A (en) | 2012-05-23 |
| CN102467369B true CN102467369B (en) | 2017-06-09 |
Family
ID=46071046
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201010534838.0A Active CN102467369B (en) | 2010-11-03 | 2010-11-03 | Measurement resource control system and measurement resource control method |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN102467369B (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105302609B (en) * | 2015-11-05 | 2018-10-16 | 中国电子科技集团公司第四十一研究所 | Data resource configuring management method applied to measuring instrument |
| TWI676899B (en) * | 2018-02-21 | 2019-11-11 | Measuring instrument data collecting device and method | |
| CN112650576B (en) * | 2021-01-22 | 2023-12-29 | 百度在线网络技术(北京)有限公司 | Resource scheduling method, device, equipment, storage medium and computer program product |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1367426A (en) * | 2000-12-28 | 2002-09-04 | 微软公司 | Label related to environment for electronic equipment |
| CN1573723A (en) * | 2003-05-15 | 2005-02-02 | 三星电子株式会社 | Method and apparatus for communication via serial multi-port |
| CN1821959A (en) * | 2005-02-17 | 2006-08-23 | 国际商业机器公司 | Methods for user interface controlling system |
-
2010
- 2010-11-03 CN CN201010534838.0A patent/CN102467369B/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1367426A (en) * | 2000-12-28 | 2002-09-04 | 微软公司 | Label related to environment for electronic equipment |
| CN1573723A (en) * | 2003-05-15 | 2005-02-02 | 三星电子株式会社 | Method and apparatus for communication via serial multi-port |
| CN1821959A (en) * | 2005-02-17 | 2006-08-23 | 国际商业机器公司 | Methods for user interface controlling system |
Non-Patent Citations (2)
| Title |
|---|
| 基于网络的高频虚拟实验室的设计与开发;郝建勋;《学位论文》;20060918;第7,14,17页 * |
| 多仪器测试系统及其串行通信驱动程序的开发;赵伟等;《鱼雷技术》;20070430;第15卷(第2期);全文 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN102467369A (en) | 2012-05-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN102004952B (en) | Measuring resource control system and measuring resource control method | |
| CN112270149B (en) | Verification platform automatic integration method and system, electronic equipment and storage medium | |
| TWI514130B (en) | A computing device, method, computer-program product and apparatus for enabling concurrent testing | |
| CN101206130A (en) | Automatic verification/calibration/testing platform for electronic instruments | |
| CN104915297B (en) | A kind of automated testing method of the APP power consumption of android equipment | |
| CN102890652B (en) | Method for constructing testing software and testing system employing method | |
| CN106646315A (en) | Automatic testing system and automatic testing method for digital measuring instruments | |
| CN102467372B (en) | One kind measurement resource control system and measurement resource control method | |
| CN102467369B (en) | Measurement resource control system and measurement resource control method | |
| CN102467370B (en) | Measure resource control system and measure resource control method | |
| CN112765018B (en) | Instrument debugging system and method | |
| WO2020146798A1 (en) | Disaggregated distributed measurement analysis system using dynamic application builder | |
| CN106815150B (en) | Server-side interface test system and method | |
| CN109783295A (en) | Test macro self-test method for producing software and device based on configuration | |
| CN102467090B (en) | A kind of measurement resource control method and measurement resource control system | |
| CN101030160B (en) | Tester and method for testing unified series interface command | |
| CN110749814A (en) | Automatic testing system and method for chip IC sample | |
| Rao et al. | Development of Python-Based Applications for Virtual Instrument Control Using PyQt5, PyVISA, and SCPI Protocol | |
| CN102467368B (en) | A kind of measurement resource control system and measurement resource control method | |
| CN112770108A (en) | Performance test method, device and system and computer readable storage medium | |
| US9298428B2 (en) | Graphical user interface editor that displays live data during editing | |
| CN118606211A (en) | Test script generation method, device, electronic equipment and vehicle | |
| CN102467368A (en) | Measurement resource control system and measurement resource control method | |
| CN102467371B (en) | A kind of measurement resource control method and measurement resource control system | |
| CN114598630A (en) | A network device testing system, method, electronic device and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |