Virtual Instrument Test System Based on Network

Publisher:painterLatest update time:2015-01-08 Source: knowskyKeywords:Network Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

  With the in-depth development and combination of computer technology, communication technology and instrument technology, virtual instruments have been further developed. Virtual instruments combine computer resources with instrument hardware and digital signal processing technology, and change the way manufacturers define instrument functions to users defining instrument functions themselves. Users can design the required instrument system according to the needs of the test, use one or more general modules of functions, call software modules with different functions, and form different instrument functions. In virtual instruments, computers become part of the instrument, so that computers can be fully utilized. In addition to the input, output, data processing and analysis, and result display of the instrument completed by the computer, a computer network can also be formed. A large and complex test system often has system measurement, input, output, and result analysis distributed in different geographical locations. Only one computer cannot complete the test task, and several computers distributed in different geographical locations need to jointly complete the entire test task. The development of computer network technology, bus technology, database technology, and even the development of the Internet has expanded the application scope of virtual instrument test systems. Using network technology to connect test equipment with different functions scattered in different geographical locations, expensive hardware equipment and software can be shared within the network, reducing repeated investment in equipment. The data collected by one computer can be immediately transmitted to another processing and analysis machine for processing and analysis. The results of the analysis can be queried and used by the executive agency and the designer, making data collection, transmission, processing and analysis integrated, and easy to achieve real-time collection and real-time monitoring. Important data is backed up on multiple machines to improve the reliability of the system. For some dangerous data collection work in harsh environments that are not suitable for human operation, remote collection can be implemented, and the collected data can be placed on the server for users to use. Virtual instruments are combined with computer networks to realize remote teaching of instruments. Students learn and operate instruments through the Internet, which is also the goal of our school laboratory construction. Virtual instrument computer networking has broad application prospects in test systems.

2. Design of virtual instrument network test system

  The design of virtual instrument network test system needs to consider both virtual instrument and network technology.

  (1) Virtual instrument part

  Analyze the requirements of the test system and the functions of the system, and optimize the selection between software and hardware according to the requirements of the system functions, so as to determine the necessary hardware modules for the instrument, so as to achieve the best functions of the instrument with the least modules. According to the application and actual conditions, select the instrument modules of computer-based virtual instruments (VXI bus, PCI bus, PXI bus, GPIB instruments), including sensors, signal conditioning circuits, DAQ data acquisition, signal sources and other modules.

  After the hardware is determined, the main thing is to determine the software functional modules and which instrument functions are implemented by software, and divide the software functions into relatively independent modules. Then choose a graphical software platform that is easy to write. The LabVIEW platform is a graphical programming environment that provides virtual instrument controls, rich data processing and analysis functions, instrument drivers, and database tool software packages. The SQL and DataSocket software provided by LabVIEW are software packages that are easy to establish a networked test environment. Using LabVIEW to write virtual instrument software simplifies program design and improves efficiency. We use LabVIEW and NI's data acquisition card to achieve data acquisition, virtual oscilloscopes, and virtual signal generators.

  Virtual C++ is a general-purpose, powerful object-oriented programming language that provides integrated and visual user interfaces. It uses object-oriented programming methods. It has low-level operating functions and database development functions. It is flexible in programming, so it is also a programming language often used by programmers. We also used VC++ to write a virtual instrument platform that can build an oscilloscope, spectrum analyzer, and signal generator. Now we plan to use VC to write database software and realize networked virtual instruments.

  (2) Network structure design

  According to the different geographical locations and coverage of each part of the test system, a local area network, a metropolitan area network, and a wide area network can be constructed. A large and complex test system is composed of various subsystems, such as an aviation dynamic test system and a gun test system. Environmental tests, temperature tests, vibration tests, and tests on electronic systems and communication systems are required. Each subsystem is generally within a small range of a unit, so a local area network can be established, and then each local area network can be interconnected to form an enterprise measurement system. Due to the development of the Internet, some public data can also be published online through the Internet for online users to use, and a measurement publishing system can be established. For some dangerous and harsh data collection work that is not suitable for human operation, remote collection can be implemented.

  Since each test point in the network test is responsible for different test tasks, in order to reduce unnecessary duplication of work, resource sharing is achieved through the network, and at the same time, the data transmission between the server and each node is reduced to improve the performance of the network system. Therefore, the coordination between the server and each node and between each node is particularly important. Distributed computing and distributed processing systems based on the Client/Server model are the best choice to solve this problem. Based on the C/S model, the system functions are decomposed into each node, and each node cooperates organically. Users can observe the data and processing results obtained from the server on their own terminals. In C/S, there are client programs and server programs. Client programs and server programs can run in one computer or in two or more computers. Client programs and Sewer programs cooperate with each other. A test system consists of one or more clients with different tasks and one or more servers. The client is the interactive interface between the user and the system, providing a user interface, completing the input of user commands and data, and displaying the results sent back by the server. The server accepts the application submitted by the client, completes the required operation and transmits the results to the user. In a test system, each server and client has different tasks, such as data collection, data processing and analysis, output, and monitoring. A computer collects external data, stores and transmits the collected data to another computer, which is the server. In addition, it needs to obtain data from a remote computer, and then it becomes a client. The C/S model is a collaborative processing working mode of an open system. [page]

  When designing the C/S model, we should first analyze the indicators and functional requirements that the system needs to achieve. On this basis, we should divide the system into relatively independent modules and assign them to various computers. Each computer performs different functions. Independent tasks that can be completed on the client should not be placed on the server to reduce the workload of the server. Second, we must ensure reliable transmission of data between the server and the client, and between the clients. When designing, we need to consider that the network bandwidth must meet the transmission requirements and reduce the amount of network data transmission. The second major consideration is the choice of server type. One of the most basic service types in the C/S model is the database server, as well as the transaction processing server, application server, and object server types.

   In a database server, the client uses an SQL command to send a service request to the database server, and the database transmits the range service result to the client. The transaction processing server treats the completion of a more complex data processing process as a transaction, and uses a set of SQL commands to represent the transaction processing process. After the server executes this set of commands, it returns the result to the client. The application server is used to control an information, image or email display device, control an electronic bulletin board, and a processor with download capabilities. The application program of the object server is designed as a structure of communication objects, namely client objects and server objects. The client object uses an object request to proxy all communication tasks between it and the server object. The client object request proxy finds the corresponding server object on the server and returns the result to the client.

  In the test system, you can design a collection server with collection services, a server for data processing and analysis, and the server type can be a database server. The monitoring server, information publishing and data display use application servers and object servers. Choosing the right server type according to the actual situation is very important to improve the efficiency of the network test system. The security and reliability of the network system is an important issue that must be considered during design. This is also a hot topic in the network system, which will not be described here.

  (3) Software development methods

  Since the tasks of each node in the test system are different, the database management systems they are connected to may not be the same. Therefore, the test system generally hopes not to rely on the database management system. Therefore, the development of the database often adopts the ODBC method. ODBC is a standard interface for database access. You can access different types of databases through this interface. It can basically be used for all relational databases. No matter what kind of relational database the test database is, as long as there is an ODBC driver for the corresponding type of database, you can access the database. The ODBC API includes the following components:

  ① Test the application;

  ②Driver Manager: Loads the ODBC driver according to the needs of the application.

  ③ODBC driver: Submits SQL statements to the specified data source and returns the results to the application.

  ④Data source: data, DBMS and operating system that users want to access.

  LabVIEW provides DBC, SQL, and DataSocket development tools. Programming with these tools will improve programming efficiency. DataSocket is a programming technology for real-time data exchange on the Internet for measurement and automation engineering launched by NI. It includes several tool software such as DS Sewer Manager, DS Sewer, and DS function library, as well as technical specifications such as DSip protocol, universal resource locator URL, and file format. It can greatly simplify the programming work of measurement and control data exchange between computers on the Internet. DS can also be used for data exchange between multiple applications in a computer or a local area network. The DS function library contains functions such as Open, read, writedose, etc. DS technology can be used in a variety of development environments such as C language, VB, and LabVIEW. DataSocket software can be considered for remote data exchange.

  If the virtual instrument software is written in VC and the user is familiar with VC, VC++ can be used to develop the database. VC provides a variety of methods for accessing the database: ODBC, MFC ODBC, DAO, OLE DB, ADO, etc. These technologies have their own characteristics.

  ODBC can access all relational databases, but cannot access object databases and other non-relational databases. Therefore, for high-level database application technologies, 6C ODBC can be used. MFC ODBC is an object-oriented database class provided by VC. The MFC ODBC class encapsulates the ODBC API and provides object-oriented database classes. The main ODBC classes are Cdatabase, Crecordset, CrecordView, etc. Use the Cdatabase object class to connect to the database. The Crecordset class can search, sort, add, delete, and update database records. The CrecordVIew class is used to display documents. Using these classes to write programs greatly simplifies the writing of applications.

  DAO (Database Access Object) is a mechanism provided by VC to create and manipulate local databases and remote data through program code, and manage objects or structures in the database. DAO supports two different database environments. One is to use the Micsoft Jet database engine to access the Micsoft Jet database data, the ODBC database data connected to Micsoft Jet, etc. The other is the ODBC Direct workspace, which directly accesses an ODBC database and can access the database server through ODBC without loading the Micsoft Jet database engine. Using DAO technology, we can access a variety of database formats from txt files to large background databases.

  OLE DB is a database interface based on the Component Object Model (COM). It provides a unified calling interface for all files. It can access both relational databases and non-relational data (such as spreadsheets, e-mails, various documents, files, etc.). Due to the use of the COM model, the system is stable, the interface is flexible, it has availability and encapsulation, and the database access speed is fast. Because componentization enables OLE DB programs to implement functional distribution, the data application program as a client only needs to complete its own data management function, and the server data provider only needs to complete part of its own function.

  OLE DB technology can be used to develop object servers and application servers in C/S.

  ADO〈ActiveX Data Object〉 is another object-oriented database development technology provided by VC. OLE DB can access the capabilities of database applications, but a lot of code programs need to be written. ADO accesses the database through the OLE DB provider. ADO technology uses high-level access technology to access the encapsulated COM interface in OLE DB. It provides access technology for various languages, including VB, VC, VBA, VJ++. At the same time, ADO can also access script, VCScript, etc. using descriptive scripting languages. Using ADO to develop web pages can easily establish Internet virtual instruments in client and server applications. LabVIEW and VirSual C++ both provide a wealth of server and client database software tools. Choosing a suitable database software development environment according to your own situation will greatly improve the efficiency of system development.

3. Conclusion

  The development and combination of computer network technology and virtual instrument technology have further broadened the application of virtual instruments, allowing virtual instruments to be developed and applied in test automation and distance learning. The network structure of the C/S model divides the functions of the system into relatively independent functional modules according to different applications, and reasonably allocates them within the system to optimize the performance of the network virtual instrument system. The development and application of computer software and software tool technology have enabled the writing of virtual instrument system performance to be optimized. The development and application of computer software and software tool technology have made it easy to implement virtual instruments and network system software, further promoting the development of virtual instrument network systems.

Keywords:Network Reference address:Virtual Instrument Test System Based on Network

Previous article:Virtual Instrument Network Measurement and Control System Platform
Next article:Top 5 Mistakes LabVIEW Newbies Make

Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号