prettypwnie Posted June 2, 2016 Report Share Posted June 2, 2016 Hi everyone! I'd really appreciate your help with this. I'm trying to write a program that will find all the VIs that are open in the LabVIEW development environment (even if they are different application instances) and analyze their front panels and generate a report about them. I wrote a quick VI just to get started which will tell you the number of controls on the front panels of all open VIs. The problem is that it doesn't work when I build it into an executable. When I run the executable, instead of finding all the VIs open in the development environment, it only finds itself. I attached the code I wrote so far. Could anyone tell me what I how I could make this work from an executable? Thanks! --Hope VI Logger.zip Quote Link to comment
Rolf Kalbermatter Posted June 2, 2016 Report Share Posted June 2, 2016 You need to provide the Application Open function with an address and port number to connect to, otherwise it will simply connect to its own instance, which is why you only see the VIs in your executable. Quote Link to comment
prettypwnie Posted June 2, 2016 Author Report Share Posted June 2, 2016 How can I know the address and port number to connect to? Is there a standard one for the development environment or is does it have to be configured specifically? Because ideally, I'd like to be able to just run this on any computer and have it work without going in and configuring something on each computer. Quote Link to comment
Rolf Kalbermatter Posted June 2, 2016 Report Share Posted June 2, 2016 The address is whatever IP address the computer has on which the IDE runs, or localhost if it is on the same computer. The port number is configurable in the LabVIEW Options, and you need to enable the TCP/IP interface to VI Server in there too, in order for it to work (but if you ever have used VIPM to install some software package into LabVIEW, that is probably already enabled). Quote Link to comment
prettypwnie Posted June 2, 2016 Author Report Share Posted June 2, 2016 Thanks, it worked when I did that (and also changed out the "All VIs In Memory" property node for the "Exported VIs In Memory" one because I guess the former isn't supported for remote). I guess that does mean I'll have to make sure all the computers I run it on have the same port configured in their LabVIEW Options, but I guess that's not too bad. Thanks for your help! Quote Link to comment
Rolf Kalbermatter Posted June 2, 2016 Report Share Posted June 2, 2016 Or you make your tool configurable with an address and port number for each one. Also notice that if you ever should have more than one version of LabVIEW on a computer you better give them each their own port in the configuration. Quote Link to comment
smithd Posted June 2, 2016 Report Share Posted June 2, 2016 1 hour ago, prettypwnie said: Thanks, it worked when I did that (and also changed out the "All VIs In Memory" property node for the "Exported VIs In Memory" one because I guess the former isn't supported for remote). I guess that does mean I'll have to make sure all the computers I run it on have the same port configured in their LabVIEW Options, but I guess that's not too bad. Thanks for your help! you can also use a service name with a port of 0. That way the actual port won't have to be fixed just the name. http://zone.ni.com/reference/en-XX/help/371361M-01/glang/open_application_reference/ ("port number or service name" section) http://zone.ni.com/reference/en-XX/help/371361M-01/lvdialog/vi_server_config_options/ ("port", "service name" sections) Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.