Sei sulla pagina 1di 4

Homework: Navigating LabVIEW

Instructions: Please complete the following in one VI. Refer to this sample front panel screenshot for
guidance:

(The exact appearance of controls and indicators depends on which style you are going to use: Modern,
Silver, System or Classic.)
If you have questions, please post comments on the homework on your universitys LabVIEW Workshop
website.

1. Include your first and last name, and Homework 1 in a comment box (double-click on blank
area on the front panel and start typing to create a comment box).
2. Turn on and off an LED using a push button.
a. On the front panel, create a push button and an LED. To open Controls palette where
you can find the controls and indicators, right-click on blank area on the front panel.
b. On the block diagram, wire the terminals together:

(to start or end a wire, click the black triangle on the terminal when the cursor has the
shape of a wire spool:

).

3. Pass a word from a string control to a string indicator.


a. The label for the string control should be left as String. The label for the string indicator
should be LabVIEW is:. (Double-click a label to edit the text.)
b. The font for the string control and string control label should be 18pt, bold, and red. (To
change the font of both texts - the label and the text inside the text box - select
a control by clicking its frame:

and then edit font attributes here:


.)
c. The font for the string indicator should be 24pt, italic, and blue. The labels font should
not be changed. (To change only the font displayed inside the indicator, click inside the
text box before you change font attributes.)
d. On the block diagram, wire the terminals of string control and string terminal together:

4. Perform this calculation in LabVIEW: (A + B) * (C 1).


a. On the front panel, create numeric controls for A, B, and C. Make sure the controls are
labeled A, B, and C.
b. Display the answer using a Vertical Pointer Slide Indicator (to be found in Numeric
controls palette).
c. Make the label for the indicator invisible (right-click the indicator, select Visible Items
and uncheck Label).
d. Make sure all the numeric controls are aligned and equally spaced (to do this, use the
buttons available here:

).

e. On the block diagram, right-click some blank space to show the Functions palette. Select

f.

Add
, Decrement
and Multiply
function blocks (they can be found in
Numeric functions palette) and place them on the block diagram.
Wire the terminals and function nodes together in the correct order:

5. Make sure the block diagram is neat.


6. Enter values into the controls and press run

to make sure the program works.

7. Also try running continuously


.
8. Save the VI to a folder called e.g. Homework1. Create a new project. Save it in the folder you
just created, e.g. as Project_HW1. Add the homework 1 VI to the project (in the Project Explorer
window, right-click on My Computer>>Add>>File... and browse to the file).
9. You can also add the file with these instructions to the project.
10. Create two virtual folders in the project (right-click on My Computer>>New>>Virtual Folder) and
name them, for example, 'Code' and 'Instructions'. Drag and drop the VI and instruction files to
the proper virtual folders.
11. Save the project again.

Bonus tasks:
-

Use a non-default palette for the controls and indicators, e.g. the silver palette:

Hint: if a palette is invisible, click the arrows


-

to expand the list of palettes.

Change colours of front panel controls and indicators using the Brush tool (in
the front panel window, click View>>Tools Palette or Shift-right-click a blank
area on the front panel to view the Tools palette where you can select the
Brush ).

Do not forget to set the tool to Automatic Tool Selection when you finish
colouring.

Potrebbero piacerti anche