NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set an application built using the C API 3.0 for myRIO to run at startup on a myRIO-1900

Solved!
Go to solution

Is it even possible to set such an application to run on startup? If it is how would you go about doing it?

What I've tried:

I compiled a program using the NI eclipse distribution and API and can run the program from Eclipse or by running it while SSH into the myRIO. The only documentation I could find relating to it is: http://digital.ni.com/public.nsf/websearch/B37FA04A1CB84B6C862571A30060EF03?opendocument&Submitted&&...

The link is a little outdated so I am not sure how relevant it is today. I changed the lines in lvrt.conf to:

RTTarget.ApplicationPath=/c/ni-rt/startup/startup.rtexe
RTTarget.LaunchAppAtBoot=True

I also tried launching the program like a script using rc.local which doesn't seem to be used the same way as it is in Ubuntu or I just don't know how to use it correctly. My compiled pogram does not come with the extension .rtexe although I can add it later which is probably not the same thing. I used LabVIEW to set a random VI to run as startup in order to see what it changes when setting a program to run at startup and it tells me that my previous rt program was corrupted and did not start.

Thanks

0 Kudos
Message 1 of 3
(2,727 Views)
Solution
Accepted by topic author neap

Hi neap,

You don't want to use lvrt.conf to do this, as the startup-app that's described in that config file is basically LV-specific (it's similar to a collection of the .vi and other project files with some additional information)

You're also correct that the rc.local file is not considered during boot.

What you'd want to use is a startup script (or "initscript"), which is described here: https://decibel.ni.com/content/docs/DOC-38960

0 Kudos
Message 2 of 3
(2,511 Views)

Thanks. That was exactly what I was looking for.

0 Kudos
Message 3 of 3
(2,511 Views)