Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Deploy via FTP and Run VIs on RIO

I am deploying VIs to RIO over FTP using code similar to (but saving in the c:\ni-rt\startup directory):

 

http://digital.ni.com/public.nsf/allkb/C242CF9F0512DF6186257434000DBCBA

 

After they are deployed over ftp, I am trying to run the VI using code similar to:

 

http://digital.ni.com/public.nsf/allkb/A7DBA869C000B5AE862570B2007C4170?OpenDocument

 

The above link claims that it is necessary to “make your project into a source distribution and FTP the files to your target.”  I can do this and it works, but I’d like to be able to automate the process (i.e. a user on the host selects a VI using a file dialog, it is uploaded to the target and run on the target).

 

I’m able to automatically ftp the VI and its dependencies to the host, but I get error 1124 (http://digital.ni.com/public.nsf/allkb/10F1D411ACBAD3D9862572FF0064C801) when the target tries to open the VI refernce.  When I do a Tools->Compare->Compare VIs, what is built by the source distribution shows NO DIFFERENCES with the original file.  However, windows reports that the two files are different sizes.  Is there some way that I can programmatically build a source distribution by supplying a list of files (i.e. not having to create a project)?  Or, is there some way that I can alter my VIs so that they have whatever attribute that is changed when building a source distribution so that I can simply ftp the files to my compactrio so that they are “loadable?”

0 Kudos
Message 1 of 4
(2,933 Views)

Hey,

You can programatically build a source distribution if you already have the build specification inside a project configured by using the Build VI (http://zone.ni.com/reference/en-XX/help/371361H-01/glang/build_vi/).  This would allow you to just have to set up the project once and then be able to programatically build the specification after that. Is there a reason you need to be able to do all this without using a project? If I better understand the reasoning for not using a project I may be able to better suggest an alternative method.

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 2 of 4
(2,926 Views)

There's not a good reason to do it outside of a project, except that my understanding is that the Build VI is only available in 2011, which I am unable to install because of IT policy.

 

Otherwise, you're correct, I would just create a source distribution with some generically named VI.  Then, when someone asks to load their VI on the RIO, I would internally overwrite the generic VI with the user-supplied one, build the source distribution with the build VI, and be on my way.

 

Is there a way to achieve the same functionality as the Build VI in LV2010?

 

Thanks for your help.

0 Kudos
Message 3 of 4
(2,912 Views)

You can get the same functionality of the Build VI in LabVIEW 2010 by using the BuildTargetBuildSpecification VI.  You can find more information about this VI here:http://zone.ni.com/reference/en-XX/help/371361G-01/lvhowto/build_exe_prog/  Please post back with any additional questions.

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 4 of 4
(2,907 Views)