LINX FAQ

This page contains frequently asked questions about LINX.


Is LINX Free?

Yes. You can download LINX for free on the LabVIEW Tools Network.



Is LINX Open Source?

Yes, you can view the LINX source in the LabVIEW MakerHub GitHub Repository. Additional resources used for LINX support on BeagleBone Black and Raspberry Pi are located in the meta-labview and lvrt-deb-pkg repositories.



How does LINX work?

Refer to the document for for more information on the LINX Architecture.



What's the difference between LINX support for BBB/RPi2 and LabVIEW Real-Time support for CompactRIO and MyRIO?

These two platforms are very similar but there are some differences:
1. LabVIEW Real-Time targets run a custom Linux distribution (NI Linux Real-Time), while LINX targets run their recommended Linux distros (debian).
2. LabVIEW Real-Time targets are turned for real-time performance and will generally be much more deterministic than LINX targets.
3. LabVIEW Real-Time targets have better security since they utilize user and file permissions, SELinux, and other security features.
4. LabVIEW Real-Time targets have undergone more robust testing that make them more appropriate in demanding environments.
5. Some features of the LabVIEW Real-Time module are not supported on LINX targets, this includes, but is not limited to LabVIEW Web Services, LabVIEW FPGA, Shared Variables, software installation through Measurement and Automation Explorer, language localization, and local front panel display.



Can I branch / split the LINX Ref wire?

When you call the LINX Initialize VI it establishes a connection to the LINX device and the Init VI passes out the LINX Ref wire. You can think of this wire as the connection to the device and it contains all of the info needed to 'talk to' the device. You really shouldn't branch / split this wire because you only have one connection to the device. If you split the wire you don't get a new connection, you juts get the same connection. If you split the LINX Ref wire, the VIs downstream might both try to talk to the device at the same time. In this case a command might be sent to the LINX device before the previous one is complete, and the responses to the commands might get swapped resulting in incorrect data being returned. Since only one command can be sent at a time splitting the LINX Ref wire doesn't result in any performance increase and adds risk for incorrect data. When you call the close VI the connection is closed. This includes any copies of the connection in branched / split wires. Once the connection is closed you can no longer talk to the device unless you establish a new connection with the LINX Init vi.



Which VIs are included in the LINX toolkit?

You can find all of the LINX API VIs here. For a complete list of VIs in the LINX toolkit check out the the LabVIEW Hacker GitHub Repository.



Can I add custom commands to LINX?

Yes. You can modify the LINX firmware with custom commands and then add LabVIEW VIs to call those commands. Adding custom commands requires more advanced LabVIEW and C development skills, but LINX was designed with customization in mind, so it is relatively easy once you learn the basics. See How To Add A Custom Command for more information on adding custom commands.



Can I use Arduino Libraries with LINX?

Yes. In order to use an Arduino library with LINX you'll have to add a custom commands (see custom command section of the FAQ) that call the Arduino library functions.



How can I add a new LINX Remote I/O device?

Check out this document.



How fast is LINX?

The speed at which LINX VIs execute depends on many factors. When using 'Remote I/O' (Serial / Wifi / Ethernet) the communication method is typically the limiting factor since every LINX VI sends a packet to the device and waits for a response packet from the device before returning. The interface (serial, ethernet, etc) affects how long it takes a packet to get to and from the device and the hardware affects how fast it can process the LINX packets. When you use LINX VIs in a loop in LabVIEW each one sends a packet and waits for a response, so the more VIs in the loop, the slower the overall loop rate will be. Below are some approximate loop rates for Arduino / chipKIT devices (actual results will vary)

Serial Interface: ~4mS per LINX VI / Packet
Wifi Interface: ~3mS per LINX VI / Packet
Ethernet Interface: ~0.6 mS per LINX VI / Packet

When using 'Local I/O' on a BeagleBone Black or Raspberry Pi the execution rate is limited by the device CPU speed and hardware peripheral being used (if any). Local I/O is generally orders of magnitude faster than Remote I/O.



Which versions of LabVIEW is LINX compatible with?

LINX Remote I/O (Arduino, chipKit, etc) is supported in LabVIEW 2011 or newer and the 32-bit version of LabVIEW is highly recommended.

LINX Local I/O (ie deploying to BeagleBone Black and Raspberry Pi 2/3) is only supported in LabVIEW 2014 SP1 (32-bit).



VIPM does not show the latest version of LINX. How can I get the latest version?

First, make sure to refresh the packages from the repository in VIPM by clicking Tools»Check all package repositories for updates.

If you are still unable to see the latest version of LINX, you can download the installer directly from the FTP server. Browse to the LINX LabVIEW Tools Network Page, click Download, sign in if prompted, then click Download from FTP.



How does the LINX Target Configuration dialog work?

The Target Configuration dialog connects to a BeagleBone Black or Raspberry Pi 2/3 via SSH and then runs a series of commands just as you might do through a SSH terminal. You can see the installation steps that the dialog runs here.



When adding a new target in my LabVIEW project, my BBB/RPi2 isn't detected. What's wrong?

The LabVIEW project uses mDNS to detect available BBB/RPi2 targets on the network. Some network routers don't correctly forward mDNS traffic which can make targets undetectable in the LabVIEW traffic. This happens most commonly when the development PC is connected to the network via ethernet and the target is connected to the network via Wifi, or vice versa. When this happens you will need to add the target to your project by specifying the IP address.



Can I call a LabVIEW startup executable from the Linux command line?

No, LabVIEW startup executables cannot be called from the Linux command line. Startup exe's are not normal Linux executables so they can't be invoked from the command line. The only way to control startup exe's is through the LabVIEW project on the development PC.



Do all the features of Timed Loops work on the BBB/RPi2?

Nearly all of the features of the Timed Loop work on the BBB/RPi2:
* The MHz and KHz timing sources are both available.
* Processor Assignment can be used assign a timed loop to a specific processor core (4 cores available on the RPi, 1 core on the BBB). Note that the Linux kernel will automatically balance the load on all available processor cores, so normally the processor assignment should be left at its default.
* The Priority of the Timed Loop can be used to set the relative priority of multiple Timed Loops.
* The CPU Pool VIs will not work on the BBB/RPi2 due to limitations in the kernel on these targets.



How do I start/stop the LabVIEW run-time daemon on a BBB/RPi2?

To restart the LabVIEW run-time you can right-click the target in the LabVIEW project and got to Utilities»Reboot; despite the name this will only restart the LabVIEW run-time and will not reboot the target. If you SSH into the target you can also run sudo systemctl stop labview.service to stop the LabVIEW run-time and sudo systemctl start labview.service to start the LabVIEW run-time.



Can I display a VI's front panel on a monitor/display connected to a BBB/RPi2?

No, not directly, but you can use LabVIEW Web Services (see the tutorial) to create a web interface to your LabVIEW application and connect to it through a web browser running on the BBB/RPi.



Can I create a web interface to my LabVIEW application running on a BBB/RPi?

Yes, you can use LabVIEW Web Services to do this. See the tutorial here.



What is a chroot? Why does LabVIEW run within a chroot instead of as a normal Linux application on the BBB/RPi2?

A chroot is a Linux construct that allows a process (like the LabVIEW run-time engine) to run as if an arbitrary directory is the root directory. The way that we use a chroot with the LabVIEW run-time engine is to act as if LV was running within a very lightweight virtual machine. There are 2 reasons that LabVIEW runs within a chroot on the BBB/RPi2:
1. Using a chroot we can make one installer which will run on several different Linux distributions and devices since the chroot contains its own set of system libraries and other operating system files.
2. The LabVIEW run-time engine is compiled with options that make it incompatible with the system libraries that are included in the default operating system images used with the BBB and RPi2/3, so the chroot allows us to include a set of system libraries for LabVIEW to use that are compiled with options that are compatible.



Can I get a command shell inside the LabVIEW chroot on BBB/RPi2?

Yes, just SSH into the target BBB or RPi2 and run sudo schroot -c lv -r and this will create a new shell within the chroot. From here you can examine the file system and run other commands in the same environment that the LabVIEW run-time engine is running in. When you are finished, you can run exit to return to the normal shell.



Can I install additional software to the LabVIEW chroot on the BBB/RPi2?

Yes, we provide some software that is compatible with the chroot.
1. Make sure your target has an internet connection.
2. Access a shell within the chroot (see above question).
3. Run opkg update to get the list of available software.
4. You can list the available software by running opkg list.
5. When you find something you'd like to install, run opkg install <package_name>.
There are a number of packages available like packagegroup-core-build-essential which installs the gcc compiler and tools like GNU make, debugging tools like gdb, libraries like opencv, and programming languages like python. If there are other sofware packages that you'd like to use, let us know by posting in the forum!



Can I run a command outside of the chroot from LabVIEW on the BBB/RPi2?

Yes, you can using the technique outlined here.



The LabVIEW project shows a yellow exclamation by the LINX target and says it's an unsupported item. How do I fix this?

This happens when the LINX provider has not been installed correctly which is most often caused by not restarting LabVIEW after installing LINX.

Try reinstalling LINX using VIPM and make sure to restart LabVIEW after the install completes.

If the problem persists:
-Close LabVIEW
-Extract the contents of C:\Program Files (x86)\National Instruments\LabVIEW 2014\vi.lib\MakerHub\LINX\Resources\LinxProvider2014.zip into C:\Program Files (x86)\National Instruments\LabVIEW 2014. The zip's resources and vi.lib folder should merge with those in your LabVIEW directory. Overwrite any existing files if prompted.
-Open LabVIEW and try connecting to the target again.



Can I use LINX in commercial applications?

There are three licenses you must consider when determining if you can use LINX for commercial use. First is the version of LabVIEW. Anything developed using LabVIEW Home or Student is licensed for non-commercial use only. LabVIEW Base/Full/Pro are all licensed for commercial use. Second the LINX VIs and LINX firmware are free to use for commercial purposes under this license. Finally the LabVIEW runtime for BeagleBone Black and Raspberry Pi provided in LINX 3.0 and newer is Licensed for non-commercial use only.

In order to use LINX for commercial purposes you must have a commercial license for LabVIEW and must not use the LabVIEW Runtime for BBB / RPI.