12-04-2012 05:16 PM
What I would like to do is simple. I have a PC Host VI and an RT VI which communicate with one another using a Network Stream. I want to be able to programmatically tell the RT VI to run within my Host VI, so that I can make sure that the network stream endpoints are both established within the timeout period.
I know that the prescribed method for this is to create a source distribution for the RT VI, deploy it onto the RT Target, and then access the RT VI using the VI Server. I have done this and it works fine. The only problem is that due to the nature of my project the RT VI is constantly being changed. For this setup that means that I have to rebuild the source distribution and redeploy every time I make a change to the RT VI. This is time-consuming and frustrating.
I would like to keep my RT VI on the Host and programmatically do the equivalent of pressing the "Run" button (including deployment). I feel like there ought to be a way to do this using the same Open Application Reference>>Open VI Reference>>Invoke Node as I did over the VI Server, but maybe not. Is this achievable?
Solved! Go to Solution.
12-05-2012 02:32 PM
Hi riplakish,
You should be able to do that using something similar to the example found here:
Community Example: Programmatically Deploy a VI
12-05-2012 05:41 PM
I may need some pointers there. I downloaded that VI and changed the filepaths to my RT VI, but when I ran it it didn't do anything, didn't even give me errors. So I tried to use it to run my current Host VI instead, since I thought it might have something to do with the VI having a remote target. That time I got a deployment window, but it still didn't run the target VI, and again no errors. Also tried it with a dummy VI that just toggles a front panel LED for 10 seconds, same results.
It seems pretty straightforward, but I must be doing something wrong. Any ideas?
12-05-2012 08:48 PM
Did you look at what that example does? It simply deploys the VI (puts it on the RT target); it doesn't start it running. You'll need to do that yourself in a separate VI server call once the VI is deployed.
12-06-2012 12:34 PM
Hi riplakish,
You can also set the VI to Run when opened by selecting the appropriate checkbox on the Execution menu of VI Properties (File » VI Properties » Execution).
12-10-2012 02:08 PM
Thanks, you've given me exactly what I needed.