LabVIEW Arduino Projects for Industrial Applications

Industrial Arduino Automation with LabVIEW Tutorial
April 6, 2020 by
LabVIEW Arduino Projects for Industrial Applications
Boot & Work Corp. S.L., DAVID SEGOVIA LOPEZ

        Introduction

        In this post, you are going to learn how to work with an Arduino board for industrial automation and the computer application LabVIEW.

        Arduino board for industrial automation and the computer application LabVIEW

        Previous readings

        We recommend you to read the following post from our blog before reading this one.

        Requirements

        In order to work with the PC application LabVIEW, you will need the following things:

        Hardware & Software

        • The connection between an Arduino board and LabVIEW:

        First of all, you are going to look for the sketch called LIFA_Base following the steps in the first screenshot: Este equipo -- Disco local(C:) (or the letter that your local disc has) -- Archivos de programa (x86) -- National Instruments -- LabVIEW 2019 (or the version that you downloaded) -- vi.lib -- LabVIEW Interface for Arduino -- Firmware -- LIFA_Base. Once you found it click on it and an Arduino IDE window is going to pop up on your computer.

        Connection between an Arduino board and LabVIEW

        After this, go to this window and click Tools (Herramientas) -- Board (Placa) + Processor (Procesador) + Port (Puerto) and select your Arduino board and processor type and the serial port where it is located.

        How to find port tool - LabVIEW Arduino Projects for Industrial Applications


        Build the following electrical circuit:

        • The Leds can have any color. (The long leg of the leds is the positive part, which has to be connected to its resistor and the other one has to be connected to the ground pin, GND).

        • The connections can be done in any of the PWM or DIGITAL pins, except the PWM 0, 1 (RX and TX communication pins), or the 13 (associated with the led of the Arduino board).

        • The resistors should be 220 Ohm.

        Led electrical circuit

        The next step is going to be finding some LabVIEW examples to work with them. Go to Este equipo -- Disco local(C:) (or the letter that your local disc has) -- Archivos de programa (x86) -- National Instruments -- LabVIEW 2019 (or the version that you downloaded) -- Examples -- MakerHub -- LINX. Click on LINX - Blink (Simple). It is a digital output test.

        LabVIEW examples - LabVIEW Arduino Projects for Industrial Applications

        A window will pop up. Go to the window -- Tile Left and Right and you will have the sketch of this project on your screen.

        To connect your board goes to Tools -- MakerHub -- LINX -- LINX Firmware Wizard. Again, a window will pop up on your computer screen and you will have to select your Arduino board type and click Next. Select your Port also in the next window and click Next again. Keep clicking Next until the program is uploaded to your Arduino board and then click Finish.

        To connect your board - LabVIEW Arduino Projects for Industrial Applications

        LabVIEW MakerHub

        Click on the green button and you will see that the board leds RX and TX are going to light up. This means that the connection between LabVIEW and your board and between your board and LabVIEW MakerHub are working.

        If one or both of the leds do not light up, it means that the connection is not working, so disconnect the board from your computer and upload the LIFA_base and the LINX - Blink (Simple) again until it works.

        Manual Blink Example


        Once it is connected, click again on the green button and the led of the Digital Output Channel is going to light up. Change the number of the channel to try all of your leds. You can also try it with the Arduino board led writing the number 13.

        Digital Output Channel
        The next test is going to be an Analog input test. The electrical circuit will be the following one:

        • Put a potentiometer in your protoboard (better if it is from 0 to 5 analog Voltage).

        • The connections will be done as in the picture. (Middle leg to the analog input A0, positive leg to the 5V power pin and negative leg to the ground, GND.


        connections - LabVIEW Arduino Projects for Industrial Applications

        The next step is going to be the same as before. Go to Este equipo -- Disco local(C:) (or the letter that your local disc has) -- Archivos de programa (x86) -- National Instruments -- LabVIEW 2019 (or the version that you downloaded) -- Examples -- MakerHub -- Labview Arduino linx LINX. Click on LINX - Analog Read 1 Channel.

        Upload all the sketches as done before and turn your potentiometer from left to right. You are going to see that the Analog Value of the voltage changes.

        Analog Read Example (Serial Interface)
        If you want, you can try any sketch of the Examples folder.

        Following readings

        We recommend you read the following post from our blog, in order to start using the interface LabVIEW with our PLCs.

        ​Search in our Blog

        LabVIEW Arduino Projects for Industrial Applications
        Boot & Work Corp. S.L., DAVID SEGOVIA LOPEZ April 6, 2020

        Looking for your ideal Programmable Logic Controller?

        Take a look at this product comparison with other industrial controllers Arduino-based. 

        We are comparing inputs, outputs, communications and other features with the ones of the relevant brands.


        Industrial PLC comparison >>>