04-10-2015 08:48 AM
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.
-Ø
Solved! Go to Solution.
04-10-2015 01:09 PM
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
04-10-2015 09:45 PM
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..
04-13-2015 02:47 AM
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).
04-13-2015 02:49 AM
An ls -la would show a lot more information than an ls!
04-13-2015 02:54 AM
of course!
04-13-2015 05:54 AM - edited 04-13-2015 05:56 AM
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.
04-13-2015 07:52 AM
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!
-------------- 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
---------------------------------------------------
12-08-2017 03:12 AM
Very interesting, but I'm not sure if I'm ready to use it in my project
07-08-2020 12:35 PM
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.