Design of Human-Machine Interface Mode of Virtual Instrument Based on Labview

Publisher:pcwgLatest update time:2015-07-20 Source: dzscKeywords:Labview Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
  1 Introduction

  Lebview is now more and more widely used in measurement, control, teaching, scientific research and other fields. It adopts graphical programming and has a large number of built-in functions. It can easily complete various operations such as data acquisition, analysis and display, instrument control, measurement and testing, industrial process simulation and control, and has good scalability.

  When using Labview for actual project development, the program is often required to achieve multi-functional integration. At this time, the program interface is unified and easy to operate. This paper takes the development process of a virtual signal generator as an example to study the design and implementation of the human-computer interface mode when using Labview to develop virtual instruments .

  2 System Requirements and Analysis of Virtual Signal Generator

  2.1 System Requirements

  The overall design requirements of the virtual signal generator are as follows: 1. Realize multifunctional signal generation, be able to generate common waveforms (sine wave, triangle wave, square wave, saw wave, etc.), user-defined function waveforms, noise waveforms, etc. 2. Be able to adjust parameters and complete the digital storage function of waveforms. 3. Require a good human-computer interaction interface and easy operation.

  2.2 Design Analysis

  It is relatively simple to realize the signal generation of a single function in Lebview. You only need to place the corresponding controls on the front panel to set waveform parameters, waveform display and data storage path, then select the appropriate function node in the block diagram program window and complete the logical connection of each node and endpoint to meet the requirements.

  According to the system design requirements, the program not only needs to realize multiple functions, but also should have the characteristics of allowing users to operate conveniently. Simply putting multiple sub-function programs together cannot meet the requirements.

  We conducted a comprehensive analysis of the system requirement of "easy to operate and good human-computer interaction interface" and designed three human-computer interface modes with different characteristics: overall interface mode, pop-up interface mode, and dynamic call interface mode.

  3 Human-machine interface design of virtual signal generator

  3.1 Overall interface mode design

  Features of the overall interface mode: parameter settings and implementations of all functional modules are in the same interface, and different functions correspond to different function buttons. When a button is pressed, the corresponding function operation will be realized.

  3.1.1 Front panel design

  In the front panel design, we put common parameters in one group to avoid duplicate controls; we divide the characteristic parameters of each sub-function into different groups to facilitate user operation. The waveform display is completed by a graph control, and the data storage also shares the same functional area. Interlocking buttons are used to switch between sub-functions. The front panel in this mode is shown in Figure 1.

Figure 1 Front panel of the overall interface mode

Figure 1 Front panel of the overall interface mode

  3.1.2 Key points of block diagram programming

  We chose the selection structure to complete the implementation of the overall interface mode: the common signal module, user function signal module, and noise signal module are used as the three branches of the selection structure. When the required function button is pressed, the selected sub-block diagram program is executed to complete the corresponding operation. It should be noted here that each sub-function button should be set to an interlocking relationship, that is, only one button is allowed to be pressed at any time. When another button is pressed, the button that was originally pressed will automatically pop up.

  We put each sub-function button into an array, and the array content corresponds to the switch state of each button. Then set a while loop structure, and use the shift register of the loop structure to compare the button array content in this loop with the button array content in the previous loop. If they are equal, it means that no other buttons are pressed; if they are not equal, it means that another button is pressed. At this time, the content of the button array needs to be rewritten: the logic value of the button originally pressed should be changed to "false", and the logic value of the newly pressed button should be changed to "true". The current button state content and the previous button state content can be XORed to achieve these two functions. The updated button state is completed by rewriting the original button array content through local variables. The block diagram program of the interlocking logic is shown in Figure 2.

Figure 2 Interlocking logic block diagram program

Figure 2 Interlocking logic block diagram program

  The advantage of the overall interface mode is that all sub-function modules are in the same interface, and the overall visibility and operability are good. However, when there are many sub-module types, the interface will be too bloated and difficult to operate, and the programming will be too complicated. At this time, we can use the Tab control to classify the function modules to achieve the purpose of simplifying the front panel interface. [page]
 

  3.2 Pop-up interface mode

  Features of the pop-up interface mode: When you press a sub-function button on the main program panel, a sub-program panel of the corresponding function will pop up, and the sub-panel will return to the main panel after it finishes running.

  3.2.1 Front panel design

  We make each sub-function module into multiple sub-programs and place them in the same path as the main program for easy calling. The front panel of the main program only needs to implement the call button configuration of the corresponding function. When a certain function needs to be used, press the corresponding button to call out the sub-program interface. After the execution is completed, close the sub-program and return to the main program interface to call other functions. The pop-up interface during the operation of the virtual signal generator is shown in Figure 3 (calling the "common waveform generation" sub-function program).

Figure 3 Front panel architecture in pop-up interface mode

Figure 3 Front panel architecture in pop-up interface mode

  3.2.2 Key points of block diagram programming

  The event-driven function of Labview can easily realize the design requirements of the pop-up interface, so we choose the event structure to implement the programming of the pop-up interface of the virtual signal generator.

  In the event structure of the main program, the call of the corresponding sub-function program is specified for each function button event. In this way, every time a function button is pressed, Labview will automatically notify the program of the event, and then respond to the event according to the program code specified for this event. The block diagram design of the main program is shown in Figure 4.

Figure 4 Main block diagram of pop-up interface mode

Figure 4 Main block diagram of pop-up interface mode

  The advantage of the pop-up interface mode is that the interface and program structure are clear, all sub-modules are programmed separately and called by the main program on demand, which can greatly reduce the complexity of programming.

  3.3 Dynamic Call Mode

  Characteristics of dynamic calling mode: The sub-function program is dynamically loaded into the memory only when it is called and is released after the call ends.

  3.3.1 Front panel design

  We divide the program interface into two areas: the left area is set with various function buttons, which can call sub-functions as needed; the right area is composed of subpanel controls, which display and run the corresponding interface and functions when the sub-function is called. Figure 5 shows the interface when the program calls the "Function Signal Generation" sub-function program.

Figure 5 Front panel of dynamic call mode

Figure 5 Front panel of dynamic call mode

  3.3.2 Key points of block diagram programming

  In order to facilitate calling sub-function programs, the main program and each sub-function program are saved in the same path.

  When the main program is running, if you need to call a sub-function program, you should first know the overall path of the sub-program: you can first use the current VI'S Poih function and the Stdp Path function to obtain the path of the main program, and combine this path with the name of the sub-program to be called to form the overall path of the sub-program. Then use the loadondRun function to load and start the sub-program with the known path, and finally use the Insert VI method in the call node corresponding to the subponel control to insert the sub-program panel into the sub-panel control.

  The selection requirements of different sub-function programs are implemented by the selection structure.

  The advantages of the dynamic call interface mode are that the sub-modules are programmed separately, the structure is clear, and the programming complexity is low; the program is dynamically loaded, occupies less memory, and has a fast loading speed.

  4 Conclusion

  Based on the design of the virtual signal generator, we have conducted a detailed analysis and research on the three commonly used human-computer interface modes in Labview programming: the overall interface mode, the pop-up interface mode, and the dynamic call interface mode. In actual project development, these modes can be directly selected for interface design according to specific circumstances, or they can be used in combination to meet higher design requirements.

  It should also be pointed out that the implementation method of each mode is also flexible and changeable. For example, the interlocking buttons involved in 2.1 can also use the Enum control to achieve the same function. The implementation of interlocking logic can also be achieved by using the event structure combined with the method of setting the control property node: when a function button (such as the "Common Waveform" button) is pressed, the corresponding program code is executed: the logic value of itself is set to lrue, and the values ​​of other function buttons are set to false.

Keywords:Labview Reference address:Design of Human-Machine Interface Mode of Virtual Instrument Based on Labview

Previous article:Application of LabVIEW in Intelligent Virtual Instrument Simulation
Next article:Solar street light charging and discharging monitoring system based on LabVlEW

Recommended ReadingLatest update time:2024-11-15 13:24

Use of Tree Control
This section will focus on the Tree control in LabVIEW. Perhaps because the control itself is "troublesome" to use, many programmers are reluctant to use it. In fact, you can see the Tree control in most applications, such as the file list on the left side of the "Explorer" in the Windows operating system. Usually, th
[Test Measurement]
Use of Tree Control
Creating a Block Diagram in LabVIEW
  After creating the front panel, the controls in the front panel window correspond to terminals in the block diagram window. Select "Window → Show Block Diagram" (shortcut key: ) in the main menu of the front panel window, or double-click the added block diagram object to switch the front panel design interface to the
[Test Measurement]
Creating a Block Diagram in LabVIEW
LabVIEW releases EXE containing shared variables and solves related problems
RT, the following error is reported during generation. Solution:
[Test Measurement]
My LABVIEW rapid development of serial port test software example
  LABVIEW is an innovative product of National Instruments (NI), which allows programmers to use graphics to program, abandoning the difficult and obscure codes. They only need to drag the corresponding graphic controls and connect them, and perform simple configuration to complete the development of an application pr
[Test Measurement]
My LABVIEW rapid development of serial port test software example
Graphical System Design in RF and Communications
Academic experimental research requires some flexible, customizable, easy-to-use and powerful tools to develop and implement innovative algorithms, methods and systems in RF and communication applications. Today's complex systems, from their prototyping to their implementation, require an easy-to-use, fast and flexibl
[Test Measurement]
Graphical System Design in RF and Communications
In LabView, what is the difference between a drop-down list and an enumeration?
Enumeration variables can only be used for unsigned integer data types U32, U16, and U8; The drop-down list can include extended precision, double precision, single precision, 64-bit, long, double-byte, single-byte integers and various unsigned integers (as shown in the black part in the figure below).       drop
[Test Measurement]
In LabView, what is the difference between a drop-down list and an enumeration?
Labview programming skills-----How to eliminate trend items
Netizens asked about eliminating trends. Trend items are long-term cumulative system errors caused by certain factors in the test system. They are mainly reflected in the integration link and are often encountered in vibration signal processing. Acceleration sensors are generally used to detect vibration. The integr
[Test Measurement]
Labview programming skills-----How to eliminate trend items
Development of Solar Jet Refrigeration Measurement and Control System Based on LabVIEW
1. Introduction  The development of air conditioning systems towards new energy and reducing electricity consumption is an inevitable trend. At present, worldwide, the research and application of solar-driven jet refrigeration, absorption refrigeration and adsorption refrigeration have received widespread attention
[Test Measurement]
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号