How to setup LabVIEW on your Raspberry pi
LabVIEW (Laboratory Virtual Instrument Engineering Workbench) is a graphical programming syntax that makes it simple to visualise, create, and code engineering systems. This visualisation makes it simple to integrate measurement hardware, represent complex logic on the diagram, develop data analysis algorithms, and design custom engineering user interfaces. With the Raspberry Pi, you can deploy your LabVIEW VIs (Virtual Instruments) to the board and run with a computer to visualize your data or run headlessly.
LabVIEW (software interface) can communicate with Raspberry Pi 4 (hardware interface) using NI LabVIEW LINX Toolkit. Here we use LabVIEW 2020 community edition (free version) that supports the LINX library. We will use the Raspberry Pi OS 2019 operating system for better compatibility and to avoid bugs.
Figure 1: LabVIEW interfacing with Raspberry Pi SBC.
Below are the hardware and software requirements
|Hardware Requirements||Software Requirements|
|1. Raspberry Pi 4 Model B||1. LabVIEW 2020 community edition|
|2. USB A to micro B||2. LabVIEW MakerHub LINX|
|3. Ethernet cable/ Wifi system||3. Raspian OS 2019|
Here is the summary of steps that need to be followed to connect LabVIEW to Raspberry Pi
- Sign up on the NI (National Instruments) website and install LabVIEW 2020 community edition on your system
- Download LabVIEW Add-Ons from VI Package Manager
- Setup your Raspberry Pi 4 Model B hardware
- Connect LabVIEW on the Raspberry Pi 4
- Run an Example
Sign up on the NI website and download the free version of the LabVIEW community edition (not SP1).
Once you download the file (iso format), open the folder in window explorer and Install LabVIEW community edition (this generally takes 5-10 mins depending on your system hardware and performance). Once installed, reboot and verify the software by opening NI LabVIEW edition via startup menu.
Download and install VI Package Manager (VIPM) from JKI. VIPM is the recommended method for downloading and managing your LabVIEW Add-ons and giving you instant access to the Add-ons on the LabVIEW Tools Network. Open the VIPM browser, search with the "LINX" keyword, and install NI LabVIEW LINX Toolkit from the list.
Note: Follow this thread if you observe errors and find it difficult to install the add-on toolkit.
Next, Download and install Raspian OS. Use Raspberry Pi Imager to quickly install Raspberry Pi OS and other operating systems to a microSD card.
Now, set up your Raspberry Pi 4 with headless setup via SSH and enable wifi. Follow the instruction provided on the Raspberry Pi website, and you will successfully configure your Raspberry Pi Device. Here we are using the Putty terminal on Windows10 to communicate with the device.
Ping the device to make sure that it is connected to the network.
Now open LabVIEW and go to Tools -> MakerHub -> LINX -> LINX Target Configuration. This will open up a window like the one pictured below. Enter the IP address you found in the Hostname or IP box. For the Raspberry Pi 4, the default username is "pi," and the default password is "raspberry." Enter that information and click connect.
The indicator will show the installation information. Once it's done connecting, Go to the install software tab and click install. Once the install is finished, a blink example will open.
With the example open, attach an LED to digital pin 7 and ground. Run the VI and notice that when you click the LED on the front panel, the LED connected to the Raspberry Pi 4 will blink as well!
Keep up to date on the latest information and exclusive offers!
Thanks for subscribing
Well done! You are now part of an elite group who receive the latest info on products, technologies and applications straight to your inbox.