LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Auto deply RT vi?

Im using Labview 8.2 on a winxp computer.  I have the real time module and Im interfacing with a compact rio.

 

I have a VI on the cRIO RT system that I want to call from a vi on the Host computer.  I have it working, but I have to deploy the RT program from my project explorer every time I run the HOST program.  Otherwise my open VI reference box gives me Error 7: File could not be found.    I have attached a picture of my VI reference code. 

 

It was my understanding that the once a VI was deployed on an RT system it stayed there, or that it would be automatically deployed by the host program with the vi reference. 

 

Questions

1)      Is  c:\ni-rt\startup\MyProgram.vi  the correct path on the RIO or should I be pointing it somewhere else?  As mentioned before, this code works as long as I deply the RT code before I run it.

2)      If my code is correct, how do I save the VI on the real time system?

0 Kudos
Message 1 of 13
(7,834 Views)

Hi J Coates,

If you want the VI to both stay on the controller and be a startup VI, I would recommend you take a look at this KnowledgeBase article:

Configuring Startup VIs on LabVIEW Real-Time Targets

That should do the trick!

Best regards,

 
-Sam F, DAQ Marketing Manager
0 Kudos
Message 2 of 13
(7,778 Views)
I didnt want it to start when the RT system boots.  I wanted to be able to call the VI on the RT system from a host program on a laptop computer, without deploying it from the project explorer every time.  I managed to get it to work today though.  Im not sure exactly what I did to fix it, I think it was when i deleted the close vi reference block in my host program.  Thank you for the reply.
 
0 Kudos
Message 3 of 13
(7,769 Views)
I observe exactly the same problem. j coates, how did you solve it?
I have also to deploy the RT program from my project explorer every time I run the HOST program.
Is there a way to deploy a VI programmatically for example?
0 Kudos
Message 4 of 13
(7,727 Views)
Hi Nico74,

Yes, it is possible to programmatically deploy a VI onto the RT controller and the run it with VI server. If you have the internet toolkit, then you can use the FTP VIs in your host VI to transfer the files over to your RT controller before launching them.

If you do not have that, then you will need to manually copy the files over the the RT controller using an FTP client.

Best regards,
-Sam F, DAQ Marketing Manager
0 Kudos
Message 5 of 13
(7,649 Views)
When you deploy a VI from the LabVIEW Development environment, it is dowloaded into RAM only, not to the hard drive. If you want to run something remotely you could put it on the targets file system and then use VI Server to load it from disk and run it. In order to do that you have to make sure that the VI is saved for the correct target and that all of it's dependencies are there as well. Building a Source Distribution is the best way to do this. The link SamboNI provide for configuring a startup VI above has details on using the souce distribution. Once you have the distribution on the target, in your host application all you have to do is open a VI Server application reference to the target IP and then open a VI reference to the top level VI on disk. 
 
There is a utility available for FTP'ing a RT application down to the target, running it, and attaching remote panel. 
 
-JR
0 Kudos
Message 6 of 13
(7,538 Views)

Thanks JR,

That clears up a lot.  I have heard of the build source distribution before, but I cant find the option.  Do you have to have any special toolkits? I have Labview 8.2 and Labview RT. 

0 Kudos
Message 7 of 13
(7,511 Views)
You shouldn't need any additional toolkits. The help manual page on Source Distributions should cover everything. If not let me know.
 
-JR
0 Kudos
Message 8 of 13
(7,500 Views)
Thanks for the link.  My project explorer does not have a build specifications or dependencies entry under my computer or anywhere else for that matter.  I also read somewhere that there is an option under tools to build a source distribution and I cant find that either.
 
 
0 Kudos
Message 9 of 13
(7,488 Views)
Nico74
 
I was mistaken when I thought I had solved the problem.  I will post the solution when I manage to fix it.  It will probably be a couple weeks because the hardware is now at a different location and I will not have access to it for a while.  I think it will be worked out when i do the build source distribution stuff mentioned in this thread.  Please post your solution if you beat me to it.
 
Jason
0 Kudos
Message 10 of 13
(7,482 Views)