I'm developing a Real Time project designed to run on a PC/PXI system under LabVIEW 8.5, with communication via Shared Variables. During the development process, the PC code resides in a Project folder called "Host", while the PXI code resides in a folder called "Remote". Thus far, I haven't written PXI-specific code, and have everything actually residing on the PC for testing. The Host routine has a "Start VI" VI which is given the name of the Remote routine to start -- this works just fine.
I now want to test the same code, but with the Remote running on the PXI. Using Project, I simply drag the Remote folder to the visible "Target" system. As I understand it, this puts my code into PXI memory where it can run. My question is, is there a way to modify my "Start VI" VI to programmatically start this memory-resident piece of software?
Because I'm still very much in "development mode", I haven't actually built a "remote executable" and downloaded it into the PXI's C:\ni-rt\startup folder. Indeed, my present target is a brand new PXI controller, with absolutely nothing in this folder! I've discovered that if I manually deploy my remote software to the PXI and tell the PXI to run the VI at C:\ni-rt\startup\MyVI.vi, it actually runs fine (even though MyVI.vi doesn't actually "live" on the PXI's C: drive, but only in memory).
I like the ability to simply drag a folder in Project from the remote target to My Computer as a means of configuring a "Windows Stand-Alone Test bench" or a "PC/PXI Test bench" system. Is there a way, short of remembering to either manually hit the "Deploy All" switch in Project, or actually building the remote application and downloading it to my (so-far-pristine) PXI, to have my Host VI perform the equivalent of Project's Deploy All on my target before it invokes the modified Start VI routine to start the code in PXI memory?
I'm attaching a picture of the Start VI routine. You pass it the name of the VI you want to run, and an IP, if it is on a remote (I'd love to just pass a boolean, "Run_on_Remote", and have it "figure out" the IP, but haven't yet figured out "how to"). If no IP is passed, it assumes the code is running locally. It checks the name to see if an extension is present, and if not, appends ".vi". It then opens a VI reference to the named VI, opens its front panel, and runs it (if it is currently idle). On the other hand, if an IP is present, it first opens an application reference to the target, prepends C:\ni-rt\startup to the VI's name, and again runs the VI, skipping the "Front Panel Open" step. This actually works if the named VI is deployed in PXI memory, even if the disk on the PXI is empty! So if I can figure out "deployment", I'll be able to have my cake (simple switch between PC-only development mode and PC/PXI test mode by dragging a folder in Project) and eat it, too.
Bob Schor