Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: Jul 2, 2008


Feedback


Yes No

Related Links - Developer Zone

Related Links - Products and Services

Exercise: Block Diagram

1 ratings | 2.00 out of 5
Print | PDF

Overview

This exercise will introduce you to the components of the Block Diagram. You will walk through placing functions onto the Block Diagram and changing their properties.

Goal

Understand the basic components of the Block Diagram and how to place down functions.

Description

This exercise consists of a series of tasks in which will walk you through placing down functions on the Block Diagram. It will also show you how to search the Function Palette easily to find your desired function. 

Block Diagram

1. Launch LabVIEW and open a blank VI.

❑ Select File»New VI

2. Display the Block Diagram 

❑ Navigate to Window»Show Block Diagram to display the Block Diagram.


 

3. Display and pin down the Functions Palette.

❑ Anywhere in the Block Diagram, right click. This brings up the Functions Palette.
❑ Click the thumbtack on the upper left corner. This pins down the Functions Palette so that you can move freely along your Block Diagram without closing the Functions Palette.


 

4. Change the default visible categories of the Functions palette. 

❑ Click the View button on the Functions Palette and select Change Visible Categories.


 ❑ In this window, you can change which function categories you want displayed on your Functions Palette by default. Click Select All and then click OK.

 

 

6. Place an Add function on the Block Diagram.

❑ From the Functions Palette, navigate to Programming»Numeric»Add.
❑ Place this function on the Block Diagram by dragging and dropping the Add function onto the Block Diagram.




7. Create inputs to the Add function.

❑ Right click on one on the input terminals of the Add function, navigate to Create»Constant. This creates a numeric constant as one of the inputs of the Add function.

 

❑ Change the value of this constant to 4. This can be done by double clicking the constant and typing the number 4.

❑ Move the constant to a different location on the block diagram by clicking and holding the constant, and then moving the mouse to a different location on the block diagram.

❑ On the second input of the Add function, right click and navigate to Create»Control. This creates a control that will allow users to input data directly into the Add function. This concept will be explained in more detail in the Front Panel tutorial. Move the constant away from the Add function as seen below.

8. Create an output for the Add function.

❑ Right click the output of the Add function and select Create»Indicator This creates an indicator on the Block Diagram that will be able to display output to the user. Again, this will be explained in more detail in the Front Panel exercise.

 

9. Change the number representation of the constant input of the Add function.

❑ Right click 4 constant and navigate to the Representation submenu.

❑ Click the I32 button to change the representation of this constant to a long.

10. Create a Free Label on the block diagram.

❑ Double click anywhere on the block diagram not occupied by another element. This creates a Free Label.
❑ Type some text into the text field. This is useful for documenting your code.

11. Use the Search feature to search for a function

❑ From the Functions Palette, click the Search button. This brings up the search window where you can search for all the different functions in the Functions Palette.
❑ In the search field, type in Compound Arithmetic. Three results are found. Double click the first result.

 

❑ By double clicking the search result you are taken to the respective location in the Functions Palette.  You can also drag the function directly from the search window to the block diagram.

12. Close the VI and do not save changes.

 

END OF EXERCISE

 


Tutorial           Video          The LabVIEW Environment          Modules Home          FIRST Community

1 ratings | 2.00 out of 5
Print | PDF

Reader Comments | Submit a comment »

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).