Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Home/Student Edition Page 1

HW5.vi
C:\Users\Mallory\Desktop\HW5.vi
Last modified on 2/7/2016 at 4:30 PM
Printed on 2/7/2016 at 5:09 PM
Connector Pane

HW5.vi

Part 1 of this VI allows the user to choose between an inscribed hexagon or a cone and enter in the desierd
radius or redius and height. The program will then calculate and disply the area and display a 2D image of
the desired shape. Part 2 of this VI generates 100 random numbers and allows the user to choose a portion
of the array to view.
Front Panel

Part 1: Shape Calculator Mallory Waterman


mgw148
Shape Area 2D Picture
2/3/16
Hexagon 58456.7
HW5

Radius stop
150 r
STOP

Height
0

Part 2: Random Number Generator


From: To:
2 5

Sub-array
0 0.0445184 0.38684 0.746868 0.551267 0.867426 0 0 0

Controls and Indicators


Home/Student Edition Page 2
HW5.vi
C:\Users\Mallory\Desktop\HW5.vi
Last modified on 2/7/2016 at 4:30 PM
Printed on 2/7/2016 at 5:09 PM
Block Diagram

Radius

Area
Height
Inscribed Hexagon Calculator.vi

Shape
2D Picture

stop

100

Sub-array

From:

To:
Home/Student Edition Page 3
HW5.vi
C:\Users\Mallory\Desktop\HW5.vi
Last modified on 2/7/2016 at 4:30 PM
Printed on 2/7/2016 at 5:09 PM
0, Default

Area

2D Picture

Cone Area Calculator.vi

Inscribed Hexagon Calculator.vi

Position in Hierarchy
Home/Student Edition Page 4
HW5.vi
C:\Users\Mallory\Desktop\HW5.vi
Last modified on 2/7/2016 at 4:30 PM
Printed on 2/7/2016 at 5:09 PM

List of SubVIs and Express VIs with Configuration Information

Cone Area Calculator.vi


C:\Users\Mallory\Desktop\Cone Area Calculator.vi
Inscribed Hexagon Calculator.vi
C:\Users\Mallory\Desktop\Inscribed Hexagon Calculator.vi

VI Revision History

"HW5.vi History"
Current Revision: 8

Iconified Cluster Constants


Home/Student Edition Page 1
Inscribed Hexagon Calculator.vi
C:\Users\Mallory\Desktop\Inscribed Hexagon Calculator.vi
Last modified on 2/7/2016 at 12:55 AM
Printed on 2/7/2016 at 5:08 PM
Connector Pane

Inscribed Hexagon Calculator.vi

Area
Radius
2D Picture
This program calculates the area of an inscribed hexagon based on a user input of radius. Also displays a 2D
image of an inscribed hexagon.
Front Panel

(3r^2)sin(3.14/3)

Radius Area
150 58456.7

2D Picture

Controls and Indicators

Radius
User enters desired radius
pen
<B>pen</B> sets the width and style of the pen the VI uses to draw the picture.
Width
<B>Width</B> sets the width in pixels of the pen the VI uses to draw the picture.
Style
<B>Style</B> sets the style of the line the VI uses to draw the picture.
Home/Student Edition Page 2
Inscribed Hexagon Calculator.vi
C:\Users\Mallory\Desktop\Inscribed Hexagon Calculator.vi
Last modified on 2/7/2016 at 12:55 AM
Printed on 2/7/2016 at 5:08 PM
pen 2
<B>pen</B> sets the width and style of the pen the VI uses to draw the picture.
Width
<B>Width</B> sets the width in pixels of the pen the VI uses to draw the picture.
Style
<B>Style</B> sets the style of the line the VI uses to draw the picture.
pen 3
<B>pen</B> sets the width and style of the pen the VI uses to draw the picture.
Width
<B>Width</B> sets the width in pixels of the pen the VI uses to draw the picture.
Style
<B>Style</B> sets the style of the line the VI uses to draw the picture.
Area
Program displays area for desired radius
2D Picture
Program displays a 2D image of an inscribed hexagon
Block Diagram

True

20

x1 = 100 - (0.5*r);
x1
y1 = 100 + (sqrt(3)/2)*r;
y1
r x2 = 100 + (0.5*r);
y2 = 100 + (sqrt(3)/2)*r; x2
3 x3 = 100 + r;
Radius 80 y2
y3 = 100;
Area x4 = 100 + (0.5*r); x3
y4 = 100 - (sqrt(3)/2)*r; y3 100
x5 = 100 - (0.5*r);
x4 100
3 y5 = 100 - (sqrt(3)/2)*r;
x6 = 100 - r; y4
100
y6 = 100; x5
x7 = x1; 100
y5
y7 = y1;
rx = x5; x6
ry = y5; y6 pen 3
x7 2D Picture
y7
r

ry rx

90

90
Home/Student Edition Page 3
Inscribed Hexagon Calculator.vi
C:\Users\Mallory\Desktop\Inscribed Hexagon Calculator.vi
Last modified on 2/7/2016 at 12:55 AM
Printed on 2/7/2016 at 5:08 PM
False
False

80
100 20

100
80

100
90

84
110

120 84

100
110

116
90

116
80

100
100

100
110
pen 2
84
105

90 r
Home/Student Edition Page 4
Inscribed Hexagon Calculator.vi
C:\Users\Mallory\Desktop\Inscribed Hexagon Calculator.vi
Last modified on 2/7/2016 at 12:55 AM
Printed on 2/7/2016 at 5:08 PM
True

100 80

100
60

30
140

30
180

100
140

170
60

170
20

100
60

30
100

100
60

30
70

pen
70 r

Position in Hierarchy
Home/Student Edition Page 5
Inscribed Hexagon Calculator.vi
C:\Users\Mallory\Desktop\Inscribed Hexagon Calculator.vi
Last modified on 2/7/2016 at 12:55 AM
Printed on 2/7/2016 at 5:08 PM

List of SubVIs and Express VIs with Configuration Information

Draw Text at Point.vi


C:\Program Files (x86)\National Instruments\LabVIEW 2015\vi.lib\picture\picture.llb\Draw Text at
Point.vi
Draw Line.vi
C:\Program Files (x86)\National Instruments\LabVIEW 2015\vi.lib\picture\picture.llb\Draw Line.vi
Move Pen.vi
C:\Program Files (x86)\National Instruments\LabVIEW 2015\vi.lib\picture\picture.llb\Move Pen.vi
Draw Multiple Lines.vi
C:\Program Files (x86)\National Instruments\LabVIEW 2015\vi.lib\picture\picture.llb\Draw
Multiple Lines.vi
Draw Circle by Radius.vi
C:\Program Files (x86)\National Instruments\LabVIEW 2015\vi.lib\picture\pictutil.llb\Draw Circle
by Radius.vi
Iconified Cluster Constants
Home/Student Edition Page 1
Cone Area Calculator.vi
C:\Users\Mallory\Desktop\Cone Area Calculator.vi
Last modified on 2/7/2016 at 5:00 PM
Printed on 2/7/2016 at 5:03 PM
Connector Pane

Cone Area Calculator.vi

Radius Area
Height Picture
Calculates area of a cone with inputs of height and radius. Also displays a 2D picture of a cone. The
drawing is dynamic and is dependent on both height and radius.
Front Panel

Radius Area Picture


150 170564

Height
150

Controls and Indicators

Radius
User enters desired radius of cone
Height
User enters desired height of cone
Area
Program displays area of cone
Picture
Program displays image of cone
Home/Student Edition Page 2
Cone Area Calculator.vi
C:\Users\Mallory\Desktop\Cone Area Calculator.vi
Last modified on 2/7/2016 at 5:00 PM
Printed on 2/7/2016 at 5:03 PM
Block Diagram

3.14 Area
Radius

Height

True
x1 = 100 - r; x1
y1 = 160; y1
r x2 = 100;
x2
y2 = 160 - h;
y2
h x3 = 100 + r; Picture
80 y3 = 160; x3
o1 = 100 - r; y3
o2 = 155; o1
20 o3 = 100 + r; o2
o4 = 165; pen 5
o3
rx1 = 100 + r;
140 ry1 = 160; o4
rx2 = 100; rx1
rx2 = 160; ry1 pen 6
20
hx = 100; rx2
hy = 160 - h; ry2
hx
hy

False
True

20
155
180
20 pen pen 2
165
80 160
100 90
20 90
180
h
160
140 100 140
20 145
100
r
160
180
160
Home/Student Edition Page 3
Cone Area Calculator.vi
C:\Users\Mallory\Desktop\Cone Area Calculator.vi
Last modified on 2/7/2016 at 5:00 PM
Printed on 2/7/2016 at 5:03 PM
False

80
155
120
80 pen 3 pen 4
165
160
100 80
140 135
120
h
160
100 110
140 160
100
r
160
120
160

True

20
155
180
20 pen pen 2
165
160
100 90
20 90
180
h
160
100 140
20 145
100
r
160
180
160
Home/Student Edition Page 4
Cone Area Calculator.vi
C:\Users\Mallory\Desktop\Cone Area Calculator.vi
Last modified on 2/7/2016 at 5:00 PM
Printed on 2/7/2016 at 5:03 PM
True
x1 = 100 - r; x1
y1 = 160; y1
r x2 = 100;
x2
y2 = 160 - h;
y2
h x3 = 100 + r;
y3 = 160; x3
o1 = 100 - r; y3
o2 = 155; o1
o3 = 100 + r; o2
o4 = 165; pen 5
o3
rx1 = 100 + r;
ry1 = 160; o4
rx2 = 100; rx1
rx2 = 160; ry1 pen 6
hx = 100; rx2
hy = 160 - h; ry2
hx
hy

Position in Hierarchy
Home/Student Edition Page 5
Cone Area Calculator.vi
C:\Users\Mallory\Desktop\Cone Area Calculator.vi
Last modified on 2/7/2016 at 5:00 PM
Printed on 2/7/2016 at 5:03 PM
List of SubVIs and Express VIs with Configuration Information

Draw Text at Point.vi


C:\Program Files (x86)\National Instruments\LabVIEW 2015\vi.lib\picture\picture.llb\Draw Text at
Point.vi
Draw Line.vi
C:\Program Files (x86)\National Instruments\LabVIEW 2015\vi.lib\picture\picture.llb\Draw Line.vi
Move Pen.vi
C:\Program Files (x86)\National Instruments\LabVIEW 2015\vi.lib\picture\picture.llb\Move Pen.vi
Draw Oval.vi
C:\Program Files (x86)\National Instruments\LabVIEW 2015\vi.lib\picture\picture.llb\Draw Oval.vi
Draw Multiple Lines.vi
C:\Program Files (x86)\National Instruments\LabVIEW 2015\vi.lib\picture\picture.llb\Draw
Multiple Lines.vi
VI Revision History

"Cone Area Calculator.vi History"


Current Revision: 14

Iconified Cluster Constants

You might also like