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: 

Running Multiple Real-Time Executables (.rtexe's)...

Solved!
Go to solution

For the PXI (or any NI embedded controller) can multiple real-time executables developed in LabVIEW (.rtexe files) run simultaneously?

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

I'm almost certain the answer is "No", as the whole point of an RTOS is for the code to be "as deterministic as possible", with jitter and timing reduced by removing elements (such as "interference by the OS") out of the control or understanding of the Developer.

 

You can, however, write a single RT Executable that loads in two routines that run "in parallel".  If you have a multi-core processor, you could reserve different processors for the two routines which should improve their independence from each other.

 

We encountered a slightly different variant of this issue when migrating code from LabVIEW 7 to a "LabVIEW Project-centric" development (introduced in LabVIEW 8.x).  We used to have several different LabVIEW RT programs that utilized different code on the PXI -- when we ran the Host Executable, it loaded and ran the appropriate RT code (saved in an .llb).  This doesn't work well with RT Executables.

 

What we developed was a system where we saved each RT Executable as a separately-named routine (i.e. not Startup.rtexe) and (initially) set them to Run as Startup.  When the Host code runs, it queries the PXI for the name of the Startup routine, and if it is not the "correct" one, we change it on the PXI and make the PXI reboot itself.

 

[Actually, we don't really do it this way, as 99% of the time, we always run the same RT Executable.  What we did do was to write a separate "Set RT Startup" routine that we almost never run, unless we "know" we need to run an older version or something like that.  It, in turn, tells us what the PXI is set to run and what RT Executables can be set as Startup, then makes the changes, reboots the PXI, and exits.  The "Rule" is that if you change the RT Executable, be sure to change it back when you are done.]

 

Bob Schor

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