Você está na página 1de 14

LABVIEW 2012 SP1 USER MANUAL

I. How to open LabView?


Opening LabView is a very simple. It is the same as opening any other applications when you
click the start menu. Here are the steps:

Click START>All Programs>National Instruments LabView 2012

There you go! You have already opened LabView 2012


NOTE: Usually when LabView is opened, a dialog box appears that asks you which type of LabView to
open. Just click LabView SP1 instead of LabView robotics. It will open the same window as shown above.
II. Creating a Project
After opening your LabView 2012 on your computer, you can now create your new project.
Creating projects in LabView is very intuitive. Here is the tutorial: (In this case, we are using Blank VI as
an example)

Click Create Project. You will be asked to open a starting point for your project.
Double-Click Blank VI. You should get these windows:

LabViEW 2012 SP1 User Manual

1|Page

This is the Front Panel Window and the Block Diagram Window. Later we will familiarize
ourselves on how they function.
III. Front Panel Familiarization

This is the Front Panel Window. Its function is comparable to a GUI (Graphical User
Interface). All of the things that you can see here is often the result of what you want to do that is
determined by your Block Diagram (will be discussed later). However, in order to have functions
on your Front Panel, Use the Controls Palette.
IV. Controls Palette
LabViEW 2012 SP1 User Manual

2|Page

You can access the Control Palette by virtue of two methods:


1. THE STABLE

On your front panel, click the VIEW button on the menu bar.
Click CONTROLS PALETTE. You should have a window something like this:

2. FAST LANE
You can achieve this by simply right clicking on the field of your Front Panel.

By doing so, you can have an option that is very similar to what is shown in the first
method.
V. Indicators
LabViEW 2012 SP1 User Manual

3|Page

In your Controls Palette, there are a number of indicators to be used. In this tutorial, we are going
to use the Numeric button.

Right Click in the Front Panel Field.

Hover your pointer on the Numeric Button (Red and Numbers).

FACT:
LabViEW 2012 SP1 User Manual

4|Page

Numeric controls and indicators are the simplest way to enter and display numeric data. You can resize
these front panel objects horizontally to accommodate more digits.

Click the Numeric Indicator Button.

Click the Numeric Indicator shadow on the Front Panel field.

The purpose of Numeric Indicator is to show the results of the operation that is a number. It
is used mainly in mathematical operations. Consider both the Sum and Average Numeric
Indicators.

LabViEW 2012 SP1 User Manual

5|Page

Here are some more examples of Indicators that you can use. All of which can be found in
the Controls Palette of your Front Panel.

VI. Simple Math


In this part of the tutorial, we are showing how to do simple math. This includes the use of
both the Front Panel Window and the Block Diagram Window. Let us try to make a simple
addition calculator with the average of its two inputs. Here are the steps:

Right Click in the Front Panel Field.

LabViEW 2012 SP1 User Manual

6|Page


H
over your
pointer on
the
Numeric
Button
(Red and
Numbers).

lick the Numeric Indicator Button.

LabViEW 2012 SP1 User Manual

7|Page

Click the Numeric Indicator shadow on the Front Panel field. From this time on, this step is
needed to be done twice.

LabViEW 2012 SP1 User Manual

8|Page

Next is the Numeric Control Button. Right-click on the Front Panel Field. Click
Numeric>Numeric Control. You need to do this twice.

Rename all of the components according to this example.

LabViEW 2012 SP1 User Manual

9|Page

This part of the tutorial needs to use the Block Diagram Window. You can access it by
hitting CTRL + E on your keyboard. You should get a window like this:

LabViEW 2012 SP1 User Manual

10 | P a g e

Right-click on the Block Diagram Field. Go to Numeric then click the ADD button.

We need to add a constant (2) for the average output. Right-click on the Block Diagram
Field. Go to Numeric then click the Numeric Constant button. Set it in 2 by typing inside the
Numeric Constant.

LabViEW 2012 SP1 User Manual

11 | P a g e

Connect the
input to the ADD operator by
clicking INPUT A then the ADD. Click on the first node. Do the same for the INPUT B but
now clicking on the second node of ADD. You should get something like this.

The node on the pointy edge of the operator should be connected to the SUM.

Test what you did on your Front Panel. Hit CTRL + E on your keyboard. Input any number
that you want in your Numeric Controls. After inputting, click the run button just below the
Edit button on your option bar.

LabViEW 2012 SP1 User Manual

12 | P a g e

On
the Block
Diagram, right-click on the Block Diagram Field. Go to Numeric then click the DIVIDE
button. Connect it to the SUM and to the Numeric Constant. The pointy-edge node should
be connected to the AVERAGE. Test everything you did on the Front Panel Window.

VII. Arrays & Loops


The purpose of arrays and loops in programming is to repeat data execution and to perform
any operation or string of program on a certain set of data in a number of repetitions. In LabView, it is very
similar in what most of programming languages do.
LabViEW 2012 SP1 User Manual

13 | P a g e

There are two types of passing data into and out of a loop. These are Tunneling and Auto
Indexing. Tunnels are created because data values enter and exit the loop structure through it. On the
other hand, Auto Indexing works if you wire an array to a For Loop or While Loop, you can read and
process every element in that array by enabling this. When you wire an array from an external node to an
input tunnel on the loop border and enable auto-indexing on the input tunnel, elements of that array enter
the loop one at a time, starting with the first element.
Accessing Arrays in LabView is similar with others. Here are some examples of loop
structures:

1. 8 element array as input to a 'for loop'


This is a
virtual instrument demonstrating how arrays can be manipulated as a For Loop. If a 1-dimensional array
is connected to a 'for loop' then auto-indexing is on by default. The 'for loop' will treat the elements of the
array one at the time. If you want to do some calculation on all the individual elements of the array it is
okay to leave the N (number of iterations) unwired. It is possible to pass the entire array to the For Loop.
This can be achieved by turning auto-indexing off. In this case N should be wired to the desired number of
iterations.

LabViEW 2012 SP1 User Manual

14 | P a g e

Você também pode gostar