Wednesday, August 18, 2010

Exercise 2a – Create a SubVI

Front Panel
1.      Select File»Open and navigate to c:\exercises\LV Intro to open the Convert C to F VI.
If you closed all open VIs, click the Open… button on the LabVIEW dialog box.
Tip Click the arrow next to Open… button on the LabVIEW dialog box to open recently opened files, such as Convert C to F.vi.
The following front panel appears.

1.      Right-click the icon in the upper right corner of the front panel and select Edit Icon from the shortcut menu. The Icon Editor dialog box appears.
2.      Double-click the Select tool on the left side of the Icon Editor dialog box to select the default icon.
3.      Press the <Delete> key to remove the default icon.
4.      Double-click the Rectangle tool to redraw the border.
5.      Create the following icon.

a.       Use the Text tool to click the editing area.
b.      Type C and F.
c.       Double-click the Text tool and change the font to Small Fonts.
d.      Use the Pencil tool to create the arrow.
Note To draw horizontal or vertical straight lines, press the <Shift> key while you use the Pencil tool to drag the cursor.
e.       Use the Select tool and the arrow keys to move the text and arrow you created.
f.       Select the B&W icon and select 256 Colors in the Copy from field to create a black and white icon, which LabVIEW uses for printing unless you have a color printer.
g.      When the icon is complete, click the OK button to close the Icon Editor dialog box. The icon appears in the upper right corner of the front panel and block diagram.
2.      Right-click the icon on the front panel and select Show Connector from the shortcut menu to define the connector pane terminal pattern.
LabVIEW selects a connector pane pattern based on the number of controls and indicators on the front panel. For example, this front panel has two terminals, deg C and deg F, so LabVIEW selects a connector pane pattern with two terminals.
3.      Assign the terminals to the digital control and digital indicator.
a.       Select Help»Show Context Help to display the Context Help window. View each connection in the Context Help window as you make it.
b.      Click the left terminal in the connector pane. The tool automatically changes to the Wiring tool, and the terminal turns black.
c.       Click the deg C control. The left terminal turns orange, and a marquee highlights the control.
d.      Click an open area of the front panel. The marquee disappears, and the terminal changes to the data type color of the control to indicate that you connected the terminal.
e.       Click the right terminal in the connector pane and click the deg F indicator. The right terminal turns orange.
f.       Click an open area on the front panel. Both terminals are orange.
g.      Move the cursor over the connector pane. The Context Help window shows that both terminals are connected to floating-point values.
4.      Select File»Save to save the VI because you will use this VI later in the course.
5.      Select File»Close to close the Convert C to F VI.

End of Exercise

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

Popular Projects

My Blog List

Give support

Give support
Encourage Me through Comments & Followers

Followers