LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Deploy All (on remote system) programmatically?

I am using LabVIEW 8.5 and LabVIEW Project to develop a data acquisition/control system whose target is ultimately a PXI box, with communications being handled by TCP/IP and Shared Variables.  I'm hoping to do all of the data acquisition and control on the PXI, to stream the data (via Shared Variables) to the PC, which, in turn, will stream them to disk.  My goal is to have all acquisition on the PXI, and all data storage (and, of course, experiment control) on the PC.  Thus far, I've managed (in Prototype 3) to 16-bit integer data (simulating A/D values) at 16K samples/sec (or 16 channels at 1KHz sampling rate) while simultaneously acquiring "digital data" (asynchronous information that includes a timestamp as part of its structure) at 2K events/sec.

I have the Project for this "project" arranged with a folder called "Host" that contains the main PC VIs, and one called "Remote" that contains the main VIs destined to run on the PXI remote system.  During the initial phase of development, I have the Remote folder under "My Computer" in Project, so everything runs on the PC for testing and debugging.  [This also makes it easy to put my work on my laptop and take it with me, without the need for a "portable PXI"].

What I'd like to do, during development, is to simply drag the Remote folder in Project from My Computer to my target PXI and run the entire package more-or-less automatically.  In particular, I'd like to avoid (for now, during development) the step of building executables.  I've written a VI (which I hope I remember to attach this time) that starts the main Remote VI (it is called from the Host VI on the PC) -- if it is passed a blank IP, it assumes that the Remote VI can be found on the Host, but if an IP is provided, it looks for the VI on that remote system.

The "correct" way to implement such a VI (and the way my code actually does work) is to provide the path (on the remote) where the VI is located.  However, I'm being "lazy", and only dragging the Remote folder back and forth between My Computer and My PXI Target in Project, which doesn't actually write any files on the PXI's disk.  However, it can be used to deploy the remote VIs into the memory of the PXI -- if this is (manually) done, then my Start VI code will actually start the remote VI, even though the path of the VI on the remote is empty!

So here's the question -- is there a way to write a VI (which I would execute in my host routine before calling Start VI) to effect a "Deploy All" or "Deploy" command on the target?  [Both of these options are available if one right-clicks the target in Project].  If this were possible, I'd be able to Have My Cake and Eat It, Too -- I could easily develop and test in a "PC-only" environment by dragging the Remote folder back to My Computer (in Project), then simply drag it to the Target when I wanted to try it using the PXI as a "real remote" system, without doing any extra "fussing" (such as building executables).  Given that almost everything else in LabVIEW is programmable, I figured that Project would also have such an interface, but haven't found cogent documentation nor "How To" notes.

Thanks for any suggestions.  I realize that I could always simply remember to do a "manual deploy" when testing using the PXI, but part of the "art" of LabVIEW programming is to insulate the user (even oneself!) from having to remember all of the details.  And now, before I forget, I better find the picture of Start VI ...

Bob Schor
0 Kudos
Message 1 of 4
(3,067 Views)
Hi Bob,

I understand your use-case, and I can appreciate the desire for such a feature.  At this time, the LabVIEW Real-Time module does not support deploying real-time components programmatically.  I recommend you reiterate your requirements to the Product Suggestion Center.  Click on the feedback link on this page.


Message Edited by Pie56694 on 07-24-2008 12:45 PM
0 Kudos
Message 2 of 4
(3,046 Views)

I just discovered a Method for the Project Application Object called "Deploy Items", which sounds exactly like what I'm trying to do!  You need to give it an array of ProjectItems, which you can get using the following chain:  Use the Application Property "Projects" to get an array of all current Projects (there should be just one).  For each Project, use the "Targets" Property to get a list of all Targets.  For each Target, look at the TypeString and ignore "My Computer" -- this gets you all the Remote Targets.  At the same step, you get a list of all "Children" on the Target.  For each Child, look at the TypeString and select "VI" and add it to an array of ProjectItem that was initialized to an empty array.  In my case, I had one Project, one Target, and one VI at the top level of this VI.  This routine correctly found this and built the array (with a single element).

 

This Array of Items is now presented to the Deploy Items method of the Project found previously.  Logic (and the LabVIEW Help) suggests this should be the equivalent of right-clicking on the VI on the Project Explorer and chosing Deploy -- when you do this, you see a dialog box pop up as stuff gets sent via Ethernet to the Remote, and the green light indicator by the Remote Target in Project Explorer lights up.  However, when you do the same thing using the Deploy Items method, nothing happens!

 

So close, yet so far.  I've sent a version of this VI to NI, asking "Why doesn't the Deploy Items method do the same as right-clicking and choosing Deploy in Project Explorer?"  Is something broken?  Am I leaving something out?

 

I've attached a picture (=1000 words) of the "guts" of this VI.  For simplicity (and for testing!), I've removed the Close Reference items (it helps fit the picture on the screen).  Now if I could only get this to work!

 

Bob Schor 

 

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

Hi Bob,

 

Would you please clarify, is the "Remote" PXI running LVRT?

 

 

Message Edited by Pie56694 on 11-10-2008 05:01 PM
0 Kudos
Message 4 of 4
(2,921 Views)