Basic LabView Programming
Basic LabView Programming
Programming
Starting LabView
• Let’s begin by
opening LabView
– From the Start Menu,
Locate and start
LabView 7.1
Unblock if this is your first time
starting LabView…
…then Continue
LabView Programs
•National Instruments uses programs that are called VI’s.
This stands for Virtual Instrument. It considers each
program a tool as one would use a meter or oscilloscope.
•Clicking this will attach to the pointer a control outline and you
can select where you want it placed on the Front Panel.
•Place one in the upper left portion of the panel
Rename the control “Degrees C”
•After you drop the control, it highlights the name ready for you to rename it.
•Just drop the control and start typing the name “Degrees C”. You can
always go back and double click the name to change it. Changing the name
as you place it will speed up programming time when you are doing large
programs.
Observe the Block Diagram
Search button
Also try the search button on this menu as it allows you to search the vast
toolbox.
Multiply
Multiply vi
Hover over each pallet to open it’s sub pallet. Select the Multiply function…
Multiply
Now hover over the lower terminal on the multiply function and right
click.
Constants
Then enter 1.8 for the constant value. Entering this now will save you
having to select it again later.
Constants
Right Click the Icon for the VI in the upper right corner.
Add Terminals
Click in one
corner…
Right Click…
•Locate the vi inside the while loop and click to place it.
•Hover over the terminals on the left and right to see what is available.
Create Control
Add Indicator
Preferred Stop
button.
Use this stop only when nothing else works! The abort button will
halt execution immediately, which might not be good if the code
needs to close com ports or save files before exiting.
What was learned about LabView?
• Create new VI’s from the beginning.
• Use of numeric controls and indicators.
• Block Diagram Wiring and Data Flow.
• Creating and Using Sub-VI’s.
• While loops.