Loading...
Thursday, August 16, 2012

Lab .3(b) How to Make a Circle in LabVIEW

The graphical user interface that LabVIEW provides for the development of software applications allows users to develop applications faster. LabVIEW provides a set of functions that can be used to draw various shapes. These shapes are drawn as pictures on the front panel window of a LabVIEW program. A built in function block called "Draw Circle by Radius.VI" can be used to draw a circle in LabVIEW.

Instructions

1. Double-click on the LabVIEW shortcut on your desktop to launch the program. Click on "New VI" to launch a new LabVIEW program with two windows: the diagram window to develop the graphical code and the front panel window to develop the user interface. Save the program as "DrawCircle.VI."

2. Click on "View," "Functions Palette" on the "Menu" of the diagram window to open the functions palette. Drag and drop the "Draw Circle by Radius.VI" from the functions palette into the diagram window. This function block has an output called "New Picture" and two inputs called "Radius" and "Pixel Center."

3. Right-click on the "New Picture" output and click on "Create Indicator." A picture frame will automatically appear on the front panel window. Right click on each of the inputs and click on "Create Indicator" to create user input controls on the front panel window for entering the value of the radius and the location of the center of the circle.
4. Enter the value "20" in the input control called "Radius." The "Pixel Center" input has two sections: horizontal position and vertical position. Enter the value "20" in both sections.
5. Click on the "Run" button on the "Menu" bar of the front panel window to execute the program. A circle of radius 20 will be drawn in the picture frame. Change the value of the vertical and horizontal position to change the position of the circle in the picture frame.

0 comments:

Post a Comment

 
TOP