Updated date:

Labview and Arduino


Basic Elements Needed

Fig. 2: Block Diagram View

Fig. 2: Block Diagram View

Fig 3: Front Panel Display

Fig 3: Front Panel Display

What is LabVIEW?

LabVIEW is a visual programming software developed by National Instruments. LabVIEW is an acronym for Laboratory Virtual Instrumentation Engineering Workbench. It's used in testing, automation, instrument control, monitoring, and data acquisition. Programming is done by connecting icons together to form a visual flow chart of processes. There is no code or syntax to memorize or acronyms to learn. Programming is like drawing a flowchart.

LabVIEW is growing in popularity. Recently the SpaceX commercial Space Exploration Technologies Corporation completed a cargo mission to the International Space Station using the largest network of LabVIEW sensors and controls in one operation. The large walls of monitors shown in the mission control room were all LabVIEW based front panels.

You can find LabVIEW being used in science experiments and industrial controls everywhere. Whenever I've visited a plant manufacturing something or a University science lab, the video screen that monitors and controls the process is usually running LabVIEW.

LabVIEW Software Elements

Front Panel on Left,  Block Diagram on Right

Front Panel on Left, Block Diagram on Right

Programming LabVIEW

LabVIEW is completely graphical in it's programming and visualization of the data and controls. Years ago racks of instruments with mechanical switches, LED indicators, knobs, buttons and vu-meters were needed to control and monitor a plant operation or a science experiment. Today all those controls and indicators can be viewed controlled on a single computer monitor or touch screen interface. The controls and the software logic can be changed with just a simple click of a mouse or keyboard. If you want to add a switch, no holes need to be drilled or wires soldered in. Add the switch to the front panel screen of LabVIEW and wire the switch into the block diagram of the program.

LabVIEW is easier to learn than other programming languages. The program you create is called a VI (virtual instrument). Within this VI is two screens. The Front Panel is the GUI (Graphical User Interface) where the human interacts and monitors the program while it's running. The Front Panel contains the voltage readings, the measurements, etc. Elements that need to be measured and communicated to the person running the experiment.

The Block Diagram contains the programming working behind the Front Panel. Just like wires, switches and circuits would work behind an instrument panel. The Block Diagram is not a "hard-wired" device with solder and electrical cables. The Block Diagram is icons wired visually together to create a flow chart of the program.

Icon's represent the functions of what is being controlled and wires contain the data that connects the icons together. If you want an operation that has one switch controlling an indicator light. You pick the light and switch from the icon palette and place them on the front panel as seen in Fig. 3. On the Block Diagram (see Fig. 2) you wire the switch and light together to complete the circuit.

National Instruments offers training classes and certifications on programming using LabVIEW. There is also a wealth of information online where you can learn every aspect of LabVIEW programming.

What is the Arduino?

A graphical programming language like LabVIEW is meant to work with the outside world and environment through an interface device. National Instruments and many other vendors offer a very wide variety of data acquisition, controls and measurement devices. One of the easiest to work with and most economical is the Arduino microcontroller board.

The Arduino microcontroller board is available from your local electronics store or online for a very reasonable price. The Arduino has an open source software (free software), with an easy to use prototyping interface that connects to the USB port of your computer. It has several inputs and outputs that can be programmed to accept or produce analog and digital signals. By using the Arduino with LabVIEW, you get the easy graphical programming of LabVIEW and you get the simple easy to use inputs and outputs of the Arduino.

Arduino Circuit

Microcontroller Input/Output device

Microcontroller Input/Output device

Combine LabVIEW and the Arduino.

To get these two talking together you must first must obtain a copy of LabVIEW. National Instruments offers a low cost Student Version and a 30-day evaluation copy.

Once you have LabVIEW loaded you can download the VI Package Manager from NI. This VI Package Manager contains the LabVIEW Interface for the Arduino.

You will need a sketch loaded on the Arduino so it will act as a slave to the LabVIEW VI. Adding sketches to the Arduino is described at the arduino.cc site.

After you get the Arduino and LabVIEW working, you can try the built-in examples given in the LabVIEW drop down palette. Selecting the Analog Read Pin example will automatically program LabVIEW to read one analog pin you choose to be read for voltage or frequency.

Try a few examples and after a little trial and error, you will be running real world tests of your own. It's amazing how many gadgets you will be creating with LabVIEW and the Arduino microcontroller board.

Examples for Arduino

Examples for Arduino

Useful Links

This article is written by RichFatCat. All rights reserved. It's hosted on HubPages, an online community where everyday experts like you and me can publish high-quality articles like this one and earn a share of the ad revenue they generate.

Sign up for HubPages here.: