7. Afișarea datelorTOPICSA. Waveform ChartsB. Waveform and XY GraphsC. Intensity PlotsD. Personalizarea graficelor
• LabVIEW offers powerful functionality for plotting data. In the Graph  palette we have lots of useful controls for plott...
Înregistratoarele sunt indicatoare numerice speciale care afişează unasau mai multe curbe.Diagrama unda (Waveform Chart ):...
A. Waveform Charts• The waveform chart is a numeric indicator that displays one or  more plots. Waveform charts can displa...
Wiring to ChartsSingle-Plot ChartMultiple-Plot Chart
B. Waveform and XY Graphs• Selected from the Graph subpalette• Waveform Graph – Plot an array of numbers against their ind...
Single-Plot Waveform GraphsUniform X axisInitial X = 0.0Delta X = 1.0Uniform X axisyou specify pointspacing
Multiple-Plot Waveform GraphsEach row is aseparate plot:Initial X = 0Delta X = 1Each row is aseparate plot:Bundle specifie...
XY Graphs• Non-uniform X axis• Separate X and Y arrays  define data points
Chart and Graph Use SummaryUse the Context Help window with charts and graphs
C. Intensity Plots and Graphs• Useful in displaying terrain, temperature patterns, spectrum  analysis, and image processin...
D. Personalizarea graficelor
• The different Chart components in LabVIEW offer a great deal of  customizing.• You may click on the “Plot Legend” in ord...
• If you right-click on the Graph/Chart, you may set properties such as  auto-scaling, etc.
• If you select Properties, you get the following dialog:
• You may also select which items that should be visible or not.
Exemple:Se va realiza un VI care să genereze un număr aleator la o ratăspecificată de utilizator și afișarea rezultatelor ...
Se va modifica While_Graph pentru a calcula și afișa media ultimelortrei măsurări. Se va salva salva VI-ul cu numeleWhile_...
Următorul exemplu arată construcția funcției trigonometrice sinuscu ajutorul buclei For, și afișarea rezultatului pe un Gr...
Summary• The waveform chart is a special numeric indicator that displays one or  more plots.• Waveform graphs and XY graph...
Cap.7
Upcoming SlideShare
Loading in …5
×

Cap.7

241 views

Published on

Instrumentatie virtuala

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
241
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Graficele si diagramele difera dupa modul cum afiseaza si actualizeaza datele. VI-urile cu grafice de obicei colecteaza datele intr-un sir si apoi ploteza datele catre grafice, lucru ce este similar cu un software pentru analizarea informatiilor cuprinse in tabele care la inceput stocheaza datele si apoi genereaza un grafic al acestora. In contrast, pe o diagrama, se pot vedea datele curente in context cu datele care sunt anterior obtinute. Sunt disponibile 3 tipuri de componente de interfata pentru vizualizarea reprezentarii grafice: - diagrama unda (waveform charts); - grafice unda (waveform graphs); - grafice XY (XY graphs); Diagrama unda Este o componeta de interfata dedicata afisarii uneia sau mai multor reprezentari grafice simultan, pentru care se urmareste variatia in timp. Graficele unda Se utilizeaza pentru reprezentarea functiilor de o variabila, avand punctele distribuite uniform pe axa absciselor. Aceasta se aseamana cu diagrama undelor . P ermite realizarea uneia sau mai multor reprezentari simultane. Graficul XY Este componenta cea mai generala, care permite realizarea reprezentarilor grafice ale functiilor de doua variabile X si Y. Deasemenea se pot realiza una sau mai multe reprezentari simultane. Waveform Graph —The waveform graph displays one or more plots of evenly sampled measurements. The waveform graph plots only single-valued functions, as in y = f( x ), with points evenly distributed along the xaxis, such as acquired time-varying waveforms. Waveform Chart -The waveform chart is a special type of numeric indicator that displays one or more plots of data typically acquired at a constant rate. The waveform chart maintains a history of data, or buffer, from previous updates. Right-click the chart and select Chart History Length from the shortcut menu to configure the buffer. The default chart history length for a waveform chart is 1,024 data points. The frequency at which you send data to the chart determines how often the chart redraws. XY Graph —The XY graph is a general-purpose, Cartesian graphing object that plots multivalued functions, such as circular shapes or waveforms with a varying time base. The XY graph displays any set of points, evenly sampled or not. You can wire a scalar output directly to a waveform chart to display one plot. To display multiple plots on one chart, use the Merge Signals function found in the Functions >> Signal Manipulation palette. The Merge Signal function bundles multiple outputs to plot on the waveform chart. To add more plots, use the Positioning tool to resize the Merge Signal function. The context help contains very good information on how the different ways to wire data into charts.
  • For a single plot, wire from the numeric control to the chart terminal. For multiple traces, bundle each number together and then wire to the strip chart. Open the chart example with the Example Wizard. It is important that students know that these examples are shipped with the package. If they have questions about how to wire to a strip chart, they have a good resource that shows all possible ways to display data on a chart. Transition to next topic: Now we will discuss topics related to plotting: chart properties and mechanical action of booleans.
  • A graph is a 2D display of one or more data arrays. Data arrays are called plots. Two types of graphs: Waveform Graph: Plots array of numbers vs. its index. Ideal for arrays with evenly distributed data points. Used for time-varying waveforms. XY Graph: Plots one array vs. another. General purpose. Good for multivalued functions, such as circular shapes or waveforms with a varying timebase. Both look similar on front panel. To place a graph on the front panel, choose the appropriate graph from the Graph subpalette of the Controls palette.
  • Because the Bundle function is used with graphs, be sure to briefly introduce the idea of clusters. Clusters allow you to group different data types together into one structure. In this lesson, they are useful to control the x-axis scaling attributes. Bundle function: Used to combine two or more elements of like or different data types. Remind the class that they used this function to bundle arrays in multiplot strip chart. There are several different ways to plot a waveform graph: Example 1: Bundle the array with the initial X value (Xo) and interval between X values (Delta X). The terminal looks like a cluster of objects because the data was bundled. (Called a cluster). Example 2: For simple plots, the array can be passed directly to the waveform graph terminal. Assumes the initial X value is 0 and the X increment is 1. The terminal is an array of double-precision numbers. Note that auto-indexing is used in the above examples.
  • If a 1D array is wired to a waveform graph, the graph assumes it is one plot. When a 2D array is wired to a waveform graph, the graph assumes each row in that array is a separate plot. Use the Build Array function to create a 2D array input for multiplot graphs: Example 1: A combination of two single-plot examples without Xo and Delta X defined (Example 2 from the previous slide). The Build Array function creates a 2D array input to the waveform graph. The terminal is a 2D array of double-precision numbers. Example 2: A combination of two single-plot examples with Xo and Delta X defined (Ex 1 from previous slide). The Build Array function creates a cluster array input to the waveform graph. The terminal is an array of clusters, because each graph is a cluster.
  • The XY graph looks identical to the waveform graph on the panel. Does not assume that the X-axis has a constant interval. Array of X values and array of Y values must be provided. More flexible than the waveform graph. Explain the slide: Generate two arrays, one for X values and other for Y values. Bundle arrays wire into the XY graph. Explain that an X array 1,2,3,4,5 and a Y array 0,1,0,1,0 will result in a graph with points ((1,0)(2,1)(3,0)(4,1)(5,0)). Show the class some graph examples using the Example Wizard: Examples of ways to graph charts (Charts.vi), waveform graphs (Waveform Graph.vi), and XY graphs (XY Graph.vi). Very useful reference.
  • not in course manual: Demonstrate to the students how the Help window gives you valuable wiring information about charts and graphs and which one you have.
  • Create a VI that generates a random number at a specified rate and displays the readings on a Waveform Chart until stopped by the user. Connect the termination terminal to a front panel stop button, and add a slider control to the front panel. The slider control should range from 0 to 1000 in value, and be connected to the Time Delay Express VI function inside your while loop. Save as Loop.vi
  • Modify Loop.vi to calculate and display also moving average taken from last three “measurements”. Save as Moving Average.vi
  • Do not immediately display this slide. Suggested questions for class participation: What are the three update modes for a chart? What is the different between a chart, graph and XY graph? What would you use to plot data if you wanted to see the temperature versus the pressure? What would you use to plot the temperature map of an X-Y plane?
  • Cap.7

    1. 1. 7. Afișarea datelorTOPICSA. Waveform ChartsB. Waveform and XY GraphsC. Intensity PlotsD. Personalizarea graficelor
    2. 2. • LabVIEW offers powerful functionality for plotting data. In the Graph palette we have lots of useful controls for plotting and visualization of data. The most useful are: • Waveform Chart • Waveform Graph • XY Graph
    3. 3. Înregistratoarele sunt indicatoare numerice speciale care afişează unasau mai multe curbe.Diagrama unda (Waveform Chart ): Este o componeta de interfatadedicata afisarii uneia sau mai multor reprezentari grafice simultan,pentru care se urmareste variatia in timp.Graficele unda (Waveform Graph ): Se utilizeaza pentrureprezentarea functiilor de o variabila (de forma y=f(x)), avandpunctele distribuite uniform pe axa absciselor. Aceasta se aseamanacu diagrama undă. Permite realizarea uneia sau mai multorreprezentari simultane.Graficul XY(XY Graph ): Este componenta cea mai generala, carepermite realizarea reprezentarilor grafice ale functiilor de douavariabile X si Y. Deasemenea se pot realiza una sau mai multereprezentari simultane.
    4. 4. A. Waveform Charts• The waveform chart is a numeric indicator that displays one or more plots. Waveform charts can display single or multiple plots. Figure de mai jos, shows the elements of a multiplot waveform chart. Two plots are displayed: Raw Data and Running Avg.
    5. 5. Wiring to ChartsSingle-Plot ChartMultiple-Plot Chart
    6. 6. B. Waveform and XY Graphs• Selected from the Graph subpalette• Waveform Graph – Plot an array of numbers against their indices• XY Graph – Plot one array against another Plot Legend (point and line styles) Graph PaletteScale Legend
    7. 7. Single-Plot Waveform GraphsUniform X axisInitial X = 0.0Delta X = 1.0Uniform X axisyou specify pointspacing
    8. 8. Multiple-Plot Waveform GraphsEach row is aseparate plot:Initial X = 0Delta X = 1Each row is aseparate plot:Bundle specifiespoint spacing of theX axis
    9. 9. XY Graphs• Non-uniform X axis• Separate X and Y arrays define data points
    10. 10. Chart and Graph Use SummaryUse the Context Help window with charts and graphs
    11. 11. C. Intensity Plots and Graphs• Useful in displaying terrain, temperature patterns, spectrum analysis, and image processing• Data type is a 2D array of numbers; each number represents a color• Use these options to set and display color mapping scheme• Cursor also adds a third dimension
    12. 12. D. Personalizarea graficelor
    13. 13. • The different Chart components in LabVIEW offer a great deal of customizing.• You may click on the “Plot Legend” in order to set colors, different line styles, etc.
    14. 14. • If you right-click on the Graph/Chart, you may set properties such as auto-scaling, etc.
    15. 15. • If you select Properties, you get the following dialog:
    16. 16. • You may also select which items that should be visible or not.
    17. 17. Exemple:Se va realiza un VI care să genereze un număr aleator la o ratăspecificată de utilizator și afișarea rezultatelor pe un grafic(Waveform Chart) până când este oprit de utilizator. Se va salvasalva VI-ul cu numele While_Graph.vi
    18. 18. Se va modifica While_Graph pentru a calcula și afișa media ultimelortrei măsurări. Se va salva salva VI-ul cu numeleWhile_Graph_Average.vi
    19. 19. Următorul exemplu arată construcția funcției trigonometrice sinuscu ajutorul buclei For, și afișarea rezultatului pe un Grafic undă.
    20. 20. Summary• The waveform chart is a special numeric indicator that displays one or more plots.• Waveform graphs and XY graphs display data from arrays.• Right-click a waveform chart or graph or its components to set attributes of the chart and its plots.• You can display more than one plot on a graph using the Build Array function and the Bundle function for charts and XY graphs. The graph becomes a multiplot graph when you wire the array of outputs to the terminal.• When you wire data to charts and graphs, use the Context Help window to determine how to wire them.• You can use intensity charts and graphs to plot three-dimensional data. The third dimension is represented by different colors corresponding to a color mapping that you define. Intensity charts and graphs are commonly used in conjunction with spectrum analysis, temperature display, and image processing.

    ×