07-01-2016 11:45 AM
if I have an RT application, with a VI that runs on the host PC and another that runs on the RT target, can one use a static VI reference in the host VI to run the start the RT target VI running on the RT target?
07-01-2016 12:37 PM
No. A static VI reference applies only within a specific application instance. It cannot reference a VI running on another computer (such as an RT target), nor a VI in a different LabVIEW application on the same target.
07-02-2016 02:06 PM
The new (since LabVIEW 2009 or so, possibly 8.x) model for LabVIEW RT is that the Remote runs its application as a Startup VI, so it's already running code, thus limiting your ability to (at "run time") choose what code it should run.
However, you could write a "loader" that runs in the RT system and "listens" for a message from the Host telling it what VI you want to run. How you transmit that message is up to you, but it needs to be "relative to the Remote". So you could (as we used to do in LabVIEW 7.0) provide a full Path to the VI that you want the Remote to run (using VI Server on the Remote), or you could pass just the File Name and have the Remote either "know" where its files are located or go look for them.
Alternatively, your RT Startup routine could contain the code for the 2 or 3 routines you are likely to run, and you just say "Run Routine 1" (i.e. send a number).
[These may sound like frivolous comments, and, if so, I apologize. When I realized a number of years ago that we couldn't choose at Run Time the routine to run on the Remote (as I'd done in LabVIEW 7.0), I had numerous discussions with NI Applications Engineers, who didn't understand why I wanted "choice" at Run Time, and suggested writing a Loader or a Routine That Does Everything. I eventually settled on another method ...]
Bob Schor