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
Other People Are Reading
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."
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.
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.
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.
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."
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for