Detailed Explanation of Waveform Chart in LabVIEW

Publisher:自由梦想Latest update time:2016-07-27 Source: eefocusKeywords:LabVIEW Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
A curve is a graphical display of a set of X and Y corresponding values. Usually, the Y value in the curve chart represents the data value, while the X value represents the time. The waveform chart control can be found in the Modern>>Graph sub-panel of the Controls tool panel. This control is a numerical indicator control specifically used to display one or more data curves. This control is often used in a loop structure to retain and display previously collected data, and append newly generated data to display these data in a continuously updated manner. In the waveform chart control, the Y value represents the newly generated data, and the X value represents the time (usually, a new set of Y values ​​is generated each time the loop is completed, and the X value represents the time of a loop).  There is only one waveform chart control in LabVIEW, but this control has three data refresh modes. The figure below is an example of a multi-curve waveform chart. 

[Reprint] Detailed Explanation of Waveform Chart in LabVIEW 


Waveform Update Mode
  The three data update modes of the waveform chart control are strip chart mode, scope chart mode, and sweep chart mode, as shown in the figure below. The data update mode can be changed by right-clicking the waveform chart control and selecting the Advanced>>Update Mode>> submenu in the pop-up menu. If you want to change the data update mode of the waveform chart control during the running of the VI program, since the right-click menu of the control at runtime is different from that during programming, just select it in the Update Mode in the control's mail menu.


[Reprint] Detailed Explanation of Waveform Chart in LabVIEW 
 
 


  Strip Chart mode displays the waveform like a real strip chart device. Scope mode displays the waveform like a real oscilloscope except that when the waveform reaches the right edge of the waveform, the entire waveform is cleared and restarted at the left edge of the waveform. Scan mode is very similar to Scope mode, but instead of clearing the waveform at the right edge, a vertical line appears on the waveform that marks the beginning of new data and moves slowly as new data is added. These differences are easy to distinguish after seeing the actual waveform control running in different refresh modes. Since Scope and Scan modes have less overhead in tracing back past curves than Strip Chart mode, these two data update modes are significantly faster than Strip Chart mode.
Note: The waveform graph is always set to X values ​​representing equally spaced points. In LabVIEW waveform graphs, you can provide only Y values ​​without worrying about X values. Each time a new Y value is added to the waveform graph, the X value is automatically increased by 1. For situations where the X value is arbitrary, you need to use the curve graph described later instead of the waveform graph.
  The data types that the waveform graph control can accept include numeric, array, and waveform data types. The waveform data type contains time information (such as the time stamp of the first data point and the time interval between each point). The waveform graph control will use this time information to display the data, which means that the initial X value and the interval between each point will be different each time new data is written to the waveform graph.
Single curve waveform
  The simplest way to use the waveform graph control is to connect a value to the input terminal of the waveform graph control in the VI block diagram, as shown in the figure below. A point is added to the waveform displayed in the waveform graph every time the loop is executed.
 
 

[Reprint] Detailed Explanation of Waveform Chart in LabVIEW 

  You can also update a single-curve waveform graph by adding multiple points at a time, as shown in the figure below, passing an array of values ​​to the waveform graph.

[Reprint] Detailed Explanation of Waveform Chart in LabVIEW 

 
 
Connection of multi-curve waveform graphs
  The Waveform Graph control can also be used to display multiple curves. However, since you cannot wire multiple data sources to a single Waveform Graph control input endpoint, you need to first use the Bundle function (found in the Programming>>Cluster & Variant subpanel) to bundle the multiple data together. As shown in the figure below, this function "bundles" or aggregates the outputs of three different temperature acquisition VIs into a cluster so that the data can be displayed by the Waveform Graph control. You can notice the changes after the endpoints of the Waveform Graph control are connected to the output of the Bundle function. If you need to add multiple curves, just increase the number of input endpoints of the Bundle function.
 
 

[Reprint] Detailed Explanation of Waveform Chart in LabVIEW 

  When you are connecting a waveform graph with multiple plots, be sure to use the Bundle function instead of the Build Array function. LabVIEW treats the values ​​in an array as belonging to one plot, and the values ​​in a cluster as belonging to multiple plots. If you use the Build Array function, you will get a single plot with three new data points each time through the loop. This is useful when reading waveforms from hardware because you are reading multiple samples from a single channel.
Single-curve vs. multi-curve data types: Tips to remember
  Graphs and waveform graphs are reusable. They can accept several different types of data and can be used to display single or multiple graphs. However, sometimes it is difficult to remember which data type to use for a single graph and multiple graphs. In addition, there are many types of graphs and waveform graphs, which makes things more complicated.
  However, there is a simple and quick way to find out the data type used for a certain curve graph or waveform graph. This method is to move the mouse cursor over the curve graph or waveform graph input endpoint in the program block diagram, and then you can see a detailed description of the curve data type in the Context Help window. This Context Help window can be opened through the menu Help>>Show Context Help or using the shortcut key.

[Reprint] Detailed Explanation of Waveform Chart in LabVIEW 

Display value?
  Similar to other numerical display controls, the waveform graph also has the option to show or hide the numerical display (right-click on the graph and select Visible Items>>Option in the right-click menu to set it). This numerical display part will show the value of the last data displayed in the waveform graph.
X-axis scroll bar
  The waveform graph also has an X-axis scroll bar, which can be set to be visible through the submenu in the right-click menu Visible Items>>. You can drag this scroll bar to view old data in the waveform graph that is no longer on the display.
Clear the waveform
  Sometimes, we need to delete old data from the waveform chart. You can clear all data in the waveform chart in edit mode by selecting Data Operations>>Clear Chart in the right-click menu. If your VI is not in the running state, it is usually in the editing state. If you need to change the state when the VI is not running, you can select Change to Run/Edit Mode in the Operator menu. If the VI is in the running state, the Clear Chart option can be found directly in the right-click menu without having to search in the Data Operations submenu.
  If you need to automatically clear the data in the waveform chart through programming in the program, you need to write an empty array to the History Data property of the waveform chart control, as shown in the following figure.

[Reprint] Detailed Explanation of Waveform Chart in LabVIEW 

Waveform diagrams of overlay mode and stacking mode
  If you are using a multi-curve graph control, you can choose to display all curves on the same Y axis, which is called overlay mode; or let each curve have an independent Y axis, which is called stacking mode. This can be set by selecting the display type in the right-click menu of the waveform graph. The following figure shows the difference between these two display modes:

[Reprint] Detailed Explanation of Waveform Chart in LabVIEW 

Multi-scale Y-axis
  If there are multiple curves in a waveform graph and they are displayed in overlay mode, sometimes you need to set different Y-axis scales for each curve. For example, the Y value range of one curve is from -1 to +1, and the Y value range of another curve is from -100 to +100. If you use overlay mode and display them with the same scaled Y axis, you may not be able to see the curve with the smaller Y value range. At this time, it is necessary to use a multi-scale Y axis. The specific steps for using a multi-scale Y axis are as follows: first, right-click on the Y axis and select Duplicate Scale in the pop-up right-click menu; then, right-click on this new scale and select Swap Sides in the right-click menu to move the duplicated scale to the other side of the graph. The specific coordinates corresponding to which curve can be modified in the waveform properties dialog box. If you need to delete a Y-axis scale, right-click on the scale and select Delete Scale. The following figure is an example of a waveform graph using two Y-axis scales:

[Reprint] Detailed Explanation of Waveform Chart in LabVIEW 

  You cannot duplicate multiple X-axis scales in a waveform chart because the waveform chart control can only have one X-axis scale. If you try to right-click on the X-axis scale, you will find that the Duplicate Scale option in the pop-up right-click menu is grayed out and unavailable. (Multiple X-axis scales can be used in a curve chart control)
  You can reset the scale of a graph or waveform by right-clicking the mouse on the graph or waveform and selecting Advanced>>Reset Scale Layout from the right-click menu. After performing this operation, the Y-axis scale will return to the left side of the graph display area, the X-axis scale will return to the bottom of the graph display area, and the scale values ​​will be reset.
Waveform history length
  By default, the waveform chart control can store 1024 data points. If you want it to store more or less data, you can set a new value for the number of data points in the Chart History Length... option in the right-click menu. The value range is 10 to 2,147,483,647 (although the actual limit may be smaller depending on the amount of memory on your computer). Changing the size of this buffer does not change the number of data points displayed on the waveform chart at one time, but only the total number of data points you can scroll back through using the scroll bar.

Keywords:LabVIEW Reference address:Detailed Explanation of Waveform Chart in LabVIEW

Previous article:LABVIEW file I/O operation ----- text file operation
Next article:Labview creates its own subVI call

Recommended ReadingLatest update time:2024-11-17 02:42

Research on the test of portable vibration analyzer
Introduction Portable vibration meter is a field-oriented test instrument developed with the increasing demand for equipment fault diagnosis. Traditional vibration analysis instruments have the characteristics of complex structure, large size, and inconvenient operation; while the vibration acquisition analyze
[Test Measurement]
Research on the test of portable vibration analyzer
Design of multi-physics field measurement system for marine environment based on LabVIEW
I. Introduction In recent years, with the increase of human efforts in the development of the ocean, the research on the ocean has become more extensive and in-depth. Correspondingly, various environmental physical fields in the ocean have also become the focus of research. Because the understanding of the physical fi
[Test Measurement]
Design of multi-physics field measurement system for marine environment based on LabVIEW
In-depth exploration of LabVIEW - basic types of state machines sequential structures
The previous article introduced the important concept of LV programming---state machine. State machine is a basic concept or theory. Its specific forms are too diverse and difficult to classify. Based on my personal experience in programming practice, I summarize several common types. 1. Sequential structure LV it
[Test Measurement]
In-depth exploration of LabVIEW - basic types of state machines sequential structures
Dynamic Event Modification in LabVIEW
  If you register for events dynamically, you can modify the registration information at run time to change the object for which LabVIEW generates events. To modify an existing registration associated with a refnum instead of creating a new registration, wire the event registration refnum input in the upper left corner
[Test Measurement]
LabVIEW 1.0 Programming Environment (Graphics and Text)
LabVIEW 1.0 was born in 1986. Do you want to see what LabVIEW looked like at that time if you have used LabVIEW 7.0 or above? Here are some screenshots of LV 1.0. I forgot where I got them, but they should be quite valuable.
[Test Measurement]
LabVIEW 1.0 Programming Environment (Graphics and Text)
Broken rotor bar detection of asynchronous motor based on LabVIEW
The broken rotor bar fault of cage asynchronous motor will lead to the deterioration of motor running performance and cause certain losses to production development. The probability of broken rotor bar fault is as high as 10%. Therefore, it is necessary to detect and warn in time at the early stage of fault developm
[Test Measurement]
Broken rotor bar detection of asynchronous motor based on LabVIEW
Using LabVIEW to simulate and control pulp production in a large paper mill
Industries: Manufacturing, Pipe/Paper Products: Data Acquisition, Data Recording and Monitoring Modules, Labview Challenge: Create a system to monitor the pulp production process in a large paper mill to save energy and reduce costs. Solution: To increase throughput, save energy, and optimize the production p
[Test Measurement]
Using LabVIEW to simulate and control pulp production in a large paper mill
In-depth exploration of LabVIEW - file series: writing spreadsheet files
There are many types of LABVIEW file operations. The simplest and easiest to use is WRITE TO SPREAD SHEET FILE (usually translated as writing a spreadsheet file). This so-called spreadsheet file is actually a text file, not a real spreadsheet file. A real spreadsheet file has a format. General text editors, such as NOT
[Test Measurement]
In-depth exploration of LabVIEW - file series: writing spreadsheet files
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号