Figure 1 System software composition
The instrument driver is a software program that completes the control and communication of a specific instrument, that is, the driver software of the module. Its design must comply with the two specifications of VPP, namely VPP3.1 "Instrument Driver Structure and Model" and VPP3.2 "Instrument Driver Design Specification".
"Soft panel" design is to design a panel with variability, multi-layer, self-service and humanization. This panel should not only have functional components such as display, LED, pointer-type meter, knob, slide bar, switch button, alarm device, etc. like the traditional instrument panel, but also should have multiple coherent operation panels, online help functions, etc.
2. Application of virtual instruments in data acquisition The
use of virtual instruments to make data acquisition devices can be completed in two steps: hardware design and software design.
2.1 Hardware Design
Hardware design should complete the following:
(1) A/D conversion and data storage
Setting up a universal data acquisition system should generally meet the requirements of acquiring multiple signals as synchronously as possible. In order to store the acquired data not only on the data acquisition device, but also to timely transmit the data to the host computer during the acquisition process, a first-in-first-out memory with a relatively moderate storage capacity is selected. This can not only meet the needs of storing a small amount of data, but also transmit data at the same time as A/D conversion when real-time data transmission is required, without losing any data.
(2) VXI bus interface
VXI bus data acquisition devices can usually use two VXI bus general interfaces: message-based interface and register-based interface. The function of the message-based interface is to transmit commands through the bus to control the operation of the instrument hardware. The general register-based interface controls the operation of the instrument hardware by simply reading and writing registers. Design using the message-based interface. The block diagram of the specific message-based interface is shown in Figure 2. [page]
Figure 2 Block diagram of the message-based interface
In order to meet the requirements of several typical system channel control, the number of channels is sufficient and the channel selection is flexible. The sampling channels can be designed to be up to 64 channels and at least 2 channels, which can be selected at will, by using the cooperation of register circuits, presettable counter circuits and some other logic circuits. Moreover, sampling can be started from any channel and ended at any channel, as long as the end channel number is greater than the start channel number. The entire control is operated on the virtual instrument soft panel. The command is written into the control register of this part through the message base interface to set the initial value of the counter and the total number of channels to be sampled.
(4) Timing sampling control
Since different automatic test systems have different requirements for sampling time intervals, and the sampling time intervals required for the same system in different tests are also different, the sampling time interval can be set to any range between 2 μs and 13.0 ms by program control. The minimum unit that can be increased or decreased is 2 μs. All these selection settings can be made on the virtual instrument soft panel.
(5) Sampling point control
According to the requirements of different test systems, the sampling points are designed to be arbitrarily selected within a relatively large range, and the selection is also made on the soft panel.
(6) Sampling mode control
In summary, the sampling modes of various automatic test systems are nothing more than software-triggered sampling and hardware-triggered sampling. Hardware-triggered sampling includes synchronous full-cycle sampling and asynchronous full-cycle sampling. These two types of sampling can be performed at regular intervals or with equal speed differences. All these sampling modes can be selected on the soft panel for the data logger.
2.2 Software design
Software is the key to virtual instruments. In order to make the VI system structure clear and concise, the component design concept can generally be adopted to make the independent software units of each part into standard components, and then form a complete application system according to the overall requirements of the system. A standard componentized virtual instrument software system is shown in Figure 3.
Figure 3 Componentized virtual instrument software system
The software of data acquisition devices based on virtual instruments includes system management software, application programs, instrument driver software, and I/O interface software. In the past, these four parts needed to be organized or developed by users themselves, which was often difficult, but now NI provides all four parts of software, making application development much easier than before.
The following briefly introduces the method of developing drivers for VXI virtual instruments using NI's Lab Windows/CVI as the development environment.
Step 1: Generate the user interface resource file (UIR) of the instrument module. The user interface resource and file are a graphical user interface (GUI) designed for the instrument module by the instrument module developer using the user interface editor of Lab Windows/CVI. A Lab Windows/CVI GUI consists of panels, command buttons, icons, drop-down menus, curves, knobs, indicator tables, and many other control items and instructions.
Step 2: Lab Windows/CVI event-driven programming. Designing a user interface in the application development environment Lab Windows/CVI is actually defining a panel on the user's computer screen, which consists of various control items (such as command buttons, menus, curves, etc.). When the user selects these control items, a series of user interface events (events) can be generated. For example, when the user clicks a command button, this button generates a user interface event and passes it to the C language driver written by the developer. This is the application of the event-driven mechanism of Windows programming. Different types of control items are used in Lab Windows/CVI, and different types of information will be displayed in the interface editor, and interface events for different operations will be generated. In the Lab Wind ows/CVI development platform, there are two basic methods for C program programming for event-driven: callback function method and event loop processing method. The
callback function method is that the developer writes an independent user interface control function for each user interface control item. When a control item is selected, the corresponding function is called for event processing. In the loop processing method, only the COMMIT event generated by the GUI control item is processed. Through the Get User Event function filtering, all COMMIT events are distinguished, and the event generated by which control item is identified, and the corresponding processing is performed.
Step 3: Write application functions/VI sets and application software packages. Application functions/VI sets need to be programmed for specific instrument module functions. Application software packages are only required for some powerful modules that require complete data processing capabilities, such as waveform analyzer modules, DSP modules, etc.
Figure 4 is a system test process based on virtual instruments.
Figure 4 Virtual instrument system test flow chart
This paper discusses the basic composition of virtual instruments and the general methods of virtual instrument software and hardware design. These methods have been proven to be reliable through practical design work and can be used as a reference for system engineering technicians when building specific VXI bus-based virtual instrument data acquisition and testing.
References
[1] Zhao Yong. Virtual instrument software platform and development trend [J]. Foreign Electronic Measurement Technology, 2002, (1)
[2] Chen Guangyu. VXI bus test platform [M]. Beijing: University of Electronic Science and Technology Press, 1996
[3] Sun Xin, Zhang Zhongting, Xue Changbin. Methods for integrating VXI bus automatic test system [J]. Measurement and Control Technology, 1996, 15 (4)
[4] Zhang Yigang, Peng Xiyuan, Jiang Ningda, et al. Automatic test system [M]. Harbin: Harbin Institute of Technology Press, 2001
[5] Wang Hong. Component-based virtual instrument software system [J]. Microcomputer Information, 2001, (1): 76-77
Previous article:Application of Virtual Instrument Technology in Automobile Testing
Next article:Virtual Instrument Technology and Its Application in Data Acquisition
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- SIMterix-Simplis~6~
- Experience in using MQTT protocol
- SSD1306 Chinese character mobile demonstration
- Using Low Noise Modules in Satellite Applications
- Software Implementation of Serial Data Communication between C2000 Series DSPs
- Some misunderstandings in FPGA learning.zip
- MSP430F5438A supports communication scheme verification based on COAP protocol
- I want to design a sine wave generator.
- [RT-Thread reading notes] Part 1 Simple principles of the kernel
- I worked hard to drive the CC2640 Hanshuo electronic tag.