Hobbyist Toolkit

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Launch Application on Raspberry Pi

Hello, 

 

Is it possible to have LabVIEW launch an application on a raspberry pi device? I have a TCP VI that works but I don't want to have to launch both from the main pc. I want to have the one application on PC launch the raspberry pi VI and then start up TCP communication.

 

I tried using the suggested method from NI to launch a VI from a real time device but that didn't seem to work for me.

0 Kudos
Message 1 of 4
(1,545 Views)

Where on the Raspberry Pi? In the LabVIEW schrod or on the Raspberry Pi host OS?

Rolf Kalbermatter
My Blog
Message 2 of 4
(1,526 Views)

I have found the two locations below. When I try using NI's method of opening an application in a real time device I get an error 1124 from the Open VI Reference with the first one. The Open Application Reference has no issue connecting to the Raspberry Pi.

 

With the second one I get an error 7 at the same VI, which is just saying that LV can't find the file.

 

/home/lvuser/natinst/bin/startup.rtexe

 

/run/schroot/mount/lv/home/lvuser/natinst/bin/startup.rtexe

0 Kudos
Message 3 of 4
(1,498 Views)

Take a step back and try to explain what you are trying to really do!

 

LabVIEW runs in a schroot, which runs a seperate Debian based OS compiled specifically for the requirements of the LabVIEW runtime application and according libraries. It is NOT binary compatible to the Raspbian OS running on your target.

 

Your first path is inside the LabVIEW schroot, but the rtexe is NOT a normal binary executable that you can just start like any executable. There is a special script command that you need to start and whom you need to pass the rtexe as parameter. Which command script I don't really know out of my head but it is not trivial.

 

The second path is as seen from the Raspbian OS. Anything under /run/schroot/mount/lv is basically the root directory for the schroot environment. However Raspbian does know even less what to do with an rtexe. There is no LabVIEW runtime on it that could load this file so that is never ever going to possibly work! Even if the rtexe was a normal compiled binary executable, it would be using a different EABI architecture then what your Raspbian OS uses.

 

The LabVIEW schroot environment including its Debian system is compiled for ARM 32-bit with soft-FPU. Your Raspbian OS is either 32-bit or 64-bit ARM hard-FPU compiled. Binaries from one of these are as incompatible to the other, similar to how a Windows 32-bit DLL is incompatible to a Windows 64-bit process or vice-versa.

 

If you want to start a regular executable compiled for the LabVIEW schroot environment you can use System Exec in your LabVIEW executable to start it. If you want to run a regular executable on your Raspi host OS from the LabVIEW application on your Raspi you need to connect to the host OS on your Raspi through a SSH shell and do that in this way. You can NOT execute executables in the schroot from within your host OS directly nor the opposite. They are to be considered like two completely seperate computers in that regard and you have to employ remote control techniques such as SSH to do anything from one to the other.

 

Trying to run the rtexe on your own is going to be a bit of an exercise in checking out the startup scripts in your LabVIEW runtime schroot after you set the rtexe to autostart at boot time from your LabVIEW project. And you only can do it if you are in a shell session inside the schroot.

Rolf Kalbermatter
My Blog
Message 4 of 4
(1,476 Views)