From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create Program Icons on Linux Desktop

Hi,

 

On a Linux based cDAQ, how do I make desktop icons so the user can stop the main program (that boots at startup), then run a setup utility, then launch the main program again?  I can see the .rtexe files in the target directory but can not run them directly as they are not associated to a known file type.

 

Regards

 

Ashley

 

0 Kudos
Message 1 of 8
(2,950 Views)

Ashley,

     As I understand it, the RTEXE format is a (probably proprietary) format NI uses for the RT Startup routines that are the preferred version for running on an NI Real Time Platform.  As  you probably know, when an NI Real-Time Platform boots, it runs a startup routine with the .rtexe extension, often called "Startup.rtexe".  When you deploy your (single) executable to the Remote, you are encouraged to likewise name it "Startup.rtexe".

 

     When LabVIEW transitioned to the "new" RT Engine (somewhere around LabVIEW 8, I'm guessing), the notion of an "always on, always running" engine emerged, as did this file format.  It took me a while to "mentally adjust" -- we had been deploying several executables to the RT Target and letting the user "choose", at run-time, which to use.  This is no longer the case.

 

     What we do now is the following -- all of our RT Executables have unique names (none are called "Startup.rtext").  When they are deployed, they are usually deployed "as the startup Executable", which means that the ni-rt.ini file is rewritten and the RT Target is rebooted.  I've written a utility (Reset RT Target) that lets the User specify the Startup Routine on the Remote Host.  The program gets the ni-rt.ini file from the Target and sets the RT Target Application Path as specified by the User.  Once ni-rt.ini has been rewritten, we reboot the Target.

 

     Normally, we never run this utility.  We normally switch the RT routine because we've "fixed a bug" (in which case we just replace the .rtexe with another of the same name) or we've migrated to a newer version of the code with more capabilities (and a new name).  The only time we've needed it was to "get one last measurement using the old system".

 

Bob Schor

 

P.S. -- I just realized I hadn't directly answered your question.  We don't make icons for the RTEXE because we don't "run" them in the traditional sense -- they are the Startup routine that automatically runs when the RT Target boots, hence need no icon -- they "are the effective OS".

Message 2 of 8
(2,900 Views)

Hi Bob,

Thanks for the detailed reply.

I do hope that it is not the case that we can not switch which labview program is running at the users request without doing anything special!  We have migrated from running on a PC to a cDAQ so were hoping to keep things the same/similar for the user.

The most likely option if we can not run them seperately will be to integrate them all into one program.

Regards

Ashley

 

0 Kudos
Message 3 of 8
(2,879 Views)

A cDAQ is not a computer, it is a dedicated embedded device with RT capabilities. And it doesn't really have a desktop as it normally doesn't even have a display. Even if you use one of the cDAQ 913x devices which does support a display connection, for the NI Linux RT variant this is not a full featured display as you know it from your desktop computer.

If you want to get a more familiar desktop experience you would be better served by using the cDAQ 913x with WES 7 OS.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 8
(2,867 Views)

Thanks for the advice.  I am thinking I will have to combine our two programs into one that just runs all the time.  Our cDAQ runs a big touch screen display, keyboard and mouse that does provide a desktop like experience for the user.  But looks like as you said there is limited functionality included in the NI Linux...

0 Kudos
Message 5 of 8
(2,864 Views)

One of the problems with a full desktop environment under Linux is that you need to install one of the high end desktop managers which usually is X-Windows based. That is a very powerfull and versatile display manager system, but equally power hungry in terms of CPU and memory resources and adversing the RT capabilities of a system substantially.

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 8
(2,859 Views)

I didn't look into it too much but it appears to be running some sort of dulled down version of X window.  Seems familiar to me based on my memory of last time I used an older version of Linux with a GUI.

 

I am thinking that making my main VI a selection screen where the user can choose configure or run and perhaps in the future a test and shut down button too.

 

Do you know if it is possible in Labview to have a VI with a button that switches to a different VI, then fall back to the original VI when the user selects exit? 

0 Kudos
Message 7 of 8
(2,855 Views)

When I was contemplating how to "have my run-time choice and change it, too", one of the NI engineers suggested that my start-up routine be essentially a "plug-in manager" that would allow the user to choose, at run time, which of (say) 3-6 fully-functional LabVIEW routines to run.  This seemed extremely awkward to set up (to me), so I opted for "going along" with the "Run the Startup Routine" (and the possiblity of having the Host change the Startup Routine and make the Remote reboot).  An unexpected Side Effect was that by putting "all of my eggs" in the Single Routine RT Basket, my RT code runs much faster than before, is much simpler to develop and debug, and has far more capabilities (we've not only more than doubled the acquisition rate, but we now stream data directly from the RT system to the PC to the PC's disk without losing a single byte, in Real Time) than we had before, largely because we're using the RT hardware to its full capability.  Having to wait 15 seconds for the Target to reboot in order to run a different RT routine is "in the noise" for us -- your requirements might be very different.

 

Bob Schor

0 Kudos
Message 8 of 8
(2,841 Views)