LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I use SubPanels to display and run multiple executables from the same GUI?

Solved!
Go to solution
The template and subPanel approach is looking very promising.  There is just one more thing I need to be able to do.  When I use Open VI Reference and pass it the path to my VIT, is there a way to pass in a parameter to that VIT.  In my VIT, I'm listening on a localhost::port for TCP traffic.  However, I would like each instance that gets opened to listen on a different port (that is passed in, ideally).  Is there a way to do this?
0 Kudos
Message 21 of 41
(1,681 Views)

Yes, you can pass data to controls of the VIT using VI Server.  You need to input the name of the control as a string and the value as variant type.  See attached for an example.


Dan

Message 22 of 41
(1,674 Views)
Thanks to all that helped with this.  I look very much like this guy Smiley Very Happy  right now.
0 Kudos
Message 23 of 41
(1,666 Views)
okay, looking ahead a bit.  The client that will eventually be calling my VITs is going to be an exe.  When that project builds the exe, it knows where the VIT is (of course), but when it's installed on the target, does the VIT (source) need to be sitting somewhere?  What's  a good way to handle that?
0 Kudos
Message 24 of 41
(1,664 Views)

If your VIT is a subVI of the main VI that is calling it then it should automatically be included in the build (exe).  If for some reason it is not included then you need to explicitly include the VIT when you create the build (this is done from the build-properties, add the VIT to the "always included list").

 

Dan

0 Kudos
Message 25 of 41
(1,651 Views)
I am familiar with the Build property "always included list".  And although that may help, I can see that my question is really part of a larger question of how to deploy all of this.  Specifically, in the last question, I was verifying that the path I specify (to the vit) in the open reference is where (in the target) I have to have my source file vit located.  However, the bigger issue is, what is the best way to deploy onto a target?  We really don't want source code (at least in the form of a VI) sitting on the target.  So, I'm thinking that leaves the option of an EXE or a DLL.  One of the clients is going to be an EXE, but the code providing the functionality behind the VIT we've been talking about, I'm wondering how to best deploy that.  Due to the re-entrant nature of all the subVIs, does that limit what I can do in deployment?
0 Kudos
Message 26 of 41
(1,629 Views)

I would suggest building all files into applications (exe files) if you do not want source code files available to the user.  When you build the executable remember that the absolute paths to files within the exe change as compared to running in the devopement environmwnt.  You have to be sure to have the correct path to the VIT if it is run from wihtin an exe.  I recommend using the "Application Driectory.vi (constant)" for putting together the correct path. 

Also see this: http://digital.ni.com/public.nsf/allkb/FD7DE8BC8FFC256C862565F4006BE363

 

The re-entrancy does not limit you in deployment options as far as I know. 

0 Kudos
Message 27 of 41
(1,615 Views)
I may have asked this before (in a different way), but since the VI and VIT are identical, is there any need to maintain both?  Just wondering what the protocol is.  If, for some reason, I need the VI, do I then have to rename it xxx.vi, or at any time can I use the VIT?
0 Kudos
Message 28 of 41
(1,600 Views)
There is no need to maintain both, just the VIT.  They are independent of each other.
0 Kudos
Message 29 of 41
(1,588 Views)
I plan on having a routine that reads the desired TCP ports (localhost) from a file and passes them to for loop.  I was hoping to be able to programmatically create as many subpanels as dictated by the for loop - one for each port found in the configuration file.  Is there a way to do this?
0 Kudos
Message 30 of 41
(1,552 Views)