EXERCISE 1
Complete the following steps to build a VI that plots a circle using independent x and y arrays.
1.A) Front Panel
- Open a blank VI and build the front panel shown in Figure 1.
Figure 1 - Place an
XY Graph
, located on theControls>>All Controls>>Graph
palette, on the front panel. - Label the graph
XY Circle Graph
. - Change
Plot 0
toCircle
in the plot legend. - Right-click the plot in the plot legend, select
Point Style
from the shortcut menu, and select the small square. - Change the scale labels and ranges, as shown in Figure 1.
- Place an
1.B) Block Diagram
- Build the block diagram shown in Figure 2.
Figure 2 - Place the
Sine & Cosine
function, located on theFunctions>>Arithmetic & Comparison>>Express Numeric>>Express Trigonometric
palette, on the block diagram. This function builds an array of points that represents one cycle of a sine wave and a cosine wave. - Place the
Bundle
function, located on theFunctions>>All Functions>>Cluster
palette, on the block diagram. This function assembles the sine array and the cosine array to plot the sine array against the cosine array to produce a circle. - Place the
Pi Multiplied by 2
constant, located on theFunctions>>Arithmetic & Comparison>>Express Numeric>>Express Numeric Constants
palette, on the block diagram.
- Place the
- Save the VI as
Graph Circle.vi
in theC:\Exercises\LabVIEW Basics I
directory. - Display the front panel and run the VI.
- Close the VI.
No comments:
Post a Comment