LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Run startup.rtexe in linux from terminal

Solved!
Go to solution

Hi,

 

I'm running some programs on a cRIO 9030. This rio is running Linux and it has a DisplayPort to monitor the applications.

My question is: How do I manually start the LabVIEW application from the terminal window?

 

I have tried "./startup.rtexe" but I only get som errors and weird looking symbols.

 

 

0 Kudos
Message 1 of 13
(9,185 Views)

Well, I'm using a PXI, running PharLap, so this might not apply.  When the RT system was installed, it was set so that when it started, the Startup Application was startup.rtexe, so all you had to do was to reboot.  If you downloaded an App and set it to run as the new Startup App, the initialization file (ni-rt.ini) was changed to reflect this (I think Project took care of this).  I just discovered that if I manually (from Project) ran an RT app, it cleared some of the initialization file, setting the Startup App back to the default Startup.rtexe.

 

Hmm, I might not have actually answered your question (sorry about that).  If you are developing in a LabVIEW RT Project, you should be able to right-click on your VI (in the Target part of Project) and say "Run".  If you've built it as an Executable, you should be able to go to the Build Spec, right-click, and say "Run" (or "Run as Startup", which will make it the Startup App).

 

Bob Schor

0 Kudos
Message 2 of 13
(9,167 Views)

The first thing I would want to check is that the startup.rtexe actually runs as you expect when you power on or reset your target.  If that is the case and you just want to be able to start up the application again from your terminal when it stops without having to reboot your system for whatever reason, we're good.

 

If your startup.rtexe is working well on system startup, I would be interested to know what errors you are receiving when you try to run your executable through terminal commands..

Matt J | National Instruments | CLA
0 Kudos
Message 3 of 13
(9,149 Views)

The system works as expected when starting up, my VI loads and runs.

If I go to the terminal and type: ./startup.rtexe, i only get some confusing text (see attachment).

 

2015-04-13 09.19.57.jpg

 

 

0 Kudos
Message 4 of 13
(9,117 Views)

An ls -la would show a lot more information than an ls!

Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 13
(9,111 Views)

of course!

2015-04-13 09.50.53.jpg

 

 

0 Kudos
Message 6 of 13
(9,104 Views)
Solution
Accepted by topic author ThetaMa

I can't try it out right now, but I have a suspicion that the rtexe program is not really an executable file but rather a LabVIEW packed library or something of that sort and that it is really started up through /usr/local/natinst/labview/lvrt as a parameter. You probably can see something in /etc/init.d/nilvrt which is a link to /usr/local/natinst/etc/init.d/nilvrt which most likely contains scripts to bootstrap the system and boots up the rtexe program when enabled.

 

The contents in /etc/init.d/ is standard Linux bootstrap logic and allows to configure the startup of the system in any desired way.

Rolf Kalbermatter
My Blog
Message 7 of 13
(9,074 Views)

you are absolutely right. I did some copy-paste-delete-modify++ and came up with this file. I run it from the terminal, and now it works:

I have no idea how it works, but it works!  Smiley LOL

 

 

 

 

-------------- New file content --------------

#!/bin/sh

STARTUP_PARAM=NORMAL_START
UI_ENABLED=`/usr/local/natinst/bin/nirtcfg -g section=SYSTEMSETTINGS,token=ui.enabled | tr "[:upper:]" "[:lower:]"`
PID_LVRT_WRAPPER=/var/run/lvrt_wrapper.pid

/etc/init.d/lvrt-wrapper $STARTUP_PARAM $PID_LVRT_WRAPPER $UI_ENABLED

---------------------------------------------------

Message 8 of 13
(9,057 Views)

Very interesting, but I'm not sure if I'm ready to use it in my project Smiley SadSmiley Happy

0 Kudos
Message 9 of 13
(8,200 Views)

I know this is quite old, but I am trying this myself now.

 

It seemingly launches LV as I get the Welcome to LV Real-Time 19.0.1f1 when I run the custom bash file like you posted.  I am not getting my UI to show though, even though I am building with the Embedded UI Enabled.

 

Hmm.

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 10 of 13
(6,553 Views)