Embedded Controlling and Monitoring on Arduino with LabVIEW

Hasan Yiğit
5 min readSep 10, 2021

Systems are getting more complex, and more and more data needs to be processed in real-time to monitor and control these systems. At this point, graphical programming languages make it easy to take measurements from any embedded sensor, create complex programming algorithms, develop analysis algorithms, and design systems. This article briefly introduces real-time monitoring and control applications on Arduino, one of the popular systems, with LabVIEW, which offers a graphical programming approach.

Ardunio is the most common embedded platform using lots of projects. It has reached this popularity thanks to its becoming very simple and cheap. It has not only many built-in features but also supports external devices interfacing. Because of these features, it requires writing different lines of code sometimes, which could be cumbersome. At this point, LabView submits a graphical language for programming and doesn’t require writing lines of code, so using graphical diagrams to perform different tasks are easy to interface with LabView. Arduino combines both the simplicity of the hardware board and the graphical language of LabVIEW to make it easier for you to change different tasks using only a graphical interface without having to write code. Arduino connected with LabVIEW also has a very nice feature: the ability to read sensors data and hand on these values to the graphical interface of LabVIEW.

We will make a simple application together, and I will explain all the steps one by one.
Firstly, LabView and Ardunio IDE have must be installed on the computer. You can easily find these programs on the internet. After, we download and install the NI-VISA library. This library provides support for input-output, USB, Serial Communication and Ethernet, etc. İf it is not installed, a connected port isn’t selected.

NI also provides an online installation tool, and then we need one last package. That is LINX. LINX provides board support. It includes a graphical user interface, sensors Vıs, hardware-agnostic APIs for accessing peripherals like digital I/O, analog I/O, PWM, I2C, SPI, and UART.

We already have installed serial communication support in the VISA library, but that is different from LINX APIs. If we want to communicate on two different devices, we use communication protocols like SPI. the VISA package supports communicating requirements for LabView installed on the computer. The other side LINX package supports the same for Ardunio.

We can download the LINX package from NI’s website. Also, we can use the VI package manager to download LINX. VI package manager comes with LabView. If you do have not, you can download the same website.

If downloading is not starting, probably, you have an internet connection problem or a problem that VIPM cannot communicate to LabView. VIPM connection problem solutions are found easily on the forms. On the other hand, internet problems generally occur when using company or group internet networks.

Now, we are ready for the first application after the program is successfully installed.

We are ready to start after you open the LabView, create a new blank project, and add a new vi to the project.

If you completed these steps successfully, You have three windows. Sometimes, the front and block diagram panel shown in a purple and blue rectangle is not opened initially. If this occurs, You can open the project window shown in the green rectangle and click the vi file to open the front panel. You can click the show the block diagram below the window tab to reach it.

Shortly, graphical language is drawn in the block diagram. You can edit the visual interface from the front panel. Therefore, the front panel is used to control and simulate to program.

We start drawing the block diagram like in the image. When you add an item in the block diagram, Labview automatically adds an interfacing image that belongs to adding item; besides, the opposite situation is available.

In this program, Arduino communicates the LabView using serial communication. We can select the digital output pin thanks to DO Channel. Also, output Value supports us changing to pin level.

You can see the front panel above. You can design the front panel freely what you want. I didn’t make any design in the front panel. I added only control panels. Now we have finished drawing the program. After these steps, we start loading steps to the Ardunio. I recommend that you write a simple program using Arduino ide and download it to the board, so you test the Arduino for work successfully. Arduino ide is used by LabView when the program is downloading.

It would help if you connected the Arduino board to your computer, and your operating system must be assigned to Com Port to your Arduino. You find out which port use in the device manager. Then, You must open the Linx firmware wizard window by following the path to the tools-> maker hub-> Linx-> Linx firmware wizard and select the board.

You select the com port on the new page that opens and downloads the program into the Arduino.

After downloading the program into the Arduino, you open the front panel and select the DO Channel and Serial Port. Finally, we can run the program.

Hasan YİĞİT

--

--

Hasan Yiğit
0 Followers

Elektrik & Elektronik Mühendisi