How to Graph in LabVIEW?

Written by aalhad deshmukh
  • Share
  • Tweet
  • Share
  • Email

Software applications that acquire, process, analyse and store data are frequently equipped with graphing and plotting features to display data. Most software development platforms are equipped with functional blocks that help in developing graphing applications. LabVIEW provides users with ready made functional blocks for displaying graphs. The "XY Graph" component in LabVIEW is a powerful tool for plotting multiple points on an XY plane.

Skill level:
Moderately Easy


  1. 1

    Launch the LabVIEW software and create a new LabVIEW VI program by clicking on "New VI" on the splash screen. Each new VI has two windows: the front panel window and the diagram window. Save this VI as "myGraph.VI." In the diagram window, drag and drop the following components from the functions palette: "Bundle," "Random Number (0-1)," "XY Graph" and "For Loop."

  2. 2

    Stretch the "For Loop" in diagram window using the Position/Size/Select tool from the "Tools" palette to make it big enough to fit a few components. Place the "Random Number (0-1)" component inside the "For Loop." Right-click on the "Loop-Count" input of the "For Loop," and click on "Create,Constant." Enter the value "100" in the constant. This will cause the loop to iterate 100 times, which will generate a random number in each iteration.

  3. 3

    Place the "Bundle" component outside the "For Loop." Connect the "Loop Iteration" counter output of the "For Loop" to the first input of the "Bundle" component. Connect the output of the "Random Number (0-1)" component to the second input of the "Bundle" component.

  4. 4

    Connect the output of the Bundle component to the input of the XY Graph. The first input of the Bundle component provides the values for the X-axis and the second input provides the values for the Y-axis of the graph. The XY Graph is automatically visible on the front panel of the myGraph.VI.

  5. 5

    Click on the "Run VI" button on the Tools bar of the front panel to execute the "myGraph.VI." A line joining the 100 random numbers generated from the for loop will be plotted on the "XY Graph."

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.